diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e44fab5..76a1aa94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,17 @@ jobs: - name: UI unit tests run: node --test --experimental-strip-types ui/tests/*.test.mjs + - name: Committed UI bundle matches source + working-directory: ui + run: | + pnpm exec vite build + stale=$(git status --porcelain -- dist) + if [ -n "$stale" ]; then + echo "$stale" + echo "::error::ui/dist is stale; run pnpm build in ui/ and commit the result." + exit 1 + fi + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: diff --git a/ui/dist/assets/index-CTdE8kO2.js b/ui/dist/assets/index-CTdE8kO2.js deleted file mode 100644 index 1c6950a1..00000000 --- a/ui/dist/assets/index-CTdE8kO2.js +++ /dev/null @@ -1,1123 +0,0 @@ -var fV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var dV=(e,n,t)=>n in e?fV(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Bs=(e,n,t)=>dV(e,typeof n!="symbol"?n+"":n,t),T2=(e,n,t)=>n.has(e)||L9("Cannot "+t);var ue=(e,n,t)=>(T2(e,n,"read from private field"),t?t.call(e):n.get(e)),ct=(e,n,t)=>n.has(e)?L9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ue=(e,n,t,r)=>(T2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),$t=(e,n,t)=>(T2(e,n,"access private method"),t);var Rp=(e,n,t,r)=>({set _(s){Ue(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 gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A2={exports:{}},Mp={};/** - * @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 I9;function hV(){if(I9)return Mp;I9=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 Mp.Fragment=n,Mp.jsx=t,Mp.jsxs=t,Mp}var $9;function pV(){return $9||($9=1,A2.exports=hV()),A2.exports}var f=pV(),R2={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 B9;function mV(){if(B9)return Zt;B9=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"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(F,U,K){this.props=F,this.context=U,this.refs=v,this.updater=K||x}b.prototype.isReactComponent={},b.prototype.setState=function(F,U){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,U,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,U,K){this.props=F,this.context=U,this.refs=v,this.updater=K||x}var C=y.prototype=new w;C.constructor=y,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function z(){}var T={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,U,K){var ne=K.ref;return{$$typeof:e,type:F,key:U,ref:ne!==void 0?ne:null,props:K}}function D(F,U){return M(F.type,U,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function $(F){var U={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(K){return U[K]})}var q=/\/+/g;function H(F,U){return typeof F=="object"&&F!==null&&F.key!=null?$(""+F.key):U.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(z,z):(F.status="pending",F.then(function(U){F.status==="pending"&&(F.status="fulfilled",F.value=U)},function(U){F.status==="pending"&&(F.status="rejected",F.reason=U)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function V(F,U,K,ne,ce){var _e=typeof F;(_e==="undefined"||_e==="boolean")&&(F=null);var se=!1;if(F===null)se=!0;else switch(_e){case"bigint":case"string":case"number":se=!0;break;case"object":switch(F.$$typeof){case e:case n:se=!0;break;case h:return se=F._init,V(se(F._payload),U,K,ne,ce)}}if(se)return ce=ce(F),se=ne===""?"."+H(F,0):ne,N(ce)?(K="",se!=null&&(K=se.replace(q,"$&/")+"/"),V(ce,U,K,"",function(le){return le})):ce!=null&&(I(ce)&&(ce=D(ce,K+(ce.key==null||F&&F.key===ce.key?"":(""+ce.key).replace(q,"$&/")+"/")+se)),U.push(ce)),1;se=0;var G=ne===""?".":ne+":";if(N(F))for(var oe=0;oe{const n=A.useContext(oO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},gV=({client:e,children:n})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(oO.Provider,{value:e,children:n})),vV={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var au,mk,QM,bV=(QM=class{constructor(){ct(this,au,vV);ct(this,mk,!1)}setTimeoutProvider(e){Ue(this,au,e)}setTimeout(e,n){return ue(this,au).setTimeout(e,n)}clearTimeout(e){ue(this,au).clearTimeout(e)}setInterval(e,n){return ue(this,au).setInterval(e,n)}clearInterval(e){ue(this,au).clearInterval(e)}},au=new WeakMap,mk=new WeakMap,QM);const y_=new bV;function yV(e){setTimeout(e,0)}const xV=typeof window>"u"||"Deno"in globalThis;function Us(){}function wV(e,n){return typeof e=="function"?e(n):e}function cO(e){return typeof e=="number"&&e>=0&&e!==1/0}function lO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Lr(e,n){return typeof e=="function"?e(n):e}function F9(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==gk(a,n.options))return!1}else if(!oh(n.queryKey,a))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function H9(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(G_(n.options.mutationKey)!==G_(i))return!1}else if(!oh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function gk(e,n){return((n==null?void 0:n.queryKeyHashFn)||G_)(e)}function G_(e){return JSON.stringify(e,(n,t)=>T4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function oh(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=q9(e)&&q9(n);if(!r&&!(T4(e)&&T4(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 c=0;for(let u=0;u{y_.setTimeout(n,e)})}function A4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?vk(e,n):n}function CV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function EV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const bk=Symbol();function uO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===bk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yk(e,n){return typeof e=="function"?e(...n):!!e}function NV(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 zV=()=>xV;const xk=()=>zV();var lf=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(){}},S_,ou,qd,XM,jV=(XM=class extends lf{constructor(){super();ct(this,S_);ct(this,ou);ct(this,qd);Ue(this,qd,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,ou)||this.setEventListener(ue(this,qd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,ou))==null||n.call(this),Ue(this,ou,void 0))}setEventListener(n){var t;Ue(this,qd,n),(t=ue(this,ou))==null||t.call(this),Ue(this,ou,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,S_)!==n&&(Ue(this,S_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,S_)=="boolean"?ue(this,S_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},S_=new WeakMap,ou=new WeakMap,qd=new WeakMap,XM);const wk=new jV,TV=yV;function AV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=TV;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const zr=AV();var Ud,cu,Gd,YM,RV=(YM=class extends lf{constructor(){super();ct(this,Ud,!0);ct(this,cu);ct(this,Gd);Ue(this,Gd,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,cu)||this.setEventListener(ue(this,Gd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,cu))==null||n.call(this),Ue(this,cu,void 0))}setEventListener(n){var t;Ue(this,Gd,n),(t=ue(this,cu))==null||t.call(this),Ue(this,cu,n(this.setOnline.bind(this)))}setOnline(n){ue(this,Ud)!==n&&(Ue(this,Ud,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,Ud)}},Ud=new WeakMap,cu=new WeakMap,Gd=new WeakMap,YM);const dv=new RV;function MV(e){return Math.min(1e3*2**e,3e4)}function _O(e){return(e??"online")==="online"?dv.isOnline():!0}var hv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function OV(e){return e instanceof hv}function fO(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((w,y)=>{i=w,a=y});o.catch(Us);const c=()=>s!=="pending",u=w=>{var y;if(!c()){const C=new hv(w);k(C),(y=e.onCancel)==null||y.call(e,C)}},h=()=>{n=!0},_=()=>{n=!1},p=()=>wk.isFocused()&&(e.networkMode==="always"||dv.isOnline())&&e.canRun(),m=()=>_O(e.networkMode)&&e.canRun(),x=w=>{c()||(r==null||r(),s="resolved",i(w))},k=w=>{c()||(r==null||r(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;r=C=>{(c()||p())&&w(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,c()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(c())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(x).catch(C=>{var M;if(c())return;const N=e.retry??(xk()?0:3),z=e.retryDelay??MV,T=typeof z=="function"?z(t,C):z,j=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),o)}}var C_,ZM,dO=(ZM=class{constructor(){ct(this,C_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cO(this.gcTime)&&Ue(this,C_,y_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xk()?1/0:3e5))}clearGcTimeout(){ue(this,C_)!==void 0&&(y_.clearTimeout(ue(this,C_)),Ue(this,C_,void 0))}},C_=new WeakMap,ZM);function DV(e){return{onFetch:(n,t)=>{var h,_,p,m,x;const r=n.options,s=(p=(_=(h=n.fetchOptions)==null?void 0:h.meta)==null?void 0:_.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:[]},c=0;const u=async()=>{let k=!1;const v=y=>{NV(y,()=>n.signal,()=>k=!0)},b=uO(n.options,n.fetchOptions),w=async(y,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&y.pages.length)return Promise.resolve(y);const T=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),j=await b(T),{maxPages:M}=n.options,D=N?EV:CV;return{pages:D(y.pages,j,M),pageParams:D(y.pageParams,C,M)}};if(s&&i.length){const y=s==="backward",C=y?LV:G9,N={pages:i,pageParams:a};o=await w(N,C(r,N),y)}else{const y=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:G9(r,o);if(c>0&&C==null)break;o=await w(o,C),c++}while(c{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function G9(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 LV(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 Vd,E_,Kd,Ra,N_,us,rm,z_,Qa,qc,JM,IV=(JM=class extends dO{constructor(n){super();ct(this,Qa);ct(this,Vd);ct(this,E_);ct(this,Kd);ct(this,Ra);ct(this,N_);ct(this,us);ct(this,rm);ct(this,z_);Ue(this,z_,!1),Ue(this,rm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ue(this,N_,n.client),Ue(this,Ra,ue(this,N_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ue(this,E_,K9(this.options)),this.state=n.state??ue(this,E_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Vd)}get promise(){var n;return(n=ue(this,us))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,rm),...n},n!=null&&n._type&&Ue(this,Vd,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=K9(this.options);t.data!==void 0&&(this.setState(V9(t.data,t.dataUpdatedAt)),Ue(this,E_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Ra).remove(this)}setData(n,t){const r=A4(this.state.data,n,this.options);return $t(this,Qa,qc).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){$t(this,Qa,qc).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,us))==null?void 0:r.promise;return(s=ue(this,us))==null||s.cancel(n),t?t.then(Us).catch(Us):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,E_)}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===bk||!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:!lO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,us))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,us))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,Ra).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,us)&&(ue(this,z_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,us).cancel({revert:!0}):ue(this,us).cancelRetry()),this.scheduleGc()),ue(this,Ra).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$t(this,Qa,qc).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,_,p,m,x,k,v,b,w,y,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,us))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,us))return ue(this,us).continueRetry(),ue(this,us).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(z=>z.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ue(this,z_,!0),r.signal)})},i=()=>{const N=uO(this.options,t),T=(()=>{const j={client:ue(this,N_),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ue(this,z_,!1),this.options.persister?this.options.persister(N,T,this):N(T)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,N_),state:this.state,fetchFn:i};return s(N),N})();(h=ue(this,Vd)==="infinite"?DV(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ue(this,Kd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=o.fetchOptions)==null?void 0:_.meta))&&$t(this,Qa,qc).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ue(this,us,fO({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof hv&&N.revert&&this.setState({...ue(this,Kd),fetchStatus:"idle"}),r.abort()},onFail:(N,z)=>{$t(this,Qa,qc).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{$t(this,Qa,qc).call(this,{type:"pause"})},onContinue:()=>{$t(this,Qa,qc).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await c.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(x=(m=ue(this,Ra).config).onSuccess)==null||x.call(m,N,this),(v=(k=ue(this,Ra).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof hv){if(N.silent)return ue(this,us).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw $t(this,Qa,qc).call(this,{type:"error",error:N}),(w=(b=ue(this,Ra).config).onError)==null||w.call(b,N,this),(C=(y=ue(this,Ra).config).onSettled)==null||C.call(y,this.state.data,N,this),N}finally{ue(this,us)===c&&Ue(this,us,void 0),this.scheduleGc()}}},Vd=new WeakMap,E_=new WeakMap,Kd=new WeakMap,Ra=new WeakMap,N_=new WeakMap,us=new WeakMap,rm=new WeakMap,z_=new WeakMap,Qa=new WeakSet,qc=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,...hO(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...V9(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ue(this,Kd,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),zr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,Ra).notify({query:this,type:"updated",action:n})})},JM);function hO(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_O(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function V9(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function K9(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 ii,Cn,sm,ai,j_,Wd,Wc,im,Qd,Xd,T_,A_,lu,Yd,In,Jp,R4,M4,O4,D4,L4,I4,$4,B4,eO,kk=(eO=class extends lf{constructor(n,t){super();ct(this,In);ct(this,ii);ct(this,Cn);ct(this,sm);ct(this,ai);ct(this,j_);ct(this,Wd);ct(this,Wc);ct(this,im);ct(this,Qd);ct(this,Xd);ct(this,T_);ct(this,A_);ct(this,lu);ct(this,Yd,new Set);this.options=t,Ue(this,ii,n),Ue(this,Wc,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Cn).addObserver(this),W9(ue(this,Cn),this.options)?$t(this,In,Jp).call(this):this.updateResult(),$t(this,In,L4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return P4(ue(this,Cn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return P4(ue(this,Cn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$t(this,In,I4).call(this),$t(this,In,$4).call(this),ue(this,Cn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Cn);if(this.options=ue(this,ii).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,ue(this,Cn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$t(this,In,B4).call(this),ue(this,Cn).setOptions(this.options),t._defaulted&&!a0(this.options,t)&&ue(this,ii).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Cn),observer:this});const s=this.hasListeners();s&&Q9(ue(this,Cn),r,this.options,t)&&$t(this,In,Jp).call(this),this.updateResult(),s&&(ue(this,Cn)!==r||Lr(this.options.enabled,ue(this,Cn))!==Lr(t.enabled,ue(this,Cn))||Lr(this.options.staleTime,ue(this,Cn))!==Lr(t.staleTime,ue(this,Cn)))&&$t(this,In,M4).call(this);const i=$t(this,In,O4).call(this);s&&(ue(this,Cn)!==r||Lr(this.options.enabled,ue(this,Cn))!==Lr(t.enabled,ue(this,Cn))||i!==ue(this,lu))&&$t(this,In,D4).call(this,i)}getOptimisticResult(n){const t=ue(this,ii).getQueryCache().build(ue(this,ii),n),r=this.createResult(t,n);return a0(this.getCurrentResult(),r)||(Ue(this,ai,r),Ue(this,Wd,this.options),Ue(this,j_,ue(this,Cn).state)),r}getCurrentResult(){return ue(this,ai)}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,Yd).add(n)}getCurrentQuery(){return ue(this,Cn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,ii).defaultQueryOptions(n),r=ue(this,ii).getQueryCache().build(ue(this,ii),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,ii).getQueryCache().subscribe(c=>{c.type==="updated"&&c.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 $t(this,In,Jp).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ai)))}createResult(n,t){var z;const r=ue(this,Cn),s=this.options,i=ue(this,ai),a=ue(this,j_),o=ue(this,Wd),c=n!==r?n.state:ue(this,sm),{state:u}=n;let h={...u},_=!1,p;if(t._optimisticResults){const T=this.hasListeners(),j=!T&&W9(n,t),M=T&&Q9(n,r,t,s);(j||M)&&(h={...h,...hO(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:k}=h;p=h.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let T;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(T=i.data,v=!0):T=typeof t.placeholderData=="function"?t.placeholderData((z=ue(this,Xd))==null?void 0:z.state.data,ue(this,Xd)):t.placeholderData,T!==void 0&&(k="success",p=A4(i==null?void 0:i.data,T,t),_=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,im))p=ue(this,Qd);else try{Ue(this,im,t.select),p=t.select(p),p=A4(i==null?void 0:i.data,p,t),Ue(this,Qd,p),Ue(this,Wc,null)}catch(T){Ue(this,Wc,T)}else p===void 0&&Ue(this,Wc,null);ue(this,Wc)&&(m=ue(this,Wc),p=ue(this,Qd),x=Date.now(),k="error",_=!1);const b=h.fetchStatus==="fetching",w=k==="pending",y=k==="error",C=w&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:w,isSuccess:k==="success",isError:y,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&N,isStale:Sk(n,t),refetch:this.refetch,isEnabled:Lr(t.enabled,n)!==!1}}updateResult(){const n=ue(this,ai),t=this.createResult(ue(this,Cn),this.options);if(Ue(this,j_,ue(this,Cn).state),Ue(this,Wd,this.options),ue(this,j_).data!==void 0&&Ue(this,Xd,ue(this,Cn)),a0(t,n))return;Ue(this,ai,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Yd).size)return!0;const o=new Set(a??ue(this,Yd));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,ai)).some(c=>{const u=c;return ue(this,ai)[u]!==n[u]&&o.has(u)})})();zr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,ai))}),ue(this,ii).getQueryCache().notify({query:ue(this,Cn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$t(this,In,L4).call(this)}},ii=new WeakMap,Cn=new WeakMap,sm=new WeakMap,ai=new WeakMap,j_=new WeakMap,Wd=new WeakMap,Wc=new WeakMap,im=new WeakMap,Qd=new WeakMap,Xd=new WeakMap,T_=new WeakMap,A_=new WeakMap,lu=new WeakMap,Yd=new WeakMap,In=new WeakSet,Jp=function(n){$t(this,In,B4).call(this);let t=ue(this,Cn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Us)),t},R4=function(n){return!xk()&&Lr(this.options.enabled,ue(this,Cn))!==!1&&cO(n)},M4=function(){$t(this,In,I4).call(this);const n=Lr(this.options.staleTime,ue(this,Cn));if(ue(this,ai).isStale||!$t(this,In,R4).call(this,n))return;const t=lO(ue(this,ai).dataUpdatedAt,n)+1;Ue(this,T_,y_.setTimeout(()=>{ue(this,ai).isStale||this.updateResult()},t))},O4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Cn)):this.options.refetchInterval)??!1},D4=function(n){$t(this,In,$4).call(this),Ue(this,lu,n),!(ue(this,lu)===0||!$t(this,In,R4).call(this,ue(this,lu)))&&Ue(this,A_,y_.setInterval(()=>{(this.options.refetchIntervalInBackground||wk.isFocused())&&$t(this,In,Jp).call(this)},ue(this,lu)))},L4=function(){$t(this,In,M4).call(this),$t(this,In,D4).call(this,$t(this,In,O4).call(this))},I4=function(){ue(this,T_)!==void 0&&(y_.clearTimeout(ue(this,T_)),Ue(this,T_,void 0))},$4=function(){ue(this,A_)!==void 0&&(y_.clearInterval(ue(this,A_)),Ue(this,A_,void 0))},B4=function(){const n=ue(this,ii).getQueryCache().build(ue(this,ii),this.options);if(n===ue(this,Cn))return;const t=ue(this,Cn);Ue(this,Cn,n),Ue(this,sm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},eO);function $V(e,n){return Lr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Lr(n.retryOnMount,e)===!1)}function W9(e,n){return $V(e,n)||e.state.data!==void 0&&P4(e,n,n.refetchOnMount)}function P4(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&&Sk(e,n)}return!1}function Q9(e,n,t,r){return(e!==n||Lr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&Sk(e,t)}function Sk(e,n){return Lr(n.enabled,e)!==!1&&e.isStaleByTime(Lr(n.staleTime,e))}var am,Po,Fs,R_,Fo,tu,tO,BV=(tO=class extends dO{constructor(n){super();ct(this,Fo);ct(this,am);ct(this,Po);ct(this,Fs);ct(this,R_);Ue(this,am,n.client),this.mutationId=n.mutationId,Ue(this,Fs,n.mutationCache),Ue(this,Po,[]),this.state=n.state||pO(),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,Po).includes(n)||(ue(this,Po).push(n),this.clearGcTimeout(),ue(this,Fs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ue(this,Po,ue(this,Po).filter(t=>t!==n)),this.scheduleGc(),ue(this,Fs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,Po).length||(this.state.status==="pending"?this.scheduleGc():ue(this,Fs).remove(this))}continue(){var n;return((n=ue(this,R_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,_,p,m,x,k,v,b,w,y,C,N,z,T,j;const t=()=>{$t(this,Fo,tu).call(this,{type:"continue"})},r={client:ue(this,am),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ue(this,R_,fO({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{$t(this,Fo,tu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{$t(this,Fo,tu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,Fs).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{$t(this,Fo,tu).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,Fs).config.onMutate&&await ue(this,Fs).config.onMutate(n,this,r);const D=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,n,r));D!==this.state.context&&$t(this,Fo,tu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=ue(this,Fs).config).onSuccess)==null?void 0:h.call(u,M,n,this.state.context,this,r)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,n,this.state.context,r)),await((x=(m=ue(this,Fs).config).onSettled)==null?void 0:x.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),$t(this,Fo,tu).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,Fs).config).onError)==null?void 0:w.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(y=this.options).onError)==null?void 0:C.call(y,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((z=(N=ue(this,Fs).config).onSettled)==null?void 0:z.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(T=this.options).onSettled)==null?void 0:j.call(T,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw $t(this,Fo,tu).call(this,{type:"error",error:M}),M}finally{ue(this,R_)===s&&Ue(this,R_,void 0),ue(this,Fs).runNext(this)}}},am=new WeakMap,Po=new WeakMap,Fs=new WeakMap,R_=new WeakMap,Fo=new WeakSet,tu=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),zr.batch(()=>{ue(this,Po).forEach(r=>{r.onMutationUpdate(n)}),ue(this,Fs).notify({mutation:this,type:"updated",action:n})})},tO);function pO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qc,Xa,om,nO,PV=(nO=class extends lf{constructor(n={}){super();ct(this,Qc);ct(this,Xa);ct(this,om);this.config=n,Ue(this,Qc,new Set),Ue(this,Xa,new Map),Ue(this,om,0)}build(n,t,r){const s=new BV({client:n,mutationCache:this,mutationId:++Rp(this,om)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,Qc).add(n);const t=Ug(n);if(typeof t=="string"){const r=ue(this,Xa).get(t);r?r.push(n):ue(this,Xa).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,Qc).delete(n)){const t=Ug(n);if(typeof t=="string"){const r=ue(this,Xa).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,Xa).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Ug(n);if(typeof t=="string"){const s=(r=ue(this,Xa).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=Ug(n);return typeof t=="string"?((s=(r=ue(this,Xa).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){zr.batch(()=>{ue(this,Qc).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,Qc).clear(),ue(this,Xa).clear()})}getAll(){return Array.from(ue(this,Qc))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>H9(t,r))}findAll(n={}){return this.getAll().filter(t=>H9(n,t))}notify(n){zr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return zr.batch(()=>Promise.all(n.map(t=>t.continue().catch(Us))))}},Qc=new WeakMap,Xa=new WeakMap,om=new WeakMap,nO);function Ug(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Xc,uu,Hs,Yc,Ko,e0,F4,rO,FV=(rO=class extends lf{constructor(t,r){super();ct(this,Ko);ct(this,Xc);ct(this,uu);ct(this,Hs);ct(this,Yc);Ue(this,Xc,t),this.setOptions(r),this.bindMethods(),$t(this,Ko,e0).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,Xc).defaultMutationOptions(t),a0(this.options,r)||ue(this,Xc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Hs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&G_(r.mutationKey)!==G_(this.options.mutationKey)?this.reset():((s=ue(this,Hs))==null?void 0:s.state.status)==="pending"&&ue(this,Hs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,Hs)&&(ue(this,Hs).addObserver(this),$t(this,Ko,e0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,Hs))==null||t.removeObserver(this)}onMutationUpdate(t){$t(this,Ko,e0).call(this),$t(this,Ko,F4).call(this,t)}getCurrentResult(){return ue(this,uu)}reset(){var t;(t=ue(this,Hs))==null||t.removeObserver(this),Ue(this,Hs,void 0),$t(this,Ko,e0).call(this),$t(this,Ko,F4).call(this)}mutate(t,r){var s;return Ue(this,Yc,r),(s=ue(this,Hs))==null||s.removeObserver(this),Ue(this,Hs,ue(this,Xc).getMutationCache().build(ue(this,Xc),this.options)),ue(this,Hs).addObserver(this),ue(this,Hs).execute(t)}},Xc=new WeakMap,uu=new WeakMap,Hs=new WeakMap,Yc=new WeakMap,Ko=new WeakSet,e0=function(){var r;const t=((r=ue(this,Hs))==null?void 0:r.state)??pO();Ue(this,uu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},F4=function(t){zr.batch(()=>{var r,s,i,a,o,c,u,h;if(ue(this,Yc)&&this.hasListeners()){const _=ue(this,uu).variables,p=ue(this,uu).context,m={client:ue(this,Xc),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Yc)).onSuccess)==null||s.call(r,t.data,_,p,m)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Yc)).onSettled)==null||a.call(i,t.data,null,_,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(c=(o=ue(this,Yc)).onError)==null||c.call(o,t.error,_,p,m)}catch(x){Promise.reject(x)}try{(h=(u=ue(this,Yc)).onSettled)==null||h.call(u,void 0,t.error,_,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(_=>{_(ue(this,uu))})})},rO);function X9(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Zd,oi,Jd,M_,Ui,O_,cm,lm,um,_m,hs,H4,q4,mO,U4,G4,V4,sO,HV=(sO=class extends lf{constructor(n,t,r){super();ct(this,hs);ct(this,Zd);ct(this,oi);ct(this,Jd);ct(this,M_);ct(this,Ui);ct(this,O_);ct(this,cm);ct(this,lm);ct(this,um);ct(this,_m,[]);Ue(this,Zd,n),Ue(this,M_,r),Ue(this,Jd,[]),Ue(this,Ui,[]),Ue(this,oi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Ui).forEach(n=>{n.subscribe(t=>{$t(this,hs,G4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Ui).forEach(n=>{n.destroy()})}setQueries(n,t){Ue(this,Jd,n),Ue(this,M_,t),zr.batch(()=>{const r=ue(this,Ui),s=$t(this,hs,U4).call(this,ue(this,Jd));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const i=s.map(_=>_.observer),a=i.map(_=>_.getCurrentResult()),o=r.length!==i.length,c=i.some((_,p)=>_!==r[p]),u=o||c,h=u?!0:a.some((_,p)=>{const m=ue(this,oi)[p];return!m||!a0(_,m)});!u&&!h||(u&&(Ue(this,_m,s),Ue(this,Ui,i)),Ue(this,oi,a),this.hasListeners()&&(u&&(X9(r,i).forEach(_=>{_.destroy()}),X9(i,r).forEach(_=>{_.subscribe(p=>{$t(this,hs,G4).call(this,_,p)})})),$t(this,hs,V4).call(this)))})}getCurrentResult(){return ue(this,oi)}getQueries(){return ue(this,Ui).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Ui)}getOptimisticResult(n,t){const r=$t(this,hs,U4).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>$t(this,hs,q4).call(this,a??s,t,i),()=>$t(this,hs,H4).call(this,s,r)]}},Zd=new WeakMap,oi=new WeakMap,Jd=new WeakMap,M_=new WeakMap,Ui=new WeakMap,O_=new WeakMap,cm=new WeakMap,lm=new WeakMap,um=new WeakMap,_m=new WeakMap,hs=new WeakSet,H4=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(c=>{c.observer.trackProp(o)}))})})},q4=function(n,t,r){if(t){const s=ue(this,um),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,oi)!==ue(this,lm)||i||t!==ue(this,cm))&&(Ue(this,cm,t),Ue(this,lm,ue(this,oi)),r!==void 0&&Ue(this,um,r),Ue(this,O_,vk(ue(this,O_),t(n)))),ue(this,O_)}return n},mO=function(){var n;return!((n=ue(this,M_))!=null&&n.combine)||ue(this,Ui).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,oi)[r])==null?void 0:s.data)===void 0})},U4=function(n){const t=new Map;ue(this,Ui).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,Zd).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new kk(ue(this,Zd),i);r.push({defaultedQueryOptions:i,observer:a})}),r},G4=function(n,t){const r=ue(this,Ui).indexOf(n);r!==-1&&(Ue(this,oi,ue(this,oi).slice()),ue(this,oi)[r]=t,$t(this,hs,V4).call(this))},V4=function(){var n;if(this.hasListeners()){const t=$t(this,hs,mO).call(this),r=ue(this,O_),s=t?r:$t(this,hs,q4).call(this,$t(this,hs,H4).call(this,ue(this,oi),ue(this,_m)),(n=ue(this,M_))==null?void 0:n.combine);(t||r!==s)&&zr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,oi))})})}},sO),Ho,iO,qV=(iO=class extends lf{constructor(n={}){super();ct(this,Ho);this.config=n,Ue(this,Ho,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??gk(s,t);let a=this.get(i);return a||(a=new IV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Ho).has(n.queryHash)||(ue(this,Ho).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Ho).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Ho).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){zr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Ho).get(n)}getAll(){return[...ue(this,Ho).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>F9(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>F9(n,r)):t}notify(n){zr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){zr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){zr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Ho=new WeakMap,iO),Er,_u,fu,eh,th,du,nh,rh,aO,UV=(aO=class{constructor(e={}){ct(this,Er);ct(this,_u);ct(this,fu);ct(this,eh);ct(this,th);ct(this,du);ct(this,nh);ct(this,rh);Ue(this,Er,e.queryCache||new qV),Ue(this,_u,e.mutationCache||new PV),Ue(this,fu,e.defaultOptions||{}),Ue(this,eh,new Map),Ue(this,th,new Map),Ue(this,du,0)}mount(){Rp(this,du)._++,ue(this,du)===1&&(Ue(this,nh,wk.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Er).onFocus())})),Ue(this,rh,dv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Er).onOnline())})))}unmount(){var e,n;Rp(this,du)._--,ue(this,du)===0&&((e=ue(this,nh))==null||e.call(this),Ue(this,nh,void 0),(n=ue(this,rh))==null||n.call(this),Ue(this,rh,void 0))}isFetching(e){return ue(this,Er).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,_u).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Er).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Er).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 ue(this,Er).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,Er).get(r.queryHash))==null?void 0:a.state.data,i=wV(n,s);if(i!==void 0)return ue(this,Er).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return zr.batch(()=>ue(this,Er).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,Er).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Er);zr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Er);return zr.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=zr.batch(()=>ue(this,Er).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Us).catch(Us)}invalidateQueries(e,n={}){return zr.batch(()=>(ue(this,Er).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=zr.batch(()=>ue(this,Er).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Us)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Us)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Er).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=ue(this,Er).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(Us).catch(Us)}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(Us).catch(Us)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return dv.isOnline()?ue(this,_u).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Er)}getMutationCache(){return ue(this,_u)}getDefaultOptions(){return ue(this,fu)}setDefaultOptions(e){Ue(this,fu,e)}setQueryDefaults(e,n){ue(this,eh).set(G_(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,eh).values()],t={};return n.forEach(r=>{oh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,th).set(G_(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,th).values()],t={};return n.forEach(r=>{oh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,fu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=gk(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===bk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,fu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Er).clear(),ue(this,_u).clear()}},Er=new WeakMap,_u=new WeakMap,fu=new WeakMap,eh=new WeakMap,th=new WeakMap,du=new WeakMap,nh=new WeakMap,rh=new WeakMap,aO);const gO=A.createContext(!1),vO=()=>A.useContext(gO);gO.Provider;function GV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const VV=A.createContext(GV()),bO=()=>A.useContext(VV),yO=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?yk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},xO=e=>{A.useEffect(()=>{e.clearReset()},[e])},wO=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||yk(t,[e.error,r])),kO=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))}},K4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,SO=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function KV({queries:e,...n},t){const r=bm(),s=vO(),i=bO(),a=n.subscribed!==!1,o=A.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{kO(k);const v=r.getQueryCache().get(k.queryHash);yO(k,i,v)}),xO(i);const[c]=A.useState(()=>new HV(r,o,n)),[u,h,_]=c.getOptimisticResult(o,n.combine),p=!s&&a;A.useSyncExternalStore(A.useCallback(k=>p?c.subscribe(zr.batchCalls(k)):Us,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>K4(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&K4(b,k)){const w=new kk(r,b);return SO(b,w,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((k,v)=>{const b=o[v];return b&&wO({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(x)throw x.error;return h(_())}function WV(e,n,t){const r=vO(),s=bO(),i=bm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,kO(a),yO(a,s,o),xO(s);const[u]=A.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),_=!r&&c;if(A.useSyncExternalStore(A.useCallback(p=>{const m=_?u.subscribe(zr.batchCalls(p)):Us;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),A.useEffect(()=>{u.setOptions(a)},[a,u]),K4(a,h))throw SO(a,u,s);if(wO({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function lt(e,n){return WV(e,kk)}function QV(e,n){const t=bm(),r=t.getQueryCache();return A.useSyncExternalStore(A.useCallback(s=>r.subscribe(zr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function ln(e,n){const t=bm(),[r]=A.useState(()=>new FV(t,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const s=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(zr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Us)},[r]);if(s.error&&yk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const tt=new UV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),ll=new Set;let Y9=null,yb=0;const W4=new Set,XV=()=>yb,Z9=e=>(W4.add(e),()=>{W4.delete(e)}),Ia=()=>["workspace",yb],Ct=(e,...n)=>[...Ia(),e,...n];function YV(e,n=!1){if(Y9===e&&!n)return!1;const t=Ia();return Y9=e,yb++,ll.clear(),Ck({queryKey:t}),W4.forEach(r=>r()),!0}const An=e=>e[1]===yb;async function Ck(e){await tt.cancelQueries(e,{revert:!1}),tt.removeQueries(e)}function Wr(e,n){if(An(e))return tt.setQueryData(e,n)}var M2={exports:{}},Op={},O2={exports:{}},D2={};/** - * @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 J9;function ZV(){return J9||(J9=1,(function(e){function n(V,J){var Z=V.length;V.push(J);e:for(;0>>1,L=V[B];if(0>>1;Bs(K,Z))nes(ce,K)?(V[B]=ce,V[ne]=Z,B=ne):(V[B]=K,V[U]=Z,B=U);else if(nes(ce,Z))V[B]=ce,V[ne]=Z,B=ne;else break e}}return J}function s(V,J){var Z=V.sortIndex-J.sortIndex;return Z!==0?Z:V.id-J.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 c=[],u=[],h=1,_=null,p=3,m=!1,x=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var J=t(u);J!==null;){if(J.callback===null)r(u);else if(J.startTime<=V)r(u),J.sortIndex=J.expirationTime,n(c,J);else break;J=t(u)}}function N(V){if(k=!1,C(V),!x)if(t(c)!==null)x=!0,z||(z=!0,$());else{var J=t(u);J!==null&&Q(N,J.startTime-V)}}var z=!1,T=-1,j=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MV&&D());){var B=_.callback;if(typeof B=="function"){_.callback=null,p=_.priorityLevel;var L=B(_.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){_.callback=L,C(V),J=!0;break t}_===t(c)&&r(c),C(V)}else r(c);_=t(c)}if(_!==null)J=!0;else{var F=t(u);F!==null&&Q(N,F.startTime-V),J=!1}}break e}finally{_=null,p=Z,m=!1}J=void 0}}finally{J?$():z=!1}}}var $;if(typeof y=="function")$=function(){y(I)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,H=q.port2;q.port1.onmessage=I,$=function(){H.postMessage(null)}}else $=function(){b(I,0)};function Q(V,J){T=b(function(){V(e.unstable_now())},J)}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||125B?(V.sortIndex=Z,n(u,V),t(c)===null&&V===t(u)&&(k?(w(T),T=-1):k=!0,Q(N,Z-B))):(V.sortIndex=L,n(c,V),x||m||(x=!0,z||(z=!0,$()))),V},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(V){var J=p;return function(){var Z=p;p=J;try{return V.apply(this,arguments)}finally{p=Z}}}})(D2)),D2}var eE;function JV(){return eE||(eE=1,O2.exports=ZV()),O2.exports}var L2={exports:{}},Ps={};/** - * @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 tE;function eK(){if(tE)return Ps;tE=1;var e=vm();function n(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),L2.exports=eK(),L2.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 rE;function tK(){if(rE)return Op;rE=1;var e=JV(),n=vm(),t=CO();function r(l){var d="https://react.dev/errors/"+l;if(1L||(l.current=B[L],B[L]=null,L--)}function K(l,d){L++,B[L]=l.current,l.current=d}var ne=F(null),ce=F(null),_e=F(null),se=F(null);function G(l,d){switch(K(_e,d),K(ce,l),K(ne,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?i9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=i9(d),l=a9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}U(ne),K(ne,l)}function oe(){U(ne),U(ce),U(_e)}function le(l){l.memoizedState!==null&&K(se,l);var d=ne.current,g=a9(d,l.type);d!==g&&(K(ce,l),K(ne,g))}function fe(l){ce.current===l&&(U(ne),U(ce)),se.current===l&&(U(se),zp._currentValue=Z)}var me,Re;function Oe(l){if(me===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);me=d&&d[1]||"",Re=-1)":-1R||pe[S]!==Ee[R]){var Ie=` -`+pe[S].replace(" at new "," at ");return l.displayName&&Ie.includes("")&&(Ie=Ie.replace("",l.displayName)),Ie}while(1<=S&&0<=R);break}}}finally{We=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Oe(g):""}function Se(l,d){switch(l.tag){case 26:case 27:case 5:return Oe(l.type);case 16:return Oe("Lazy");case 13:return l.child!==d&&d!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return He(l.type,!1);case 11:return He(l.type.render,!1);case 1:return He(l.type,!0);case 31:return Oe("Activity");default:return""}}function it(l){try{var d="",g=null;do d+=Se(l,g),g=l,l=l.return;while(l);return d}catch(S){return` -Error generating stack: `+S.message+` -`+S.stack}}var Je=Object.prototype.hasOwnProperty,ot=e.unstable_scheduleCallback,wt=e.unstable_cancelCallback,Pt=e.unstable_shouldYield,dt=e.unstable_requestPaint,ft=e.unstable_now,Le=e.unstable_getCurrentPriorityLevel,ge=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,Pe=e.unstable_NormalPriority,rt=e.unstable_LowPriority,ut=e.unstable_IdlePriority,pt=e.log,qe=e.unstable_setDisableYieldValue,Kt=null,sn=null;function Tt(l){if(typeof pt=="function"&&qe(l),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(Kt,l)}catch{}}var mt=Math.clz32?Math.clz32:xn,Bn=Math.log,Jt=Math.LN2;function xn(l){return l>>>=0,l===0?32:31-(Bn(l)/Jt|0)|0}var vr=256,Pn=262144,Rn=4194304;function Fn(l){var d=l&42;if(d!==0)return d;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function _r(l,d,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,Y=l.pingedLanes;l=l.warmLanes;var re=S&134217727;return re!==0?(S=re&~O,S!==0?R=Fn(S):(Y&=re,Y!==0?R=Fn(Y):g||(g=re&~l,g!==0&&(R=Fn(g))))):(re=S&~O,re!==0?R=Fn(re):Y!==0?R=Fn(Y):g||(g=S&~l,g!==0&&(R=Fn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function Pr(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function Et(l,d){switch(l){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 un(){var l=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),l}function zn(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function an(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function fr(l,d,g,S,R,O){var Y=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var re=l.entanglements,pe=l.expirationTimes,Ee=l.hiddenUpdates;for(g=Y&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Gn=/[\n"\\]/g;function dr(l){return l.replace(Gn,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Os(l,d,g,S,R,O,Y,re){l.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?l.type=Y:l.removeAttribute("type"),d!=null?Y==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+qr(d)):l.value!==""+qr(d)&&(l.value=""+qr(d)):Y!=="submit"&&Y!=="reset"||l.removeAttribute("value"),d!=null?Tr(l,Y,qr(d)):g!=null?Tr(l,Y,qr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?l.name=""+qr(re):l.removeAttribute("name")}function Ds(l,d,g,S,R,O,Y,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){xs(l);return}g=g!=null?""+qr(g):"",d=d!=null?""+qr(d):g,re||d===l.value||(l.value=d),l.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=re?l.checked:!!S,l.defaultChecked=!!S,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(l.name=Y),xs(l)}function Tr(l,d,g){d==="number"&&pi(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function mi(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uc=!1;if(as)try{var da={};Object.defineProperty(da,"passive",{get:function(){uc=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{uc=!1}var ur=null,_c=null,rr=null;function Sf(){if(rr)return rr;var l,d=_c,g=d.length,S,R="value"in ur?ur.value:ur.textContent,O=R.length;for(l=0;l=ma),Eo=" ",Mf=!1;function Of(l,d){switch(l){case"keyup":return Rf.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Es(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var hn=!1;function Fu(l,d){switch(l){case"compositionend":return Es(d);case"keypress":return d.which!==32?null:(Mf=!0,Eo);case"textInput":return l=d.data,l===Eo&&Mf?null:l;default:return null}}function Hu(l,d){if(hn)return l==="compositionend"||!Co&&Of(l,d)?(l=Sf(),rr=_c=ur=null,hn=!1,l):null;switch(l){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-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=be(g)}}function X(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?X(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function ae(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=pi(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=pi(l.document)}return d}function xe(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var Ae=as&&"documentMode"in document&&11>=document.documentMode,ke=null,Fe=null,Qe=null,Dt=!1;function Vn(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Dt||ke==null||ke!==pi(S)||(S=ke,"selectionStart"in S&&xe(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Qe&&te(Qe,S)||(Qe=S,S=jg(Fe,"onSelect"),0>=Y,R-=Y,jo=1<<32-mt(d)+R|g<nn?(bn=St,St=null):bn=St.sibling;var Tn=je(we,St,Ce[nn],$e);if(Tn===null){St===null&&(St=bn);break}l&&St&&Tn.alternate===null&&d(we,St),ve=O(Tn,ve,nn),jn===null?Lt=Tn:jn.sibling=Tn,jn=Tn,St=bn}if(nn===Ce.length)return g(we,St),Sn&&kc(we,nn),Lt;if(St===null){for(;nnnn?(bn=St,St=null):bn=St.sibling;var Wl=je(we,St,Tn.value,$e);if(Wl===null){St===null&&(St=bn);break}l&&St&&Wl.alternate===null&&d(we,St),ve=O(Wl,ve,nn),jn===null?Lt=Wl:jn.sibling=Wl,jn=Wl,St=bn}if(Tn.done)return g(we,St),Sn&&kc(we,nn),Lt;if(St===null){for(;!Tn.done;nn++,Tn=Ce.next())Tn=Be(we,Tn.value,$e),Tn!==null&&(ve=O(Tn,ve,nn),jn===null?Lt=Tn:jn.sibling=Tn,jn=Tn);return Sn&&kc(we,nn),Lt}for(St=S(St);!Tn.done;nn++,Tn=Ce.next())Tn=Me(St,we,nn,Tn.value,$e),Tn!==null&&(l&&Tn.alternate!==null&&St.delete(Tn.key===null?nn:Tn.key),ve=O(Tn,ve,nn),jn===null?Lt=Tn:jn.sibling=Tn,jn=Tn);return l&&St.forEach(function(_V){return d(we,_V)}),Sn&&kc(we,nn),Lt}function tr(we,ve,Ce,$e){if(typeof Ce=="object"&&Ce!==null&&Ce.type===k&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case m:e:{for(var Lt=Ce.key;ve!==null;){if(ve.key===Lt){if(Lt=Ce.type,Lt===k){if(ve.tag===7){g(we,ve.sibling),$e=R(ve,Ce.props.children),$e.return=we,we=$e;break e}}else if(ve.elementType===Lt||typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===j&&t_(Lt)===ve.type){g(we,ve.sibling),$e=R(ve,Ce.props),ip($e,Ce),$e.return=we,we=$e;break e}g(we,ve);break}else d(we,ve);ve=ve.sibling}Ce.type===k?($e=Xu(Ce.props.children,we.mode,$e,Ce.key),$e.return=we,we=$e):($e=Vm(Ce.type,Ce.key,Ce.props,null,we.mode,$e),ip($e,Ce),$e.return=we,we=$e)}return Y(we);case x:e:{for(Lt=Ce.key;ve!==null;){if(ve.key===Lt)if(ve.tag===4&&ve.stateNode.containerInfo===Ce.containerInfo&&ve.stateNode.implementation===Ce.implementation){g(we,ve.sibling),$e=R(ve,Ce.children||[]),$e.return=we,we=$e;break e}else{g(we,ve);break}else d(we,ve);ve=ve.sibling}$e=Wy(Ce,we.mode,$e),$e.return=we,we=$e}return Y(we);case j:return Ce=t_(Ce),tr(we,ve,Ce,$e)}if(Q(Ce))return yt(we,ve,Ce,$e);if($(Ce)){if(Lt=$(Ce),typeof Lt!="function")throw Error(r(150));return Ce=Lt.call(Ce),qt(we,ve,Ce,$e)}if(typeof Ce.then=="function")return tr(we,ve,Jm(Ce),$e);if(Ce.$$typeof===y)return tr(we,ve,Qm(we,Ce),$e);eg(we,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ve!==null&&ve.tag===6?(g(we,ve.sibling),$e=R(ve,Ce),$e.return=we,we=$e):(g(we,ve),$e=Ky(Ce,we.mode,$e),$e.return=we,we=$e),Y(we)):g(we,ve)}return function(we,ve,Ce,$e){try{sp=0;var Lt=tr(we,ve,Ce,$e);return Vf=null,Lt}catch(St){if(St===Gf||St===Ym)throw St;var jn=Li(29,St,null,we.mode);return jn.lanes=$e,jn.return=we,jn}finally{}}}var r_=XC(!0),YC=XC(!1),Al=!1;function ax(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ox(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Rl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ml(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(On&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Gm(l),Jh(l,null,g),d}return Rr(l,S,d,g),Gm(l)}function ap(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,wn(l,g)}}function cx(l,d){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var Y={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=Y:O=O.next=Y,g=g.next}while(g!==null);O===null?R=O=d:O=O.next=d}else R=O=d;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=d:l.next=d,g.lastBaseUpdate=d}var lx=!1;function op(){if(lx){var l=Uf;if(l!==null)throw l}}function cp(l,d,g,S){lx=!1;var R=l.updateQueue;Al=!1;var O=R.firstBaseUpdate,Y=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var pe=re,Ee=pe.next;pe.next=null,Y===null?O=Ee:Y.next=Ee,Y=pe;var Ie=l.alternate;Ie!==null&&(Ie=Ie.updateQueue,re=Ie.lastBaseUpdate,re!==Y&&(re===null?Ie.firstBaseUpdate=Ee:re.next=Ee,Ie.lastBaseUpdate=pe))}if(O!==null){var Be=R.baseState;Y=0,Ie=Ee=pe=null,re=O;do{var je=re.lane&-536870913,Me=je!==re.lane;if(Me?(vn&je)===je:(S&je)===je){je!==0&&je===qf&&(lx=!0),Ie!==null&&(Ie=Ie.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var yt=l,qt=re;je=d;var tr=g;switch(qt.tag){case 1:if(yt=qt.payload,typeof yt=="function"){Be=yt.call(tr,Be,je);break e}Be=yt;break e;case 3:yt.flags=yt.flags&-65537|128;case 0:if(yt=qt.payload,je=typeof yt=="function"?yt.call(tr,Be,je):yt,je==null)break e;Be=_({},Be,je);break e;case 2:Al=!0}}je=re.callback,je!==null&&(l.flags|=64,Me&&(l.flags|=8192),Me=R.callbacks,Me===null?R.callbacks=[je]:Me.push(je))}else Me={lane:je,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Ie===null?(Ee=Ie=Me,pe=Be):Ie=Ie.next=Me,Y|=je;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Me=re,re=Me.next,Me.next=null,R.lastBaseUpdate=Me,R.shared.pending=null}}while(!0);Ie===null&&(pe=Be),R.baseState=pe,R.firstBaseUpdate=Ee,R.lastBaseUpdate=Ie,O===null&&(R.shared.lanes=0),$l|=Y,l.lanes=Y,l.memoizedState=Be}}function ZC(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function JC(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var Y=V.T,re={};V.T=re,zx(l,!1,d,g);try{var pe=R(),Ee=V.S;if(Ee!==null&&Ee(re,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Ie=eG(pe,S);_p(l,d,Ie,Fi(l))}else _p(l,d,S,Fi(l))}catch(Be){_p(l,d,{then:function(){},status:"rejected",reason:Be},Fi())}finally{J.p=O,Y!==null&&re.types!==null&&(Y.types=re.types),V.T=Y}}function aG(){}function Ex(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=A7(l).queue;T7(l,R,d,Z,g===null?aG:function(){return R7(l),g(S)})}function A7(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:Z},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function R7(l){var d=A7(l);d.next===null&&(d=l.alternate.memoizedState),_p(l,d.next.queue,{},Fi())}function Nx(){return zs(zp)}function M7(){return Kr().memoizedState}function O7(){return Kr().memoizedState}function oG(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=Fi();l=Rl(g);var S=Ml(d,l,g);S!==null&&(Si(S,d,g),ap(S,d,g)),d={cache:nx()},l.payload=d;return}d=d.return}}function cG(l,d,g){var S=Fi();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},ug(l)?L7(d,g):(g=El(l,d,g,S),g!==null&&(Si(g,l,S),I7(g,d,S)))}function D7(l,d,g){var S=Fi();_p(l,d,g,S)}function _p(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(ug(l))L7(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var Y=d.lastRenderedState,re=O(Y,g);if(R.hasEagerState=!0,R.eagerState=re,vs(re,Y))return Rr(l,d,R,0),ir===null&&xa(),!1}catch{}finally{}if(g=El(l,d,R,S),g!==null)return Si(g,l,S),I7(g,d,S),!0}return!1}function zx(l,d,g,S){if(S={lane:2,revertLane:a2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},ug(l)){if(d)throw Error(r(479))}else d=El(l,g,S,2),d!==null&&Si(d,l,2)}function ug(l){var d=l.alternate;return l===en||d!==null&&d===en}function L7(l,d){Wf=rg=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function I7(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,wn(l,g)}}var fp={readContext:zs,use:ag,useCallback:Mr,useContext:Mr,useEffect:Mr,useImperativeHandle:Mr,useLayoutEffect:Mr,useInsertionEffect:Mr,useMemo:Mr,useReducer:Mr,useRef:Mr,useState:Mr,useDebugValue:Mr,useDeferredValue:Mr,useTransition:Mr,useSyncExternalStore:Mr,useId:Mr,useHostTransitionStatus:Mr,useFormState:Mr,useActionState:Mr,useOptimistic:Mr,useMemoCache:Mr,useCacheRefresh:Mr};fp.useEffectEvent=Mr;var $7={readContext:zs,use:ag,useCallback:function(l,d){return ri().memoizedState=[l,d===void 0?null:d],l},useContext:zs,useEffect:x7,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,cg(4194308,4,C7.bind(null,d,l),g)},useLayoutEffect:function(l,d){return cg(4194308,4,l,d)},useInsertionEffect:function(l,d){cg(4,2,l,d)},useMemo:function(l,d){var g=ri();d=d===void 0?null:d;var S=l();if(s_){Tt(!0);try{l()}finally{Tt(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=ri();if(g!==void 0){var R=g(d);if(s_){Tt(!0);try{g(d)}finally{Tt(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=cG.bind(null,en,l),[S.memoizedState,l]},useRef:function(l){var d=ri();return l={current:l},d.memoizedState=l},useState:function(l){l=xx(l);var d=l.queue,g=D7.bind(null,en,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Sx,useDeferredValue:function(l,d){var g=ri();return Cx(g,l,d)},useTransition:function(){var l=xx(!1);return l=T7.bind(null,en,l.queue,!0,!1),ri().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=en,R=ri();if(Sn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),ir===null)throw Error(r(349));(vn&127)!==0||i7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,x7(o7.bind(null,S,O,l),[l]),S.flags|=2048,Xf(9,{destroy:void 0},a7.bind(null,S,O,g,d),null),g},useId:function(){var l=ri(),d=ir.identifierPrefix;if(Sn){var g=To,S=jo;g=(S&~(1<<32-mt(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=sg++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?Y.createElement("select",{is:S.is}):Y.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?Y.createElement(R,{is:S.is}):Y.createElement(R)}}O[tn]=d,O[on]=S;e:for(Y=d.child;Y!==null;){if(Y.tag===5||Y.tag===6)O.appendChild(Y.stateNode);else if(Y.tag!==4&&Y.tag!==27&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===d)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===d)break e;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}d.stateNode=O;e:switch(Ts(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&jc(d)}}return mr(d),Hx(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&jc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=_e.current,Ff(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=Ns,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[tn]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||r9(l.nodeValue,g)),l||jl(d,!0)}else l=Tg(l).createTextNode(S),l[tn]=d,d.stateNode=l}return mr(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=Ff(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[tn]=d}else Yu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;mr(d),l=!1}else g=Zy(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?($i(d),d):($i(d),null);if((d.flags&128)!==0)throw Error(r(558))}return mr(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=Ff(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[tn]=d}else Yu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;mr(d),R=!1}else R=Zy(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?($i(d),d):($i(d),null)}return $i(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==l&&g&&(d.child.flags|=8192),pg(d,d.updateQueue),mr(d),null);case 4:return oe(),l===null&&u2(d.stateNode.containerInfo),mr(d),null;case 10:return Cc(d.type),mr(d),null;case 19:if(U(Vr),S=d.memoizedState,S===null)return mr(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)hp(S,!1);else{if(Or!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ng(l),O!==null){for(d.flags|=128,hp(S,!1),l=O.updateQueue,d.updateQueue=l,pg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)DC(g,l),g=g.sibling;return K(Vr,Vr.current&1|2),Sn&&kc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&ft()>yg&&(d.flags|=128,R=!0,hp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ng(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,pg(d,l),hp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Sn)return mr(d),null}else 2*ft()-S.renderingStartTime>yg&&g!==536870912&&(d.flags|=128,R=!0,hp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=ft(),l.sibling=null,g=Vr.current,K(Vr,R?g&1|2:g&1),Sn&&kc(d,S.treeForkCount),l):(mr(d),null);case 22:case 23:return $i(d),_x(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(mr(d),d.subtreeFlags&6&&(d.flags|=8192)):mr(d),g=d.updateQueue,g!==null&&pg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&U(e_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),Cc(Yr),mr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function dG(l,d){switch(Xy(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Cc(Yr),oe(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return fe(d),null;case 31:if(d.memoizedState!==null){if($i(d),d.alternate===null)throw Error(r(340));Yu()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if($i(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Yu()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return U(Vr),null;case 4:return oe(),null;case 10:return Cc(d.type),null;case 22:case 23:return $i(d),_x(),l!==null&&U(e_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return Cc(Yr),null;case 25:return null;default:return null}}function c8(l,d){switch(Xy(d),d.tag){case 3:Cc(Yr),oe();break;case 26:case 27:case 5:fe(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&$i(d);break;case 13:$i(d);break;case 19:U(Vr);break;case 10:Cc(d.type);break;case 22:case 23:$i(d),_x(),l!==null&&U(e_);break;case 24:Cc(Yr)}}function pp(l,d){try{var g=d.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&l)===l){S=void 0;var O=g.create,Y=g.inst;S=O(),Y.destroy=S}g=g.next}while(g!==R)}}catch(re){Qn(d,d.return,re)}}function Ll(l,d,g){try{var S=d.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&l)===l){var Y=S.inst,re=Y.destroy;if(re!==void 0){Y.destroy=void 0,R=d;var pe=g,Ee=re;try{Ee()}catch(Ie){Qn(R,pe,Ie)}}}S=S.next}while(S!==O)}}catch(Ie){Qn(d,d.return,Ie)}}function l8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{JC(d,g)}catch(S){Qn(l,l.return,S)}}}function u8(l,d,g){g.props=i_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){Qn(l,d,S)}}function mp(l,d){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var S=l.stateNode;break;case 30:S=l.stateNode;break;default:S=l.stateNode}typeof g=="function"?l.refCleanup=g(S):g.current=S}}catch(R){Qn(l,d,R)}}function Ao(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){Qn(l,d,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){Qn(l,d,R)}else g.current=null}function _8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){Qn(l,l.return,R)}}function qx(l,d,g){try{var S=l.stateNode;DG(S,l.type,g,d),S[on]=d}catch(R){Qn(l,l.return,R)}}function f8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ql(l.type)||l.tag===4}function Ux(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||f8(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&ql(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Gx(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Ar));else if(S!==4&&(S===27&&ql(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(Gx(l,d,g),l=l.sibling;l!==null;)Gx(l,d,g),l=l.sibling}function mg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&ql(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(mg(l,d,g),l=l.sibling;l!==null;)mg(l,d,g),l=l.sibling}function d8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Ts(d,S,g),d[tn]=l,d[on]=g}catch(O){Qn(l,l.return,O)}}var Tc=!1,es=!1,Vx=!1,h8=typeof WeakSet=="function"?WeakSet:Set,bs=null;function hG(l,d){if(l=l.containerInfo,d2=Ig,l=ae(l),xe(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var Y=0,re=-1,pe=-1,Ee=0,Ie=0,Be=l,je=null;t:for(;;){for(var Me;Be!==g||R!==0&&Be.nodeType!==3||(re=Y+R),Be!==O||S!==0&&Be.nodeType!==3||(pe=Y+S),Be.nodeType===3&&(Y+=Be.nodeValue.length),(Me=Be.firstChild)!==null;)je=Be,Be=Me;for(;;){if(Be===l)break t;if(je===g&&++Ee===R&&(re=Y),je===O&&++Ie===S&&(pe=Y),(Me=Be.nextSibling)!==null)break;Be=je,je=Be.parentNode}Be=Me}g=re===-1||pe===-1?null:{start:re,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(h2={focusedElem:l,selectionRange:g},Ig=!1,bs=d;bs!==null;)if(d=bs,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,bs=l;else for(;bs!==null;){switch(d=bs,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Ts(O,S,g),O[tn]=l,nr(O),S=O;break e;case"link":var Y=y9("link","href",R).get(S+(g.href||""));if(Y){for(var re=0;retr&&(Y=tr,tr=qt,qt=Y);var we=ze(re,qt),ve=ze(re,tr);if(we&&ve&&(Me.rangeCount!==1||Me.anchorNode!==we.node||Me.anchorOffset!==we.offset||Me.focusNode!==ve.node||Me.focusOffset!==ve.offset)){var Ce=Be.createRange();Ce.setStart(we.node,we.offset),Me.removeAllRanges(),qt>tr?(Me.addRange(Ce),Me.extend(ve.node,ve.offset)):(Ce.setEnd(ve.node,ve.offset),Me.addRange(Ce))}}}}for(Be=[],Me=re;Me=Me.parentNode;)Me.nodeType===1&&Be.push({element:Me,left:Me.scrollLeft,top:Me.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,V.T=null,g=Jx,Jx=null;var O=Pl,Y=Dc;if(cs=0,td=Pl=null,Dc=0,(On&6)!==0)throw Error(r(331));var re=On;if(On|=4,C8(O.current),w8(O,O.current,Y,g),On=re,wp(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(Kt,O)}catch{}return!0}finally{J.p=R,V.T=S,q8(l,d)}}function G8(l,d,g){d=wa(g,d),d=Rx(l.stateNode,d,2),l=Ml(l,d,2),l!==null&&(an(l,2),Ro(l))}function Qn(l,d,g){if(l.tag===3)G8(l,l,g);else for(;d!==null;){if(d.tag===3){G8(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Bl===null||!Bl.has(S))){l=wa(g,l),g=V7(2),S=Ml(d,g,2),S!==null&&(K7(g,S,d,l),an(S,2),Ro(S));break}}d=d.return}}function r2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new gG;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(Qx=!0,R.add(g),l=wG.bind(null,l,d,g),d.then(l,l))}function wG(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,ir===l&&(vn&g)===g&&(Or===4||Or===3&&(vn&62914560)===vn&&300>ft()-bg?(On&2)===0&&nd(l,0):Xx|=g,ed===vn&&(ed=0)),Ro(l)}function V8(l,d){d===0&&(d=un()),l=Hn(l,d),l!==null&&(an(l,d),Ro(l))}function kG(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),V8(l,g)}function SG(l,d){var g=0;switch(l.tag){case 31:case 13:var S=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=l.stateNode;break;case 22:S=l.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(d),V8(l,g)}function CG(l,d){return ot(l,d)}var Eg=null,sd=null,s2=!1,Ng=!1,i2=!1,Hl=0;function Ro(l){l!==sd&&l.next===null&&(sd===null?Eg=sd=l:sd=sd.next=l),Ng=!0,s2||(s2=!0,NG())}function wp(l,d){if(!i2&&Ng){i2=!0;do for(var g=!1,S=Eg;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var Y=S.suspendedLanes,re=S.pingedLanes;O=(1<<31-mt(42|l)+1)-1,O&=R&~(Y&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,X8(S,O))}else O=vn,O=_r(S,S===ir?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||Pr(S,O)||(g=!0,X8(S,O));S=S.next}while(g);i2=!1}}function EG(){K8()}function K8(){Ng=s2=!1;var l=0;Hl!==0&&IG()&&(l=Hl);for(var d=ft(),g=null,S=Eg;S!==null;){var R=S.next,O=W8(S,d);O===0?(S.next=null,g===null?Eg=R:g.next=R,R===null&&(sd=g)):(g=S,(l!==0||(O&3)!==0)&&(Ng=!0)),S=R}cs!==0&&cs!==5||wp(l),Hl!==0&&(Hl=0)}function W8(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0re)break;var Ie=pe.transferSize,Be=pe.initiatorType;Ie&&s9(Be)&&(pe=pe.responseEnd,Y+=Ie*(pe"u"?null:document;function m9(l,d,g){var S=id;if(S&&typeof d=="string"&&d){var R=dr(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),p9.has(R)||(p9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Ts(d,"link",l),nr(d),S.head.appendChild(d)))}}function VG(l){Lc.D(l),m9("dns-prefetch",l,null)}function KG(l,d){Lc.C(l,d),m9("preconnect",l,d)}function WG(l,d,g){Lc.L(l,d,g);var S=id;if(S&&l&&d){var R='link[rel="preload"][as="'+dr(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+dr(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+dr(g.imageSizes)+'"]')):R+='[href="'+dr(l)+'"]';var O=R;switch(d){case"style":O=ad(l);break;case"script":O=od(l)}za.has(O)||(l=_({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),za.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Ep(O))||d==="script"&&S.querySelector(Np(O))||(d=S.createElement("link"),Ts(d,"link",l),nr(d),S.head.appendChild(d)))}}function QG(l,d){Lc.m(l,d);var g=id;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+dr(S)+'"][href="'+dr(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=od(l)}if(!za.has(O)&&(l=_({rel:"modulepreload",href:l},d),za.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Np(O)))return}S=g.createElement("link"),Ts(S,"link",l),nr(S),g.head.appendChild(S)}}}function XG(l,d,g){Lc.S(l,d,g);var S=id;if(S&&l){var R=Fr(S).hoistableStyles,O=ad(l);d=d||"default";var Y=R.get(O);if(!Y){var re={loading:0,preload:null};if(Y=S.querySelector(Ep(O)))re.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":d},g),(g=za.get(O))&&x2(l,g);var pe=Y=S.createElement("link");nr(pe),Ts(pe,"link",l),pe._p=new Promise(function(Ee,Ie){pe.onload=Ee,pe.onerror=Ie}),pe.addEventListener("load",function(){re.loading|=1}),pe.addEventListener("error",function(){re.loading|=2}),re.loading|=4,Rg(Y,d,S)}Y={type:"stylesheet",instance:Y,count:1,state:re},R.set(O,Y)}}}function YG(l,d){Lc.X(l,d);var g=id;if(g&&l){var S=Fr(g).hoistableScripts,R=od(l),O=S.get(R);O||(O=g.querySelector(Np(R)),O||(l=_({src:l,async:!0},d),(d=za.get(R))&&w2(l,d),O=g.createElement("script"),nr(O),Ts(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function ZG(l,d){Lc.M(l,d);var g=id;if(g&&l){var S=Fr(g).hoistableScripts,R=od(l),O=S.get(R);O||(O=g.querySelector(Np(R)),O||(l=_({src:l,async:!0,type:"module"},d),(d=za.get(R))&&w2(l,d),O=g.createElement("script"),nr(O),Ts(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function g9(l,d,g,S){var R=(R=_e.current)?Ag(R):null;if(!R)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=ad(g.href),g=Fr(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=ad(g.href);var O=Fr(R).hoistableStyles,Y=O.get(l);if(Y||(R=R.ownerDocument||R,Y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,Y),(O=R.querySelector(Ep(l)))&&!O._p&&(Y.instance=O,Y.state.loading=5),za.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},za.set(l,g),O||JG(R,l,g,Y.state))),d&&S===null)throw Error(r(528,""));return Y}if(d&&S!==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=Fr(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function ad(l){return'href="'+dr(l)+'"'}function Ep(l){return'link[rel="stylesheet"]['+l+"]"}function v9(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function JG(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Ts(d,"link",g),nr(d),l.head.appendChild(d))}function od(l){return'[src="'+dr(l)+'"]'}function Np(l){return"script[async]"+l}function b9(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+dr(g.href)+'"]');if(S)return d.instance=S,nr(S),S;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(l.ownerDocument||l).createElement("style"),nr(S),Ts(S,"style",R),Rg(S,g.precedence,l),d.instance=S;case"stylesheet":R=ad(g.href);var O=l.querySelector(Ep(R));if(O)return d.state.loading|=4,d.instance=O,nr(O),O;S=v9(g),(R=za.get(R))&&x2(S,R),O=(l.ownerDocument||l).createElement("link"),nr(O);var Y=O;return Y._p=new Promise(function(re,pe){Y.onload=re,Y.onerror=pe}),Ts(O,"link",S),d.state.loading|=4,Rg(O,g.precedence,l),d.instance=O;case"script":return O=od(g.src),(R=l.querySelector(Np(O)))?(d.instance=R,nr(R),R):(S=g,(R=za.get(O))&&(S=_({},g),w2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),nr(R),Ts(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Rg(S,g.precedence,l));return d.instance}function Rg(l,d,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,Y=0;Y title"):null)}function eV(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){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 l=d.disabled,typeof d.precedence=="string"&&l==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 w9(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function tV(l,d,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=ad(S.href),O=d.querySelector(Ep(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Og.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,nr(O);return}O=d.ownerDocument||d,S=v9(S),(R=za.get(R))&&x2(S,R),O=O.createElement("link"),nr(O);var Y=O;Y._p=new Promise(function(re,pe){Y.onload=re,Y.onerror=pe}),Ts(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Og.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var k2=0;function nV(l,d){return l.stylesheets&&l.count===0&&Lg(l,l.stylesheets),0k2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Og(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lg(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Dg=null;function Lg(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Dg=new Map,d.forEach(rV,l),Dg=null,Og.call(l))}function rV(l,d){if(!(d.state.loading&4)){var g=Dg.get(l);if(g)var S=g.get(null);else{g=new Map,Dg.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),M2.exports=tK(),M2.exports}var rK=nK();const sK=!1;var EO=A.useLayoutEffect;function iK(e,n,t){A.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 aK(e){const n=A.useRef(null);return A.useImperativeHandle(e,()=>n.current,[]),n}function x0(e){return e[e.length-1]}function ch(e,n){return typeof e=="function"?e(n):e}const NO=Object.prototype.hasOwnProperty,oK=Object.prototype.propertyIsEnumerable;function zO(e){for(const n in e)if(NO.call(e,n))return!0;return!1}const cK=()=>Object.create(null),c_=(e,n)=>x_(e,n,cK);function x_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=oE(e)&&oE(s);if(!i&&!(pv(e)&&pv(s)))return s;const a=i?e:iE(e);if(!a)return s;const o=i?s:iE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!aE(t)||!t.hasOwnProperty("isPrototypeOf"))}function aE(e){return Object.prototype.toString.call(e)==="[object Object]"}function oE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vu(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||!vu(e[a],n[a],t)))return!1;return s===i}return!1}const lK=/[\x00-\x1f\x7f"<>`{}]/g;function uK(e){return e.replace(lK,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function cE(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 uK(n)}const _K=["http:","https:","mailto:","tel:"];function mv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Dp(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+=cE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+cE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function fK(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function dK(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 c=t;n.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,t||(t=c),n.set(i,c)}},clear(){n.clear(),t=void 0,r=void 0}}}const pu=4,jO=5;function TO(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 c=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=c,t[4]=c,t[5]=c,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!I.parse&&I.caseSensitive===j&&I.prefix===z&&I.suffix===T));if(D)w=D;else{const I=hK(N,_,j,z,T);w=I,I.parent=s,I.depth=i;let $;N===1?$=s.dynamic??(s.dynamic=[]):N===3?$=s.optional??(s.optional=[]):$=s.wildcard??(s.wildcard=[]),$.push(I),$.length===2&&(a==null||a.push($))}break}}s=w}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Td(_);b.kind=jO,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=Td(_);b.kind=pu,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)xb(e,n,_,c,s,i,a,o)}function AO(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 Td(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 hK(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 pK(e,n){const t=Td("/"),r=new Uint16Array(6),s=[];for(const i of e)xb(!1,r,i,1,t,0,s);for(const i of s)i.sort(AO);n.masksTree=t,n.flatCache=gv(1e3)}function mK(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=Nk(e,n.masksTree);return n.flatCache.set(e,r),r}function gK(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=Td("/"),xb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),Nk(r,a,t)}function vK(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=Nk(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=MO(i.route)),n.matchCache.set(r,i),i}function bK(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function yK(e,n=!1,t){const r=Td(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;xb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&Ek(),a[u.id]=u,c!==0&&u.path){const h=bK(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(AO);return{processedTree:{segmentTree:r,singleCache:gv(1e3),matchCache:gv(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Nk(e,n,t=!1){const r=e.split("/"),s=wK(e,r,n,t);if(!s)return null;const[i]=RO(e,r,s);return{route:s.node.route,rawParams:i}}function RO(e,n,t){var h,_,p,m;const r=xK(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.part)??0,o=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;z--){const T=_.wildcard[z],{prefix:j,suffix:M}=T;if(!(j&&(y||!(T.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(j)))){if(M){if(y)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((T.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;T--){const j=_.optional[T];o.push({node:j,index:p,skipped:z,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}if(!y)for(let T=_.optional.length-1;T>=0;T--){const j=_.optional[T],{prefix:M,suffix:D}=j;if(M||D){const I=j.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;z--){const T=_.dynamic[z],{prefix:j,suffix:M}=T;if(j||M){const D=T.caseSensitive?C:N??(N=C.toLowerCase());if(j&&!D.startsWith(j)||M&&D.indexOf(M,D.length-M.length)=0;z--){const T=_.pathless[z];o.push({node:T,index:p,skipped:m,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(r&&c){let h=c.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===pu)>(e.node.kind===pu)||n.node.kind===pu==(e.node.kind===pu)&&n.node.depth>e.node.depth))):!0}function F1(e){return H1(e.filter(n=>n!==void 0).join("/"))}function H1(e){return e.replace(/\/{2,}/g,"/")}function OO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Zc(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function DO(e){return Zc(OO(e))}function vv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function SK(e,n,t){return vv(e,t)===vv(n,t)}function CK({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 a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=H1(e)),a=e.split("/");a.length>1&&x0(a)==="";)a.pop();const u=n.split("/");for(let h=0,_=u.length;h<_;h++){const p=u[h];p===""?h?h===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(x0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?H1(o):o)||"/";return i&&r&&r.set(i,c),c}function EK(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 I2(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=>_E(s,t)).join("/"):_E(r,t)}function uE({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,c,u="";for(;oe.state.__TSR_key||e.href;function MK(e){const n=e.getAttribute(fE);if(n)return`[${fE}="${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 Kg=!1;const q1="window";function Q4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function dE(e){const n=new Set;for(const t of e){if(t===q1)continue;const r=Q4(t);r&&n.add(r)}return n}function OK(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||RK,i=new Set,a=o=>{const c=nu[o]||(nu[o]={});for(const u of i)u===document?c[q1]={scrollX,scrollY}:u.isConnected&&(c[MK(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,Kg=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{Kg||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())),AK()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=r.next,_=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 v=nu[x];if(v){let b=nu[m];for(const w in v){if(w===q1){if(h)continue}else{const y=Q4(w);if(!y||h&&u&&(p??(p=dE(u)),p.has(y)))continue}b||(b=nu[m]={}),b[w]??(b[w]=v[w])}}}Kg=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!v&&u&&(p??(p=dE(u)));const y=v&&b&&_,C=r.restoring?nu[m]:void 0;if(C)for(const N in C){const{scrollX:z,scrollY:T}=C[N];if(N===q1){if(y)continue;scrollTo({top:T,left:z,behavior:c}),w=!0}else{const j=Q4(N);j&&(j.scrollLeft=z,j.scrollTop=T,p==null||p.delete(j))}}if(!v){const N={top:0,left:0,behavior:c};if(w||scrollTo(N),p)for(const z of p)z.scrollTo(N)}}!w&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{Kg=!1}}))}function DK(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 $2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function LK(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]=$2(s):Array.isArray(i)?i.push($2(s)):t[r]=[i,$2(s)]}return t}const IK=/^(?:\s|["[{\d-]|fa|nu|tr)/,$K=PK(JSON.parse),BK=FK(JSON.stringify,JSON.parse);function PK(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=LK(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function FK(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&&!IK.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=DK(s,r);return i?`?${i}`:""}}const Rd="__root__";function HK(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 LO(e){return e instanceof Response&&!!e.options}function qK(e){return{input:({url:n})=>{for(const t of e)n=X4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=IO(e[t],n);return n}}}function UK(e){const n=DO(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=F1(["/",n,i.pathname]),i)}}function X4(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 IO(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 GK(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),c=t(void 0),u=t([]),h=r(()=>u.get().map(k=>i.get(k).get())),_=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.get(),location:o.get(),resolvedLocation:c.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:c,ids:u,matches:h,byRoute:i,__store:_,getMatchStore:p,setMatches:x};function x(k){const v=u.get(),b=k.map(w=>w.routeId);s(()=>{dK(v,b)||u.set(b);for(const w of v)b.includes(w)||i.get(w).set(()=>{});for(const w of k){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var bu="__TSR_index",hE="popstate",pE="beforeunload";function VK(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,...c})=>{var _,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const x=bv(c.path,c.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:c.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,c)=>{const u=n.state[bu];o=mE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=n.state[bu];o=mE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,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[bu]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const o=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...o,a]),()=>{var h,_;const u=((h=e.getBlockers)==null?void 0:h.call(e))??[];(_=e.setBlockers)==null||_.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 mE(e,n){n||(n={});const t=zk();return{...n,key:t,__TSR_key:t,[bu]:e}}function KK(e){var T,j;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),c=(()=>bv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((T=n.history.state)!=null&&T.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=zk();n.history.replaceState({[bu]:0,key:M,__TSR_key:M},"")}let u=c(),h,_=!1,p=!1,m=!1,x=!1;const k=()=>u;let v;const b=()=>{v&&(z._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),z._ignoreSubscribers=!1,v=void 0,h=void 0)},w=(M,D,I)=>{const $=o(D),q=!!v;q||(h=u),u=bv(D,I),v=[$,I,(v==null?void 0:v[2])||M],q||queueMicrotask(()=>b())},y=M=>{u=c(),z.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[bu]-u.state[bu],I=D===1,$=D===-1,q=!I&&!$||_;_=!1;const H=q?"GO":$?"BACK":"FORWARD",Q=q?{type:"GO",index:D}:{type:$?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const J of V)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,n.history.go(1),z.notify(Q);return}}}u=c(),z.notify(Q)},N=M=>{if(x){x=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const $ of I){const q=$.enableBeforeUnload??!0;if(q===!0){D=!0;break}if(typeof q=="function"&&q()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},z=VK({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>w(!0,M,D),replaceState:(M,D)=>w(!1,M,D),back:M=>(M&&(m=!0),x=!0,n.history.back()),forward:M=>{M&&(m=!0),x=!0,n.history.forward()},go:M=>{_=!0,n.history.go(M)},createHref:M=>o(M),flush:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(pE,N,{capture:!0}),n.removeEventListener(hE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(pE,N,{capture:!0}),n.addEventListener(hE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return z._ignoreSubscribers||y("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return z._ignoreSubscribers||y("REPLACE"),D},z}function WK(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function bv(e,n){const t=WK(e),r=t.indexOf("#"),s=t.indexOf("?"),i=zk();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||{[bu]:0,key:i,__TSR_key:i}}}function zk(){return(Math.random()+1).toString(36).substring(7)}function gE(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 wb(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 vE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function QK(e,n,t,r){var s,i,a,o;for(const c of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===c.routeId)||(i=(s=e.routesById[c.routeId].options).onLeave)==null||i.call(s,c)}for(const c of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[c.routeId].options)[n.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||o.call(a,c)}}var XK=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??sK??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=EK(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=KK()),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=gv(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=GK(this.latestLocation,u),OK(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=DO(o);h&&h!=="/"&&u.push(UK({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:qK(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=yK(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&pK(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:c,search:u,hash:h,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:c+w+h,publicHref:c+w+h,pathname:Dp(c).path,external:!1,searchStr:w,search:c_(r==null?void 0:r.search,b),hash:Dp(h.slice(1)).path,state:x_(r==null?void 0:r.state,p)}}const m=new URL(_,this.origin),x=X4(this.rewrite,m),k=this.options.parseSearch(x.search),v=this.options.stringifySearch(k);return x.search=v,{href:x.href.replace(x.origin,""),publicHref:_,pathname:Dp(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:v,search:c_(r==null?void 0:r.search,k),hash:Dp(x.hash.slice(1)).path,state:x_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>CK({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=vK(Zc(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,D;if(i.href){const I=bv(i.href,{});i={...i,to:X4(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],h=o[3],_=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=bE(i.params,h);const m=this.routesByPath[Zc(_)];let x;if(m)x=this.getRouteBranch(m);else if(_.includes("$"))x=[];else{const[I,$,q]=this.getMatchedRoutes(_);x=I,this.options.notFoundRoute&&(!q||q.path!=="/"&&$["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&zO(p))for(const I of x){const $=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if($){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,$(p))}catch{}}}const k=t.leaveParams?_:Dp(uE({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const I={};x.forEach($=>{if($.options.validateSearch)try{Object.assign(I,U1($.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=ZK(v,i,x,t._includeValidateSearch),v=c_(u,v);const b=this.options.stringifySearch(v),w=i.hash===!0?a.hash:i.hash?ch(i.hash,a.hash):void 0,y=w?`#${w}`:"";let C=i.state===!0?a.state:i.state?ch(i.state,a.state):{};i.state&&(C=x_(a.state,C));const N=`${k}${b}${y}`;let z,T,j=!1;if(this.rewrite){const I=new URL(N,this.origin),$=IO(this.rewrite,I);z=I.href.replace(I.origin,""),$.origin!==this.origin?(T=$.href,j=!0):T=$.pathname+$.search+$.hash}else z=fK(N),T=z;return{publicHref:T,href:z,pathname:k,search:v,searchStr:b,state:C,hash:w??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=mK(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=bE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Zc(this.latestLocation.href)===Zc(s.href)&&vu(vE(s.state),vE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:_,...p}=s;h&&(p={...h,state:{...h.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=_??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 c=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var c,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 _=this.buildLocation({to:t,...a});s=s??_.publicHref,i=i??_.publicHref}const h=!o&&i?i:s;if(mv(h,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(h):window.location.href=h;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 oW(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,c=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(wb(o,c)):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,h;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(_=>!s||s(_)).map(_=>_.id)),o=[];for(const[_,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(_),o.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&gE(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=r.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(h=this._flights)==null||h.delete(_);for(const _ of o)_.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&&mv(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[h,_]of r)(!i||i(_))&&(o.push(h),a.push(_));const c=[];for(const[h,_]of s??[])(!i||_.some(i))&&(c.push(h),a.push(..._));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const _=h._flight;h._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===_&&this._flights.delete(h.id),c.push(_[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Md,this.preloadRoute=t=>cW(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(),c=gK(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!vu(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?vu(o.search,i.search,{partial:!0})?c.rawParams:!1:c.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??BK,parseSearch:e.parseSearch??$K,protocolAllowlist:e.protocolAllowlist??_K}),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=MO(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["**"]:Zc(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?JK(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(x,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===x.id?v:x===this.options.notFoundRoute?u.find(b=>b.routeId===x.id):void 0};let _;for(let x=0;x{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((x,k)=>k(x),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((x,k)=>k(x),m):m};s.push(h)}const u=c.validateSearch;if(r&&u){const h=({search:_,next:p,meta:m})=>{const x=p(_);try{const k=U1(u,x);if(m&&k)for(const v in k)v in x||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...x,...k}}catch{}return x};s.push(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const _=ch(n.search,c);return u&&(u.explicit=_),_}const h=(_,p)=>{if(p){const m=u||{};return{search:i(o+1,_,m),meta:m}}return i(o+1,_,u)};return s[o]({search:c,next:h,meta:u})};return i(0,e)}function JK(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 Rd}function bE(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,ch(e,t))}function yE(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 Y4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function eW(e,n){const t=Y4(e,"component");let r=Y4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Md(e,n,t){const r=()=>n===!1?void 0:n?Y4(e,n):eW(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,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function jk(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 _f(e,n){return e.routesById[n.routeId]}function k0(e,n,t){return LO(e)?[Ki,e]:lh(e)?(e.routeId||(e.routeId=t),[kb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[sl,e]):[Wo,e]}function Tk(e,n){var r,s;let t=k0(n,!0,e.id);if(t[0]!==sl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=k0(i,!0,e.id)}return t}function o0(e,n,t,r,s){return s[0].signal.aborted?wu:Mk(e,n,t,Tk(t,r),s)}async function tW(e,n,t,r,s,i){var h,_;const[a,o]=n,c=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({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Jc(e,m),[p,o0(e,n,x,C,t)]}if(c.aborted)return[p,wu];const b=m.paramsError??m.searchError;if(b!==void 0)return Jc(e,m),[p,o0(e,n,x,b,t)];const w=x.options.beforeLoad;if(!w)continue;const y=m.status;p>=i&&(m.status="pending",(_=t[7])==null||_.call(t));try{S0(e,m,"beforeLoad",t[0]);const C=await uf(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,wu];const N=Mk(e,n,x,k0(C,!1,x.id),t);if(N[0]!==Wo)return Jc(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Jc(e,m),[p,o0(e,n,x,C,t)]}finally{m.status=y,S0(e,m,!1,t[0])}}s()}function Ak(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 Jc(e,n){var r;const t=n._flight;n._flight=void 0,(r=Ak(e,n,t))==null||r.abort()}function ji(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(c=>c.id===a.id)))o[2]=0;else{const c=Ak(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function Rk(e){for(const n of e){const t=n._flight;t&&t[2]++}}function S0(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 $O(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:c=>e.navigate({...c,_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 xE(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return wu;if(!s)return[Wo,void 0];let u=t._flight;S0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s($O(e,n,t,r,h,i,!!a[3]))).then(_=>k0(_,!1,r.id),_=>k0(_,!0,r.id)).then(_=>{var p;return _[0]!==Wo&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),_[0]===sl&&u[2]?Tk(r,_[1]):_}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Mk(e,n,r,await uf(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return Jc(e,t),wu}finally{S0(e,t,!1,o)}}function wE(e,n,t){n[0]!==Ki&&(e.status="success",e.error=void 0,n[0]===Wo?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function nW(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&&Jc(e,r)}function kE(e,n){return n[0]===sl||n[0]===kb?{...e,status:n[0]===sl?"error":"notFound",error:n[1],_flight:void 0}:e}function rW(e,n,t,r,s,i,a){var $,q;const o=n[1][t],c=_f(e,o),u=!!i[3],h=e._cache.get(o.id);let _,p=!1,m;try{if(o.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_($O(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=wu)),!m)if(o.status!=="success")p=!0;else{const H=u||o.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||_||_===void 0&&Date.now()-o.updatedAt>=H&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(H){o.invalid=!0,Jc(e,o),m=o0(e,n,c,H,i)}const x=c.options.loader,k=typeof x=="function",v=k?x:x==null?void 0:x.handler,b=!u||c.options.preload!==!1;let w=b&&x?($=e._flights)==null?void 0:$.get(o.id):void 0;w===o._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(x&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!y&&(o.status!=="success"||!!x),z=t>=a?i[7]:void 0,T=c.lazyFn&&c._lazy!==!0?z:void 0;if(C&&!x&&(o.invalid=!1,o.updatedAt=Date.now()),w&&w[2]++,N){const H=o._flight;o._flight=w,(q=Ak(e,o,H))==null||q.abort(),t>=a&&(o.status="pending"),z==null||z()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):N?xE(e,n,o,c,v,s,i):Promise.resolve([Wo,o.loaderData])).then(H=>(N&&(wE(o,H,u),H[0]===Wo&&(x&&!i[0].signal.aborted&&nW(e,o,h),t>=a&&(o.status="pending"))),H)),M=uf(Promise.resolve().then(()=>Md(c,void 0,T)),i[0].signal).then(()=>{},H=>n[1].some((Q,V)=>V<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,o0(e,n,c,H,i)]).then(H=>j.then(Q=>(N&&!H&&Q[0]===Wo&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",z==null||z()),H)));if(r.push([t,j,M]),!y)return j.then(H=>kE(o,H));const D={...o,status:"pending",preload:!1,_flight:w};o.invalid=!1,o.isFetching="loader";const I=xE(e,n,D,c,v,s,i).then(H=>(o.isFetching=!1,wE(D,H,!1),H));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(H=>kE(D,H))}async function Z4(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 c=_f(e,n[o]);try{const u=Md(c,!1);u&&await uf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(c.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function $_(e,n){n[2]&&(ji(e,n[2].map(t=>t[3])),n[2]=void 0)}async function SE(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]>=Ki)throw[o,a];!s&&a[0]!==Wo&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===Ki)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function Mk(e,n,t,r,s,i){for(;r[0]===Ki;){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):[Ki,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[sl,c]:Tk(t,c),i=!0}}return r}async function BO(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===kb?Z4(e,a,m,r.signal):m[0];let _=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=Ki)_=0;else if(o){_=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=_)break;const x=await m[1];if(x[0]!==Wo&&x[0]=_)break;const x=await m[2];if(x){o=x;break}}if(((o==null?void 0:o[1][0])??0)>=Ki){const m=o[1];if(m[0]!==Ki||m[1].options.reloadDocument||m[2])return $_(e,n),m;c=!0,o=[0,[sl,new Error("Too many redirects")]]}const p=o?o[2]??await h(o):u;if(p>=0){const m=o==null?void 0:o[1],x=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],b=()=>{m&&(k._notFound=void 0,x===sl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};b(),m||i==null||i();const w=_f(e,k);try{await uf(m?Promise.resolve().then(()=>Md(w,x===sl?"errorComponent":"notFoundComponent")):Promise.all([Md(w),Md(w,"notFoundComponent")]),r.signal)}catch(y){if(y===r.signal&&r.signal.aborted)return $_(e,n),wu}m?c&&(r.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(n[2]??[]).map(y=>y[1])]),$_(e,n),ji(e,a),b()):k.status="success"}return n}async function PO(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await Z4(e,t,void 0,i,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let h=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Ki&&(h=0);k()}if(!i.aborted&&!r[3]){const w=[];for(const[y,C]of e._flights??[])C[2]||(e._flights.delete(y),w.push(C[1]));for(const y of w)y.abort()}const b=BO(e,s,p,r[0],SE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=SE(s[2],void 0,void 0,b.then(w=>w0(w)?0:jk(t).length,()=>0))),a=await b}catch(c){if($_(e,s),c===i&&i.aborted)return wu;throw c}return w0(a)?a:PO(e,a,i,r[6]===t.length?r[6]:0)}function J4(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(()=>J4(e,n),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+x),w));return}}function Lp(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 CE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!jk(n[3]).some(i=>i.id===t[1]))return;let s;try{await uf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function HO(e,n){e._committed=n,e.stores.setMatches(n)}function sW(e,n,t,r){const s=e._committed,i=e._cache;for(const c of t)c.preload=!1,r&&(c._assetEnd=void 0);const a=jk(t).length,o=new Map;{const c=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,HO(e,t),ji(e,[...i.values(),...s],[...t,...o.values()]),QK(e,s,t,n)}async function Wg(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function qO(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 iW(e,n,t,r,s){const i=t.map(c=>({...c}));Rk(i);for(const c of r)Jc(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await BO(e,a,r,n[0],s)}catch(c){throw ji(e,i),c}if(w0(o)){ji(e,i),o[0]===Ki&&e._tx===n&&e._committed===t&&await qO(e,n,o);return}if(await PO(e,o,n[0].signal),e._tx!==n||e._committed!==t){ji(e,i);return}for(const c of i){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Jc(e,u))}HO(e,i),ji(e,t,i)}async function aW(e,n,t,r,s,i){const a=await FO(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(w0(a)){const _=a[0]===Ki&&e._tx===n;if((!_||a[1].options.reloadDocument)&&Lp(e,n),ji(e,n[3]),n[3]=[],!_)return;if(e._tx!==n){Lp(e,n);return}await qO(e,n,a);return}const o=a[1];if(e._tx===n&&await CE(e,n),e._tx!==n){Lp(e,n),ji(e,o),$_(e,a);return}const c=n[2],u=wb(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await CE(e,n),e._tx!==n){Lp(e,n),ji(e,o),$_(e,a);return}const _=()=>{Lp(e,n),sW(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,o);if(e._tx!==n){$_(e,a);return}h!=null&&h.length&&iW(e,n,o,h,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),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 oW(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,c=e._handoff,u=c==null?void 0:c[0](),h=new AbortController,_=e._preflight;if(e._preflight=h,u||c==null||c[1](),_==null||_.abort(),!h.signal.aborted){const N=wb(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await Wg(e,t);return}const p=s.href===i.href;let m=h;const x=e.matchRoutes(i,{_controller:h});Rk(x);const k=u?c[1](x):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){ji(e,x),await Wg(e,t);return}e._preflight=void 0;let v;const b=()=>aW(e,y,p,()=>J4(e,y),n==null?void 0:n.sync,k),w=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),y=[m,o,i,x,Date.now(),w];if(e._tx=y,t){for(const N of e.stores.matches.get()){if(e._tx!==y)break;N.isFetching&&S0(e,N,!1)}t[0].abort(),ji(e,t[3],y[3],!0)}if(e._tx!==y){ji(e,y[3]),y[3]=[],v==null||v(),await Wg(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(N=>N._notFound))&&J4(e,y),v==null||v(b()),await w,await Wg(e,y)}async function cW(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,c;try{try{a=e.matchRoutes(t,{_controller:i}),Rk(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await FO(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),ji(e,a)),i.abort()}if(!w0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){lh(u)||console.error(u);return}}}const lW="Error preloading route! ☝️";var UO=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 c,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),r?this._path=Rd:this.parentRoute||Ek();let s=r?Rd:t==null?void 0:t.path;s&&s!=="/"&&(s=OO(s));const i=(t==null?void 0:t.id)||s;let a=r?Rd:F1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=F1(["/",a]));const o=a==="__root__"?"/":F1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Zc(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=>HK({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.")}},uW=class extends UO{constructor(e){super(e)}},Ok=class extends A.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?A.createElement(this.props.errorComponent??_W,{error:e,reset:this.reset}):this.props.children}};function _W({error:e}){const[n,t]=A.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.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"})]}),f.jsx("div",{style:{height:".25rem"}}),n?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function fW({children:e,fallback:n=null}){return f.jsx(et.Fragment,{children:GO()?e:n})}function GO(){return et.useSyncExternalStore(dW,()=>!0,()=>!1)}function dW(){return()=>{}}var VO=A.createContext(null);function _i(e){return A.useContext(VO)}var Sb=A.createContext(void 0),hW=A.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 pW({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,_){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=_,h.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===_&&x.sub===h)return;const k=h.depsTail=u.subsTail={version:_,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,x!==void 0?x.nextSub=k:u.subs=k}function s(u,h=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:h.depsTail=p,p!==void 0?p.nextDep=m:h.deps=m,x!==void 0?x.prevSub=k:_.subsTail=k,k!==void 0?k.nextSub=x:(_.subs=x)===void 0&&t(_),m}function i(u){let h=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(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 k=(u=x).nextSub;k!==void 0&&(_={value:h,prev:_},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let _,p=0,m=!1;e:do{const x=u.dep,k=x.flags;if(h.flags&16)m=!0;else if((k&17)===17){if(e(x)){const v=x.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=x.deps,h=x,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,_=h.flags;(_&48)===32&&(h.flags=_|16,(_&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let _=h.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function mW(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 e3=[];let G1=0;const{link:EE,unlink:gW,propagate:vW,checkDirty:KO,shallowPropagate:NE}=pW({update(e){return e._update()},notify(e){e3[t3++]=e,e.flags&=~xr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=xr.Mutable|xr.Dirty,xv(e))}});let Qg=0,t3=0,Bo,n3=0;function bW(e){try{++n3,e()}finally{--n3||WO()}}function xv(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=gW(t,e)}function WO(){if(!(n3>0)){for(;Qg{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=Bo,o=(n==null?void 0:n.compare)??Object.is;if(t)Bo=s,++G1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=xr.Mutable|xr.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&t?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{Bo=a,t&&(s.flags&=~xr.RecursedCheck),xv(s)}}};return t?(s.flags=xr.Mutable|xr.Dirty,s.get=function(){const i=s.flags;if(i&xr.Dirty||i&xr.Pending&&KO(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&NE(a)}}else i&xr.Pending&&(s.flags=i&~xr.Pending);return Bo!==void 0&&EE(s,Bo,G1),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(vW(a),NE(a),WO())}},s}function yW(e){const n=()=>{const r=Bo;Bo=t,++G1,t.depsTail=void 0,t.flags=xr.Watching|xr.RecursedCheck;try{return e()}finally{Bo=r,t.flags&=~xr.RecursedCheck,xv(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&&KO(this.deps,this)?n():this.flags=xr.Watching},stop(){this.flags=xr.None,this.depsTail=void 0,xv(this)}};return n(),t}var B2={exports:{}},P2={},F2={exports:{}},H2={};/** - * @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 jE;function xW(){if(jE)return H2;jE=1;var e=vm();function n(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&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(_,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),k=x[0].inst,v=x[1];return i(function(){k.value=m,k.getSnapshot=p,c(k)&&v({inst:k})},[_,m,p]),s(function(){return c(k)&&v({inst:k}),_(function(){c(k)&&v({inst:k})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return H2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,H2}var TE;function wW(){return TE||(TE=1,F2.exports=xW()),F2.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 AE;function kW(){if(AE)return P2;AE=1;var e=vm(),n=wW();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return P2.useSyncExternalStoreWithSelector=function(u,h,_,p,m){var x=i(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=o(function(){function b(z){if(!w){if(w=!0,y=z,z=p(z),m!==void 0&&k.hasValue){var T=k.value;if(m(T,z))return C=T}return C=z}if(T=C,r(y,z))return T;var j=p(z);return m!==void 0&&m(T,j)?(y=z,T):(y=z,C=j)}var w=!1,y,C,N=_===void 0?null:_;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,_,p,m]);var v=s(u,x[0],x[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},P2}var RE;function SW(){return RE||(RE=1,B2.exports=kW()),B2.exports}var QO=SW();const CW=gm(QO);function EW(e,n){return e===n}function Xo(e,n,t=EW){const r=A.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=A.useCallback(()=>e==null?void 0:e.get(),[e]);return QO.useSyncExternalStoreWithSelector(r,s,s,n,t)}var ME={};function Dk(e,n){const t=A.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=x_(t.current,s):s}}function ff(e){const n=_i(),t=A.useContext(e.from?hW:Sb),r=e.from??t,s=n.stores.getMatchStore(r),i=Dk(e,n),a=Xo(s,o=>o?i(o):ME);if(a!==ME)return a;(e.shouldThrow??!0)&&Ek()}function XO(e){return ff({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function YO(e){const{select:n,...t}=e;return ff({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function ZO(e){return ff({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 JO(e){return ff({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Cb(e){const n=_i();return A.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function Lk(e){return ff({...e,select:n=>e.select?e.select(n.context):n.context})}function q2(e){const n=A.useRef(e);return vu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function NW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function zW(e,n,t){if(e!=null&&e.external)return mv(e.href,t)?void 0:e.href;if(!DW(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),mv(n,t)?void 0:n}catch{}}function jW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!SK(e.pathname,n.pathname,r))return!1}else{const a=vv(e.pathname,r),o=vv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!vu(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 TW(e,n){const t=_i(),r=aK(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:x,viewTransition:k,children:v,target:b,disabled:w,style:y,className:C,onClick:N,onBlur:z,onFocus:T,onMouseEnter:j,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:$,search:q,hash:H,state:Q,mask:V,reloadDocument:J,unsafeRelative:Z,from:B,_fromLocation:L,...F}=e,U=GO(),K=q2(e.search),ne=q2(e.params),ce=q2(a),_e=A.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,K,ne,e.state,e.mask,e.unsafeRelative]),se=A.useCallback(dt=>{const ft=t.buildLocation({_fromLocation:dt,..._e}),Le=OW(ft.maskedLocation?ft.maskedLocation.publicHref:ft.publicHref,ft.maskedLocation?ft.maskedLocation.external:ft.external,t.history,w),ge=zW(Le,o,t.protocolAllowlist);return[Le==null?void 0:Le.href,ge,jW(dt,ft,ce,t.basepath,U,ge!==void 0)]},[ce,w,U,_e,t,o]),[G,oe,le]=Xo(t.stores.location,se,NW),fe=le?ch(s,{})??AW:U2,me=le?U2:ch(i,{})??U2,Re=[C,fe.className,me.className].filter(Boolean).join(" "),Oe=(y||fe.style||me.style)&&{...y,...fe.style,...me.style},We=A.useRef(!1),He=e.reloadDocument||oe||w?!1:c??t.options.defaultPreload,Se=u??t.options.defaultPreloadDelay??0,it=A.useCallback(()=>{t.preloadRoute(_e).catch(dt=>{console.warn(dt),console.warn(lW)})},[t,_e]),Je=A.useCallback(dt=>{if(!dt){G2(r);return}if(!(dt.isIntersecting??He==="intent")){dt.isIntersecting===!1&&G2(r);return}if(!Se){it();return}c0.has(r)||c0.set(r,setTimeout(()=>{c0.delete(r),it()},Se))},[it,r,He,Se]);iK(r,Je,He!=="viewport"),A.useEffect(()=>{We.current||He==="render"&&(it(),We.current=!0)},[it,He]);const ot=dt=>{const ft=dt.currentTarget.getAttribute("target"),Le=b!==void 0?b:ft;!w&&!(dt.metaKey||dt.altKey||dt.ctrlKey||dt.shiftKey)&&!dt.defaultPrevented&&(!Le||Le==="_self")&&dt.button===0&&(dt.preventDefault(),t.navigate({..._e,replace:p,resetScroll:x,hashScrollIntoView:_,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...F,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...C&&{className:C},...N&&{onClick:N},...z&&{onBlur:z},...T&&{onFocus:T},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const wt=()=>{He==="intent"&&it()},Pt=()=>{He==="intent"&&G2(r)};return{...F,...fe,...me,href:G,ref:r,onClick:ld([N,ot]),onBlur:ld([z,Pt]),onFocus:ld([T,Je]),onMouseEnter:ld([j,Je]),onMouseLeave:ld([M,Pt]),onTouchStart:ld([D,wt]),disabled:!!w,target:b,...Oe&&{style:Oe},...Re&&{className:Re},...w&&RW,...le&&MW}}var U2={},AW={className:"active"},RW={role:"link","aria-disabled":!0},MW={"data-status":"active","aria-current":"page"},c0=new WeakMap,G2=e=>{clearTimeout(c0.get(e)),c0.delete(e)},ld=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function OW(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function DW(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Eb=A.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=TW(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...c}=i;return A.createElement("a",c,a)}return A.createElement(t,i,a)}),LW=class extends UO{constructor(n){super(n),this.useMatch=t=>ff({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Lk({...t,from:this.id}),this.useSearch=t=>JO({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>ZO({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>YO({...t,from:this.id}),this.useLoaderData=t=>XO({...t,from:this.id}),this.useNavigate=()=>Cb({from:this.fullPath}),this.Link=et.forwardRef((t,r)=>f.jsx(Eb,{ref:r,from:this.fullPath,...t}))}};function IW(e){return new LW(e)}function $W(){return e=>PW(e)}var BW=class extends uW{constructor(e){super(e),this.useMatch=n=>ff({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Lk({...n,from:this.id}),this.useSearch=n=>JO({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>ZO({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>YO({...n,from:this.id}),this.useLoaderData=n=>XO({...n,from:this.id}),this.useNavigate=()=>Cb({from:this.fullPath}),this.Link=et.forwardRef((n,t)=>f.jsx(Eb,{ref:t,from:this.fullPath,...n}))}};function PW(e){return new BW(e)}function tc(e){return n=>{const t=IW(n);return t.isRoot=!1,t}}function FW(e){const n=_i(),t=`not-found-${Xo(n.stores.location,r=>r.pathname)}-${Xo(n.stores.status,r=>r)}`;return f.jsx(Ok,{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 HW(){return f.jsx("p",{children:"Not Found"})}function gd(e){return f.jsx(f.Fragment,{children:e.children})}function eD(e,n,t){return n.options.notFoundComponent?f.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(HW,{})}function Nb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var qW=(e,n)=>e[0]===n[0]&&e[1]===n[1],tD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,nD=A.memo(function({routeId:n}){const t=_i();return f.jsx(UW,{router:t,match:Xo(t.stores.getMatchStore(n),r=>r)})});function UW({router:e,match:n}){var _,p;const t=e.routesById[n.routeId],r=Nb(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",c=tD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?A.Suspense:gd,u=s?Ok:gd,h=a?FW:gd;return f.jsxs(t.isRoot?t.options.shellComponent??gd:gd,{children:[f.jsx(Sb.Provider,{value:n.routeId,children:f.jsx(c,{fallback:r,children:f.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:f.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return A.createElement(a,m)},children:o?f.jsx(fW,{fallback:r,children:f.jsx(OE,{match:n})}):f.jsx(OE,{match:n})})})})}),null]})}var OE=A.memo(function({match:n}){const t=_i(),r=n.routeId,s=t.routesById[r],i=A.useMemo(()=>{var c;const o=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({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=A.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?f.jsx(o,{},i):f.jsx(C0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!tD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Nb(t,s)}if(n.status==="notFound")return eD(t,s,n.error);if(n.status==="error")throw n.error;return a}),C0=A.memo(function(){const n=_i(),t=A.useContext(Sb);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Xo(o,c=>[!!c._notFound,c.error],qW),i=Xo(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return eD(n,n.routesById[t],s);if(!i)return null;const a=f.jsx(nD,{routeId:i});return t===Rd?f.jsx(A.Suspense,{fallback:Nb(n),children:a}):a});function rD(e,n){const t=e[1];e.length=0,t==null||t(n)}function GW({t:e}){const n=_i(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{rD(t,!1),t.push(s,i),e(n),A.startTransition(r)}),EO(()=>{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(Zc(s.publicHref)!==Zc(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",...wb(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function VW(){const e=_i(),n=e.routesById[Rd],t=Nb(e,n),r=e.ssr?gd:A.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(GW,{t:A.useState()[1]}),f.jsx(r,{fallback:t,children:f.jsx(KW,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function KW(){const e=_i(),n=e._rendered,t=Xo(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;EO(()=>{n[0]===t&&rD(n,!0)},[n,t]);const i=s?f.jsx(nD,{routeId:s}):null;return f.jsx(Sb.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:f.jsx(Ok,{getResetKey:()=>r,onCatch:void 0,children:i})})}var WW=e=>({createMutableStore:zE,createReadonlyStore:zE,batch:bW}),QW=e=>new XW(e),XW=class extends XK{constructor(e){super(e,WW)}};function YW({router:e,children:n,...t}){zO(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=f.jsx(VO.Provider,{value:e,children:n});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function ZW({router:e,...n}){return f.jsx(YW,{router:e,...n,children:f.jsx(VW,{})})}function JW(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 eQ(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=JW(e),a=_i(),{history:o}=a,[c,u]=A.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return A.useEffect(()=>{const h=async _=>{function p(b){const w=a.parseLocation(b),[,y,C]=a.getMatchedRoutes(w.pathname);return C===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),x=p(_.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const k=await t({action:_.action,current:m,next:x});if(!i)return k;if(!k)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:x,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function sD(e){const n=_i({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Xo(t.stores.__store,Dk(e,t))}function tQ(e){const n=_i();return Xo(n.stores.location,Dk(e,n))}const wv=new WeakMap,V1=new WeakMap;function Za(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))wv.set(s,(wv.get(s)??0)+1),(r=V1.get(s))==null||r.add(t)}function ym(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(c=>[c.id,c])),i=new Set(e.map(c=>c.id)),a=n.filter(c=>t.has(c.id)&&!i.has(c.id)),o=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return r?[...a,...o]:[...o,...a]}async function Rh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?wv.get(s):void 0,a=await t();if(!s||wv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,c=>c??a);const o=new Set;V1.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{V1.get(s)===o&&V1.delete(s)}}const uh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function iD(e){const n=e.queryKey[2];if(n==="resolvedFile")return uh(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&&uh(t.ref)}function Ta(e,n=Ia(),t,r=!1){if(!An(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!iD(i)&&(!t||t(i))};r?tt.cancelQueries(s).then(()=>{An(n)&&tt.invalidateQueries(s)}):tt.invalidateQueries(s)}const aD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Ik=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],nQ=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Ik,...aD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function rQ(e,n=Ia(),t=!1){const r=tt.getQueryData([...n,"listChatSessions",e])??[],s=tt.getQueryData([...n,"listRuns",e])??[],i=tt.getQueryData([...n,"listExperiments",e])??[];Ta([...aD,...Ik,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(c=>c.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(c=>c.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function zb(e){const n=Ia();ll.add(e),Za(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"])Ck({queryKey:[...n,t,e]})}function sQ(e){const n=Ia(),t=tt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])zb(r.id);Ck({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const iQ={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:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function aQ(e,n){var a;if(!An(n))return;const t=(o,c=n,u)=>Ta(o,c,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(iQ[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],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,c]=i;if(c.startsWith("/file")){rQ(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 oQ={},cQ="en",$k=["en","zh-CN","fa","ar","es","hi"],oD="orx:locale",Bk=["localStorage","preferredLanguage","baseLocale"],DE=[],E0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let LE=!1,E=()=>{var t;let e=Bk;!E0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=uD(window.location.href));const n=lQ(e);if(n)return LE||(LE=!0,cD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function lQ(e,n){let t;for(const r of e){if(r==="baseLocale")t=cQ;else if(r==="preferredLanguage"&&!E0)t=hQ();else if(r==="localStorage"&&!E0)t=localStorage.getItem(oD)??void 0;else if(_D(r)&&kv.has(r)){const i=kv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return fQ(a)}}const s=N0(t);if(s)return s}}const uQ=e=>{window.location.reload()};let cD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=Bk;!E0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=uD(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(oD,e);else if(_D(c)&&kv.has(c)){const u=kv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(h))}}}const a=()=>{!E0&&t.reload&&window.location&&e!==r&&uQ()};if(s.length)return Promise.all(s).then(()=>{a()});a()},_Q=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function N0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of $k)if(t.toLowerCase()===n)return t}function lD(e){return!!e&&$k.some(n=>n===e)}function fQ(e){const n=N0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${$k.join(", ")}`)}function dQ(e,n){return e.exec(n.href)}function hQ(){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=N0(t.fullTag);if(r)return r;const s=N0(t.baseTag);if(s)return s}}function pQ(e){return mQ(e)}function mQ(e){const n=typeof e=="string"?new URL(e,_Q()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&N0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let IE,$E;function gQ(e){if(DE.length===0)return;const n=typeof e=="string"?e:e.href;if(IE===n)return $E;const t=new URL(n,"http://example.com"),r=pQ(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of DE){const c=new oQ(o.match,a.href);if(dQ(c,a)){i=o;break}}if(i)break}return IE=n,$E=i,i}function uD(e){const n=gQ(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:Bk}const kv=new Map;function _D(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const vQ=e=>`Actions for ${e==null?void 0:e.name}`,bQ=e=>`${e==null?void 0:e.name} 的操作`,yQ=e=>`عملیات ${e==null?void 0:e.name}`,xQ=e=>`إجراءات ${e==null?void 0:e.name}`,wQ=e=>`Acciones para ${e==null?void 0:e.name}`,kQ=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,SQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bQ(e):t==="fa"?yQ(e):t==="ar"?xQ(e):t==="es"?wQ(e):t==="hi"?kQ(e):vQ(e)}),CQ=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,EQ=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,NQ=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,zQ=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,jQ=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,TQ=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,AQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EQ(e):t==="fa"?NQ(e):t==="ar"?zQ(e):t==="es"?jQ(e):t==="hi"?TQ(e):CQ(e)}),RQ=e=>`Branch: ${e==null?void 0:e.branch}`,MQ=e=>`分支:${e==null?void 0:e.branch}`,OQ=e=>`شاخه: ${e==null?void 0:e.branch}`,DQ=e=>`الفرع: ${e==null?void 0:e.branch}`,LQ=e=>`Rama: ${e==null?void 0:e.branch}`,IQ=e=>`ब्रांच: ${e==null?void 0:e.branch}`,$Q=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MQ(e):t==="fa"?OQ(e):t==="ar"?DQ(e):t==="es"?LQ(e):t==="hi"?IQ(e):RQ(e)}),BQ=e=>`Browse code on ${e==null?void 0:e.branch}`,PQ=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,FQ=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,HQ=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,qQ=e=>`Explorar el código en ${e==null?void 0:e.branch}`,UQ=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,fD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PQ(e):t==="fa"?FQ(e):t==="ar"?HQ(e):t==="es"?qQ(e):t==="hi"?UQ(e):BQ(e)}),GQ=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,VQ=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,KQ=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,WQ=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,QQ=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,XQ=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,YQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VQ(e):t==="fa"?KQ(e):t==="ar"?WQ(e):t==="es"?QQ(e):t==="hi"?XQ(e):GQ(e)}),ZQ=e=>`Collapse ${e==null?void 0:e.name}`,JQ=e=>`折叠 ${e==null?void 0:e.name}`,eX=e=>`بستن ${e==null?void 0:e.name}`,tX=e=>`طيّ ${e==null?void 0:e.name}`,nX=e=>`Contraer ${e==null?void 0:e.name}`,rX=e=>`${e==null?void 0:e.name} समेटें`,sX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JQ(e):t==="fa"?eX(e):t==="ar"?tX(e):t==="es"?nX(e):t==="hi"?rX(e):ZQ(e)}),iX=e=>`Committed changes versus ${e==null?void 0:e.parent}`,aX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,oX=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,cX=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,lX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,uX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,_X=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aX(e):t==="fa"?oX(e):t==="ar"?cX(e):t==="es"?lX(e):t==="hi"?uX(e):iX(e)}),fX=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,dX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,hX=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,pX=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,mX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,gX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,vX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dX(e):t==="fa"?hX(e):t==="ar"?pX(e):t==="es"?mX(e):t==="hi"?gX(e):fX(e)}),bX=e=>`Copy ${e==null?void 0:e.value}`,yX=e=>`复制 ${e==null?void 0:e.value}`,xX=e=>`کپی ${e==null?void 0:e.value}`,wX=e=>`نسخ ${e==null?void 0:e.value}`,kX=e=>`Copiar ${e==null?void 0:e.value}`,SX=e=>`${e==null?void 0:e.value} कॉपी करें`,CX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yX(e):t==="fa"?xX(e):t==="ar"?wX(e):t==="es"?kX(e):t==="hi"?SX(e):bX(e)}),EX=e=>`Delete ${e==null?void 0:e.name}`,NX=e=>`删除 ${e==null?void 0:e.name}`,zX=e=>`حذف ${e==null?void 0:e.name}`,jX=e=>`حذف ${e==null?void 0:e.name}`,TX=e=>`Eliminar ${e==null?void 0:e.name}`,AX=e=>`${e==null?void 0:e.name} हटाएं`,r3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NX(e):t==="fa"?zX(e):t==="ar"?jX(e):t==="es"?TX(e):t==="hi"?AX(e):EX(e)}),RX=e=>`Download ${e==null?void 0:e.name}`,MX=e=>`下载 ${e==null?void 0:e.name}`,OX=e=>`بارگیری ${e==null?void 0:e.name}`,DX=e=>`تنزيل ${e==null?void 0:e.name}`,LX=e=>`Descargar ${e==null?void 0:e.name}`,IX=e=>`${e==null?void 0:e.name} डाउनलोड करें`,BE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MX(e):t==="fa"?OX(e):t==="ar"?DX(e):t==="es"?LX(e):t==="hi"?IX(e):RX(e)}),$X=e=>`Expand ${e==null?void 0:e.name}`,BX=e=>`展开 ${e==null?void 0:e.name}`,PX=e=>`باز کردن ${e==null?void 0:e.name}`,FX=e=>`توسيع ${e==null?void 0:e.name}`,HX=e=>`Expandir ${e==null?void 0:e.name}`,qX=e=>`${e==null?void 0:e.name} फैलाएं`,UX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BX(e):t==="fa"?PX(e):t==="ar"?FX(e):t==="es"?HX(e):t==="hi"?qX(e):$X(e)}),GX=e=>`Hide additional ${e==null?void 0:e.target}`,VX=e=>`隐藏其余${e==null?void 0:e.target}`,KX=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WX=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,QX=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,XX=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,YX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VX(e):t==="fa"?KX(e):t==="ar"?WX(e):t==="es"?QX(e):t==="hi"?XX(e):GX(e)}),ZX=e=>`Hide error details for ${e==null?void 0:e.activity}`,JX=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,eY=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,tY=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,nY=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,rY=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,sY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JX(e):t==="fa"?eY(e):t==="ar"?tY(e):t==="es"?nY(e):t==="hi"?rY(e):ZX(e)}),iY=e=>`${e==null?void 0:e.count} consecutive identical calls`,aY=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,oY=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,cY=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,lY=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,uY=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,_Y=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aY(e):t==="fa"?oY(e):t==="ar"?cY(e):t==="es"?lY(e):t==="hi"?uY(e):iY(e)}),fY=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,dY=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,hY=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,pY=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,mY=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,gY=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,vY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dY(e):t==="fa"?hY(e):t==="ar"?pY(e):t==="es"?mY(e):t==="hi"?gY(e):fY(e)}),bY=e=>`Open ${e==null?void 0:e.branch} on GitHub`,yY=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,xY=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,wY=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,kY=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,SY=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,dD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yY(e):t==="fa"?xY(e):t==="ar"?wY(e):t==="es"?kY(e):t==="hi"?SY(e):bY(e)}),CY=e=>`Open experiment ${e==null?void 0:e.name}`,EY=e=>`打开实验 ${e==null?void 0:e.name}`,NY=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,zY=e=>`فتح التجربة ${e==null?void 0:e.name}`,jY=e=>`Abrir el experimento ${e==null?void 0:e.name}`,TY=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,AY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EY(e):t==="fa"?NY(e):t==="ar"?zY(e):t==="es"?jY(e):t==="hi"?TY(e):CY(e)}),RY=e=>`Open ${e==null?void 0:e.path} in the right pane`,MY=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,OY=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,DY=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,LY=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,IY=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,$Y=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MY(e):t==="fa"?OY(e):t==="ar"?DY(e):t==="es"?LY(e):t==="hi"?IY(e):RY(e)}),BY=e=>`Open ${e==null?void 0:e.name}`,PY=e=>`打开 ${e==null?void 0:e.name}`,FY=e=>`باز کردن ${e==null?void 0:e.name}`,HY=e=>`فتح ${e==null?void 0:e.name}`,qY=e=>`Abrir ${e==null?void 0:e.name}`,UY=e=>`${e==null?void 0:e.name} खोलें`,GY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PY(e):t==="fa"?FY(e):t==="ar"?HY(e):t==="es"?qY(e):t==="hi"?UY(e):BY(e)}),VY=e=>`Open logs for run ${e==null?void 0:e.run}`,KY=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,WY=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,QY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,XY=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,YY=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,ZY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KY(e):t==="fa"?WY(e):t==="ar"?QY(e):t==="es"?XY(e):t==="hi"?YY(e):VY(e)}),JY=e=>`Open ${e==null?void 0:e.name} on GitHub`,eZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,tZ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,nZ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,rZ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,sZ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Sv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eZ(e):t==="fa"?tZ(e):t==="ar"?nZ(e):t==="es"?rZ(e):t==="hi"?sZ(e):JY(e)}),iZ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,aZ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,oZ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,cZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,lZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,uZ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,_Z=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aZ(e):t==="fa"?oZ(e):t==="ar"?cZ(e):t==="es"?lZ(e):t==="hi"?uZ(e):iZ(e)}),fZ=e=>`Overleaf — ${e==null?void 0:e.status}`,dZ=e=>`Overleaf — ${e==null?void 0:e.status}`,hZ=e=>`Overleaf — ${e==null?void 0:e.status}`,pZ=e=>`Overleaf — ${e==null?void 0:e.status}`,mZ=e=>`Overleaf — ${e==null?void 0:e.status}`,gZ=e=>`Overleaf — ${e==null?void 0:e.status}`,vZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dZ(e):t==="fa"?hZ(e):t==="ar"?pZ(e):t==="es"?mZ(e):t==="hi"?gZ(e):fZ(e)}),bZ=e=>`Preview /${e==null?void 0:e.name} skill`,yZ=e=>`预览 /${e==null?void 0:e.name} 技能`,xZ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,wZ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,kZ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,SZ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,CZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yZ(e):t==="fa"?xZ(e):t==="ar"?wZ(e):t==="es"?kZ(e):t==="hi"?SZ(e):bZ(e)}),EZ=e=>`Remove annotation ${e==null?void 0:e.number}`,NZ=e=>`移除批注 ${e==null?void 0:e.number}`,zZ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,jZ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,TZ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,AZ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,RZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NZ(e):t==="fa"?zZ(e):t==="ar"?jZ(e):t==="es"?TZ(e):t==="hi"?AZ(e):EZ(e)}),MZ=e=>`Remove ${e==null?void 0:e.name}`,OZ=e=>`移除 ${e==null?void 0:e.name}`,DZ=e=>`حذف ${e==null?void 0:e.name}`,LZ=e=>`إزالة ${e==null?void 0:e.name}`,IZ=e=>`Quitar ${e==null?void 0:e.name}`,$Z=e=>`${e==null?void 0:e.name} हटाएं`,BZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OZ(e):t==="fa"?DZ(e):t==="ar"?LZ(e):t==="es"?IZ(e):t==="hi"?$Z(e):MZ(e)}),PZ=e=>`Remove queued message: ${e==null?void 0:e.text}`,FZ=e=>`移除排队消息:${e==null?void 0:e.text}`,HZ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,qZ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,UZ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,GZ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,VZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FZ(e):t==="fa"?HZ(e):t==="ar"?qZ(e):t==="es"?UZ(e):t==="hi"?GZ(e):PZ(e)}),KZ=e=>`Retry queued message: ${e==null?void 0:e.text}`,WZ=e=>`重试排队消息:${e==null?void 0:e.text}`,QZ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,XZ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,YZ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,ZZ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,JZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WZ(e):t==="fa"?QZ(e):t==="ar"?XZ(e):t==="es"?YZ(e):t==="hi"?ZZ(e):KZ(e)}),eJ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,tJ=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,nJ=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,rJ=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,sJ=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,iJ=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,PE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tJ(e):t==="fa"?nJ(e):t==="ar"?rJ(e):t==="es"?sJ(e):t==="hi"?iJ(e):eJ(e)}),aJ=e=>`Run ${e==null?void 0:e.id}`,oJ=e=>`运行 ${e==null?void 0:e.id}`,cJ=e=>`اجرای ${e==null?void 0:e.id}`,lJ=e=>`تشغيل ${e==null?void 0:e.id}`,uJ=e=>`Ejecución ${e==null?void 0:e.id}`,_J=e=>`रन ${e==null?void 0:e.id}`,fJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oJ(e):t==="fa"?cJ(e):t==="ar"?lJ(e):t==="es"?uJ(e):t==="hi"?_J(e):aJ(e)}),dJ=e=>`Show error details for ${e==null?void 0:e.activity}`,hJ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,pJ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,mJ=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,gJ=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,vJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,bJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hJ(e):t==="fa"?pJ(e):t==="ar"?mJ(e):t==="es"?gJ(e):t==="hi"?vJ(e):dJ(e)}),yJ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,xJ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,wJ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,kJ=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,SJ=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,CJ=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,EJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xJ(e):t==="fa"?wJ(e):t==="ar"?kJ(e):t==="es"?SJ(e):t==="hi"?CJ(e):yJ(e)}),NJ=e=>`${e==null?void 0:e.name} skill`,zJ=e=>`${e==null?void 0:e.name} 技能`,jJ=e=>`مهارت ${e==null?void 0:e.name}`,TJ=e=>`مهارة ${e==null?void 0:e.name}`,AJ=e=>`Skill ${e==null?void 0:e.name}`,RJ=e=>`${e==null?void 0:e.name} स्किल`,MJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zJ(e):t==="fa"?jJ(e):t==="ar"?TJ(e):t==="es"?AJ(e):t==="hi"?RJ(e):NJ(e)}),OJ=e=>`Value for ${e==null?void 0:e.name}`,DJ=e=>`${e==null?void 0:e.name} 的值`,LJ=e=>`مقدار ${e==null?void 0:e.name}`,IJ=e=>`قيمة ${e==null?void 0:e.name}`,$J=e=>`Valor de ${e==null?void 0:e.name}`,BJ=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,PJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DJ(e):t==="fa"?LJ(e):t==="ar"?IJ(e):t==="es"?$J(e):t==="hi"?BJ(e):OJ(e)}),FJ=()=>"Agent reported back",HJ=()=>"智能体已返回结果",qJ=()=>"عامل نتیجه را گزارش کرد",UJ=()=>"أبلغ الوكيل بالنتيجة",GJ=()=>"El agente informó de los resultados",VJ=()=>"एजेंट ने रिपोर्ट भेजी",KJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HJ():t==="fa"?qJ():t==="ar"?UJ():t==="es"?GJ():t==="hi"?VJ():FJ()}),WJ=()=>"Browse",QJ=()=>"浏览",XJ=()=>"مرور",YJ=()=>"تصفّح",ZJ=()=>"Navegar",JJ=()=>"ब्राउज़ करें",eee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QJ():t==="fa"?XJ():t==="ar"?YJ():t==="es"?ZJ():t==="hi"?JJ():WJ()}),tee=()=>"Browsing…",nee=()=>"正在浏览…",ree=()=>"در حال مرور…",see=()=>"جارٍ التصفّح…",iee=()=>"Navegando…",aee=()=>"ब्राउज़ कर रहा है…",oee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nee():t==="fa"?ree():t==="ar"?see():t==="es"?iee():t==="hi"?aee():tee()}),cee=()=>"Checked experiment status and updated notes",lee=()=>"已检查实验状态并更新笔记",uee=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",_ee=()=>"فحص حالة التجربة وحدّث الملاحظات",fee=()=>"Consultó el estado del experimento y actualizó las notas",dee=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",hee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lee():t==="fa"?uee():t==="ar"?_ee():t==="es"?fee():t==="hi"?dee():cee()}),pee=()=>"Closed an agent",mee=()=>"已关闭智能体",gee=()=>"عامل بسته شد",vee=()=>"أغلق وكيلًا",bee=()=>"Cerró un agente",yee=()=>"एक एजेंट बंद किया",xee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mee():t==="fa"?gee():t==="ar"?vee():t==="es"?bee():t==="hi"?yee():pee()}),wee=()=>"Context compacted",kee=()=>"上下文已压缩",See=()=>"زمینه فشرده شد",Cee=()=>"تم ضغط السياق",Eee=()=>"Contexto comprimido",Nee=()=>"कॉन्टेक्स्ट छोटा किया गया",zee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kee():t==="fa"?See():t==="ar"?Cee():t==="es"?Eee():t==="hi"?Nee():wee()}),jee=()=>"Compacting conversation…",Tee=()=>"正在压缩对话…",Aee=()=>"در حال فشرده‌سازی گفت‌وگو…",Ree=()=>"جارٍ ضغط المحادثة…",Mee=()=>"Comprimiendo la conversación…",Oee=()=>"बातचीत छोटी की जा रही है…",FE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tee():t==="fa"?Aee():t==="ar"?Ree():t==="es"?Mee():t==="hi"?Oee():jee()}),Dee=()=>"Compacting failed",Lee=()=>"压缩失败",Iee=()=>"فشرده‌سازی ناموفق بود",$ee=()=>"فشل الضغط",Bee=()=>"Error al comprimir",Pee=()=>"छोटा करना विफल",Fee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lee():t==="fa"?Iee():t==="ar"?$ee():t==="es"?Bee():t==="hi"?Pee():Dee()}),Hee=e=>`Created ${e==null?void 0:e.target}`,qee=e=>`已创建 ${e==null?void 0:e.target}`,Uee=e=>`${e==null?void 0:e.target} ایجاد شد`,Gee=e=>`أنشأ ${e==null?void 0:e.target}`,Vee=e=>`Creó ${e==null?void 0:e.target}`,Kee=e=>`${e==null?void 0:e.target} बनाया`,Wee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qee(e):t==="fa"?Uee(e):t==="ar"?Gee(e):t==="es"?Vee(e):t==="hi"?Kee(e):Hee(e)}),Qee=()=>"Delegate",Xee=()=>"委派",Yee=()=>"واگذاری",Zee=()=>"تفويض",Jee=()=>"Delegar",ete=()=>"सौंपें",tte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xee():t==="fa"?Yee():t==="ar"?Zee():t==="es"?Jee():t==="hi"?ete():Qee()}),nte=()=>"Delegating…",rte=()=>"正在委派…",ste=()=>"در حال واگذاری…",ite=()=>"جارٍ التفويض…",ate=()=>"Delegando…",ote=()=>"सौंप रहा है…",cte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rte():t==="fa"?ste():t==="ar"?ite():t==="es"?ate():t==="hi"?ote():nte()}),lte=e=>`Deleted ${e==null?void 0:e.target}`,ute=e=>`已删除 ${e==null?void 0:e.target}`,_te=e=>`${e==null?void 0:e.target} حذف شد`,fte=e=>`حذف ${e==null?void 0:e.target}`,dte=e=>`Eliminó ${e==null?void 0:e.target}`,hte=e=>`${e==null?void 0:e.target} हटाया`,pte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ute(e):t==="fa"?_te(e):t==="ar"?fte(e):t==="es"?dte(e):t==="hi"?hte(e):lte(e)}),mte=()=>"Edit",gte=()=>"编辑",vte=()=>"ویرایش",bte=()=>"تعديل",yte=()=>"Editar",xte=()=>"संपादित करें",wte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gte():t==="fa"?vte():t==="ar"?bte():t==="es"?yte():t==="hi"?xte():mte()}),kte=e=>`Edited ${e==null?void 0:e.target}`,Ste=e=>`已编辑 ${e==null?void 0:e.target}`,Cte=e=>`${e==null?void 0:e.target} ویرایش شد`,Ete=e=>`عدّل ${e==null?void 0:e.target}`,Nte=e=>`Editó ${e==null?void 0:e.target}`,zte=e=>`${e==null?void 0:e.target} संपादित किया`,jte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ste(e):t==="fa"?Cte(e):t==="ar"?Ete(e):t==="es"?Nte(e):t==="hi"?zte(e):kte(e)}),Tte=()=>"Editing…",Ate=()=>"正在编辑…",Rte=()=>"در حال ویرایش…",Mte=()=>"جارٍ التعديل…",Ote=()=>"Editando…",Dte=()=>"संपादित कर रहा है…",Lte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ate():t==="fa"?Rte():t==="ar"?Mte():t==="es"?Ote():t==="hi"?Dte():Tte()}),Ite=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,$te=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Bte=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,Pte=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Fte=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Hte=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,qte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$te(e):t==="fa"?Bte(e):t==="ar"?Pte(e):t==="es"?Fte(e):t==="hi"?Hte(e):Ite(e)}),Ute=()=>"Imported from your terminal — new turns continue in the agent's own history",Gte=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Vte=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Kte=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Wte=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",Qte=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",Xte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gte():t==="fa"?Vte():t==="ar"?Kte():t==="es"?Wte():t==="hi"?Qte():Ute()}),Yte=e=>`Listed files matching ${e==null?void 0:e.pattern}`,Zte=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,Jte=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,ene=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,tne=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,nne=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,rne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zte(e):t==="fa"?Jte(e):t==="ar"?ene(e):t==="es"?tne(e):t==="hi"?nne(e):Yte(e)}),sne=()=>"Load",ine=()=>"加载",ane=()=>"بارگیری",one=()=>"تحميل",cne=()=>"Cargar",lne=()=>"लोड करें",une=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ine():t==="fa"?ane():t==="ar"?one():t==="es"?cne():t==="hi"?lne():sne()}),_ne=()=>"Loaded a skill",fne=()=>"已加载技能",dne=()=>"یک مهارت بارگیری شد",hne=()=>"حمّل مهارة",pne=()=>"Cargó una skill",mne=()=>"एक स्किल लोड की",gne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fne():t==="fa"?dne():t==="ar"?hne():t==="es"?pne():t==="hi"?mne():_ne()}),vne=e=>`Loaded ${e==null?void 0:e.name} skill`,bne=e=>`已加载技能 ${e==null?void 0:e.name}`,yne=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,xne=e=>`حمّل مهارة ${e==null?void 0:e.name}`,wne=e=>`Cargó la skill ${e==null?void 0:e.name}`,kne=e=>`${e==null?void 0:e.name} स्किल लोड की`,Sne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bne(e):t==="fa"?yne(e):t==="ar"?xne(e):t==="es"?wne(e):t==="hi"?kne(e):vne(e)}),Cne=()=>"Loading…",Ene=()=>"正在加载…",Nne=()=>"در حال بارگیری…",zne=()=>"جارٍ التحميل…",jne=()=>"Cargando…",Tne=()=>"लोड हो रहा है…",Ane=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ene():t==="fa"?Nne():t==="ar"?zne():t==="es"?jne():t==="hi"?Tne():Cne()}),Rne=e=>`Opened ${e==null?void 0:e.target}`,Mne=e=>`已打开 ${e==null?void 0:e.target}`,One=e=>`${e==null?void 0:e.target} باز شد`,Dne=e=>`فتح ${e==null?void 0:e.target}`,Lne=e=>`Abrió ${e==null?void 0:e.target}`,Ine=e=>`${e==null?void 0:e.target} खोला`,$ne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mne(e):t==="fa"?One(e):t==="ar"?Dne(e):t==="es"?Lne(e):t==="hi"?Ine(e):Rne(e)}),Bne=e=>`Ran ${e==null?void 0:e.command}`,Pne=e=>`已运行 ${e==null?void 0:e.command}`,Fne=e=>`${e==null?void 0:e.command} اجرا شد`,Hne=e=>`نفّذ ${e==null?void 0:e.command}`,qne=e=>`Ejecutó ${e==null?void 0:e.command}`,Une=e=>`${e==null?void 0:e.command} चलाया`,Gne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pne(e):t==="fa"?Fne(e):t==="ar"?Hne(e):t==="es"?qne(e):t==="hi"?Une(e):Bne(e)}),Vne=()=>"Ran a sub-agent",Kne=()=>"已运行子智能体",Wne=()=>"یک عامل فرعی اجرا شد",Qne=()=>"شغّل وكيلًا فرعيًا",Xne=()=>"Ejecutó un subagente",Yne=()=>"एक सब-एजेंट चलाया",Zne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kne():t==="fa"?Wne():t==="ar"?Qne():t==="es"?Xne():t==="hi"?Yne():Vne()}),Jne=()=>"Read",ere=()=>"读取",tre=()=>"خواندن",nre=()=>"قراءة",rre=()=>"Leer",sre=()=>"पढ़ें",ire=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ere():t==="fa"?tre():t==="ar"?nre():t==="es"?rre():t==="hi"?sre():Jne()}),are=()=>"Read experiment notes",ore=()=>"已读取实验笔记",cre=()=>"یادداشت‌های آزمایش خوانده شد",lre=()=>"قرأ ملاحظات التجربة",ure=()=>"Leyó las notas del experimento",_re=()=>"प्रयोग के नोट्स पढ़े",fre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ore():t==="fa"?cre():t==="ar"?lre():t==="es"?ure():t==="hi"?_re():are()}),dre=()=>"Read a paper",hre=()=>"已读取论文",pre=()=>"یک مقاله خوانده شد",mre=()=>"قرأ ورقة",gre=()=>"Leyó un paper",vre=()=>"एक पेपर पढ़ा",bre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hre():t==="fa"?pre():t==="ar"?mre():t==="es"?gre():t==="hi"?vre():dre()}),yre=e=>`Read ${e==null?void 0:e.name} skill`,xre=e=>`已读取技能 ${e==null?void 0:e.name}`,wre=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,kre=e=>`قرأ مهارة ${e==null?void 0:e.name}`,Sre=e=>`Leyó la skill ${e==null?void 0:e.name}`,Cre=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,V2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xre(e):t==="fa"?wre(e):t==="ar"?kre(e):t==="es"?Sre(e):t==="hi"?Cre(e):yre(e)}),Ere=e=>`Read ${e==null?void 0:e.target}`,Nre=e=>`已读取 ${e==null?void 0:e.target}`,zre=e=>`${e==null?void 0:e.target} خوانده شد`,jre=e=>`قرأ ${e==null?void 0:e.target}`,Tre=e=>`Leyó ${e==null?void 0:e.target}`,Are=e=>`${e==null?void 0:e.target} पढ़ा`,Ip=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nre(e):t==="fa"?zre(e):t==="ar"?jre(e):t==="es"?Tre(e):t==="hi"?Are(e):Ere(e)}),Rre=()=>"Read a web page",Mre=()=>"已读取网页",Ore=()=>"یک صفحهٔ وب خوانده شد",Dre=()=>"قرأ صفحة ويب",Lre=()=>"Leyó una página web",Ire=()=>"एक वेब पेज पढ़ा",$re=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mre():t==="fa"?Ore():t==="ar"?Dre():t==="es"?Lre():t==="hi"?Ire():Rre()}),Bre=()=>"Reading…",Pre=()=>"正在读取…",Fre=()=>"در حال خواندن…",Hre=()=>"جارٍ القراءة…",qre=()=>"Leyendo…",Ure=()=>"पढ़ रहा है…",Gre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pre():t==="fa"?Fre():t==="ar"?Hre():t==="es"?qre():t==="hi"?Ure():Bre()}),Vre=()=>"Resumed an agent",Kre=()=>"已恢复智能体",Wre=()=>"عامل از سر گرفته شد",Qre=()=>"استأنف عمل وكيل",Xre=()=>"Reanudó un agente",Yre=()=>"एक एजेंट फिर से शुरू किया",Zre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kre():t==="fa"?Wre():t==="ar"?Qre():t==="es"?Xre():t==="hi"?Yre():Vre()}),Jre=()=>"Review",ese=()=>"查看",tse=()=>"بازبینی",nse=()=>"مراجعة",rse=()=>"Revisar",sse=()=>"समीक्षा करें",ise=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ese():t==="fa"?tse():t==="ar"?nse():t==="es"?rse():t==="hi"?sse():Jre()}),ase=()=>"Reviewed run log",ose=()=>"已查看运行日志",cse=()=>"گزارش اجرا بازبینی شد",lse=()=>"راجع سجل التشغيل",use=()=>"Revisó el log de la ejecución",_se=()=>"रन लॉग की समीक्षा की",fse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ose():t==="fa"?cse():t==="ar"?lse():t==="es"?use():t==="hi"?_se():ase()}),dse=()=>"Reviewed run logs",hse=()=>"已查看运行日志",pse=()=>"گزارش‌های اجرا بازبینی شد",mse=()=>"راجع سجلات التشغيل",gse=()=>"Revisó los logs de las ejecuciones",vse=()=>"रन लॉग की समीक्षा की",bse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hse():t==="fa"?pse():t==="ar"?mse():t==="es"?gse():t==="hi"?vse():dse()}),yse=()=>"Reviewed experiment status and notes",xse=()=>"已查看实验状态和笔记",wse=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",kse=()=>"راجع حالة التجربة وملاحظاتها",Sse=()=>"Revisó el estado y las notas del experimento",Cse=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Ese=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xse():t==="fa"?wse():t==="ar"?kse():t==="es"?Sse():t==="hi"?Cse():yse()}),Nse=()=>"Reviewing…",zse=()=>"正在查看…",jse=()=>"در حال بازبینی…",Tse=()=>"جارٍ المراجعة…",Ase=()=>"Revisando…",Rse=()=>"समीक्षा कर रहा है…",Mse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zse():t==="fa"?jse():t==="ar"?Tse():t==="es"?Ase():t==="hi"?Rse():Nse()}),Ose=()=>"Run",Dse=()=>"运行",Lse=()=>"اجرا",Ise=()=>"تشغيل",$se=()=>"Ejecutar",Bse=()=>"चलाएं",Pse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?$se():t==="hi"?Bse():Ose()}),Fse=()=>"Running…",Hse=()=>"正在运行…",qse=()=>"در حال اجرا…",Use=()=>"جارٍ التشغيل…",Gse=()=>"Ejecutando…",Vse=()=>"चल रहा है…",hD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hse():t==="fa"?qse():t==="ar"?Use():t==="es"?Gse():t==="hi"?Vse():Fse()}),Kse=()=>"Search",Wse=()=>"搜索",Qse=()=>"جست‌وجو",Xse=()=>"بحث",Yse=()=>"Buscar",Zse=()=>"खोजें",Jse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wse():t==="fa"?Qse():t==="ar"?Xse():t==="es"?Yse():t==="hi"?Zse():Kse()}),eie=()=>"Searched alphaXiv full text",tie=()=>"已搜索 alphaXiv 全文",nie=()=>"متن کامل alphaXiv جست‌وجو شد",rie=()=>"بحث في نص alphaXiv الكامل",sie=()=>"Buscó en el texto completo de alphaXiv",iie=()=>"alphaXiv का पूरा टेक्स्ट खोजा",aie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tie():t==="fa"?nie():t==="ar"?rie():t==="es"?sie():t==="hi"?iie():eie()}),oie=()=>"Searched alphaXiv semantically",cie=()=>"已对 alphaXiv 进行语义搜索",lie=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",uie=()=>"أجرى بحثًا دلاليًا في alphaXiv",_ie=()=>"Hizo una búsqueda semántica en alphaXiv",fie=()=>"alphaXiv को सिमेंटिक रूप से खोजा",die=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cie():t==="fa"?lie():t==="ar"?uie():t==="es"?_ie():t==="hi"?fie():oie()}),hie=()=>"Searched bioRxiv",pie=()=>"已搜索 bioRxiv",mie=()=>"bioRxiv جست‌وجو شد",gie=()=>"بحث في bioRxiv",vie=()=>"Buscó en bioRxiv",bie=()=>"bioRxiv खोजा",yie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pie():t==="fa"?mie():t==="ar"?gie():t==="es"?vie():t==="hi"?bie():hie()}),xie=()=>"Searched code",wie=()=>"已搜索代码",kie=()=>"کد جست‌وجو شد",Sie=()=>"بحث في الشيفرة",Cie=()=>"Buscó en el código",Eie=()=>"कोड खोजा",K2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wie():t==="fa"?kie():t==="ar"?Sie():t==="es"?Cie():t==="hi"?Eie():xie()}),Nie=e=>`Searched code for “${e==null?void 0:e.pattern}”`,zie=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,jie=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Tie=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Aie=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Rie=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,W2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zie(e):t==="fa"?jie(e):t==="ar"?Tie(e):t==="es"?Aie(e):t==="hi"?Rie(e):Nie(e)}),Mie=e=>`Searched images for “${e==null?void 0:e.query}”`,Oie=e=>`已搜索图片“${e==null?void 0:e.query}”`,Die=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,Lie=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Iie=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,$ie=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,Bie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oie(e):t==="fa"?Die(e):t==="ar"?Lie(e):t==="es"?Iie(e):t==="hi"?$ie(e):Mie(e)}),Pie=()=>"Searched the literature",Fie=()=>"已搜索文献",Hie=()=>"منابع علمی جست‌وجو شد",qie=()=>"بحث في الأدبيات",Uie=()=>"Buscó en la literatura",Gie=()=>"साहित्य खोजा",HE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fie():t==="fa"?Hie():t==="ar"?qie():t==="es"?Uie():t==="hi"?Gie():Pie()}),Vie=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Kie=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Wie=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Qie=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,Xie=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,Yie=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,Zie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kie(e):t==="fa"?Wie(e):t==="ar"?Qie(e):t==="es"?Xie(e):t==="hi"?Yie(e):Vie(e)}),Jie=()=>"Searched OpenAlex",eae=()=>"已搜索 OpenAlex",tae=()=>"OpenAlex جست‌وجو شد",nae=()=>"بحث في OpenAlex",rae=()=>"Buscó en OpenAlex",sae=()=>"OpenAlex खोजा",iae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eae():t==="fa"?tae():t==="ar"?nae():t==="es"?rae():t==="hi"?sae():Jie()}),aae=e=>`Searched the web for “${e==null?void 0:e.query}”`,oae=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,cae=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,lae=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,uae=e=>`Buscó “${e==null?void 0:e.query}” en la web`,_ae=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,qE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oae(e):t==="fa"?cae(e):t==="ar"?lae(e):t==="es"?uae(e):t==="hi"?_ae(e):aae(e)}),fae=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,dae=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,hae=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,pae=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,mae=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,gae=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,vae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dae(e):t==="fa"?hae(e):t==="ar"?pae(e):t==="es"?mae(e):t==="hi"?gae(e):fae(e)}),bae=()=>"Searching…",yae=()=>"正在搜索…",xae=()=>"در حال جست‌وجو…",wae=()=>"جارٍ البحث…",kae=()=>"Buscando…",Sae=()=>"खोज रहा है…",Cae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yae():t==="fa"?xae():t==="ar"?wae():t==="es"?kae():t==="hi"?Sae():bae()}),Eae=()=>"Sent input to an agent",Nae=()=>"已向智能体发送输入",zae=()=>"ورودی به عامل فرستاده شد",jae=()=>"أرسل مدخلًا إلى وكيل",Tae=()=>"Envió información a un agente",Aae=()=>"एक एजेंट को इनपुट भेजा",Rae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nae():t==="fa"?zae():t==="ar"?jae():t==="es"?Tae():t==="hi"?Aae():Eae()}),Mae=()=>"Spawned an agent",Oae=()=>"已创建智能体",Dae=()=>"یک عامل ساخته شد",Lae=()=>"أنشأ وكيلًا",Iae=()=>"Creó un agente",$ae=()=>"एक एजेंट शुरू किया",Bae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oae():t==="fa"?Dae():t==="ar"?Lae():t==="es"?Iae():t==="hi"?$ae():Mae()}),Pae=()=>"Sub-agent",Fae=()=>"子智能体",Hae=()=>"عامل فرعی",qae=()=>"وكيل فرعي",Uae=()=>"Subagente",Gae=()=>"सब-एजेंट",Vae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fae():t==="fa"?Hae():t==="ar"?qae():t==="es"?Uae():t==="hi"?Gae():Pae()}),Kae=()=>"Sub-agent interrupted",Wae=()=>"子智能体已中断",Qae=()=>"عامل فرعی متوقف شد",Xae=()=>"قُوطع الوكيل الفرعي",Yae=()=>"Subagente interrumpido",Zae=()=>"सब-एजेंट बाधित हुआ",Jae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wae():t==="fa"?Qae():t==="ar"?Xae():t==="es"?Yae():t==="hi"?Zae():Kae()}),eoe=()=>"Sub-agent started",toe=()=>"子智能体已启动",noe=()=>"عامل فرعی آغاز شد",roe=()=>"بدأ الوكيل الفرعي",soe=()=>"Subagente iniciado",ioe=()=>"सब-एजेंट शुरू हुआ",aoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?toe():t==="fa"?noe():t==="ar"?roe():t==="es"?soe():t==="hi"?ioe():eoe()}),ooe=()=>"Updated experiment notes",coe=()=>"已更新实验笔记",loe=()=>"یادداشت‌های آزمایش به‌روز شد",uoe=()=>"حدّث ملاحظات التجربة",_oe=()=>"Actualizó las notas del experimento",foe=()=>"प्रयोग के नोट्स अपडेट किए",doe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?coe():t==="fa"?loe():t==="ar"?uoe():t==="es"?_oe():t==="hi"?foe():ooe()}),hoe=()=>"Waiting on an agent",poe=()=>"正在等待智能体",moe=()=>"در انتظار عامل",goe=()=>"في انتظار وكيل",voe=()=>"Esperando a un agente",boe=()=>"एजेंट का इंतज़ार है",yoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?poe():t==="fa"?moe():t==="ar"?goe():t==="es"?voe():t==="hi"?boe():hoe()}),xoe=e=>`Approval required: ${e==null?void 0:e.label}`,woe=e=>`需要批准:${e==null?void 0:e.label}`,koe=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Soe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Coe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Eoe=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,UE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?woe(e):t==="fa"?koe(e):t==="ar"?Soe(e):t==="es"?Coe(e):t==="hi"?Eoe(e):xoe(e)}),Noe=()=>"The CLI is retrying the turn.",zoe=()=>"CLI 正在重试本轮。",joe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Toe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Aoe=()=>"La CLI está reintentando el turno.",Roe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Moe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zoe():t==="fa"?joe():t==="ar"?Toe():t==="es"?Aoe():t==="hi"?Roe():Noe()}),Ooe=()=>"Continue is available.",Doe=()=>"可以继续。",Loe=()=>"ادامه در دسترس است.",Ioe=()=>"المتابعة متاحة.",$oe=()=>"Puedes continuar.",Boe=()=>"जारी रखना उपलब्ध है।",Poe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Doe():t==="fa"?Loe():t==="ar"?Ioe():t==="es"?$oe():t==="hi"?Boe():Ooe()}),Foe=()=>"Retry is available.",Hoe=()=>"可以重试。",qoe=()=>"تلاش دوباره در دسترس است.",Uoe=()=>"إعادة المحاولة متاحة.",Goe=()=>"Puedes reintentarlo.",Voe=()=>"फिर से कोशिश करना उपलब्ध है।",Koe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hoe():t==="fa"?qoe():t==="ar"?Uoe():t==="es"?Goe():t==="hi"?Voe():Foe()}),Woe=()=>"Running a tool",Qoe=()=>"正在运行工具",Xoe=()=>"در حال اجرای ابزار",Yoe=()=>"جارٍ تشغيل أداة",Zoe=()=>"Ejecutando una herramienta",Joe=()=>"एक टूल चल रहा है",ece=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qoe():t==="fa"?Xoe():t==="ar"?Yoe():t==="es"?Zoe():t==="hi"?Joe():Woe()}),tce=()=>"Tool activity completed",nce=()=>"工具活动已完成",rce=()=>"فعالیت ابزار کامل شد",sce=()=>"اكتمل نشاط الأداة",ice=()=>"Actividad de la herramienta completada",ace=()=>"टूल गतिविधि पूरी हुई",oce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nce():t==="fa"?rce():t==="ar"?sce():t==="es"?ice():t==="hi"?ace():tce()}),cce=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,lce=e=>`工具活动失败:${e==null?void 0:e.labels}`,uce=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,_ce=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,fce=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,dce=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,hce=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lce(e):t==="fa"?uce(e):t==="ar"?_ce(e):t==="es"?fce(e):t==="hi"?dce(e):cce(e)}),pce=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,mce=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,gce=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,vce=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,bce=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,yce=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,xce=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mce(e):t==="fa"?gce(e):t==="ar"?vce(e):t==="es"?bce(e):t==="hi"?yce(e):pce(e)}),wce=()=>"Turn did not finish.",kce=()=>"本轮未完成。",Sce=()=>"این نوبت کامل نشد.",Cce=()=>"لم تكتمل الجولة.",Ece=()=>"El turno no terminó.",Nce=()=>"यह टर्न पूरा नहीं हुआ।",zce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kce():t==="fa"?Sce():t==="ar"?Cce():t==="es"?Ece():t==="hi"?Nce():wce()}),jce=()=>"Artifacts",Tce=()=>"产物",Ace=()=>"خروجی‌ها",Rce=()=>"المُخرَجات",Mce=()=>"Artefactos",Oce=()=>"आर्टिफ़ैक्ट",pD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tce():t==="fa"?Ace():t==="ar"?Rce():t==="es"?Mce():t==="hi"?Oce():jce()}),Dce=()=>"Close panel",Lce=()=>"关闭面板",Ice=()=>"بستن پنل",$ce=()=>"إغلاق اللوحة",Bce=()=>"Cerrar panel",Pce=()=>"पैनल बंद करें",z0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lce():t==="fa"?Ice():t==="ar"?$ce():t==="es"?Bce():t==="hi"?Pce():Dce()}),Fce=()=>"Current task",Hce=()=>"当前任务",qce=()=>"وظیفهٔ فعلی",Uce=()=>"المهمة الحالية",Gce=()=>"Tarea actual",Vce=()=>"मौजूदा टास्क",GE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hce():t==="fa"?qce():t==="ar"?Uce():t==="es"?Gce():t==="hi"?Vce():Fce()}),Kce=()=>"Drag to resize panel",Wce=()=>"拖动以调整面板大小",Qce=()=>"برای تغییر اندازهٔ پنل بکشید",Xce=()=>"اسحب لتغيير حجم اللوحة",Yce=()=>"Arrastra para cambiar el tamaño del panel",Zce=()=>"पैनल का आकार बदलने के लिए खींचें",Jce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wce():t==="fa"?Qce():t==="ar"?Xce():t==="es"?Yce():t==="hi"?Zce():Kce()}),ele=()=>"Drag toward the center to restore panel",tle=()=>"向中央拖动以恢复面板",nle=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",rle=()=>"اسحب نحو المنتصف لاستعادة اللوحة",sle=()=>"Arrastra hacia el centro para restaurar el panel",ile=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",ale=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tle():t==="fa"?nle():t==="ar"?rle():t==="es"?sle():t==="hi"?ile():ele()}),ole=()=>"Entire project",cle=()=>"整个项目",lle=()=>"کل پروژه",ule=()=>"المشروع بالكامل",_le=()=>"Todo el proyecto",fle=()=>"पूरा प्रोजेक्ट",VE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cle():t==="fa"?lle():t==="ar"?ule():t==="es"?_le():t==="hi"?fle():ole()}),dle=()=>"Expand panel",hle=()=>"展开面板",ple=()=>"گسترش پنل",mle=()=>"توسيع اللوحة",gle=()=>"Expandir panel",vle=()=>"पैनल फैलाएं",KE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hle():t==="fa"?ple():t==="ar"?mle():t==="es"?gle():t==="hi"?vle():dle()}),ble=e=>`Experiment filter: ${e==null?void 0:e.scope}`,yle=e=>`实验筛选:${e==null?void 0:e.scope}`,xle=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,wle=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,kle=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Sle=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Cle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yle(e):t==="fa"?xle(e):t==="ar"?wle(e):t==="es"?kle(e):t==="hi"?Sle(e):ble(e)}),Ele=()=>"Experiment view",Nle=()=>"实验视图",zle=()=>"نمای آزمایش",jle=()=>"عرض التجربة",Tle=()=>"Vista de experimento",Ale=()=>"प्रयोग व्यू",Rle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nle():t==="fa"?zle():t==="ar"?jle():t==="es"?Tle():t==="hi"?Ale():Ele()}),Mle=()=>"Experiments",Ole=()=>"实验",Dle=()=>"آزمایش‌ها",Lle=()=>"التجارب",Ile=()=>"Experimentos",$le=()=>"प्रयोग",mD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ole():t==="fa"?Dle():t==="ar"?Lle():t==="es"?Ile():t==="hi"?$le():Mle()}),Ble=()=>"Files",Ple=()=>"文件",Fle=()=>"فایل‌ها",Hle=()=>"الملفات",qle=()=>"Archivos",Ule=()=>"फ़ाइलें",s3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ple():t==="fa"?Fle():t==="ar"?Hle():t==="es"?qle():t==="hi"?Ule():Ble()}),Gle=()=>"Filter experiments",Vle=()=>"筛选实验",Kle=()=>"فیلتر آزمایش‌ها",Wle=()=>"تصفية التجارب",Qle=()=>"Filtrar experimentos",Xle=()=>"प्रयोग फ़िल्टर करें",Yle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vle():t==="fa"?Kle():t==="ar"?Wle():t==="es"?Qle():t==="hi"?Xle():Gle()}),Zle=()=>"Current task filtering is unavailable for unattributed experiments",Jle=()=>"存在无法归属的实验时,不能按当前任务筛选",eue=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",tue=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",nue=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",rue=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",sue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jle():t==="fa"?eue():t==="ar"?tue():t==="es"?nue():t==="hi"?rue():Zle()}),iue=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",aue=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",oue=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",cue=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",lue=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",uue=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",_ue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aue():t==="fa"?oue():t==="ar"?cue():t==="es"?lue():t==="hi"?uue():iue()}),fue=()=>"Open a task to filter to its experiments",due=()=>"请打开一个任务以筛选其实验",hue=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",pue=()=>"افتح مهمة لعرض تجاربها فقط",mue=()=>"Abre una tarea para filtrar por sus experimentos",gue=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",vue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?due():t==="fa"?hue():t==="ar"?pue():t==="es"?mue():t==="hi"?gue():fue()}),bue=()=>"projects",yue=()=>"项目",xue=()=>"پروژه‌ها",wue=()=>"المشاريع",kue=()=>"los proyectos",Sue=()=>"प्रोजेक्ट",l0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yue():t==="fa"?xue():t==="ar"?wue():t==="es"?kue():t==="hi"?Sue():bue()}),Cue=()=>"Restore panel",Eue=()=>"还原面板",Nue=()=>"بازگرداندن اندازهٔ پنل",zue=()=>"استعادة اللوحة",jue=()=>"Restaurar panel",Tue=()=>"पैनल वापस लाएं",WE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eue():t==="fa"?Nue():t==="ar"?zue():t==="es"?jue():t==="hi"?Tue():Cue()}),Aue=()=>"Retry",Rue=()=>"重试",Mue=()=>"تلاش دوباره",Oue=()=>"إعادة المحاولة",Due=()=>"Reintentar",Lue=()=>"फिर से कोशिश करें",Vs=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rue():t==="fa"?Mue():t==="ar"?Oue():t==="es"?Due():t==="hi"?Lue():Aue()}),Iue=()=>"Select a project to browse its files.",$ue=()=>"选择一个项目以浏览其文件。",Bue=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Pue=()=>"اختر مشروعًا لتصفح ملفاته.",Fue=()=>"Selecciona un proyecto para explorar sus archivos.",Hue=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",que=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ue():t==="fa"?Bue():t==="ar"?Pue():t==="es"?Fue():t==="hi"?Hue():Iue()}),Uue=()=>"settings",Gue=()=>"设置",Vue=()=>"تنظیمات",Kue=()=>"الإعدادات",Wue=()=>"la configuración",Que=()=>"सेटिंग्स",Xue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gue():t==="fa"?Vue():t==="ar"?Kue():t==="es"?Wue():t==="hi"?Que():Uue()}),Yue=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Zue=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,Jue=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,e_e=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,t_e=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,n_e=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,r_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zue(e):t==="fa"?Jue(e):t==="ar"?e_e(e):t==="es"?t_e(e):t==="hi"?n_e(e):Yue(e)}),s_e=()=>"Sub-agent",i_e=()=>"子智能体",a_e=()=>"عامل فرعی",o_e=()=>"وكيل فرعي",c_e=()=>"Subagente",l_e=()=>"सब-एजेंट",u_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i_e():t==="fa"?a_e():t==="ar"?o_e():t==="es"?c_e():t==="hi"?l_e():s_e()}),__e=()=>"Table",f_e=()=>"表格",d_e=()=>"جدول",h_e=()=>"جدول",p_e=()=>"Tabla",m_e=()=>"टेबल",g_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f_e():t==="fa"?d_e():t==="ar"?h_e():t==="es"?p_e():t==="hi"?m_e():__e()}),v_e=()=>"Tree",b_e=()=>"树状图",y_e=()=>"درخت",x_e=()=>"شجرة",w_e=()=>"Árbol",k_e=()=>"ट्री",S_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_e():t==="fa"?y_e():t==="ar"?x_e():t==="es"?w_e():t==="hi"?k_e():v_e()}),C_e=e=>`Collapse ${e==null?void 0:e.name}`,E_e=e=>`折叠 ${e==null?void 0:e.name}`,N_e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,z_e=e=>`طيّ ${e==null?void 0:e.name}`,j_e=e=>`Contraer ${e==null?void 0:e.name}`,T_e=e=>`${e==null?void 0:e.name} समेटें`,A_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?E_e(e):t==="fa"?N_e(e):t==="ar"?z_e(e):t==="es"?j_e(e):t==="hi"?T_e(e):C_e(e)}),R_e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,M_e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,O_e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,D_e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,L_e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,I_e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,Pk=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M_e(e):t==="fa"?O_e(e):t==="ar"?D_e(e):t==="es"?L_e(e):t==="hi"?I_e(e):R_e(e)}),$_e=e=>`Delete folder ${e==null?void 0:e.name}`,B_e=e=>`删除文件夹 ${e==null?void 0:e.name}`,P_e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,F_e=e=>`حذف المجلد ${e==null?void 0:e.name}`,H_e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,q_e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,U_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B_e(e):t==="fa"?P_e(e):t==="ar"?F_e(e):t==="es"?H_e(e):t==="hi"?q_e(e):$_e(e)}),G_e=e=>`Expand ${e==null?void 0:e.name}`,V_e=e=>`展开 ${e==null?void 0:e.name}`,K_e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,W_e=e=>`توسيع ${e==null?void 0:e.name}`,Q_e=e=>`Expandir ${e==null?void 0:e.name}`,X_e=e=>`${e==null?void 0:e.name} फैलाएं`,Y_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V_e(e):t==="fa"?K_e(e):t==="ar"?W_e(e):t==="es"?Q_e(e):t==="hi"?X_e(e):G_e(e)}),Z_e=()=>"Binary or unsupported file — no inline preview.",J_e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",efe=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",tfe=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",nfe=()=>"Archivo binario o no compatible — sin vista previa.",rfe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",sfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J_e():t==="fa"?efe():t==="ar"?tfe():t==="es"?nfe():t==="hi"?rfe():Z_e()}),ife=()=>"Copy path",afe=()=>"复制路径",ofe=()=>"کپی مسیر",cfe=()=>"نسخ المسار",lfe=()=>"Copiar ruta",ufe=()=>"पथ कॉपी करें",_fe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?afe():t==="fa"?ofe():t==="ar"?cfe():t==="es"?lfe():t==="hi"?ufe():ife()}),ffe=()=>"Artifact not found",dfe=()=>"找不到产物",hfe=()=>"خروجی پیدا نشد",pfe=()=>"لم يُعثر على المُخرَج",mfe=()=>"No se encontró el artefacto",gfe=()=>"आर्टिफ़ैक्ट नहीं मिला",vfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dfe():t==="fa"?hfe():t==="ar"?pfe():t==="es"?mfe():t==="hi"?gfe():ffe()}),bfe=()=>"Open raw",yfe=()=>"打开原始文件",xfe=()=>"باز کردن فایل خام",wfe=()=>"فتح الملف الخام",kfe=()=>"Abrir sin formato",Sfe=()=>"रॉ खोलें",Cfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yfe():t==="fa"?xfe():t==="ar"?wfe():t==="es"?kfe():t==="hi"?Sfe():bfe()}),Efe=()=>"Click an artifact to view it",Nfe=()=>"点击产物即可查看",zfe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",jfe=()=>"انقر على مُخرَج لعرضه",Tfe=()=>"Selecciona un artefacto para verlo",Afe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Rfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nfe():t==="fa"?zfe():t==="ar"?jfe():t==="es"?Tfe():t==="hi"?Afe():Efe()}),Mfe=()=>"Delete artifact",Ofe=()=>"删除产物",Dfe=()=>"حذف خروجی",Lfe=()=>"حذف المُخرَج",Ife=()=>"Eliminar artefacto",$fe=()=>"आर्टिफ़ैक्ट हटाएं",QE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ofe():t==="fa"?Dfe():t==="ar"?Lfe():t==="es"?Ife():t==="hi"?$fe():Mfe()}),Bfe=()=>"Delete folder",Pfe=()=>"删除文件夹",Ffe=()=>"حذف پوشه",Hfe=()=>"حذف المجلد",qfe=()=>"Eliminar carpeta",Ufe=()=>"फ़ोल्डर हटाएं",Gfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pfe():t==="fa"?Ffe():t==="ar"?Hfe():t==="es"?qfe():t==="hi"?Ufe():Bfe()}),Vfe=()=>"Failed to load:",Kfe=()=>"加载失败:",Wfe=()=>"بارگیری ناموفق بود:",Qfe=()=>"تعذّر التحميل:",Xfe=()=>"Error al cargar:",Yfe=()=>"लोड नहीं हो सका:",Zfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kfe():t==="fa"?Wfe():t==="ar"?Qfe():t==="es"?Xfe():t==="hi"?Yfe():Vfe()}),Jfe=()=>"File truncated — showing the first 512 KB.",ede=()=>"文件已截断——仅显示前 512 KB。",tde=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",nde=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",rde=()=>"Archivo truncado — se muestran los primeros 512 KB.",sde=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",ide=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ede():t==="fa"?tde():t==="ar"?nde():t==="es"?rde():t==="hi"?sde():Jfe()}),ade=()=>"Listing truncated — the folder has more artifacts.",ode=()=>"列表已截断——文件夹中还有更多产物。",cde=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",lde=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",ude=()=>"Listado truncado — la carpeta tiene más artefactos.",_de=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",fde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ode():t==="fa"?cde():t==="ar"?lde():t==="es"?ude():t==="hi"?_de():ade()}),dde=()=>"Loading…",hde=()=>"正在加载…",pde=()=>"در حال بارگیری…",mde=()=>"جارٍ التحميل…",gde=()=>"Cargando…",vde=()=>"लोड हो रहा है…",gD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hde():t==="fa"?pde():t==="ar"?mde():t==="es"?gde():t==="hi"?vde():dde()}),bde=()=>"Loading artifacts…",yde=()=>"正在加载产物…",xde=()=>"در حال بارگیری خروجی‌ها…",wde=()=>"جارٍ تحميل المُخرَجات…",kde=()=>"Cargando artefactos…",Sde=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",Cde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yde():t==="fa"?xde():t==="ar"?wde():t==="es"?kde():t==="hi"?Sde():bde()}),Ede=()=>"Modified",Nde=()=>"修改时间",zde=()=>"ویرایش‌شده",jde=()=>"عُدّل",Tde=()=>"Modificado",Ade=()=>"बदला गया",Rde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nde():t==="fa"?zde():t==="ar"?jde():t==="es"?Tde():t==="hi"?Ade():Ede()}),Mde=()=>"No artifacts yet",Ode=()=>"尚无产物",Dde=()=>"هنوز خروجی‌ای وجود ندارد",Lde=()=>"لا توجد مُخرَجات بعد",Ide=()=>"Aún no hay artefactos",$de=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",Bde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ode():t==="fa"?Dde():t==="ar"?Lde():t==="es"?Ide():t==="hi"?$de():Mde()}),Pde=()=>"Open raw in new tab",Fde=()=>"在新标签页中打开原始文件",Hde=()=>"باز کردن فایل خام در زبانهٔ جدید",qde=()=>"فتح الملف الخام في تبويب جديد",Ude=()=>"Abrir sin formato en una pestaña nueva",Gde=()=>"नए टैब में रॉ खोलें",XE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fde():t==="fa"?Hde():t==="ar"?qde():t==="es"?Ude():t==="hi"?Gde():Pde()}),Vde=()=>"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.",Kde=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Wde=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Qde=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Xde=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",Yde=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Zde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kde():t==="fa"?Wde():t==="ar"?Qde():t==="es"?Xde():t==="hi"?Yde():Vde()}),Jde=()=>"File too large to preview inline.",ehe=()=>"文件太大,无法内嵌预览。",the=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",nhe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",rhe=()=>"El archivo es demasiado grande para previsualizarlo.",she=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",ihe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ehe():t==="fa"?the():t==="ar"?nhe():t==="es"?rhe():t==="hi"?she():Jde()}),ahe=()=>"This is the baseline branch, so there is no parent comparison.",ohe=()=>"这是基线分支,因此没有父分支可供比较。",che=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",lhe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",uhe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",_he=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",fhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ohe():t==="fa"?che():t==="ar"?lhe():t==="es"?uhe():t==="hi"?_he():ahe()}),dhe=()=>"Failed to load changes:",hhe=()=>"加载更改失败:",phe=()=>"بارگیری تغییرات ناموفق بود:",mhe=()=>"تعذّر تحميل التغييرات:",ghe=()=>"Error al cargar los cambios:",vhe=()=>"बदलाव लोड नहीं हो सके:",bhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hhe():t==="fa"?phe():t==="ar"?mhe():t==="es"?ghe():t==="hi"?vhe():dhe()}),yhe=()=>"Loading changes…",xhe=()=>"正在加载更改…",whe=()=>"در حال بارگیری تغییرات…",khe=()=>"جارٍ تحميل التغييرات…",She=()=>"Cargando cambios…",Che=()=>"बदलाव लोड हो रहे हैं…",Ehe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xhe():t==="fa"?whe():t==="ar"?khe():t==="es"?She():t==="hi"?Che():yhe()}),Nhe=()=>"No committed changes from the parent branch.",zhe=()=>"与父分支相比没有已提交的更改。",jhe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",The=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Ahe=()=>"No hay cambios confirmados respecto a la rama padre.",Rhe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Mhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zhe():t==="fa"?jhe():t==="ar"?The():t==="es"?Ahe():t==="hi"?Rhe():Nhe()}),Ohe=e=>`agent ${e==null?void 0:e.number}`,Dhe=e=>`智能体 ${e==null?void 0:e.number}`,Lhe=e=>`عامل ${e==null?void 0:e.number}`,Ihe=e=>`وكيل ${e==null?void 0:e.number}`,$he=e=>`agente ${e==null?void 0:e.number}`,Bhe=e=>`एजेंट ${e==null?void 0:e.number}`,YE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dhe(e):t==="fa"?Lhe(e):t==="ar"?Ihe(e):t==="es"?$he(e):t==="hi"?Bhe(e):Ohe(e)}),Phe=()=>"agent sessions",Fhe=()=>"智能体会话",Hhe=()=>"نشست‌های عامل‌ها",qhe=()=>"جلسات الوكلاء",Uhe=()=>"sesiones de agente",Ghe=()=>"एजेंट सेशन",Vhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fhe():t==="fa"?Hhe():t==="ar"?qhe():t==="es"?Uhe():t==="hi"?Ghe():Phe()}),Khe=()=>"All sessions",Whe=()=>"所有会话",Qhe=()=>"همهٔ نشست‌ها",Xhe=()=>"كل الجلسات",Yhe=()=>"Todas las sesiones",Zhe=()=>"सभी सेशन",vD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Whe():t==="fa"?Qhe():t==="ar"?Xhe():t==="es"?Yhe():t==="hi"?Zhe():Khe()}),Jhe=e=>`${e==null?void 0:e.count} annotations`,epe=e=>`${e==null?void 0:e.count} 条批注`,tpe=e=>`${e==null?void 0:e.count} یادداشت`,npe=e=>`التعليقات: ${e==null?void 0:e.count}`,rpe=e=>`${e==null?void 0:e.count} anotaciones`,spe=e=>`${e==null?void 0:e.count} एनोटेशन`,ipe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?epe(e):t==="fa"?tpe(e):t==="ar"?npe(e):t==="es"?rpe(e):t==="hi"?spe(e):Jhe(e)}),ape=()=>"Archive",ope=()=>"归档",cpe=()=>"بایگانی",lpe=()=>"أرشفة",upe=()=>"Archivar",_pe=()=>"आर्काइव करें",fpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ope():t==="fa"?cpe():t==="ar"?lpe():t==="es"?upe():t==="hi"?_pe():ape()}),dpe=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",hpe=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",ppe=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",mpe=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",gpe=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",vpe=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",bpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hpe():t==="fa"?ppe():t==="ar"?mpe():t==="es"?gpe():t==="hi"?vpe():dpe()}),ype=()=>"Asked about selected text",xpe=()=>"已询问所选文本",wpe=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",kpe=()=>"سأل عن النص المحدد",Spe=()=>"Preguntó sobre el texto seleccionado",Cpe=()=>"चयनित टेक्स्ट के बारे में पूछा",Epe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xpe():t==="fa"?wpe():t==="ar"?kpe():t==="es"?Spe():t==="hi"?Cpe():ype()}),Npe=()=>"Attachment",zpe=()=>"附件",jpe=()=>"پیوست",Tpe=()=>"مرفق",Ape=()=>"Adjunto",Rpe=()=>"अटैचमेंट",Mpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zpe():t==="fa"?jpe():t==="ar"?Tpe():t==="es"?Ape():t==="hi"?Rpe():Npe()}),Ope=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Dpe=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Lpe=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Ipe=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,$pe=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,Bpe=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,Ppe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpe(e):t==="fa"?Lpe(e):t==="ar"?Ipe(e):t==="es"?$pe(e):t==="hi"?Bpe(e):Ope(e)}),Fpe=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Hpe=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",qpe=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",Upe=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",Gpe=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Vpe=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",Kpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hpe():t==="fa"?qpe():t==="ar"?Upe():t==="es"?Gpe():t==="hi"?Vpe():Fpe()}),Wpe=()=>"Wait for the turn to finish before running a command.",Qpe=()=>"请等待本轮结束后再运行命令。",Xpe=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Ype=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",Zpe=()=>"Espera a que termine el turno antes de ejecutar un comando.",Jpe=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",e0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qpe():t==="fa"?Xpe():t==="ar"?Ype():t==="es"?Zpe():t==="hi"?Jpe():Wpe()}),t0e=e=>`Exited with code ${e==null?void 0:e.code}`,n0e=e=>`退出码 ${e==null?void 0:e.code}`,r0e=e=>`با کد ${e==null?void 0:e.code} خارج شد`,s0e=e=>`خرج برمز ${e==null?void 0:e.code}`,i0e=e=>`Terminó con el código ${e==null?void 0:e.code}`,a0e=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,o0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n0e(e):t==="fa"?r0e(e):t==="ar"?s0e(e):t==="es"?i0e(e):t==="hi"?a0e(e):t0e(e)}),c0e=e=>`Command not run: ${e==null?void 0:e.error}`,l0e=e=>`命令未运行:${e==null?void 0:e.error}`,u0e=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,_0e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,f0e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,d0e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,ZE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l0e(e):t==="fa"?u0e(e):t==="ar"?_0e(e):t==="es"?f0e(e):t==="hi"?d0e(e):c0e(e)}),h0e=()=>"Collapse tool activity",p0e=()=>"折叠工具活动",m0e=()=>"بستن فعالیت ابزارها",g0e=()=>"طيّ نشاط الأداة",v0e=()=>"Contraer actividad de herramientas",b0e=()=>"टूल गतिविधि समेटें",y0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p0e():t==="fa"?m0e():t==="ar"?g0e():t==="es"?v0e():t==="hi"?b0e():h0e()}),x0e=()=>"Wait for the turn to finish before compacting.",w0e=()=>"请等待本轮结束后再压缩。",k0e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",S0e=()=>"انتظر انتهاء الجولة قبل الضغط.",C0e=()=>"Espera a que termine el turno antes de comprimir.",E0e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",N0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w0e():t==="fa"?k0e():t==="ar"?S0e():t==="es"?C0e():t==="hi"?E0e():x0e()}),z0e=e=>`Compacting failed: ${e==null?void 0:e.error}`,j0e=e=>`压缩失败:${e==null?void 0:e.error}`,T0e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,A0e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,R0e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,M0e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,O0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j0e(e):t==="fa"?T0e(e):t==="ar"?A0e(e):t==="es"?R0e(e):t==="hi"?M0e(e):z0e(e)}),D0e=()=>"Continue",L0e=()=>"继续",I0e=()=>"ادامه",$0e=()=>"متابعة",B0e=()=>"Continuar",P0e=()=>"जारी रखें",F0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L0e():t==="fa"?I0e():t==="ar"?$0e():t==="es"?B0e():t==="hi"?P0e():D0e()}),H0e=()=>"Copy response",q0e=()=>"复制回复",U0e=()=>"کپی پاسخ",G0e=()=>"نسخ الرد",V0e=()=>"Copiar respuesta",K0e=()=>"जवाब कॉपी करें",JE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q0e():t==="fa"?U0e():t==="ar"?G0e():t==="es"?V0e():t==="hi"?K0e():H0e()}),W0e=e=>`Delete “${e==null?void 0:e.title}”? - -Its transcript will be permanently removed.`,Q0e=e=>`删除“${e==null?void 0:e.title}”? - -其对话记录将被永久移除。`,X0e=e=>`«${e==null?void 0:e.title}» حذف شود؟ - -رونوشت آن برای همیشه حذف خواهد شد.`,Y0e=e=>`حذف «${e==null?void 0:e.title}»؟ - -سيُحذف سجل المحادثة نهائيًا.`,Z0e=e=>`¿Eliminar “${e==null?void 0:e.title}”? - -Su transcripción se eliminará de forma permanente.`,J0e=e=>`“${e==null?void 0:e.title}” हटाएं? - -इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,eme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q0e(e):t==="fa"?X0e(e):t==="ar"?Y0e(e):t==="es"?Z0e(e):t==="hi"?J0e(e):W0e(e)}),tme=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,nme=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,rme=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,sme=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,ime=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,ame=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,ome=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nme(e):t==="fa"?rme(e):t==="ar"?sme(e):t==="es"?ime(e):t==="hi"?ame(e):tme(e)}),cme=()=>"Could not exit Plan mode. Try again.",lme=()=>"无法退出计划模式。请重试。",ume=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",_me=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",fme=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",dme=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",hme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lme():t==="fa"?ume():t==="ar"?_me():t==="es"?fme():t==="hi"?dme():cme()}),pme=()=>"Expand tool activity",mme=()=>"展开工具活动",gme=()=>"باز کردن فعالیت ابزارها",vme=()=>"توسيع نشاط الأداة",bme=()=>"Expandir actividad de herramientas",yme=()=>"टूल गतिविधि फैलाएं",xme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mme():t==="fa"?gme():t==="ar"?vme():t==="es"?bme():t==="hi"?yme():pme()}),wme=()=>"experiments",kme=()=>"实验",Sme=()=>"آزمایش‌ها",Cme=()=>"التجارب",Eme=()=>"experimentos",Nme=()=>"प्रयोग",zme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kme():t==="fa"?Sme():t==="ar"?Cme():t==="es"?Eme():t==="hi"?Nme():wme()}),jme=()=>"You",Tme=()=>"你",Ame=()=>"شما",Rme=()=>"أنت",Mme=()=>"Tú",Ome=()=>"आप",Dme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tme():t==="fa"?Ame():t==="ar"?Rme():t==="es"?Mme():t==="hi"?Ome():jme()}),Lme=()=>"Goal cleared",Ime=()=>"已清除目标",$me=()=>"هدف پاک شد",Bme=()=>"تم مسح الهدف",Pme=()=>"Objetivo borrado",Fme=()=>"लक्ष्य हटाया गया",Hme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ime():t==="fa"?$me():t==="ar"?Bme():t==="es"?Pme():t==="hi"?Fme():Lme()}),qme=e=>`Current goal: ${e==null?void 0:e.goal}`,Ume=e=>`当前目标:${e==null?void 0:e.goal}`,Gme=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,Vme=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,Kme=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,Wme=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,Qme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ume(e):t==="fa"?Gme(e):t==="ar"?Vme(e):t==="es"?Kme(e):t==="hi"?Wme(e):qme(e)}),Xme=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,Yme=e=>`设置目标失败:${e==null?void 0:e.error}`,Zme=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,Jme=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,ege=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,tge=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,eN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yme(e):t==="fa"?Zme(e):t==="ar"?Jme(e):t==="es"?ege(e):t==="hi"?tge(e):Xme(e)}),nge=()=>"No goal set — add one after /goal",rge=()=>"尚未设置目标 — 在 /goal 后面写一个",sge=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",ige=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",age=()=>"Sin objetivo — añade uno después de /goal",oge=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",cge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rge():t==="fa"?sge():t==="ar"?ige():t==="es"?age():t==="hi"?oge():nge()}),lge=()=>"Goal set",uge=()=>"已设置目标",_ge=()=>"هدف تنظیم شد",fge=()=>"تم تعيين الهدف",dge=()=>"Objetivo definido",hge=()=>"लक्ष्य सेट किया गया",pge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uge():t==="fa"?_ge():t==="ar"?fge():t==="es"?dge():t==="hi"?hge():lge()}),mge=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,gge=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,vge=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,bge=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,yge=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,xge=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,wge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gge(e):t==="fa"?vge(e):t==="ar"?bge(e):t==="es"?yge(e):t==="hi"?xge(e):mge(e)}),kge=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,Sge=e=>`导入该聊天失败:${e==null?void 0:e.error}`,Cge=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,Ege=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,Nge=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,zge=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,jge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sge(e):t==="fa"?Cge(e):t==="ar"?Ege(e):t==="es"?Nge(e):t==="hi"?zge(e):kge(e)}),Tge=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Age=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,Rge=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Mge=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Oge=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,Dge=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,Lge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Age(e):t==="fa"?Rge(e):t==="ar"?Mge(e):t==="es"?Oge(e):t==="hi"?Dge(e):Tge(e)}),Ige=e=>`Message not sent: ${e==null?void 0:e.error}`,$ge=e=>`消息未发送:${e==null?void 0:e.error}`,Bge=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,Pge=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,Fge=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,Hge=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,qge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$ge(e):t==="fa"?Bge(e):t==="ar"?Pge(e):t==="es"?Fge(e):t==="hi"?Hge(e):Ige(e)}),Uge=()=>"Model unavailable",Gge=()=>"模型不可用",Vge=()=>"مدل در دسترس نیست",Kge=()=>"النموذج غير متاح",Wge=()=>"Modelo no disponible",Qge=()=>"मॉडल उपलब्ध नहीं",Xge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gge():t==="fa"?Vge():t==="ar"?Kge():t==="es"?Wge():t==="hi"?Qge():Uge()}),Yge=()=>"New session",Zge=()=>"新会话",Jge=()=>"نشست جدید",e1e=()=>"جلسة جديدة",t1e=()=>"Nueva sesión",n1e=()=>"नया सेशन",tN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zge():t==="fa"?Jge():t==="ar"?e1e():t==="es"?t1e():t==="hi"?n1e():Yge()}),r1e=()=>"No active sessions",s1e=()=>"没有活跃会话",i1e=()=>"نشست فعالی وجود ندارد",a1e=()=>"لا توجد جلسات نشطة",o1e=()=>"No hay sesiones activas",c1e=()=>"कोई सक्रिय सेशन नहीं",l1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s1e():t==="fa"?i1e():t==="ar"?a1e():t==="es"?o1e():t==="hi"?c1e():r1e()}),u1e=()=>"No activity",_1e=()=>"无活动",f1e=()=>"بدون فعالیت",d1e=()=>"لا يوجد نشاط",h1e=()=>"Sin actividad",p1e=()=>"कोई गतिविधि नहीं",m1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_1e():t==="fa"?f1e():t==="ar"?d1e():t==="es"?h1e():t==="hi"?p1e():u1e()}),g1e=()=>"No archived sessions",v1e=()=>"没有已归档的会话",b1e=()=>"نشست بایگانی‌شده‌ای وجود ندارد",y1e=()=>"لا توجد جلسات مؤرشفة",x1e=()=>"No hay sesiones archivadas",w1e=()=>"कोई आर्काइव किया गया सेशन नहीं",k1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v1e():t==="fa"?b1e():t==="ar"?y1e():t==="es"?x1e():t==="hi"?w1e():g1e()}),S1e=()=>"No sessions yet",C1e=()=>"还没有会话",E1e=()=>"هنوز نشستی وجود ندارد",N1e=()=>"لا توجد جلسات بعد",z1e=()=>"Aún no hay sesiones",j1e=()=>"अभी तक कोई सेशन नहीं",T1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C1e():t==="fa"?E1e():t==="ar"?N1e():t==="es"?z1e():t==="hi"?j1e():S1e()}),A1e=()=>"There is nothing to compact yet",R1e=()=>"还没有可压缩的内容",M1e=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",O1e=()=>"لا يوجد شيء لضغطه بعد",D1e=()=>"Aún no hay nada que comprimir",L1e=()=>"छोटा करने के लिए अभी कुछ नहीं है",I1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R1e():t==="fa"?M1e():t==="ar"?O1e():t==="es"?D1e():t==="hi"?L1e():A1e()}),$1e=()=>"No response to copy yet",B1e=()=>"还没有可复制的回复",P1e=()=>"هنوز پاسخی برای کپی وجود ندارد",F1e=()=>"لا يوجد رد لنسخه بعد",H1e=()=>"Aún no hay ninguna respuesta que copiar",q1e=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",U1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B1e():t==="fa"?P1e():t==="ar"?F1e():t==="es"?H1e():t==="hi"?q1e():$1e()}),G1e=()=>"Nothing to export yet",V1e=()=>"还没有可导出的内容",K1e=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",W1e=()=>"لا يوجد شيء لتصديره بعد",Q1e=()=>"Aún no hay nada que exportar",X1e=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",Y1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V1e():t==="fa"?K1e():t==="ar"?W1e():t==="es"?Q1e():t==="hi"?X1e():G1e()}),Z1e=()=>"1 annotation",J1e=()=>"1 条批注",eve=()=>"۱ یادداشت",tve=()=>"تعليق واحد",nve=()=>"1 anotación",rve=()=>"1 एनोटेशन",sve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J1e():t==="fa"?eve():t==="ar"?tve():t==="es"?nve():t==="hi"?rve():Z1e()}),ive=()=>"Open sub-agent transcript",ave=()=>"打开子智能体记录",ove=()=>"باز کردن متن گفت‌وگوی عامل فرعی",cve=()=>"فتح سجل محادثة الوكيل الفرعي",lve=()=>"Abrir la transcripción del subagente",uve=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",_ve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ave():t==="fa"?ove():t==="ar"?cve():t==="es"?lve():t==="hi"?uve():ive()}),fve=()=>"About this demo",dve=()=>"关于此演示",hve=()=>"دربارهٔ این نسخهٔ نمایشی",pve=()=>"حول هذا العرض التوضيحي",mve=()=>"Acerca de esta demo",gve=()=>"इस डेमो के बारे में",nN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dve():t==="fa"?hve():t==="ar"?pve():t==="es"?mve():t==="hi"?gve():fve()}),vve=()=>"Accept and auto mode",bve=()=>"接受并使用自动模式",yve=()=>"پذیرش و حالت خودکار",xve=()=>"قبول وتفعيل الوضع التلقائي",wve=()=>"Aceptar en modo automático",kve=()=>"स्वीकार करें और ऑटो मोड",Sve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bve():t==="fa"?yve():t==="ar"?xve():t==="es"?wve():t==="hi"?kve():vve()}),Cve=()=>"Accept and bypass all",Eve=()=>"接受并跳过所有审批",Nve=()=>"پذیرش و عبور از همهٔ تأییدها",zve=()=>"القبول وتجاوز الكل",jve=()=>"Aceptar y omitir permisos",Tve=()=>"स्वीकार करें और सब बायपास करें",Ave=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eve():t==="fa"?Nve():t==="ar"?zve():t==="es"?jve():t==="hi"?Tve():Cve()}),Rve=()=>"Active",Mve=()=>"活跃",Ove=()=>"فعال",Dve=()=>"نشط",Lve=()=>"Activas",Ive=()=>"सक्रिय",$ve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mve():t==="fa"?Ove():t==="ar"?Dve():t==="es"?Lve():t==="hi"?Ive():Rve()}),Bve=()=>"All",Pve=()=>"全部",Fve=()=>"همه",Hve=()=>"الكل",qve=()=>"Todas",Uve=()=>"सभी",Gve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pve():t==="fa"?Fve():t==="ar"?Hve():t==="es"?qve():t==="hi"?Uve():Bve()}),Vve=()=>"Allow",Kve=()=>"允许",Wve=()=>"اجازه دادن",Qve=()=>"السماح",Xve=()=>"Permitir",Yve=()=>"अनुमति दें",Zve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kve():t==="fa"?Wve():t==="ar"?Qve():t==="es"?Xve():t==="hi"?Yve():Vve()}),Jve=()=>"Approval required",ebe=()=>"需要批准",tbe=()=>"نیازمند تأیید",nbe=()=>"الموافقة مطلوبة",rbe=()=>"Aprobación necesaria",sbe=()=>"स्वीकृति ज़रूरी है",ibe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ebe():t==="fa"?tbe():t==="ar"?nbe():t==="es"?rbe():t==="hi"?sbe():Jve()}),abe=()=>"Archived",obe=()=>"已归档",cbe=()=>"بایگانی‌شده",lbe=()=>"مؤرشف",ube=()=>"Archivadas",_be=()=>"आर्काइव किया गया",rN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?obe():t==="fa"?cbe():t==="ar"?lbe():t==="es"?ube():t==="hi"?_be():abe()}),fbe=()=>"Ask about this",dbe=()=>"询问此内容",hbe=()=>"دربارهٔ این بپرسید",pbe=()=>"اسأل عن هذا",mbe=()=>"Preguntar sobre esto",gbe=()=>"इसके बारे में पूछें",vbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dbe():t==="fa"?hbe():t==="ar"?pbe():t==="es"?mbe():t==="hi"?gbe():fbe()}),bbe=()=>"Attach a PDF or image",ybe=()=>"附加 PDF 或图片",xbe=()=>"پیوست PDF یا تصویر",wbe=()=>"إرفاق ملف PDF أو صورة",kbe=()=>"Adjuntar un PDF o una imagen",Sbe=()=>"PDF या इमेज अटैच करें",sN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ybe():t==="fa"?xbe():t==="ar"?wbe():t==="es"?kbe():t==="hi"?Sbe():bbe()}),Cbe=()=>"Bash",Ebe=()=>"Bash",Nbe=()=>"Bash",zbe=()=>"Bash",jbe=()=>"Bash",Tbe=()=>"Bash",bD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ebe():t==="fa"?Nbe():t==="ar"?zbe():t==="es"?jbe():t==="hi"?Tbe():Cbe()}),Abe=()=>"Browsed the web",Rbe=()=>"已浏览网页",Mbe=()=>"وب مرور شد",Obe=()=>"تصفّح الويب",Dbe=()=>"Navegó por la web",Lbe=()=>"वेब ब्राउज़ किया",iN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rbe():t==="fa"?Mbe():t==="ar"?Obe():t==="es"?Dbe():t==="hi"?Lbe():Abe()}),Ibe=()=>"Built the project",$be=()=>"已构建项目",Bbe=()=>"پروژه ساخته شد",Pbe=()=>"بنى المشروع",Fbe=()=>"Compiló el proyecto",Hbe=()=>"प्रोजेक्ट बिल्ड किया",qbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$be():t==="fa"?Bbe():t==="ar"?Pbe():t==="es"?Fbe():t==="hi"?Hbe():Ibe()}),Ube=()=>"Cancel",Gbe=()=>"取消",Vbe=()=>"لغو",Kbe=()=>"إلغاء",Wbe=()=>"Cancelar",Qbe=()=>"रद्द करें",Xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbe():t==="fa"?Vbe():t==="ar"?Kbe():t==="es"?Wbe():t==="hi"?Qbe():Ube()}),Ybe=()=>"Cancelled an experiment run",Zbe=()=>"已取消实验运行",Jbe=()=>"اجرای آزمایش لغو شد",eye=()=>"ألغى تشغيل تجربة",tye=()=>"Canceló una ejecución de experimento",nye=()=>"एक प्रयोग रन रद्द किया",rye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zbe():t==="fa"?Jbe():t==="ar"?eye():t==="es"?tye():t==="hi"?nye():Ybe()}),sye=()=>"Checked code style",iye=()=>"已检查代码风格",aye=()=>"سبک کد بررسی شد",oye=()=>"فحص نمط الشيفرة",cye=()=>"Revisó el estilo del código",lye=()=>"कोड स्टाइल जाँची",uye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iye():t==="fa"?aye():t==="ar"?oye():t==="es"?cye():t==="hi"?lye():sye()}),_ye=()=>"Checked compute options",fye=()=>"已检查算力选项",dye=()=>"گزینه‌های رایانشی بررسی شد",hye=()=>"فحص خيارات الحوسبة",pye=()=>"Consultó las opciones de cómputo",mye=()=>"कंप्यूट विकल्प जाँचे",gye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():_ye()}),vye=()=>"Checked experiment status",bye=()=>"已检查实验状态",yye=()=>"وضعیت آزمایش بررسی شد",xye=()=>"فحص حالة التجربة",wye=()=>"Consultó el estado del experimento",kye=()=>"प्रयोग की स्थिति जाँची",aN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bye():t==="fa"?yye():t==="ar"?xye():t==="es"?wye():t==="hi"?kye():vye()}),Sye=()=>"Checked Git status",Cye=()=>"已检查 Git 状态",Eye=()=>"وضعیت Git بررسی شد",Nye=()=>"فحص حالة Git",zye=()=>"Consultó el estado de Git",jye=()=>"Git स्थिति जाँची",Tye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cye():t==="fa"?Eye():t==="ar"?Nye():t==="es"?zye():t==="hi"?jye():Sye()}),Aye=()=>"Checked local times",Rye=()=>"已查询当地时间",Mye=()=>"زمان‌های محلی بررسی شد",Oye=()=>"فحص التوقيتات المحلية",Dye=()=>"Consultó horas locales",Lye=()=>"स्थानीय समय जाँचे",Iye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rye():t==="fa"?Mye():t==="ar"?Oye():t==="es"?Dye():t==="hi"?Lye():Aye()}),$ye=()=>"Checked market data",Bye=()=>"已查询市场数据",Pye=()=>"داده‌های بازار بررسی شد",Fye=()=>"فحص بيانات السوق",Hye=()=>"Consultó datos de mercado",qye=()=>"बाज़ार डेटा जाँचा",Uye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bye():t==="fa"?Pye():t==="ar"?Fye():t==="es"?Hye():t==="hi"?qye():$ye()}),Gye=()=>"Checked sports data",Vye=()=>"已查询体育数据",Kye=()=>"داده‌های ورزشی بررسی شد",Wye=()=>"فحص البيانات الرياضية",Qye=()=>"Consultó datos deportivos",Xye=()=>"खेल डेटा जाँचा",Yye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vye():t==="fa"?Kye():t==="ar"?Wye():t==="es"?Qye():t==="hi"?Xye():Gye()}),Zye=()=>"Checked the weather",Jye=()=>"已查询天气",exe=()=>"آب‌وهوا بررسی شد",txe=()=>"فحص حالة الطقس",nxe=()=>"Consultó el tiempo",rxe=()=>"मौसम जाँचा",sxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jye():t==="fa"?exe():t==="ar"?txe():t==="es"?nxe():t==="hi"?rxe():Zye()}),ixe=()=>"Checked types",axe=()=>"已检查类型",oxe=()=>"نوع‌ها بررسی شد",cxe=()=>"فحص الأنواع",lxe=()=>"Comprobó los tipos",uxe=()=>"टाइप जाँचे",_xe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?axe():t==="fa"?oxe():t==="ar"?cxe():t==="es"?lxe():t==="hi"?uxe():ixe()}),fxe=()=>"Clear annotations",dxe=()=>"清除批注",hxe=()=>"پاک کردن یادداشت‌ها",pxe=()=>"مسح التعليقات",mxe=()=>"Borrar anotaciones",gxe=()=>"एनोटेशन साफ़ करें",oN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dxe():t==="fa"?hxe():t==="ar"?pxe():t==="es"?mxe():t==="hi"?gxe():fxe()}),vxe=e=>`Clear the goal: ${e==null?void 0:e.goal}`,bxe=e=>`清除目标:${e==null?void 0:e.goal}`,yxe=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,xxe=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,wxe=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,kxe=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,cN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bxe(e):t==="fa"?yxe(e):t==="ar"?xxe(e):t==="es"?wxe(e):t==="hi"?kxe(e):vxe(e)}),Sxe=()=>"Customize",Cxe=()=>"自定义",Exe=()=>"سفارشی‌سازی",Nxe=()=>"تخصيص",zxe=()=>"Personalizar",jxe=()=>"कस्टमाइज़ करें",Txe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cxe():t==="fa"?Exe():t==="ar"?Nxe():t==="es"?zxe():t==="hi"?jxe():Sxe()}),Axe=()=>"Data sources",Rxe=()=>"数据源",Mxe=()=>"منابع داده",Oxe=()=>"مصادر البيانات",Dxe=()=>"Fuentes de datos",Lxe=()=>"डेटा स्रोत",Q2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rxe():t==="fa"?Mxe():t==="ar"?Oxe():t==="es"?Dxe():t==="hi"?Lxe():Axe()}),Ixe=()=>"Delegated a task to a new agent",$xe=()=>"已将任务委派给新智能体",Bxe=()=>"وظیفه به عامل جدید واگذار شد",Pxe=()=>"فوّض مهمة إلى وكيل جديد",Fxe=()=>"Delegó una tarea a un nuevo agente",Hxe=()=>"एक नए एजेंट को टास्क सौंपा",qxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$xe():t==="fa"?Bxe():t==="ar"?Pxe():t==="es"?Fxe():t==="hi"?Hxe():Ixe()}),Uxe=()=>"Delete",Gxe=()=>"删除",Vxe=()=>"حذف",Kxe=()=>"حذف",Wxe=()=>"Eliminar",Qxe=()=>"हटाएं",yD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gxe():t==="fa"?Vxe():t==="ar"?Kxe():t==="es"?Wxe():t==="hi"?Qxe():Uxe()}),Xxe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",Yxe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",Zxe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",Jxe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",e2e=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",t2e=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",n2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxe():t==="fa"?Zxe():t==="ar"?Jxe():t==="es"?e2e():t==="hi"?t2e():Xxe()}),r2e=()=>"to monitor it.",s2e=()=>"以查看进度。",i2e=()=>"بزنید.",a2e=()=>"لمتابعتها.",o2e=()=>"para seguirlo.",c2e=()=>"इस पर नज़र रखने के लिए।",lN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s2e():t==="fa"?i2e():t==="ar"?a2e():t==="es"?o2e():t==="hi"?c2e():r2e()}),l2e=()=>"The experiment is now running. Tap",u2e=()=>"实验正在运行。点按",_2e=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",f2e=()=>"التجربة قيد التشغيل الآن. اضغط على",d2e=()=>"El experimento ya se está ejecutando. Pulsa",h2e=()=>"प्रयोग अब चल रहा है। टैप करें",uN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u2e():t==="fa"?_2e():t==="ar"?f2e():t==="es"?d2e():t==="hi"?h2e():l2e()}),p2e=()=>"Deny",m2e=()=>"拒绝",g2e=()=>"رد کردن",v2e=()=>"رفض",b2e=()=>"Denegar",y2e=()=>"अस्वीकार करें",x2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m2e():t==="fa"?g2e():t==="ar"?v2e():t==="es"?b2e():t==="hi"?y2e():p2e()}),w2e=()=>"Dismiss",k2e=()=>"关闭",S2e=()=>"بستن",C2e=()=>"إغلاق",E2e=()=>"Cerrar",N2e=()=>"खारिज करें",Xg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2e():t==="fa"?S2e():t==="ar"?C2e():t==="es"?E2e():t==="hi"?N2e():w2e()}),z2e=()=>"Edit and re-send",j2e=()=>"编辑并重新发送",T2e=()=>"ویرایش و ارسال دوباره",A2e=()=>"تعديل وإعادة الإرسال",R2e=()=>"Editar y reenviar",M2e=()=>"संपादित करें और फिर भेजें",_N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j2e():t==="fa"?T2e():t==="ar"?A2e():t==="es"?R2e():t==="hi"?M2e():z2e()}),O2e=()=>"Edit message",D2e=()=>"编辑消息",L2e=()=>"ویرایش پیام",I2e=()=>"تعديل الرسالة",$2e=()=>"Editar mensaje",B2e=()=>"संदेश संपादित करें",P2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?$2e():t==="hi"?B2e():O2e()}),F2e=()=>"Edited a file",H2e=()=>"已编辑文件",q2e=()=>"فایل ویرایش شد",U2e=()=>"عدّل ملفًا",G2e=()=>"Editó un archivo",V2e=()=>"एक फ़ाइल संपादित की",fN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H2e():t==="fa"?q2e():t==="ar"?U2e():t==="es"?G2e():t==="hi"?V2e():F2e()}),K2e=()=>"Exit Bash mode",W2e=()=>"退出 Bash 模式",Q2e=()=>"خروج از حالت Bash",X2e=()=>"الخروج من وضع Bash",Y2e=()=>"Salir del modo Bash",Z2e=()=>"Bash मोड से बाहर निकलें",dN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W2e():t==="fa"?Q2e():t==="ar"?X2e():t==="es"?Y2e():t==="hi"?Z2e():K2e()}),J2e=()=>"Exit Plan mode",ewe=()=>"退出计划模式",twe=()=>"خروج از حالت طرح",nwe=()=>"الخروج من وضع التخطيط",rwe=()=>"Salir del modo Plan",swe=()=>"प्लान मोड से बाहर निकलें",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ewe():t==="fa"?twe():t==="ar"?nwe():t==="es"?rwe():t==="hi"?swe():J2e()}),iwe=()=>"Failed:",awe=()=>"失败:",owe=()=>"ناموفق:",cwe=()=>"فشل:",lwe=()=>"Error:",uwe=()=>"विफल:",Fk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?awe():t==="fa"?owe():t==="ar"?cwe():t==="es"?lwe():t==="hi"?uwe():iwe()}),_we=()=>"Filter sessions",fwe=()=>"筛选会话",dwe=()=>"فیلتر نشست‌ها",hwe=()=>"تصفية الجلسات",pwe=()=>"Filtrar sesiones",mwe=()=>"सेशन फ़िल्टर करें",pN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fwe():t==="fa"?dwe():t==="ar"?hwe():t==="es"?pwe():t==="hi"?mwe():_we()}),gwe=()=>"Goal",vwe=()=>"目标",bwe=()=>"هدف",ywe=()=>"الهدف",xwe=()=>"Objetivo",wwe=()=>"लक्ष्य",kwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vwe():t==="fa"?bwe():t==="ar"?ywe():t==="es"?xwe():t==="hi"?wwe():gwe()}),Swe=()=>"is unavailable.",Cwe=()=>"不可用。",Ewe=()=>"در دسترس نیست.",Nwe=()=>"غير متاح.",zwe=()=>"no está disponible.",jwe=()=>"उपलब्ध नहीं है।",Twe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cwe():t==="fa"?Ewe():t==="ar"?Nwe():t==="es"?zwe():t==="hi"?jwe():Swe()}),Awe=()=>"Later queued messages will wait until this is retried or removed.",Rwe=()=>"后续排队的消息会等待此消息重试或移除。",Mwe=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",Owe=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",Dwe=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",Lwe=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",Iwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rwe():t==="fa"?Mwe():t==="ar"?Owe():t==="es"?Dwe():t==="hi"?Lwe():Awe()}),$we=()=>"Listed files",Bwe=()=>"已列出文件",Pwe=()=>"فایل‌ها فهرست شد",Fwe=()=>"سرد الملفات",Hwe=()=>"Listó archivos",qwe=()=>"फ़ाइलों की सूची बनाई",mN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bwe():t==="fa"?Pwe():t==="ar"?Fwe():t==="es"?Hwe():t==="hi"?qwe():$we()}),Uwe=()=>"Listed project runs",Gwe=()=>"已列出项目运行",Vwe=()=>"اجراهای پروژه فهرست شد",Kwe=()=>"سرد عمليات تشغيل المشروع",Wwe=()=>"Listó las ejecuciones del proyecto",Qwe=()=>"प्रोजेक्ट रन की सूची बनाई",Xwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gwe():t==="fa"?Vwe():t==="ar"?Kwe():t==="es"?Wwe():t==="hi"?Qwe():Uwe()}),Ywe=()=>"Listed projects",Zwe=()=>"已列出项目",Jwe=()=>"پروژه‌ها فهرست شد",e4e=()=>"سرد المشاريع",t4e=()=>"Listó proyectos",n4e=()=>"प्रोजेक्ट की सूची बनाई",r4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zwe():t==="fa"?Jwe():t==="ar"?e4e():t==="es"?t4e():t==="hi"?n4e():Ywe()}),s4e=()=>"Loading conversation…",i4e=()=>"正在加载对话…",a4e=()=>"در حال بارگیری گفتگو…",o4e=()=>"جارٍ تحميل المحادثة…",c4e=()=>"Cargando conversación…",l4e=()=>"बातचीत लोड हो रही है…",u4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i4e():t==="fa"?a4e():t==="ar"?o4e():t==="es"?c4e():t==="hi"?l4e():s4e()}),_4e=()=>"New Chat",f4e=()=>"新对话",d4e=()=>"گفتگوی جدید",h4e=()=>"محادثة جديدة",p4e=()=>"Nuevo chat",m4e=()=>"नई चैट",g4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f4e():t==="fa"?d4e():t==="ar"?h4e():t==="es"?p4e():t==="hi"?m4e():_4e()}),v4e=()=>"Next version",b4e=()=>"下一版本",y4e=()=>"نسخهٔ بعدی",x4e=()=>"النسخة التالية",w4e=()=>"Siguiente versión",k4e=()=>"अगला वर्शन",gN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b4e():t==="fa"?y4e():t==="ar"?x4e():t==="es"?w4e():t==="hi"?k4e():v4e()}),S4e=()=>"Open the session this agent spawned",C4e=()=>"打开此智能体创建的会话",E4e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",N4e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",z4e=()=>"Abrir la sesión que creó este agente",j4e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",T4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C4e():t==="fa"?E4e():t==="ar"?N4e():t==="es"?z4e():t==="hi"?j4e():S4e()}),A4e=()=>"Opened web pages",R4e=()=>"已打开网页",M4e=()=>"صفحه‌های وب باز شد",O4e=()=>"فتح صفحات ويب",D4e=()=>"Abrió páginas web",L4e=()=>"वेब पेज खोले",I4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R4e():t==="fa"?M4e():t==="ar"?O4e():t==="es"?D4e():t==="hi"?L4e():A4e()}),$4e=()=>"Plan",B4e=()=>"计划",P4e=()=>"طرح",F4e=()=>"خطة",H4e=()=>"Plan",q4e=()=>"प्लान",U4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B4e():t==="fa"?P4e():t==="ar"?F4e():t==="es"?H4e():t==="hi"?q4e():$4e()}),G4e=()=>"Plan approved",V4e=()=>"计划已批准",K4e=()=>"طرح تأیید شد",W4e=()=>"تمت الموافقة على الخطة",Q4e=()=>"Plan aprobado",X4e=()=>"प्लान स्वीकृत",Y4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V4e():t==="fa"?K4e():t==="ar"?W4e():t==="es"?Q4e():t==="hi"?X4e():G4e()}),Z4e=()=>"Plan rejected",J4e=()=>"计划已拒绝",e3e=()=>"طرح رد شد",t3e=()=>"رُفضت الخطة",n3e=()=>"Plan rechazado",r3e=()=>"प्लान अस्वीकृत",s3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J4e():t==="fa"?e3e():t==="ar"?t3e():t==="es"?n3e():t==="hi"?r3e():Z4e()}),i3e=()=>"Plan resolved",a3e=()=>"计划已处理",o3e=()=>"طرح تعیین تکلیف شد",c3e=()=>"تمت معالجة الخطة",l3e=()=>"Plan resuelto",u3e=()=>"प्लान सुलझाया गया",_3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a3e():t==="fa"?o3e():t==="ar"?c3e():t==="es"?l3e():t==="hi"?u3e():i3e()}),f3e=()=>"Plan revision requested",d3e=()=>"已请求修改计划",h3e=()=>"درخواست بازنگری طرح ثبت شد",p3e=()=>"طُلب تعديل الخطة",m3e=()=>"Cambios en el plan solicitados",g3e=()=>"प्लान में बदलाव का अनुरोध",v3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d3e():t==="fa"?h3e():t==="ar"?p3e():t==="es"?m3e():t==="hi"?g3e():f3e()}),b3e=()=>"Previous version",y3e=()=>"上一版本",x3e=()=>"نسخهٔ قبلی",w3e=()=>"النسخة السابقة",k3e=()=>"Versión anterior",S3e=()=>"पिछला वर्शन",vN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y3e():t==="fa"?x3e():t==="ar"?w3e():t==="es"?k3e():t==="hi"?S3e():b3e()}),C3e=()=>"Ran a command",E3e=()=>"已运行命令",N3e=()=>"فرمان اجرا شد",z3e=()=>"نفّذ أمرًا",j3e=()=>"Ejecutó un comando",T3e=()=>"एक कमांड चलाई",A3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E3e():t==="fa"?N3e():t==="ar"?z3e():t==="es"?j3e():t==="hi"?T3e():C3e()}),R3e=()=>"Ran tests",M3e=()=>"已运行测试",O3e=()=>"آزمون‌ها اجرا شد",D3e=()=>"شغّل الاختبارات",L3e=()=>"Ejecutó tests",I3e=()=>"टेस्ट चलाए",$3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M3e():t==="fa"?O3e():t==="ar"?D3e():t==="es"?L3e():t==="hi"?I3e():R3e()}),B3e=()=>"Read a file",P3e=()=>"已读取文件",F3e=()=>"فایل خوانده شد",H3e=()=>"قرأ ملفًا",q3e=()=>"Leyó un archivo",U3e=()=>"एक फ़ाइल पढ़ी",G3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P3e():t==="fa"?F3e():t==="ar"?H3e():t==="es"?q3e():t==="hi"?U3e():B3e()}),V3e=()=>"Read Git history",K3e=()=>"已读取 Git 历史",W3e=()=>"تاریخچهٔ Git خوانده شد",Q3e=()=>"قرأ سجل Git",X3e=()=>"Leyó el historial de Git",Y3e=()=>"Git इतिहास पढ़ा",Z3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K3e():t==="fa"?W3e():t==="ar"?Q3e():t==="es"?X3e():t==="hi"?Y3e():V3e()}),J3e=()=>"Read project details",e5e=()=>"已读取项目详情",t5e=()=>"جزئیات پروژه خوانده شد",n5e=()=>"قرأ تفاصيل المشروع",r5e=()=>"Leyó los detalles del proyecto",s5e=()=>"प्रोजेक्ट विवरण पढ़ा",i5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e5e():t==="fa"?t5e():t==="ar"?n5e():t==="es"?r5e():t==="hi"?s5e():J3e()}),a5e=()=>"Reject",o5e=()=>"拒绝",c5e=()=>"رد کردن",l5e=()=>"رفض",u5e=()=>"Rechazar",_5e=()=>"अस्वीकार करें",f5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o5e():t==="fa"?c5e():t==="ar"?l5e():t==="es"?u5e():t==="hi"?_5e():a5e()}),d5e=()=>"Remove",h5e=()=>"移除",p5e=()=>"حذف",m5e=()=>"إزالة",g5e=()=>"Quitar",v5e=()=>"हटाएं",b5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h5e():t==="fa"?p5e():t==="ar"?m5e():t==="es"?g5e():t==="hi"?v5e():d5e()}),y5e=()=>"Remove annotation",x5e=()=>"移除批注",w5e=()=>"حذف یادداشت",k5e=()=>"إزالة التعليق",S5e=()=>"Quitar anotación",C5e=()=>"एनोटेशन हटाएं",E5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x5e():t==="fa"?w5e():t==="ar"?k5e():t==="es"?S5e():t==="hi"?C5e():y5e()}),N5e=()=>"Remove file",z5e=()=>"移除文件",j5e=()=>"حذف فایل",T5e=()=>"إزالة الملف",A5e=()=>"Quitar archivo",R5e=()=>"फ़ाइल हटाएं",bN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z5e():t==="fa"?j5e():t==="ar"?T5e():t==="es"?A5e():t==="hi"?R5e():N5e()}),M5e=()=>"Remove image",O5e=()=>"移除图片",D5e=()=>"حذف تصویر",L5e=()=>"إزالة الصورة",I5e=()=>"Quitar imagen",$5e=()=>"इमेज हटाएं",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O5e():t==="fa"?D5e():t==="ar"?L5e():t==="es"?I5e():t==="hi"?$5e():M5e()}),B5e=()=>"Remove queued message",P5e=()=>"移除排队消息",F5e=()=>"حذف پیام صف",H5e=()=>"إزالة الرسالة من قائمة الانتظار",q5e=()=>"Quitar mensaje en cola",U5e=()=>"कतार में लगा संदेश हटाएं",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P5e():t==="fa"?F5e():t==="ar"?H5e():t==="es"?q5e():t==="hi"?U5e():B5e()}),G5e=()=>"Rename",V5e=()=>"重命名",K5e=()=>"تغییر نام",W5e=()=>"إعادة تسمية",Q5e=()=>"Renombrar",X5e=()=>"नाम बदलें",xD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V5e():t==="fa"?K5e():t==="ar"?W5e():t==="es"?Q5e():t==="hi"?X5e():G5e()}),Y5e=()=>"Reviewed code changes",Z5e=()=>"已审查代码更改",J5e=()=>"تغییرات کد بازبینی شد",eke=()=>"راجع تغييرات الشيفرة",tke=()=>"Revisó cambios en el código",nke=()=>"कोड में बदलावों की समीक्षा की",rke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z5e():t==="fa"?J5e():t==="ar"?eke():t==="es"?tke():t==="hi"?nke():Y5e()}),ske=()=>"Run",ike=()=>"运行",ake=()=>"اجرا",oke=()=>"تشغيل",cke=()=>"Ejecutar",lke=()=>"रन",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ike():t==="fa"?ake():t==="ar"?oke():t==="es"?cke():t==="hi"?lke():ske()}),uke=()=>"Selected chat text",_ke=()=>"已选聊天文本",fke=()=>"متن انتخاب‌شدهٔ گفتگو",dke=()=>"النص المحدد من المحادثة",hke=()=>"Texto seleccionado del chat",pke=()=>"चयनित चैट टेक्स्ट",mke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ke():t==="fa"?fke():t==="ar"?dke():t==="es"?hke():t==="hi"?pke():uke()}),gke=()=>"Selected text:",vke=()=>"已选文本:",bke=()=>"متن انتخاب‌شده:",yke=()=>"النص المحدد:",xke=()=>"Texto seleccionado:",wke=()=>"चयनित टेक्स्ट:",kke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vke():t==="fa"?bke():t==="ar"?yke():t==="es"?xke():t==="hi"?wke():gke()}),Ske=()=>"Send",Cke=()=>"发送",Eke=()=>"ارسال",Nke=()=>"إرسال رسالة",zke=()=>"Enviar",jke=()=>"भेजें",i3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cke():t==="fa"?Eke():t==="ar"?Nke():t==="es"?zke():t==="hi"?jke():Ske()}),Tke=()=>"Session options",Ake=()=>"会话选项",Rke=()=>"گزینه‌های نشست",Mke=()=>"خيارات الجلسة",Oke=()=>"Opciones de la sesión",Dke=()=>"सेशन विकल्प",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ake():t==="fa"?Rke():t==="ar"?Mke():t==="es"?Oke():t==="hi"?Dke():Tke()}),Lke=()=>"Session title",Ike=()=>"会话标题",$ke=()=>"عنوان نشست",Bke=()=>"عنوان الجلسة",Pke=()=>"Título de la sesión",Fke=()=>"सेशन शीर्षक",Hke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ike():t==="fa"?$ke():t==="ar"?Bke():t==="es"?Pke():t==="hi"?Fke():Lke()}),qke=()=>"Show sidebar",Uke=()=>"显示侧边栏",Gke=()=>"نمایش نوار کناری",Vke=()=>"إظهار الشريط الجانبي",Kke=()=>"Mostrar barra lateral",Wke=()=>"साइडबार दिखाएं",SN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uke():t==="fa"?Gke():t==="ar"?Vke():t==="es"?Kke():t==="hi"?Wke():qke()}),Qke=()=>"Started an experiment run",Xke=()=>"已启动实验运行",Yke=()=>"اجرای آزمایش آغاز شد",Zke=()=>"بدأ تشغيل تجربة",Jke=()=>"Inició una ejecución de experimento",eSe=()=>"एक प्रयोग रन शुरू किया",tSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xke():t==="fa"?Yke():t==="ar"?Zke():t==="es"?Jke():t==="hi"?eSe():Qke()}),nSe=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",rSe=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",sSe=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",iSe=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",aSe=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",oSe=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",cSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rSe():t==="fa"?sSe():t==="ar"?iSe():t==="es"?aSe():t==="hi"?oSe():nSe()}),lSe=()=>"Shape a research question",uSe=()=>"明确研究问题",_Se=()=>"شکل دادن به پرسش پژوهشی",fSe=()=>"صياغة سؤال بحثي",dSe=()=>"Definir una pregunta de investigación",hSe=()=>"एक शोध प्रश्न तैयार करें",pSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uSe():t==="fa"?_Se():t==="ar"?fSe():t==="es"?dSe():t==="hi"?hSe():lSe()}),mSe=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",gSe=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",vSe=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",bSe=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",ySe=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",xSe=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",wSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gSe():t==="fa"?vSe():t==="ar"?bSe():t==="es"?ySe():t==="hi"?xSe():mSe()}),kSe=()=>"Survey related work",SSe=()=>"调研相关工作",CSe=()=>"مرور کارهای مرتبط",ESe=()=>"استعراض الأعمال ذات الصلة",NSe=()=>"Revisar trabajos relacionados",zSe=()=>"संबंधित कार्य का सर्वेक्षण करें",jSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SSe():t==="fa"?CSe():t==="ar"?ESe():t==="es"?NSe():t==="hi"?zSe():kSe()}),TSe=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",ASe=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",RSe=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",MSe=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",OSe=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",DSe=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",LSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ASe():t==="fa"?RSe():t==="ar"?MSe():t==="es"?OSe():t==="hi"?DSe():TSe()}),ISe=()=>"Scaffold a baseline",$Se=()=>"搭建基线",BSe=()=>"ساخت خط مبنا",PSe=()=>"بناء خط أساس",FSe=()=>"Crear un modelo de referencia",HSe=()=>"एक बेसलाइन तैयार करें",qSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Se():t==="fa"?BSe():t==="ar"?PSe():t==="es"?FSe():t==="hi"?HSe():ISe()}),USe=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",GSe=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",VSe=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",KSe=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",WSe=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",QSe=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",XSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GSe():t==="fa"?VSe():t==="ar"?KSe():t==="es"?WSe():t==="hi"?QSe():USe()}),YSe=()=>"Run a first experiment",ZSe=()=>"运行第一个实验",JSe=()=>"اجرای اولین آزمایش",e6e=()=>"تشغيل التجربة الأولى",t6e=()=>"Ejecutar un primer experimento",n6e=()=>"पहला प्रयोग चलाएं",r6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZSe():t==="fa"?JSe():t==="ar"?e6e():t==="es"?t6e():t==="hi"?n6e():YSe()}),s6e=()=>"Reading the project to suggest where to start…",i6e=()=>"正在阅读项目以建议从哪里开始…",a6e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",o6e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",c6e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",l6e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",u6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i6e():t==="fa"?a6e():t==="ar"?o6e():t==="es"?c6e():t==="hi"?l6e():s6e()}),_6e=()=>"Starter prompts",f6e=()=>"入门提示",d6e=()=>"پیشنهادهای شروع",h6e=()=>"اقتراحات للبدء",p6e=()=>"Prompts para empezar",m6e=()=>"शुरुआती प्रॉम्प्ट",g6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f6e():t==="fa"?d6e():t==="ar"?h6e():t==="es"?p6e():t==="hi"?m6e():_6e()}),v6e=()=>"Stop",b6e=()=>"停止",y6e=()=>"توقف",x6e=()=>"إيقاف",w6e=()=>"Detener",k6e=()=>"रोकें",CN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b6e():t==="fa"?y6e():t==="ar"?x6e():t==="es"?w6e():t==="hi"?k6e():v6e()}),S6e=()=>"Submit",C6e=()=>"提交",E6e=()=>"ارسال",N6e=()=>"إرسال",z6e=()=>"Enviar",j6e=()=>"सबमिट करें",T6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C6e():t==="fa"?E6e():t==="ar"?N6e():t==="es"?z6e():t==="hi"?j6e():S6e()}),A6e=()=>"Tool failed",R6e=()=>"工具失败",M6e=()=>"ابزار ناموفق بود",O6e=()=>"فشلت الأداة",D6e=()=>"Error en la herramienta",L6e=()=>"टूल विफल",I6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R6e():t==="fa"?M6e():t==="ar"?O6e():t==="es"?D6e():t==="hi"?L6e():A6e()}),$6e=()=>"Used tools",B6e=()=>"已使用工具",P6e=()=>"ابزارها استفاده شد",F6e=()=>"استخدم الأدوات",H6e=()=>"Usó herramientas",q6e=()=>"टूल इस्तेमाल किए",wD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B6e():t==="fa"?P6e():t==="ar"?F6e():t==="es"?H6e():t==="hi"?q6e():$6e()}),U6e=()=>"View full plan",G6e=()=>"查看完整计划",V6e=()=>"مشاهدهٔ طرح کامل",K6e=()=>"عرض الخطة كاملة",W6e=()=>"Ver plan completo",Q6e=()=>"पूरा प्लान देखें",X6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G6e():t==="fa"?V6e():t==="ar"?K6e():t==="es"?W6e():t==="hi"?Q6e():U6e()}),Y6e=()=>"Waited for an experiment run",Z6e=()=>"已等待实验运行",J6e=()=>"برای اجرای آزمایش صبر شد",eCe=()=>"انتظر تشغيل تجربة",tCe=()=>"Esperó a una ejecución de experimento",nCe=()=>"एक प्रयोग रन का इंतज़ार किया",rCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z6e():t==="fa"?J6e():t==="ar"?eCe():t==="es"?tCe():t==="hi"?nCe():Y6e()}),sCe=()=>"Waiting for your input…",iCe=()=>"正在等待你的输入…",aCe=()=>"منتظر ورودی شما…",oCe=()=>"في انتظار إدخالك…",cCe=()=>"Esperando tu respuesta…",lCe=()=>"आपके इनपुट का इंतज़ार है…",uCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iCe():t==="fa"?aCe():t==="ar"?oCe():t==="es"?cCe():t==="hi"?lCe():sCe()}),_Ce=()=>"What should we research?",fCe=()=>"我们应该研究什么?",dCe=()=>"چه چیزی را پژوهش کنیم؟",hCe=()=>"ما الذي نبحثه؟",pCe=()=>"¿Qué investigamos?",mCe=()=>"हमें क्या शोध करना चाहिए?",gCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fCe():t==="fa"?dCe():t==="ar"?hCe():t==="es"?pCe():t==="hi"?mCe():_Ce()}),vCe=()=>"You, mid-task",bCe=()=>"你(任务进行中)",yCe=()=>"شما، هنگام انجام وظیفه",xCe=()=>"أنت، أثناء المهمة",wCe=()=>"Tú, durante la tarea",kCe=()=>"आप, टास्क के बीच में",SCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bCe():t==="fa"?yCe():t==="ar"?xCe():t==="es"?wCe():t==="hi"?kCe():vCe()}),CCe=()=>"Pasted image",ECe=()=>"粘贴的图片",NCe=()=>"تصویر جای‌گذاری‌شده",zCe=()=>"صورة ملصقة",jCe=()=>"Imagen pegada",TCe=()=>"पेस्ट की गई इमेज",kD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ECe():t==="fa"?NCe():t==="ar"?zCe():t==="es"?jCe():t==="hi"?TCe():CCe()}),ACe=()=>"Plan",RCe=()=>"计划",MCe=()=>"طرح",OCe=()=>"خطة",DCe=()=>"Plan",LCe=()=>"प्लान",SD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RCe():t==="fa"?MCe():t==="ar"?OCe():t==="es"?DCe():t==="hi"?LCe():ACe()}),ICe=()=>"Plan mode — ready to proceed?",$Ce=()=>"计划模式 — 准备好继续了吗?",BCe=()=>"حالت طرح — آماده‌اید ادامه دهید؟",PCe=()=>"وضع التخطيط — جاهز للمتابعة؟",FCe=()=>"Modo Plan — ¿listo para continuar?",HCe=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",qCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ce():t==="fa"?BCe():t==="ar"?PCe():t==="es"?FCe():t==="hi"?HCe():ICe()}),UCe=()=>"Proposed plan",GCe=()=>"提议的计划",VCe=()=>"طرح پیشنهادی",KCe=()=>"خطة مقترحة",WCe=()=>"Plan propuesto",QCe=()=>"प्रस्तावित प्लान",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GCe():t==="fa"?VCe():t==="ar"?KCe():t==="es"?WCe():t==="hi"?QCe():UCe()}),XCe=()=>"Question",YCe=()=>"问题",ZCe=()=>"پرسش",JCe=()=>"سؤال",e7e=()=>"Pregunta",t7e=()=>"प्रश्न",n7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YCe():t==="fa"?ZCe():t==="ar"?JCe():t==="es"?e7e():t==="hi"?t7e():XCe()}),r7e=()=>"Queued",s7e=()=>"已排队",i7e=()=>"در صف",a7e=()=>"في قائمة الانتظار",o7e=()=>"En cola",c7e=()=>"कतार में",l7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s7e():t==="fa"?i7e():t==="ar"?a7e():t==="es"?o7e():t==="hi"?c7e():r7e()}),u7e=()=>"Recents",_7e=()=>"最近",f7e=()=>"اخیر",d7e=()=>"الأخيرة",h7e=()=>"Recientes",p7e=()=>"हाल की",CD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_7e():t==="fa"?f7e():t==="ar"?d7e():t==="es"?h7e():t==="hi"?p7e():u7e()}),m7e=()=>"Re-check its setup.",g7e=()=>"请重新检查其设置。",v7e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",b7e=()=>"أعد فحص إعداده.",y7e=()=>"Vuelve a comprobar su configuración.",x7e=()=>"इसका सेटअप फिर से जाँचें।",w7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g7e():t==="fa"?v7e():t==="ar"?b7e():t==="es"?y7e():t==="hi"?x7e():m7e()}),k7e=()=>"Could not recover this turn. Try again.",S7e=()=>"无法恢复本轮。请重试。",C7e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",E7e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",N7e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",z7e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",j7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S7e():t==="fa"?C7e():t==="ar"?E7e():t==="es"?N7e():t==="hi"?z7e():k7e()}),T7e=()=>"Could not remove the queued message. Try again.",A7e=()=>"无法移除排队消息。请重试。",R7e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",M7e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",O7e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",D7e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",L7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A7e():t==="fa"?R7e():t==="ar"?M7e():t==="es"?O7e():t==="hi"?D7e():T7e()}),I7e=e=>`Could not re-send: ${e==null?void 0:e.error}`,$7e=e=>`无法重新发送:${e==null?void 0:e.error}`,B7e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,P7e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,F7e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,H7e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,q7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$7e(e):t==="fa"?B7e(e):t==="ar"?P7e(e):t==="es"?F7e(e):t==="hi"?H7e(e):I7e(e)}),U7e=()=>"Resolved",G7e=()=>"已处理",V7e=()=>"رسیدگی شد",K7e=()=>"مُعالَج",W7e=()=>"Resuelto",Q7e=()=>"सुलझाया गया",X7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G7e():t==="fa"?V7e():t==="ar"?K7e():t==="es"?W7e():t==="hi"?Q7e():U7e()}),Y7e=()=>"Could not retry the queued message. Try again.",Z7e=()=>"无法重试排队消息。请重试。",J7e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",e8e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",t8e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",n8e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",r8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z7e():t==="fa"?J7e():t==="ar"?e8e():t==="es"?t8e():t==="hi"?n8e():Y7e()}),s8e=()=>"run logs",i8e=()=>"运行日志",a8e=()=>"گزارش‌های اجرا",o8e=()=>"سجلات التشغيل",c8e=()=>"logs de ejecución",l8e=()=>"रन लॉग",u8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i8e():t==="fa"?a8e():t==="ar"?o8e():t==="es"?c8e():t==="hi"?l8e():s8e()}),_8e=()=>"Scroll to bottom",f8e=()=>"滚动到底部",d8e=()=>"رفتن به پایین گفتگو",h8e=()=>"التمرير إلى الأسفل",p8e=()=>"Ir al final",m8e=()=>"नीचे तक स्क्रॉल करें",NN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f8e():t==="fa"?d8e():t==="ar"?h8e():t==="es"?p8e():t==="hi"?m8e():_8e()}),g8e=()=>"The selected harness is unavailable",v8e=()=>"所选智能体工具不可用",b8e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",y8e=()=>"أداة البرمجة المحددة غير متاحة",x8e=()=>"El agente seleccionado no está disponible",w8e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",Yg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v8e():t==="fa"?b8e():t==="ar"?y8e():t==="es"?x8e():t==="hi"?w8e():g8e()}),k8e=()=>"Session limit reached",S8e=()=>"已达到会话使用限额",C8e=()=>"به سقف مصرف نشست رسیده‌اید",E8e=()=>"تم بلوغ حد الاستخدام",N8e=()=>"Límite de la sesión alcanzado",z8e=()=>"सेशन सीमा पूरी हो गई",j8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S8e():t==="fa"?C8e():t==="ar"?E8e():t==="es"?N8e():t==="hi"?z8e():k8e()}),T8e=()=>"The chat session was not created",A8e=()=>"未能创建聊天会话",R8e=()=>"نشست گفت‌وگو ایجاد نشد",M8e=()=>"لم تُنشأ جلسة المحادثة",O8e=()=>"No se creó la sesión de chat",D8e=()=>"चैट सेशन नहीं बनाया गया",L8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A8e():t==="fa"?R8e():t==="ar"?M8e():t==="es"?O8e():t==="hi"?D8e():T8e()}),I8e=()=>"Show full conversation",$8e=()=>"显示完整对话",B8e=()=>"نمایش کامل گفتگو",P8e=()=>"عرض المحادثة كاملة",F8e=()=>"Mostrar la conversación completa",H8e=()=>"पूरी बातचीत दिखाएं",q8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$8e():t==="fa"?B8e():t==="ar"?P8e():t==="es"?F8e():t==="hi"?H8e():I8e()}),U8e=()=>" · Spawned by another agent",G8e=()=>" · 由另一个智能体创建",V8e=()=>" · ساخته‌شده به‌دست عامل دیگر",K8e=()=>" · أنشأه وكيل آخر",W8e=()=>" · Creada por otro agente",Q8e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",X8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G8e():t==="fa"?V8e():t==="ar"?K8e():t==="es"?W8e():t==="hi"?Q8e():U8e()}),Y8e=()=>"Starting…",Z8e=()=>"正在启动…",J8e=()=>"در حال شروع…",e9e=()=>"جارٍ البدء…",t9e=()=>"Iniciando…",n9e=()=>"शुरू हो रहा है…",r9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z8e():t==="fa"?J8e():t==="ar"?e9e():t==="es"?t9e():t==="hi"?n9e():Y8e()}),s9e=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,i9e=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,a9e=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,o9e=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,c9e=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,l9e=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,u9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i9e(e):t==="fa"?a9e(e):t==="ar"?o9e(e):t==="es"?c9e(e):t==="hi"?l9e(e):s9e(e)}),_9e=()=>"Could not stop the turn. Try again.",f9e=()=>"无法停止本轮。请重试。",d9e=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",h9e=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",p9e=()=>"No se pudo detener el turno. Inténtalo de nuevo.",m9e=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",g9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f9e():t==="fa"?d9e():t==="ar"?h9e():t==="es"?p9e():t==="hi"?m9e():_9e()}),v9e=e=>`Could not switch fork: ${e==null?void 0:e.error}`,b9e=e=>`无法切换分支:${e==null?void 0:e.error}`,y9e=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,x9e=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,w9e=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,k9e=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,S9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b9e(e):t==="fa"?y9e(e):t==="ar"?x9e(e):t==="es"?w9e(e):t==="hi"?k9e(e):v9e(e)}),C9e=()=>"The agent",E9e=()=>"智能体",N9e=()=>"عامل",z9e=()=>"الوكيل",j9e=()=>"El agente",T9e=()=>"एजेंट",A9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E9e():t==="fa"?N9e():t==="ar"?z9e():t==="es"?j9e():t==="hi"?T9e():C9e()}),R9e=()=>"Thinking",M9e=()=>"正在思考",O9e=()=>"در حال فکر کردن",D9e=()=>"جارٍ التفكير",L9e=()=>"Pensando",I9e=()=>"सोच रहा है",$9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M9e():t==="fa"?O9e():t==="ar"?D9e():t==="es"?L9e():t==="hi"?I9e():R9e()}),B9e=()=>"Could not toggle Plan mode. Try again.",P9e=()=>"无法切换计划模式。请重试。",F9e=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",H9e=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",q9e=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",U9e=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P9e():t==="fa"?F9e():t==="ar"?H9e():t==="es"?q9e():t==="hi"?U9e():B9e()}),G9e=()=>"This turn did not finish.",V9e=()=>"本轮未完成。",K9e=()=>"این نوبت کامل نشد.",W9e=()=>"لم تكتمل هذه الجولة.",Q9e=()=>"Este turno no terminó.",X9e=()=>"यह टर्न पूरा नहीं हुआ।",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V9e():t==="fa"?K9e():t==="ar"?W9e():t==="es"?Q9e():t==="hi"?X9e():G9e()}),Y9e=()=>"Type a custom answer…",Z9e=()=>"输入自定义回答…",J9e=()=>"پاسخ دلخواه را بنویسید…",eEe=()=>"اكتب إجابة مخصصة…",tEe=()=>"Escribe una respuesta personalizada…",nEe=()=>"अपना जवाब टाइप करें…",rEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z9e():t==="fa"?J9e():t==="ar"?eEe():t==="es"?tEe():t==="hi"?nEe():Y9e()}),sEe=()=>"Unarchive",iEe=()=>"取消归档",aEe=()=>"خارج کردن از بایگانی",oEe=()=>"إلغاء الأرشفة",cEe=()=>"Desarchivar",lEe=()=>"आर्काइव से निकालें",uEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iEe():t==="fa"?aEe():t==="ar"?oEe():t==="es"?cEe():t==="hi"?lEe():sEe()}),_Ee=()=>"Untitled",fEe=()=>"未命名",dEe=()=>"بدون عنوان",hEe=()=>"بدون عنوان",pEe=()=>"Sin título",mEe=()=>"बिना शीर्षक",vd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fEe():t==="fa"?dEe():t==="ar"?hEe():t==="es"?pEe():t==="hi"?mEe():_Ee()}),gEe=()=>"Could not update permissions. Try again.",vEe=()=>"无法更新权限。请重试。",bEe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",yEe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",xEe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",wEe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",kEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vEe():t==="fa"?bEe():t==="ar"?yEe():t==="es"?xEe():t==="hi"?wEe():gEe()}),SEe=()=>"Work details",CEe=()=>"工作详情",EEe=()=>"جزئیات کار",NEe=()=>"تفاصيل العمل",zEe=()=>"Detalles del trabajo",jEe=()=>"काम का विवरण",TEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CEe():t==="fa"?EEe():t==="ar"?NEe():t==="es"?zEe():t==="hi"?jEe():SEe()}),AEe=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,REe=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,MEe=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,OEe=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,DEe=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,LEe=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,IEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?REe(e):t==="fa"?MEe(e):t==="ar"?OEe(e):t==="es"?DEe(e):t==="hi"?LEe(e):AEe(e)}),$Ee=e=>`Worked for ${e==null?void 0:e.duration}`,BEe=e=>`已工作 ${e==null?void 0:e.duration}`,PEe=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,FEe=e=>`عمل لمدة ${e==null?void 0:e.duration}`,HEe=e=>`Trabajó durante ${e==null?void 0:e.duration}`,qEe=e=>`${e==null?void 0:e.duration} तक काम किया`,UEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BEe(e):t==="fa"?PEe(e):t==="ar"?FEe(e):t==="es"?HEe(e):t==="hi"?qEe(e):$Ee(e)}),GEe=()=>"Working…",VEe=()=>"正在工作…",KEe=()=>"در حال کار…",WEe=()=>"جارٍ العمل…",QEe=()=>"Trabajando…",XEe=()=>"काम हो रहा है…",Hk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VEe():t==="fa"?KEe():t==="ar"?WEe():t==="es"?QEe():t==="hi"?XEe():GEe()}),YEe=()=>"Close tab",ZEe=()=>"关闭标签页",JEe=()=>"بستن زبانه",eNe=()=>"إغلاق التبويب",tNe=()=>"Cerrar pestaña",nNe=()=>"टैब बंद करें",rNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZEe():t==="fa"?JEe():t==="ar"?eNe():t==="es"?tNe():t==="hi"?nNe():YEe()}),sNe=()=>"Changes",iNe=()=>"更改",aNe=()=>"تغییرات",oNe=()=>"التغييرات",cNe=()=>"Cambios",lNe=()=>"बदलाव",ED=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iNe():t==="fa"?aNe():t==="ar"?oNe():t==="es"?cNe():t==="hi"?lNe():sNe()}),uNe=()=>"Code browser view",_Ne=()=>"代码浏览器视图",fNe=()=>"نمای مرورگر کد",dNe=()=>"عرض متصفح الشيفرة",hNe=()=>"Vista del explorador de código",pNe=()=>"कोड ब्राउज़र व्यू",mNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ne():t==="fa"?fNe():t==="ar"?dNe():t==="es"?hNe():t==="hi"?pNe():uNe()}),gNe=()=>"Files",vNe=()=>"文件",bNe=()=>"فایل‌ها",yNe=()=>"الملفات",xNe=()=>"Archivos",wNe=()=>"फ़ाइलें",kNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vNe():t==="fa"?bNe():t==="ar"?yNe():t==="es"?xNe():t==="hi"?wNe():gNe()}),SNe=()=>"Refresh",CNe=()=>"刷新",ENe=()=>"تازه‌سازی",NNe=()=>"تحديث",zNe=()=>"Actualizar",jNe=()=>"रीफ़्रेश करें",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CNe():t==="fa"?ENe():t==="ar"?NNe():t==="es"?zNe():t==="hi"?jNe():SNe()}),TNe=()=>"listing truncated",ANe=()=>"列表已截断",RNe=()=>"فهرست کوتاه شده است",MNe=()=>"القائمة مقتطعة",ONe=()=>"listado truncado",DNe=()=>"सूची छोटी की गई",LNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ANe():t==="fa"?RNe():t==="ar"?MNe():t==="es"?ONe():t==="hi"?DNe():TNe()}),INe=()=>"No files.",$Ne=()=>"没有文件。",BNe=()=>"فایلی وجود ندارد.",PNe=()=>"لا توجد ملفات.",FNe=()=>"No hay archivos.",HNe=()=>"कोई फ़ाइल नहीं।",qNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ne():t==="fa"?BNe():t==="ar"?PNe():t==="es"?FNe():t==="hi"?HNe():INe()}),UNe=()=>"Refresh failed:",GNe=()=>"刷新失败:",VNe=()=>"تازه‌سازی ناموفق بود:",KNe=()=>"فشل التحديث:",WNe=()=>"Error al actualizar:",QNe=()=>"रीफ़्रेश विफल:",XNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GNe():t==="fa"?VNe():t==="ar"?KNe():t==="es"?WNe():t==="hi"?QNe():UNe()}),YNe=()=>"Cancelling…",ZNe=()=>"正在取消…",JNe=()=>"در حال لغو…",eze=()=>"جارٍ الإلغاء…",tze=()=>"Cancelando…",nze=()=>"रद्द हो रहा है…",rze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZNe():t==="fa"?JNe():t==="ar"?eze():t==="es"?tze():t==="hi"?nze():YNe()}),sze=()=>"Checking…",ize=()=>"正在检查…",aze=()=>"در حال بررسی…",oze=()=>"جارٍ التحقق…",cze=()=>"Comprobando…",lze=()=>"जाँचा जा रहा है…",ta=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ize():t==="fa"?aze():t==="ar"?oze():t==="es"?cze():t==="hi"?lze():sze()}),uze=()=>"Copied",_ze=()=>"已复制",fze=()=>"کپی شد",dze=()=>"تم النسخ",hze=()=>"Copiado",pze=()=>"कॉपी हो गया",j0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ze():t==="fa"?fze():t==="ar"?dze():t==="es"?hze():t==="hi"?pze():uze()}),mze=e=>`Failed to load: ${e==null?void 0:e.error}`,gze=e=>`加载失败:${e==null?void 0:e.error}`,vze=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,bze=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,yze=e=>`Error al cargar: ${e==null?void 0:e.error}`,xze=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,qk=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gze(e):t==="fa"?vze(e):t==="ar"?bze(e):t==="es"?yze(e):t==="hi"?xze(e):mze(e)}),wze=()=>"Loading…",kze=()=>"正在加载…",Sze=()=>"در حال بارگیری…",Cze=()=>"جارٍ التحميل…",Eze=()=>"Cargando…",Nze=()=>"लोड हो रहा है…",Uk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kze():t==="fa"?Sze():t==="ar"?Cze():t==="es"?Eze():t==="hi"?Nze():wze()}),zze=e=>`+ ${e==null?void 0:e.count} more`,jze=e=>`另有 ${e==null?void 0:e.count} 项`,Tze=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Aze=e=>`المزيد (+${e==null?void 0:e.count})`,Rze=e=>`+ ${e==null?void 0:e.count} más`,Mze=e=>`+ ${e==null?void 0:e.count} और`,Oze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jze(e):t==="fa"?Tze(e):t==="ar"?Aze(e):t==="es"?Rze(e):t==="hi"?Mze(e):zze(e)}),Dze=()=>"Rendered view",Lze=()=>"渲染视图",Ize=()=>"نمای رندرشده",$ze=()=>"العرض المُنسَّق",Bze=()=>"Vista renderizada",Pze=()=>"रेंडर किया गया व्यू",Cv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lze():t==="fa"?Ize():t==="ar"?$ze():t==="es"?Bze():t==="hi"?Pze():Dze()}),Fze=()=>"Save",Hze=()=>"保存",qze=()=>"ذخیره",Uze=()=>"حفظ",Gze=()=>"Guardar",Vze=()=>"सेव करें",nc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hze():t==="fa"?qze():t==="ar"?Uze():t==="es"?Gze():t==="hi"?Vze():Fze()}),Kze=()=>"Saving…",Wze=()=>"正在保存…",Qze=()=>"در حال ذخیره…",Xze=()=>"جارٍ الحفظ…",Yze=()=>"Guardando…",Zze=()=>"सेव हो रहा है…",ia=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wze():t==="fa"?Qze():t==="ar"?Xze():t==="es"?Yze():t==="hi"?Zze():Kze()}),Jze=()=>"Show less",eje=()=>"收起",tje=()=>"نمایش کمتر",nje=()=>"عرض أقل",rje=()=>"Mostrar menos",sje=()=>"कम दिखाएं",ND=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eje():t==="fa"?tje():t==="ar"?nje():t==="es"?rje():t==="hi"?sje():Jze()}),ije=()=>"Show more",aje=()=>"展开",oje=()=>"نمایش بیشتر",cje=()=>"عرض المزيد",lje=()=>"Mostrar más",uje=()=>"और दिखाएं",_je=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aje():t==="fa"?oje():t==="ar"?cje():t==="es"?lje():t==="hi"?uje():ije()}),fje=()=>"Stop",dje=()=>"停止",hje=()=>"توقف",pje=()=>"إيقاف",mje=()=>"Detener",gje=()=>"रोकें",zD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dje():t==="fa"?hje():t==="ar"?pje():t==="es"?mje():t==="hi"?gje():fje()}),vje=()=>"Stopping…",bje=()=>"正在停止…",yje=()=>"در حال توقف…",xje=()=>"جارٍ الإيقاف…",wje=()=>"Deteniendo…",kje=()=>"रोका जा रहा है…",Sje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bje():t==="fa"?yje():t==="ar"?xje():t==="es"?wje():t==="hi"?kje():vje()}),Cje=()=>"View source",Eje=()=>"查看源代码",Nje=()=>"نمایش متن منبع",zje=()=>"عرض المصدر",jje=()=>"Ver código fuente",Tje=()=>"स्रोत देखें",Cd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eje():t==="fa"?Nje():t==="ar"?zje():t==="es"?jje():t==="hi"?Tje():Cje()}),Aje=()=>"Shorten this chat's context",Rje=()=>"压缩此聊天的上下文",Mje=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",Oje=()=>"اختصار سياق هذه المحادثة",Dje=()=>"Comprime el contexto de este chat",Lje=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",Ije=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rje():t==="fa"?Mje():t==="ar"?Oje():t==="es"?Dje():t==="hi"?Lje():Aje()}),$je=()=>"Runs as a remote Hugging Face Job",Bje=()=>"作为远程 Hugging Face Job 运行",Pje=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",Fje=()=>"يعمل كمهمة Hugging Face بعيدة",Hje=()=>"Se ejecuta como un Job remoto de Hugging Face",qje=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",Uje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bje():t==="fa"?Pje():t==="ar"?Fje():t==="es"?Hje():t==="hi"?qje():$je()}),Gje=()=>"Runs as a Job on your Kubernetes cluster",Vje=()=>"作为 Kubernetes 集群上的 Job 运行",Kje=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",Wje=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",Qje=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",Xje=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",Yje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vje():t==="fa"?Kje():t==="ar"?Wje():t==="es"?Qje():t==="hi"?Xje():Gje()}),Zje=()=>"Runs directly on this computer",Jje=()=>"直接在此计算机上运行",eTe=()=>"مستقیماً روی این رایانه اجرا می‌شود",tTe=()=>"يعمل مباشرة على هذا الحاسوب",nTe=()=>"Se ejecuta directamente en este equipo",rTe=()=>"सीधे इस कंप्यूटर पर चलता है",sTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jje():t==="fa"?eTe():t==="ar"?tTe():t==="es"?nTe():t==="hi"?rTe():Zje()}),iTe=()=>"Runs in a remote Modal sandbox",aTe=()=>"在远程 Modal 沙箱中运行",oTe=()=>"در sandbox دوردست Modal اجرا می‌شود",cTe=()=>"يعمل في بيئة Modal معزولة عن بُعد",lTe=()=>"Se ejecuta en un sandbox remoto de Modal",uTe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",_Te=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aTe():t==="fa"?oTe():t==="ar"?cTe():t==="es"?lTe():t==="hi"?uTe():iTe()}),fTe=()=>"Runs on an ephemeral OpenResearch box",dTe=()=>"在临时 OpenResearch 主机上运行",hTe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",pTe=()=>"يعمل على صندوق OpenResearch مؤقت",mTe=()=>"Se ejecuta en una máquina efímera de OpenResearch",gTe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",vTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dTe():t==="fa"?hTe():t==="ar"?pTe():t==="es"?mTe():t==="hi"?gTe():fTe()}),bTe=()=>"Runs on the connected Ray cluster",yTe=()=>"在已连接的 Ray 集群上运行",xTe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",wTe=()=>"يعمل على عنقود Ray المتصل",kTe=()=>"Se ejecuta en el clúster de Ray conectado",STe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",CTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yTe():t==="fa"?xTe():t==="ar"?wTe():t==="es"?kTe():t==="hi"?STe():bTe()}),ETe=()=>"Runs as a scheduled job on your Slurm cluster",NTe=()=>"作为 Slurm 集群上的调度作业运行",zTe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",jTe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",TTe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",ATe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",RTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NTe():t==="fa"?zTe():t==="ar"?jTe():t==="es"?TTe():t==="hi"?ATe():ETe()}),MTe=()=>"Runs on a host from your SSH config",OTe=()=>"在 SSH 配置中的主机上运行",DTe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",LTe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",ITe=()=>"Se ejecuta en un host de tu configuración SSH",$Te=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",BTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OTe():t==="fa"?DTe():t==="ar"?LTe():t==="es"?ITe():t==="hi"?$Te():MTe()}),PTe=()=>"Runs through Tinker’s remote compute",FTe=()=>"通过 Tinker 远程算力运行",HTe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",qTe=()=>"يعمل عبر حوسبة Tinker البعيدة",UTe=()=>"Se ejecuta en el cómputo remoto de Tinker",GTe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",VTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FTe():t==="fa"?HTe():t==="ar"?qTe():t==="es"?UTe():t==="hi"?GTe():PTe()}),KTe=()=>"HF Jobs",WTe=()=>"HF Jobs",QTe=()=>"HF Jobs",XTe=()=>"HF Jobs",YTe=()=>"HF Jobs",ZTe=()=>"HF Jobs",JTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WTe():t==="fa"?QTe():t==="ar"?XTe():t==="es"?YTe():t==="hi"?ZTe():KTe()}),eAe=()=>"Kubernetes",tAe=()=>"Kubernetes",nAe=()=>"Kubernetes",rAe=()=>"Kubernetes",sAe=()=>"Kubernetes",iAe=()=>"Kubernetes",aAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tAe():t==="fa"?nAe():t==="ar"?rAe():t==="es"?sAe():t==="hi"?iAe():eAe()}),oAe=()=>"This machine",cAe=()=>"此计算机",lAe=()=>"این رایانه",uAe=()=>"هذا الجهاز",_Ae=()=>"Este equipo",fAe=()=>"यह मशीन",jD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cAe():t==="fa"?lAe():t==="ar"?uAe():t==="es"?_Ae():t==="hi"?fAe():oAe()}),dAe=()=>"Modal",hAe=()=>"Modal",pAe=()=>"Modal",mAe=()=>"Modal",gAe=()=>"Modal",vAe=()=>"Modal",bAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hAe():t==="fa"?pAe():t==="ar"?mAe():t==="es"?gAe():t==="hi"?vAe():dAe()}),yAe=()=>"OpenResearch",xAe=()=>"OpenResearch",wAe=()=>"OpenResearch",kAe=()=>"OpenResearch",SAe=()=>"OpenResearch",CAe=()=>"OpenResearch",EAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xAe():t==="fa"?wAe():t==="ar"?kAe():t==="es"?SAe():t==="hi"?CAe():yAe()}),NAe=()=>"Ray",zAe=()=>"Ray",jAe=()=>"Ray",TAe=()=>"Ray",AAe=()=>"Ray",RAe=()=>"Ray",MAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zAe():t==="fa"?jAe():t==="ar"?TAe():t==="es"?AAe():t==="hi"?RAe():NAe()}),OAe=()=>"Slurm",DAe=()=>"Slurm",LAe=()=>"Slurm",IAe=()=>"Slurm",$Ae=()=>"Slurm",BAe=()=>"Slurm",PAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DAe():t==="fa"?LAe():t==="ar"?IAe():t==="es"?$Ae():t==="hi"?BAe():OAe()}),FAe=()=>"SSH",HAe=()=>"SSH",qAe=()=>"SSH",UAe=()=>"SSH",GAe=()=>"SSH",VAe=()=>"SSH",KAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HAe():t==="fa"?qAe():t==="ar"?UAe():t==="es"?GAe():t==="hi"?VAe():FAe()}),WAe=()=>"Tinker",QAe=()=>"Tinker",XAe=()=>"Tinker",YAe=()=>"Tinker",ZAe=()=>"Tinker",JAe=()=>"Tinker",eRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QAe():t==="fa"?XAe():t==="ar"?YAe():t==="es"?ZAe():t==="hi"?JAe():WAe()}),tRe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",nRe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",rRe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",sRe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",iRe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",aRe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",oRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nRe():t==="fa"?rRe():t==="ar"?sRe():t==="es"?iRe():t==="hi"?aRe():tRe()}),cRe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",lRe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",uRe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",_Re=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",fRe=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",dRe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",hRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lRe():t==="fa"?uRe():t==="ar"?_Re():t==="es"?fRe():t==="hi"?dRe():cRe()}),pRe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",mRe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",gRe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",vRe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",bRe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",yRe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",xRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mRe():t==="fa"?gRe():t==="ar"?vRe():t==="es"?bRe():t==="hi"?yRe():pRe()}),wRe=()=>"This computer must stay awake and online while Tinker runs.",kRe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",SRe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",CRe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",ERe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",NRe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",zRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRe():t==="fa"?SRe():t==="ar"?CRe():t==="es"?ERe():t==="hi"?NRe():wRe()}),jRe=()=>"Context window",TRe=()=>"上下文窗口",ARe=()=>"پنجرهٔ زمینه",RRe=()=>"نافذة السياق",MRe=()=>"Ventana de contexto",ORe=()=>"कॉन्टेक्स्ट विंडो",DRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TRe():t==="fa"?ARe():t==="ar"?RRe():t==="es"?MRe():t==="hi"?ORe():jRe()}),LRe=()=>"Context window used",IRe=()=>"已使用的上下文窗口",$Re=()=>"پنجرهٔ زمینهٔ استفاده‌شده",BRe=()=>"المستخدَم من نافذة السياق",PRe=()=>"Ventana de contexto usada",FRe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",HRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRe():t==="fa"?$Re():t==="ar"?BRe():t==="es"?PRe():t==="hi"?FRe():LRe()}),qRe=e=>`${e==null?void 0:e.value} tokens`,URe=e=>`${e==null?void 0:e.value} 个 token`,GRe=e=>`${e==null?void 0:e.value} توکن`,VRe=e=>`${e==null?void 0:e.value} رمز`,KRe=e=>`${e==null?void 0:e.value} tokens`,WRe=e=>`${e==null?void 0:e.value} टोकन`,QRe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?URe(e):t==="fa"?GRe(e):t==="ar"?VRe(e):t==="es"?KRe(e):t==="hi"?WRe(e):qRe(e)}),XRe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,YRe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,ZRe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,JRe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,eMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,tMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,nMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YRe(e):t==="fa"?ZRe(e):t==="ar"?JRe(e):t==="es"?eMe(e):t==="hi"?tMe(e):XRe(e)}),rMe=()=>"Copy the last response",sMe=()=>"复制最新回复",iMe=()=>"کپی آخرین پاسخ",aMe=()=>"نسخ آخر رد",oMe=()=>"Copia la última respuesta",cMe=()=>"आखिरी जवाब कॉपी करें",lMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sMe():t==="fa"?iMe():t==="ar"?aMe():t==="es"?oMe():t==="hi"?cMe():rMe()}),uMe=()=>"No runs yet — ask the agent to launch one.",_Me=()=>"尚无运行——让智能体启动一个。",fMe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",dMe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",hMe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",pMe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",mMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Me():t==="fa"?fMe():t==="ar"?dMe():t==="es"?hMe():t==="hi"?pMe():uMe()}),gMe=()=>"Run",vMe=()=>"运行",bMe=()=>"اجرا",yMe=()=>"تشغيل",xMe=()=>"Ejecución",wMe=()=>"रन",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vMe():t==="fa"?bMe():t==="ar"?yMe():t==="es"?xMe():t==="hi"?wMe():gMe()}),kMe=()=>"Switch run",SMe=()=>"切换运行",CMe=()=>"تغییر اجرا",EMe=()=>"تبديل التشغيل",NMe=()=>"Cambiar de ejecución",zMe=()=>"रन बदलें",jMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SMe():t==="fa"?CMe():t==="ar"?EMe():t==="es"?NMe():t==="hi"?zMe():kMe()}),TMe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,AMe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,RMe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,MMe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,OMe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,DMe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,LMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AMe(e):t==="fa"?RMe(e):t==="ar"?MMe(e):t==="es"?OMe(e):t==="hi"?DMe(e):TMe(e)}),IMe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,$Me=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,BMe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,PMe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,FMe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,HMe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,qMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Me(e):t==="fa"?BMe(e):t==="ar"?PMe(e):t==="es"?FMe(e):t==="hi"?HMe(e):IMe(e)}),UMe=e=>`${e==null?void 0:e.value}m`,GMe=e=>`${e==null?void 0:e.value} 分钟`,VMe=e=>`${e==null?void 0:e.value} دقیقه`,KMe=e=>`${e==null?void 0:e.value}د`,WMe=e=>`${e==null?void 0:e.value} min`,QMe=e=>`${e==null?void 0:e.value}मि`,XMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GMe(e):t==="fa"?VMe(e):t==="ar"?KMe(e):t==="es"?WMe(e):t==="hi"?QMe(e):UMe(e)}),YMe=e=>`${e==null?void 0:e.value}s`,ZMe=e=>`${e==null?void 0:e.value} 秒`,JMe=e=>`${e==null?void 0:e.value} ثانیه`,eOe=e=>`${e==null?void 0:e.value}ث`,tOe=e=>`${e==null?void 0:e.value} s`,nOe=e=>`${e==null?void 0:e.value}से`,rOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZMe(e):t==="fa"?JMe(e):t==="ar"?eOe(e):t==="es"?tOe(e):t==="hi"?nOe(e):YMe(e)}),sOe=()=>"Code",iOe=()=>"代码",aOe=()=>"کد",oOe=()=>"الشيفرة",cOe=()=>"Código",lOe=()=>"कोड",uOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iOe():t==="fa"?aOe():t==="ar"?oOe():t==="es"?cOe():t==="hi"?lOe():sOe()}),_Oe=()=>"created",fOe=()=>"创建于",dOe=()=>"ایجادشده",hOe=()=>"أُنشئ",pOe=()=>"creado",mOe=()=>"बनाया गया",gOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fOe():t==="fa"?dOe():t==="ar"?hOe():t==="es"?pOe():t==="hi"?mOe():_Oe()}),vOe=()=>"from",bOe=()=>"来自",yOe=()=>"از",xOe=()=>"من",wOe=()=>"desde",kOe=()=>"से",SOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bOe():t==="fa"?yOe():t==="ar"?xOe():t==="es"?wOe():t==="hi"?kOe():vOe()}),COe=()=>"Logs",EOe=()=>"日志",NOe=()=>"گزارش‌ها",zOe=()=>"السجلات",jOe=()=>"Logs",TOe=()=>"लॉग",AOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EOe():t==="fa"?NOe():t==="ar"?zOe():t==="es"?jOe():t==="hi"?TOe():COe()}),ROe=()=>"Latest run",MOe=()=>"最新运行",OOe=()=>"آخرین اجرا",DOe=()=>"أحدث تشغيل",LOe=()=>"Última ejecución",IOe=()=>"नवीनतम रन",$Oe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MOe():t==="fa"?OOe():t==="ar"?DOe():t==="es"?LOe():t==="hi"?IOe():ROe()}),BOe=()=>"Code",POe=()=>"代码",FOe=()=>"کد",HOe=()=>"الشيفرة",qOe=()=>"Código",UOe=()=>"कोड",GOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?POe():t==="fa"?FOe():t==="ar"?HOe():t==="es"?qOe():t==="hi"?UOe():BOe()}),VOe=()=>"Commit",KOe=()=>"提交",WOe=()=>"کامیت",QOe=()=>"إيداع",XOe=()=>"Commit",YOe=()=>"कमिट",ZOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KOe():t==="fa"?WOe():t==="ar"?QOe():t==="es"?XOe():t==="hi"?YOe():VOe()}),JOe=()=>"created",eDe=()=>"创建于",tDe=()=>"ایجادشده",nDe=()=>"أُنشئ",rDe=()=>"creado",sDe=()=>"बनाया गया",iDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eDe():t==="fa"?tDe():t==="ar"?nDe():t==="es"?rDe():t==="hi"?sDe():JOe()}),aDe=()=>"Description",oDe=()=>"说明",cDe=()=>"توضیحات",lDe=()=>"الوصف",uDe=()=>"Descripción",_De=()=>"विवरण",fDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oDe():t==="fa"?cDe():t==="ar"?lDe():t==="es"?uDe():t==="hi"?_De():aDe()}),dDe=()=>"Duration",hDe=()=>"时长",pDe=()=>"مدت",mDe=()=>"المدة",gDe=()=>"Duración",vDe=()=>"अवधि",bDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hDe():t==="fa"?pDe():t==="ar"?mDe():t==="es"?gDe():t==="hi"?vDe():dDe()}),yDe=()=>"exit",xDe=()=>"退出码",wDe=()=>"خروج",kDe=()=>"رمز الخروج",SDe=()=>"salida",CDe=()=>"एग्ज़िट",EDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xDe():t==="fa"?wDe():t==="ar"?kDe():t==="es"?SDe():t==="hi"?CDe():yDe()}),NDe=()=>"from",zDe=()=>"来自",jDe=()=>"از",TDe=()=>"من",ADe=()=>"desde",RDe=()=>"से",MDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zDe():t==="fa"?jDe():t==="ar"?TDe():t==="es"?ADe():t==="hi"?RDe():NDe()}),ODe=()=>"Logs",DDe=()=>"日志",LDe=()=>"گزارش‌ها",IDe=()=>"السجلات",$De=()=>"Logs",BDe=()=>"लॉग",PDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DDe():t==="fa"?LDe():t==="ar"?IDe():t==="es"?$De():t==="hi"?BDe():ODe()}),FDe=()=>"Run",HDe=()=>"运行",qDe=()=>"اجرا",UDe=()=>"تشغيل",GDe=()=>"Ejecución",VDe=()=>"रन",KDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HDe():t==="fa"?qDe():t==="ar"?UDe():t==="es"?GDe():t==="hi"?VDe():FDe()}),WDe=()=>"Run history",QDe=()=>"运行历史",XDe=()=>"تاریخچهٔ اجرا",YDe=()=>"سجل التشغيل",ZDe=()=>"Historial de ejecuciones",JDe=()=>"रन इतिहास",eLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QDe():t==="fa"?XDe():t==="ar"?YDe():t==="es"?ZDe():t==="hi"?JDe():WDe()}),tLe=()=>"Started",nLe=()=>"开始时间",rLe=()=>"آغاز",sLe=()=>"بدأ",iLe=()=>"Inicio",aLe=()=>"शुरू हुआ",oLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nLe():t==="fa"?rLe():t==="ar"?sLe():t==="es"?iLe():t==="hi"?aLe():tLe()}),cLe=()=>"Runs",lLe=()=>"运行",uLe=()=>"اجراها",_Le=()=>"عمليات التشغيل",fLe=()=>"Ejecuciones",dLe=()=>"रन",hLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lLe():t==="fa"?uLe():t==="ar"?_Le():t==="es"?fLe():t==="hi"?dLe():cLe()}),pLe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",mLe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",gLe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",vLe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",bLe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",yLe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",xLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mLe():t==="fa"?gLe():t==="ar"?vLe():t==="es"?bLe():t==="hi"?yLe():pLe()}),wLe=()=>"No runs yet",kLe=()=>"还没有运行",SLe=()=>"هنوز اجرایی وجود ندارد",CLe=()=>"لا عمليات تشغيل بعد",ELe=()=>"Aún no hay ejecuciones",NLe=()=>"अभी तक कोई रन नहीं",zLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kLe():t==="fa"?SLe():t==="ar"?CLe():t==="es"?ELe():t==="hi"?NLe():wLe()}),jLe=()=>"No experiments yet.",TLe=()=>"还没有实验。",ALe=()=>"هنوز آزمایشی وجود ندارد.",RLe=()=>"لا توجد تجارب بعد.",MLe=()=>"Aún no hay experimentos.",OLe=()=>"अभी तक कोई प्रयोग नहीं।",DLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLe():t==="fa"?ALe():t==="ar"?RLe():t==="es"?MLe():t==="hi"?OLe():jLe()}),LLe=()=>"Not run yet",ILe=()=>"尚未运行",$Le=()=>"هنوز اجرا نشده",BLe=()=>"لم تُشغَّل بعد",PLe=()=>"Aún sin ejecutar",FLe=()=>"अभी तक नहीं चलाया गया",HLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ILe():t==="fa"?$Le():t==="ar"?BLe():t==="es"?PLe():t==="hi"?FLe():LLe()}),qLe=()=>"1 run",ULe=()=>"1 次运行",GLe=()=>"۱ اجرا",VLe=()=>"تشغيل واحد",KLe=()=>"1 ejecución",WLe=()=>"1 रन",QLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULe():t==="fa"?GLe():t==="ar"?VLe():t==="es"?KLe():t==="hi"?WLe():qLe()}),XLe=()=>"Open logs",YLe=()=>"打开日志",ZLe=()=>"باز کردن گزارش‌ها",JLe=()=>"فتح السجلات",eIe=()=>"Abrir logs",tIe=()=>"लॉग खोलें",nIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YLe():t==="fa"?ZLe():t==="ar"?JLe():t==="es"?eIe():t==="hi"?tIe():XLe()}),rIe=e=>`${e==null?void 0:e.count} runs`,sIe=e=>`${e==null?void 0:e.count} 次运行`,iIe=e=>`${e==null?void 0:e.count} اجرا`,aIe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,oIe=e=>`${e==null?void 0:e.count} ejecuciones`,cIe=e=>`${e==null?void 0:e.count} रन`,lIe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sIe(e):t==="fa"?iIe(e):t==="ar"?aIe(e):t==="es"?oIe(e):t==="hi"?cIe(e):rIe(e)}),uIe=()=>"Stop requested",_Ie=()=>"已请求停止",fIe=()=>"درخواست توقف ثبت شد",dIe=()=>"طُلب الإيقاف",hIe=()=>"Detención solicitada",pIe=()=>"रोकने का अनुरोध किया गया",mIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ie():t==="fa"?fIe():t==="ar"?dIe():t==="es"?hIe():t==="hi"?pIe():uIe()}),gIe=()=>"Stop run",vIe=()=>"停止运行",bIe=()=>"توقف اجرا",yIe=()=>"إيقاف التشغيل",xIe=()=>"Detener ejecución",wIe=()=>"रन रोकें",kIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vIe():t==="fa"?bIe():t==="ar"?yIe():t==="es"?xIe():t==="hi"?wIe():gIe()}),SIe=()=>"Code",CIe=()=>"代码",EIe=()=>"کد",NIe=()=>"الشيفرة",zIe=()=>"Código",jIe=()=>"कोड",TIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CIe():t==="fa"?EIe():t==="ar"?NIe():t==="es"?zIe():t==="hi"?jIe():SIe()}),AIe=()=>"Experiments",RIe=()=>"实验",MIe=()=>"آزمایش‌ها",OIe=()=>"التجارب",DIe=()=>"Experimentos",LIe=()=>"प्रयोग",IIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RIe():t==="fa"?MIe():t==="ar"?OIe():t==="es"?DIe():t==="hi"?LIe():AIe()}),$Ie=()=>"Logs",BIe=()=>"日志",PIe=()=>"گزارش‌ها",FIe=()=>"السجلات",HIe=()=>"Logs",qIe=()=>"लॉग",a3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BIe():t==="fa"?PIe():t==="ar"?FIe():t==="es"?HIe():t==="hi"?qIe():$Ie()}),UIe=()=>"Stop failed:",GIe=()=>"停止失败:",VIe=()=>"توقف ناموفق بود:",KIe=()=>"فشل الإيقاف:",WIe=()=>"Error al detener:",QIe=()=>"रोकना विफल:",XIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GIe():t==="fa"?VIe():t==="ar"?KIe():t==="es"?WIe():t==="hi"?QIe():UIe()}),YIe=()=>"Download this chat as Markdown",ZIe=()=>"将此聊天下载为 Markdown",JIe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",e$e=()=>"تنزيل هذه المحادثة بتنسيق Markdown",t$e=()=>"Descarga este chat en Markdown",n$e=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",r$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZIe():t==="fa"?JIe():t==="ar"?e$e():t==="es"?t$e():t==="hi"?n$e():YIe()}),s$e=()=>"Clipboard access is unavailable.",i$e=()=>"无法访问剪贴板。",a$e=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",o$e=()=>"الوصول إلى الحافظة غير متاح.",c$e=()=>"El acceso al portapapeles no está disponible.",l$e=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",TD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i$e():t==="fa"?a$e():t==="ar"?o$e():t==="es"?c$e():t==="hi"?l$e():s$e()}),u$e=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,_$e=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,f$e=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,d$e=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,h$e=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,p$e=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,m$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_$e(e):t==="fa"?f$e(e):t==="ar"?d$e(e):t==="es"?h$e(e):t==="hi"?p$e(e):u$e(e)}),g$e=()=>"Duplicate",v$e=()=>"创建副本",b$e=()=>"ایجاد نسخهٔ تکراری",y$e=()=>"تكرار",x$e=()=>"Duplicar",w$e=()=>"डुप्लिकेट करें",k$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v$e():t==="fa"?b$e():t==="ar"?y$e():t==="es"?x$e():t==="hi"?w$e():g$e()}),S$e=e=>`File actions for ${e==null?void 0:e.path}`,C$e=e=>`${e==null?void 0:e.path} 的文件操作`,E$e=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,N$e=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,z$e=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,j$e=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,T$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?C$e(e):t==="fa"?E$e(e):t==="ar"?N$e(e):t==="es"?z$e(e):t==="hi"?j$e(e):S$e(e)}),A$e=()=>"Open",R$e=()=>"打开",M$e=()=>"باز کردن",O$e=()=>"فتح",D$e=()=>"Abrir",L$e=()=>"खोलें",I$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R$e():t==="fa"?M$e():t==="ar"?O$e():t==="es"?D$e():t==="hi"?L$e():A$e()}),$$e=e=>`Rename ${e==null?void 0:e.path}`,B$e=e=>`重命名 ${e==null?void 0:e.path}`,P$e=e=>`تغییر نام ${e==null?void 0:e.path}`,F$e=e=>`إعادة تسمية ${e==null?void 0:e.path}`,H$e=e=>`Renombrar ${e==null?void 0:e.path}`,q$e=e=>`${e==null?void 0:e.path} का नाम बदलें`,U$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B$e(e):t==="fa"?P$e(e):t==="ar"?F$e(e):t==="es"?H$e(e):t==="hi"?q$e(e):$$e(e)}),G$e=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,V$e=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,K$e=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,W$e=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,Q$e=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,X$e=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,Y$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V$e(e):t==="fa"?K$e(e):t==="ar"?W$e(e):t==="es"?Q$e(e):t==="hi"?X$e(e):G$e(e)}),Z$e=()=>"Binary file — no inline preview.",J$e=()=>"二进制文件——无法内嵌预览。",eBe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",tBe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",nBe=()=>"Archivo binario — sin vista previa.",rBe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",sBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J$e():t==="fa"?eBe():t==="ar"?tBe():t==="es"?nBe():t==="hi"?rBe():Z$e()}),iBe=()=>"This file changed on disk. Your edits have not been overwritten.",aBe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",oBe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",cBe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",lBe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",uBe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",RN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aBe():t==="fa"?oBe():t==="ar"?cBe():t==="es"?lBe():t==="hi"?uBe():iBe()}),_Be=()=>"Compile failed",fBe=()=>"编译失败",dBe=()=>"کامپایل ناموفق بود",hBe=()=>"فشل التجميع",pBe=()=>"Error al compilar",mBe=()=>"कंपाइल विफल",gBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fBe():t==="fa"?dBe():t==="ar"?hBe():t==="es"?pBe():t==="hi"?mBe():_Be()}),vBe=()=>"Compile PDF",bBe=()=>"编译 PDF",yBe=()=>"کامپایل PDF",xBe=()=>"تجميع PDF",wBe=()=>"Compilar PDF",kBe=()=>"PDF कंपाइल करें",MN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bBe():t==="fa"?yBe():t==="ar"?xBe():t==="es"?wBe():t==="hi"?kBe():vBe()}),SBe=()=>"Compiled, but the engine reported errors — check the output below.",CBe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",EBe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",NBe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",zBe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",jBe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",TBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CBe():t==="fa"?EBe():t==="ar"?NBe():t==="es"?zBe():t==="hi"?jBe():SBe()}),ABe=()=>"Copy command",RBe=()=>"复制命令",MBe=()=>"کپی فرمان",OBe=()=>"نسخ الأمر",DBe=()=>"Copiar comando",LBe=()=>"कमांड कॉपी करें",IBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RBe():t==="fa"?MBe():t==="ar"?OBe():t==="es"?DBe():t==="hi"?LBe():ABe()}),$Be=()=>"Copy install command",BBe=()=>"复制安装命令",PBe=()=>"کپی فرمان نصب",FBe=()=>"نسخ أمر التثبيت",HBe=()=>"Copiar comando de instalación",qBe=()=>"इंस्टॉल कमांड कॉपी करें",UBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BBe():t==="fa"?PBe():t==="ar"?FBe():t==="es"?HBe():t==="hi"?qBe():$Be()}),GBe=()=>"This file was deleted on disk. Your edits have not been discarded.",VBe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",KBe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",WBe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",QBe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",XBe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",ON=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VBe():t==="fa"?KBe():t==="ar"?WBe():t==="es"?QBe():t==="hi"?XBe():GBe()}),YBe=()=>"Discard my edits and reload",ZBe=()=>"放弃我的编辑并重新加载",JBe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",ePe=()=>"تجاهل تعديلاتي وإعادة التحميل",tPe=()=>"Descartar mis cambios y recargar",nPe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",rPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZBe():t==="fa"?JBe():t==="ar"?ePe():t==="es"?tPe():t==="hi"?nPe():YBe()}),sPe=()=>"Discard unsaved changes and close this file?",iPe=()=>"要丢弃未保存的更改并关闭此文件吗?",aPe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",oPe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",cPe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",lPe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iPe():t==="fa"?aPe():t==="ar"?oPe():t==="es"?cPe():t==="hi"?lPe():sPe()}),uPe=()=>"Dismiss",_Pe=()=>"关闭",fPe=()=>"بستن",dPe=()=>"تجاهل",hPe=()=>"Cerrar",pPe=()=>"खारिज करें",mPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Pe():t==="fa"?fPe():t==="ar"?dPe():t==="es"?hPe():t==="hi"?pPe():uPe()}),gPe=()=>"Dismiss compile message",vPe=()=>"关闭编译消息",bPe=()=>"بستن پیام کامپایل",yPe=()=>"تجاهل رسالة التجميع",xPe=()=>"Cerrar mensaje de compilación",wPe=()=>"कंपाइल संदेश खारिज करें",kPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vPe():t==="fa"?bPe():t==="ar"?yPe():t==="es"?xPe():t==="hi"?wPe():gPe()}),SPe=()=>"Dismiss Overleaf message",CPe=()=>"关闭 Overleaf 消息",EPe=()=>"بستن پیام Overleaf",NPe=()=>"تجاهل رسالة Overleaf",zPe=()=>"Cerrar mensaje de Overleaf",jPe=()=>"Overleaf संदेश खारिज करें",TPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CPe():t==="fa"?EPe():t==="ar"?NPe():t==="es"?zPe():t==="hi"?jPe():SPe()}),APe=()=>"Download",RPe=()=>"下载",MPe=()=>"بارگیری",OPe=()=>"تنزيل",DPe=()=>"Descargar",LPe=()=>"डाउनलोड करें",AD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RPe():t==="fa"?MPe():t==="ar"?OPe():t==="es"?DPe():t==="hi"?LPe():APe()}),IPe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,$Pe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,BPe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,PPe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,FPe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,HPe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,qPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Pe(e):t==="fa"?BPe(e):t==="ar"?PPe(e):t==="es"?FPe(e):t==="hi"?HPe(e):IPe(e)}),UPe=()=>"Failed to load file:",GPe=()=>"加载文件失败:",VPe=()=>"بارگیری فایل ناموفق بود:",KPe=()=>"تعذّر تحميل الملف:",WPe=()=>"Error al cargar el archivo:",QPe=()=>"फ़ाइल लोड नहीं हो सकी:",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GPe():t==="fa"?VPe():t==="ar"?KPe():t==="es"?WPe():t==="hi"?QPe():UPe()}),XPe=()=>"File truncated — showing the first 512 KB.",YPe=()=>"文件已截断——仅显示前 512 KB。",ZPe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",JPe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",eFe=()=>"Archivo truncado — se muestran los primeros 512 KB.",tFe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",nFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YPe():t==="fa"?ZPe():t==="ar"?JPe():t==="es"?eFe():t==="hi"?tFe():XPe()}),rFe=()=>"The page below stops partway — the full file could not be loaded.",sFe=()=>"下方页面在中途结束——无法加载完整文件。",iFe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",aFe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",oFe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",cFe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",lFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sFe():t==="fa"?iFe():t==="ar"?aFe():t==="es"?oFe():t==="hi"?cFe():rFe()}),uFe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,_Fe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,fFe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,dFe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,hFe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,pFe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,mFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Fe(e):t==="fa"?fFe(e):t==="ar"?dFe(e):t==="es"?hFe(e):t==="hi"?pFe(e):uFe(e)}),gFe=()=>"Loading…",vFe=()=>"正在加载…",bFe=()=>"در حال بارگیری…",yFe=()=>"جارٍ التحميل…",xFe=()=>"Cargando…",wFe=()=>"लोड हो रहा है…",RD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vFe():t==="fa"?bFe():t==="ar"?yFe():t==="es"?xFe():t==="hi"?wFe():gFe()}),kFe=()=>"File not found.",SFe=()=>"找不到文件。",CFe=()=>"فایل پیدا نشد.",EFe=()=>"لم يُعثر على الملف.",NFe=()=>"No se encontró el archivo.",zFe=()=>"फ़ाइल नहीं मिली।",jFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SFe():t==="fa"?CFe():t==="ar"?EFe():t==="es"?NFe():t==="hi"?zFe():kFe()}),TFe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,AFe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,RFe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,MFe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,OFe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,DFe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,LFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AFe(e):t==="fa"?RFe(e):t==="ar"?MFe(e):t==="es"?OFe(e):t==="hi"?DFe(e):TFe(e)}),IFe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,$Fe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,BFe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,PFe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,FFe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,HFe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,qFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Fe(e):t==="fa"?BFe(e):t==="ar"?PFe(e):t==="es"?FFe(e):t==="hi"?HFe(e):IFe(e)}),UFe=()=>"File not found on disk.",GFe=()=>"磁盘上找不到此文件。",VFe=()=>"فایل روی دیسک پیدا نشد.",KFe=()=>"لم يُعثر على الملف على القرص.",WFe=()=>"No se encontró el archivo en disco.",QFe=()=>"फ़ाइल डिस्क पर नहीं मिली।",XFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GFe():t==="fa"?VFe():t==="ar"?KFe():t==="es"?WFe():t==="hi"?QFe():UFe()}),YFe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,ZFe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,JFe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,eHe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,tHe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,nHe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,rHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZFe(e):t==="fa"?JFe(e):t==="ar"?eHe(e):t==="es"?tHe(e):t==="hi"?nHe(e):YFe(e)}),sHe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,iHe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,aHe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,oHe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,cHe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,lHe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,uHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iHe(e):t==="fa"?aHe(e):t==="ar"?oHe(e):t==="es"?cHe(e):t==="hi"?lHe(e):sHe(e)}),_He=()=>"Open in default editor",fHe=()=>"在默认编辑器中打开",dHe=()=>"باز کردن در ویرایشگر پیش‌فرض",hHe=()=>"فتح في المحرر الافتراضي",pHe=()=>"Abrir en el editor predeterminado",mHe=()=>"डिफ़ॉल्ट एडिटर में खोलें",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fHe():t==="fa"?dHe():t==="ar"?hHe():t==="es"?pHe():t==="hi"?mHe():_He()}),gHe=()=>"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.",vHe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",bHe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",yHe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",xHe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",wHe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",kHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vHe():t==="fa"?bHe():t==="ar"?yHe():t==="es"?xHe():t==="hi"?wHe():gHe()}),SHe=()=>"Overwrite disk file",CHe=()=>"覆盖磁盘文件",EHe=()=>"بازنویسی فایل روی دیسک",NHe=()=>"استبدال الملف على القرص",zHe=()=>"Sobrescribir el archivo en disco",jHe=()=>"डिस्क फ़ाइल अधिलेखित करें",THe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CHe():t==="fa"?EHe():t==="ar"?NHe():t==="es"?zHe():t==="hi"?jHe():SHe()}),AHe=()=>"Compiled PDF is out of date",RHe=()=>"已编译的 PDF 不是最新版本",MHe=()=>"PDF کامپایل‌شده به‌روز نیست",OHe=()=>"ملف PDF المُجمَّع غير محدَّث",DHe=()=>"El PDF compilado está desactualizado",LHe=()=>"कंपाइल की गई PDF पुरानी है",IHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RHe():t==="fa"?MHe():t==="ar"?OHe():t==="es"?DHe():t==="hi"?LHe():AHe()}),$He=()=>"project clone",BHe=()=>"项目克隆",PHe=()=>"کلون پروژه",FHe=()=>"نسخة المشروع المستنسخة",HHe=()=>"el clon del proyecto",qHe=()=>"प्रोजेक्ट क्लोन",Zg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BHe():t==="fa"?PHe():t==="ar"?FHe():t==="es"?HHe():t==="hi"?qHe():$He()}),UHe=()=>"Recompile PDF",GHe=()=>"重新编译 PDF",VHe=()=>"کامپایل دوبارهٔ PDF",KHe=()=>"إعادة تجميع PDF",WHe=()=>"Volver a compilar el PDF",QHe=()=>"PDF फिर से कंपाइल करें",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GHe():t==="fa"?VHe():t==="ar"?KHe():t==="es"?WHe():t==="hi"?QHe():UHe()}),XHe=()=>"Reload from disk",YHe=()=>"从磁盘重新加载",ZHe=()=>"بارگذاری مجدد از دیسک",JHe=()=>"إعادة التحميل من القرص",eqe=()=>"Recargar desde el disco",tqe=()=>"डिस्क से फिर से लोड करें",nqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YHe():t==="fa"?ZHe():t==="ar"?JHe():t==="es"?eqe():t==="hi"?tqe():XHe()}),rqe=()=>"Save failed",sqe=()=>"保存失败",iqe=()=>"ذخیره ناموفق بود",aqe=()=>"فشل الحفظ",oqe=()=>"Error al guardar",cqe=()=>"सेव विफल",lqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sqe():t==="fa"?iqe():t==="ar"?aqe():t==="es"?oqe():t==="hi"?cqe():rqe()}),uqe=()=>"Saving…",_qe=()=>"正在保存…",fqe=()=>"در حال ذخیره…",dqe=()=>"جارٍ الحفظ…",hqe=()=>"Guardando…",pqe=()=>"सेव हो रहा है…",mqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_qe():t==="fa"?fqe():t==="ar"?dqe():t==="es"?hqe():t==="hi"?pqe():uqe()}),gqe=()=>"Selected — press ⌘C",vqe=()=>"已选中 — 按 ⌘C 复制",bqe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",yqe=()=>"محدد — اضغط ⌘C",xqe=()=>"Seleccionado — pulsa ⌘C",wqe=()=>"चयनित — ⌘C दबाएं",kqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vqe():t==="fa"?bqe():t==="ar"?yqe():t==="es"?xqe():t==="hi"?wqe():gqe()}),Sqe=()=>"session’s worktree",Cqe=()=>"会话工作树",Eqe=()=>"درخت کاری نشست",Nqe=()=>"شجرة عمل الجلسة",zqe=()=>"el árbol de trabajo de la sesión",jqe=()=>"सेशन की वर्कट्री",Jg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cqe():t==="fa"?Eqe():t==="ar"?Nqe():t==="es"?zqe():t==="hi"?jqe():Sqe()}),Tqe=()=>"Show compiled PDF",Aqe=()=>"显示已编译的 PDF",Rqe=()=>"نمایش PDF کامپایل‌شده",Mqe=()=>"عرض ملف PDF المُجمَّع",Oqe=()=>"Mostrar el PDF compilado",Dqe=()=>"कंपाइल की गई PDF दिखाएं",BN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aqe():t==="fa"?Rqe():t==="ar"?Mqe():t==="es"?Oqe():t==="hi"?Dqe():Tqe()}),Lqe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",Iqe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",$qe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",Bqe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",Pqe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",Fqe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",Hqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iqe():t==="fa"?$qe():t==="ar"?Bqe():t==="es"?Pqe():t==="hi"?Fqe():Lqe()}),qqe=()=>"This session's worktree isn't available — showing the project clone's copy.",Uqe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",Gqe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",Vqe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",Kqe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",Wqe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",Qqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uqe():t==="fa"?Gqe():t==="ar"?Vqe():t==="es"?Kqe():t==="hi"?Wqe():qqe()}),Xqe=()=>"Unsaved",Yqe=()=>"未保存",Zqe=()=>"ذخیره نشده",Jqe=()=>"غير محفوظ",eUe=()=>"Sin guardar",tUe=()=>"सेव नहीं हुआ",MD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yqe():t==="fa"?Zqe():t==="ar"?Jqe():t==="es"?eUe():t==="hi"?tUe():Xqe()}),nUe=()=>"Unsaved — ⌘S to save",rUe=()=>"未保存 — 按 ⌘S 保存",sUe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",iUe=()=>"غير محفوظ — ⌘S للحفظ",aUe=()=>"Sin guardar — ⌘S para guardar",oUe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",cUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rUe():t==="fa"?sUe():t==="ar"?iUe():t==="es"?aUe():t==="hi"?oUe():nUe()}),lUe=()=>"Update orx on the remote machine to edit this file safely.",uUe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",_Ue=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",fUe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",dUe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",hUe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",pUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uUe():t==="fa"?_Ue():t==="ar"?fUe():t==="es"?dUe():t==="hi"?hUe():lUe()}),mUe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",gUe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",vUe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",bUe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",yUe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",xUe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",wUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gUe():t==="fa"?vUe():t==="ar"?bUe():t==="es"?yUe():t==="hi"?xUe():mUe()}),kUe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",SUe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",CUe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",EUe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",NUe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",zUe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",jUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SUe():t==="fa"?CUe():t==="ar"?EUe():t==="es"?NUe():t==="hi"?zUe():kUe()}),TUe=()=>"Back to preview",AUe=()=>"返回预览",RUe=()=>"بازگشت به پیش‌نمایش",MUe=()=>"العودة إلى المعاينة",OUe=()=>"Volver a la vista previa",DUe=()=>"प्रीव्यू पर वापस जाएं",LUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AUe():t==="fa"?RUe():t==="ar"?MUe():t==="es"?OUe():t==="hi"?DUe():TUe()}),IUe=e=>`${e==null?void 0:e.count} changed files`,$Ue=e=>`${e==null?void 0:e.count} 个已更改文件`,BUe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,PUe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,FUe=e=>`${e==null?void 0:e.count} archivos modificados`,HUe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,OD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ue(e):t==="fa"?BUe(e):t==="ar"?PUe(e):t==="es"?FUe(e):t==="hi"?HUe(e):IUe(e)}),qUe=()=>"Changed files",UUe=()=>"已更改文件",GUe=()=>"فایل‌های تغییرکرده",VUe=()=>"الملفات المتغيّرة",KUe=()=>"Archivos modificados",WUe=()=>"बदली गई फ़ाइलें",QUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UUe():t==="fa"?GUe():t==="ar"?VUe():t==="es"?KUe():t==="hi"?WUe():qUe()}),XUe=()=>"Diff preview truncated",YUe=()=>"差异预览已截断",ZUe=()=>"پیش‌نمایش تفاوت کوتاه شده است",JUe=()=>"معاينة الفروق مقتطعة",eGe=()=>"Vista previa del diff truncada",tGe=()=>"डिफ़ प्रीव्यू छोटा किया गया",nGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YUe():t==="fa"?ZUe():t==="ar"?JUe():t==="es"?eGe():t==="hi"?tGe():XUe()}),rGe=e=>`${e==null?void 0:e.count} files shown (partial)`,sGe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,iGe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,aGe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,oGe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,cGe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,lGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sGe(e):t==="fa"?iGe(e):t==="ar"?aGe(e):t==="es"?oGe(e):t==="hi"?cGe(e):rGe(e)}),uGe=()=>"No changes.",_Ge=()=>"没有更改。",fGe=()=>"تغییری وجود ندارد.",dGe=()=>"لا توجد تغييرات.",hGe=()=>"No hay cambios.",pGe=()=>"कोई बदलाव नहीं।",mGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ge():t==="fa"?fGe():t==="ar"?dGe():t==="es"?hGe():t==="hi"?pGe():uGe()}),gGe=()=>"No complete file preview was available before the cutoff.",vGe=()=>"在截断位置之前没有完整的文件预览。",bGe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",yGe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",xGe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",wGe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",kGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vGe():t==="fa"?bGe():t==="ar"?yGe():t==="es"?xGe():t==="hi"?wGe():gGe()}),SGe=()=>"No textual diff for this file.",CGe=()=>"此文件没有文本差异。",EGe=()=>"برای این فایل تفاوت متنی وجود ندارد.",NGe=()=>"لا يوجد فرق نصّي لهذا الملف.",zGe=()=>"No hay diff de texto para este archivo.",jGe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",TGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CGe():t==="fa"?EGe():t==="ar"?NGe():t==="es"?zGe():t==="hi"?jGe():SGe()}),AGe=()=>"1 changed file",RGe=()=>"1 个已更改文件",MGe=()=>"۱ فایل تغییرکرده",OGe=()=>"ملف واحد معدَّل",DGe=()=>"1 archivo modificado",LGe=()=>"1 बदली गई फ़ाइल",DD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RGe():t==="fa"?MGe():t==="ar"?OGe():t==="es"?DGe():t==="hi"?LGe():AGe()}),IGe=()=>"1 file shown (partial)",$Ge=()=>"显示 1 个文件(部分)",BGe=()=>"۱ فایل نمایش داده شده (ناقص)",PGe=()=>"عُرض ملف واحد (جزئيًا)",FGe=()=>"1 archivo mostrado (parcial)",HGe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",qGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ge():t==="fa"?BGe():t==="ar"?PGe():t==="es"?FGe():t==="hi"?HGe():IGe()}),UGe=()=>"Unable to parse this diff.",GGe=()=>"无法解析此差异。",VGe=()=>"خواندن این تفاوت ممکن نبود.",KGe=()=>"تعذّر تحليل هذا الفرق.",WGe=()=>"No se pudo interpretar este diff.",QGe=()=>"यह डिफ़ पार्स नहीं हो सका।",XGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GGe():t==="fa"?VGe():t==="ar"?KGe():t==="es"?WGe():t==="hi"?QGe():UGe()}),YGe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,ZGe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,JGe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,eVe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,tVe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,nVe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,rVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZGe(e):t==="fa"?JGe(e):t==="ar"?eVe(e):t==="es"?tVe(e):t==="hi"?nVe(e):YGe(e)}),sVe=()=>"View full diff",iVe=()=>"查看完整差异",aVe=()=>"نمایش تفاوت کامل",oVe=()=>"عرض الفرق الكامل",cVe=()=>"Ver diff completo",lVe=()=>"पूरा डिफ़ देखें",uVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iVe():t==="fa"?aVe():t==="ar"?oVe():t==="es"?cVe():t==="hi"?lVe():sVe()}),_Ve=()=>"Create a token ↗",fVe=()=>"创建令牌 ↗",dVe=()=>"ساخت توکن ↗",hVe=()=>"إنشاء رمز ↗",pVe=()=>"Crear un token ↗",mVe=()=>"एक टोकन बनाएं ↗",gVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fVe():t==="fa"?dVe():t==="ar"?hVe():t==="es"?pVe():t==="hi"?mVe():_Ve()}),vVe=()=>"Keep the agent working toward a goal",bVe=()=>"让智能体持续朝目标推进",yVe=()=>"عامل را در مسیر یک هدف نگه دارید",xVe=()=>"اجعل الوكيل يعمل نحو هدف",wVe=()=>"Mantén al agente trabajando hacia un objetivo",kVe=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",SVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bVe():t==="fa"?yVe():t==="ar"?xVe():t==="es"?wVe():t==="hi"?kVe():vVe()}),CVe=()=>"Approve and run",EVe=()=>"批准并运行",NVe=()=>"تأیید و اجرا",zVe=()=>"الموافقة والتشغيل",jVe=()=>"Aprobar y ejecutar",TVe=()=>"स्वीकार करें और चलाएं",AVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EVe():t==="fa"?NVe():t==="ar"?zVe():t==="es"?jVe():t==="hi"?TVe():CVe()}),RVe=()=>"Cancel setup",MVe=()=>"取消设置",OVe=()=>"لغو راه‌اندازی",DVe=()=>"إلغاء الإعداد",LVe=()=>"Cancelar configuración",IVe=()=>"सेटअप रद्द करें",$Ve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MVe():t==="fa"?OVe():t==="ar"?DVe():t==="es"?LVe():t==="hi"?IVe():RVe()}),BVe=()=>"Checking connection…",PVe=()=>"正在检查连接…",FVe=()=>"در حال بررسی اتصال…",HVe=()=>"جارٍ التحقق من الإعداد…",qVe=()=>"Comprobando conexión…",UVe=()=>"कनेक्शन जाँचा जा रहा है…",GVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PVe():t==="fa"?FVe():t==="ar"?HVe():t==="es"?qVe():t==="hi"?UVe():BVe()}),VVe=e=>`${e==null?void 0:e.agent} is connected.`,KVe=e=>`${e==null?void 0:e.agent} 已连接。`,WVe=e=>`${e==null?void 0:e.agent} متصل است.`,QVe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,XVe=e=>`${e==null?void 0:e.agent} está conectado.`,YVe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,ZVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KVe(e):t==="fa"?WVe(e):t==="ar"?QVe(e):t==="es"?XVe(e):t==="hi"?YVe(e):VVe(e)}),JVe=()=>"Setup needs attention.",eKe=()=>"设置需要处理。",tKe=()=>"راه‌اندازی نیاز به بررسی دارد.",nKe=()=>"تعذّر إكمال الإعداد.",rKe=()=>"La configuración requiere atención.",sKe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",LD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eKe():t==="fa"?tKe():t==="ar"?nKe():t==="es"?rKe():t==="hi"?sKe():JVe()}),iKe=()=>"Install",aKe=()=>"安装",oKe=()=>"نصب",cKe=()=>"تثبيت",lKe=()=>"Instalar",uKe=()=>"इंस्टॉल करें",_Ke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aKe():t==="fa"?oKe():t==="ar"?cKe():t==="es"?lKe():t==="hi"?uKe():iKe()}),fKe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,dKe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,hKe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,pKe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,mKe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,gKe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,vKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dKe(e):t==="fa"?hKe(e):t==="ar"?pKe(e):t==="es"?mKe(e):t==="hi"?gKe(e):fKe(e)}),bKe=()=>"Could not load setup commands.",yKe=()=>"无法加载设置命令。",xKe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",wKe=()=>"تعذّر تحميل أوامر الإعداد.",kKe=()=>"No se pudieron cargar los comandos de configuración.",SKe=()=>"सेटअप कमांड लोड नहीं हो सके।",CKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yKe():t==="fa"?xKe():t==="ar"?wKe():t==="es"?kKe():t==="hi"?SKe():bKe()}),EKe=()=>"Sign in",NKe=()=>"登录",zKe=()=>"ورود",jKe=()=>"تسجيل الدخول",TKe=()=>"Iniciar sesión",AKe=()=>"साइन इन करें",ID=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NKe():t==="fa"?zKe():t==="ar"?jKe():t==="es"?TKe():t==="hi"?AKe():EKe()}),RKe=()=>"The agent is not ready yet. Re-check or retry sign-in.",MKe=()=>"代理尚未就绪。请重新检查或重试登录。",OKe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",DKe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",LKe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",IKe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",$D=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MKe():t==="fa"?OKe():t==="ar"?DKe():t==="es"?LKe():t==="hi"?IKe():RKe()}),$Ke=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",BKe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",PKe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",FKe=()=>"يفتح طرفية هنا",HKe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",qKe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",UKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BKe():t==="fa"?PKe():t==="ar"?FKe():t==="es"?HKe():t==="hi"?qKe():$Ke()}),GKe=()=>"This install command requires Node.js and npm.",VKe=()=>"此安装命令需要 Node.js 和 npm。",KKe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",WKe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",QKe=()=>"Este comando de instalación requiere Node.js y npm.",XKe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",YKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VKe():t==="fa"?KKe():t==="ar"?WKe():t==="es"?QKe():t==="hi"?XKe():GKe()}),ZKe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,JKe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,eWe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,tWe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,nWe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,rWe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,sWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JKe(e):t==="fa"?eWe(e):t==="ar"?tWe(e):t==="es"?nWe(e):t==="hi"?rWe(e):ZKe(e)}),iWe=e=>`Set up ${e==null?void 0:e.agent}`,aWe=e=>`设置 ${e==null?void 0:e.agent}`,oWe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,cWe=e=>`إعداد ${e==null?void 0:e.agent}`,lWe=e=>`Configurar ${e==null?void 0:e.agent}`,uWe=e=>`${e==null?void 0:e.agent} सेट अप करें`,PN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aWe(e):t==="fa"?oWe(e):t==="ar"?cWe(e):t==="es"?lWe(e):t==="hi"?uWe(e):iWe(e)}),_We=()=>"Update",fWe=()=>"更新",dWe=()=>"به‌روزرسانی",hWe=()=>"تحديث",pWe=()=>"Actualizar",mWe=()=>"अपडेट करें",gWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fWe():t==="fa"?dWe():t==="ar"?hWe():t==="es"?pWe():t==="hi"?mWe():_We()}),vWe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,bWe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,yWe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,xWe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,wWe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,kWe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,SWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bWe(e):t==="fa"?yWe(e):t==="ar"?xWe(e):t==="es"?wWe(e):t==="hi"?kWe(e):vWe(e)}),CWe=()=>"All projects",EWe=()=>"所有项目",NWe=()=>"همهٔ پروژه‌ها",zWe=()=>"كل المشاريع",jWe=()=>"Todos los proyectos",TWe=()=>"सभी प्रोजेक्ट",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EWe():t==="fa"?NWe():t==="ar"?zWe():t==="es"?jWe():t==="hi"?TWe():CWe()}),AWe=()=>"Configure Repository",RWe=()=>"配置仓库",MWe=()=>"پیکربندی مخزن",OWe=()=>"إعداد المستودع",DWe=()=>"Configurar repositorio",LWe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",IWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RWe():t==="fa"?MWe():t==="ar"?OWe():t==="es"?DWe():t==="hi"?LWe():AWe()}),$We=()=>"Create a new project",BWe=()=>"新建项目",PWe=()=>"ایجاد پروژهٔ جدید",FWe=()=>"إنشاء مشروع جديد",HWe=()=>"Crear un proyecto nuevo",qWe=()=>"नया प्रोजेक्ट बनाएं",UWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BWe():t==="fa"?PWe():t==="ar"?FWe():t==="es"?HWe():t==="hi"?qWe():$We()}),GWe=()=>"Hide sidebar",VWe=()=>"隐藏侧边栏",KWe=()=>"پنهان کردن نوار کناری",WWe=()=>"إخفاء الشريط الجانبي",QWe=()=>"Ocultar barra lateral",XWe=()=>"साइडबार छिपाएं",HN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VWe():t==="fa"?KWe():t==="ar"?WWe():t==="es"?QWe():t==="hi"?XWe():GWe()}),YWe=()=>"Project",ZWe=()=>"项目",JWe=()=>"پروژه",eQe=()=>"المشروع",tQe=()=>"Proyecto",nQe=()=>"प्रोजेक्ट",rQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZWe():t==="fa"?JWe():t==="ar"?eQe():t==="es"?tQe():t==="hi"?nQe():YWe()}),sQe=e=>`${e==null?void 0:e.count} cancelled`,iQe=e=>`${e==null?void 0:e.count} 次取消`,aQe=e=>`${e==null?void 0:e.count} لغوشده`,oQe=e=>`الملغاة: ${e==null?void 0:e.count}`,cQe=e=>`${e==null?void 0:e.count} canceladas`,lQe=e=>`${e==null?void 0:e.count} रद्द`,uQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iQe(e):t==="fa"?aQe(e):t==="ar"?oQe(e):t==="es"?cQe(e):t==="hi"?lQe(e):sQe(e)}),_Qe=e=>`${e==null?void 0:e.count} done`,fQe=e=>`${e==null?void 0:e.count} 次完成`,dQe=e=>`${e==null?void 0:e.count} تمام‌شده`,hQe=e=>`المكتملة: ${e==null?void 0:e.count}`,pQe=e=>`${e==null?void 0:e.count} completadas`,mQe=e=>`${e==null?void 0:e.count} पूरे`,gQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fQe(e):t==="fa"?dQe(e):t==="ar"?hQe(e):t==="es"?pQe(e):t==="hi"?mQe(e):_Qe(e)}),vQe=e=>`${e==null?void 0:e.count} failed`,bQe=e=>`${e==null?void 0:e.count} 次失败`,yQe=e=>`${e==null?void 0:e.count} ناموفق`,xQe=e=>`الفاشلة: ${e==null?void 0:e.count}`,wQe=e=>`${e==null?void 0:e.count} con error`,kQe=e=>`${e==null?void 0:e.count} विफल`,SQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bQe(e):t==="fa"?yQe(e):t==="ar"?xQe(e):t==="es"?wQe(e):t==="hi"?kQe(e):vQe(e)}),CQe=e=>`${e==null?void 0:e.count} files`,EQe=e=>`${e==null?void 0:e.count} 个文件`,NQe=e=>`${e==null?void 0:e.count} فایل`,zQe=e=>`الملفات: ${e==null?void 0:e.count}`,jQe=e=>`${e==null?void 0:e.count} archivos`,TQe=e=>`${e==null?void 0:e.count} फ़ाइलें`,AQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EQe(e):t==="fa"?NQe(e):t==="ar"?zQe(e):t==="es"?jQe(e):t==="hi"?TQe(e):CQe(e)}),RQe=e=>`${e==null?void 0:e.count}+ files`,MQe=e=>`至少 ${e==null?void 0:e.count} 个文件`,OQe=e=>`بیش از ${e==null?void 0:e.count} فایل`,DQe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,LQe=e=>`${e==null?void 0:e.count}+ archivos`,IQe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,$Qe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MQe(e):t==="fa"?OQe(e):t==="ar"?DQe(e):t==="es"?LQe(e):t==="hi"?IQe(e):RQe(e)}),BQe=e=>`${e==null?void 0:e.count} live`,PQe=e=>`${e==null?void 0:e.count} 次进行中`,FQe=e=>`${e==null?void 0:e.count} فعال`,HQe=e=>`النشطة: ${e==null?void 0:e.count}`,qQe=e=>`${e==null?void 0:e.count} en curso`,UQe=e=>`${e==null?void 0:e.count} लाइव`,GQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PQe(e):t==="fa"?FQe(e):t==="ar"?HQe(e):t==="es"?qQe(e):t==="hi"?UQe(e):BQe(e)}),VQe=()=>"1 file",KQe=()=>"1 个文件",WQe=()=>"۱ فایل",QQe=()=>"ملف واحد",XQe=()=>"1 archivo",YQe=()=>"1 फ़ाइल",ZQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KQe():t==="fa"?WQe():t==="ar"?QQe():t==="es"?XQe():t==="hi"?YQe():VQe()}),JQe=()=>"1 run",eXe=()=>"1 次运行",tXe=()=>"۱ اجرا",nXe=()=>"تشغيل واحد",rXe=()=>"1 ejecución",sXe=()=>"1 रन",iXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eXe():t==="fa"?tXe():t==="ar"?nXe():t==="es"?rXe():t==="hi"?sXe():JQe()}),aXe=e=>`${e==null?void 0:e.count} runs`,oXe=e=>`${e==null?void 0:e.count} 次运行`,cXe=e=>`${e==null?void 0:e.count} اجرا`,lXe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,uXe=e=>`${e==null?void 0:e.count} ejecuciones`,_Xe=e=>`${e==null?void 0:e.count} रन`,fXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oXe(e):t==="fa"?cXe(e):t==="ar"?lXe(e):t==="es"?uXe(e):t==="hi"?_Xe(e):aXe(e)}),dXe=()=>"Zoom in",hXe=()=>"放大",pXe=()=>"بزرگ‌نمایی",mXe=()=>"تكبير",gXe=()=>"Acercar",vXe=()=>"ज़ूम इन",qN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hXe():t==="fa"?pXe():t==="ar"?mXe():t==="es"?gXe():t==="hi"?vXe():dXe()}),bXe=()=>"Zoom out",yXe=()=>"缩小",xXe=()=>"کوچک‌نمایی",wXe=()=>"تصغير",kXe=()=>"Alejar",SXe=()=>"ज़ूम आउट",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yXe():t==="fa"?xXe():t==="ar"?wXe():t==="es"?kXe():t==="hi"?SXe():bXe()}),CXe=()=>"Reset zoom to fit",EXe=()=>"重置为适合窗口",NXe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",zXe=()=>"إعادة ضبط التكبير للملاءمة",jXe=()=>"Restablecer zoom para ajustar",TXe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EXe():t==="fa"?NXe():t==="ar"?zXe():t==="es"?jXe():t==="hi"?TXe():CXe()}),AXe=()=>"No instances yet.",RXe=()=>"还没有实例。",MXe=()=>"هنوز نمونه‌ای وجود ندارد.",OXe=()=>"لا توجد مثيلات بعد.",DXe=()=>"Aún no hay instancias.",LXe=()=>"अभी तक कोई इंस्टेंस नहीं।",IXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RXe():t==="fa"?MXe():t==="ar"?OXe():t==="es"?DXe():t==="hi"?LXe():AXe()}),$Xe=()=>"Nothing running right now.",BXe=()=>"当前没有运行中的实例。",PXe=()=>"اکنون چیزی در حال اجرا نیست.",FXe=()=>"لا شيء قيد التشغيل الآن.",HXe=()=>"No hay nada en ejecución ahora mismo.",qXe=()=>"अभी कुछ नहीं चल रहा।",UXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BXe():t==="fa"?PXe():t==="ar"?FXe():t==="es"?HXe():t==="hi"?qXe():$Xe()}),GXe=()=>"Select a project to see its history.",VXe=()=>"请选择一个项目以查看其历史记录。",KXe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",WXe=()=>"اختر مشروعًا لرؤية سجله.",QXe=()=>"Selecciona un proyecto para ver su historial.",XXe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",YXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VXe():t==="fa"?KXe():t==="ar"?WXe():t==="es"?QXe():t==="hi"?XXe():GXe()}),ZXe=()=>"Select a project to see its runs.",JXe=()=>"请选择一个项目以查看其运行。",eYe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",tYe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",nYe=()=>"Selecciona un proyecto para ver sus ejecuciones.",rYe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",sYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JXe():t==="fa"?eYe():t==="ar"?tYe():t==="es"?nYe():t==="hi"?rYe():ZXe()}),iYe=()=>"View history",aYe=()=>"查看历史记录",oYe=()=>"مشاهدهٔ تاریخچه",cYe=()=>"عرض السجل",lYe=()=>"Ver historial",uYe=()=>"इतिहास देखें",_Ye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aYe():t==="fa"?oYe():t==="ar"?cYe():t==="es"?lYe():t==="hi"?uYe():iYe()}),fYe=e=>`View history (${e==null?void 0:e.count})`,dYe=e=>`查看历史记录(${e==null?void 0:e.count})`,hYe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,pYe=e=>`عرض السجل (${e==null?void 0:e.count})`,mYe=e=>`Ver historial (${e==null?void 0:e.count})`,gYe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,vYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dYe(e):t==="fa"?hYe(e):t==="ar"?pYe(e):t==="es"?mYe(e):t==="hi"?gYe(e):fYe(e)}),bYe=()=>"The engine exited without producing a PDF or a log.",yYe=()=>"引擎已退出,但没有生成 PDF 或日志。",xYe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",wYe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",kYe=()=>"El motor terminó sin generar un PDF ni un log.",SYe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",CYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yYe():t==="fa"?xYe():t==="ar"?wYe():t==="es"?kYe():t==="hi"?SYe():bYe()}),EYe=()=>"Loading…",NYe=()=>"正在加载…",zYe=()=>"در حال بارگیری…",jYe=()=>"جارٍ التحميل…",TYe=()=>"Cargando…",AYe=()=>"लोड हो रहा है…",RYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NYe():t==="fa"?zYe():t==="ar"?jYe():t==="es"?TYe():t==="hi"?AYe():EYe()}),MYe=()=>"Add local model",OYe=()=>"添加本地模型",DYe=()=>"افزودن مدل محلی",LYe=()=>"إضافة نموذج محلي",IYe=()=>"Añadir modelo local",$Ye=()=>"लोकल मॉडल जोड़ें",BD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OYe():t==="fa"?DYe():t==="ar"?LYe():t==="es"?IYe():t==="hi"?$Ye():MYe()}),BYe=()=>"Local server address",PYe=()=>"本地服务器地址",FYe=()=>"نشانی سرور محلی",HYe=()=>"عنوان الخادم المحلي",qYe=()=>"Dirección del servidor local",UYe=()=>"लोकल सर्वर पता",GYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PYe():t==="fa"?FYe():t==="ar"?HYe():t==="es"?qYe():t==="hi"?UYe():BYe()}),VYe=()=>"Find models",KYe=()=>"查找模型",WYe=()=>"یافتن مدل‌ها",QYe=()=>"العثور على النماذج",XYe=()=>"Buscar modelos",YYe=()=>"मॉडल खोजें",ZYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KYe():t==="fa"?WYe():t==="ar"?QYe():t==="es"?XYe():t==="hi"?YYe():VYe()}),JYe=()=>"(OpenAI compatible)",eZe=()=>"(兼容 OpenAI)",tZe=()=>"(سازگار با OpenAI)",nZe=()=>"(متوافق مع OpenAI)",rZe=()=>"(compatible con OpenAI)",sZe=()=>"(OpenAI संगत)",PD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eZe():t==="fa"?tZe():t==="ar"?nZe():t==="es"?rZe():t==="hi"?sZe():JYe()}),iZe=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",aZe=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",oZe=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",cZe=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",lZe=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",uZe=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",_Ze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZe():t==="fa"?oZe():t==="ar"?cZe():t==="es"?lZe():t==="hi"?uZe():iZe()}),fZe=()=>"Connected",dZe=()=>"已连接",hZe=()=>"متصل شد",pZe=()=>"متصل",mZe=()=>"Conectado",gZe=()=>"कनेक्टेड",vZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dZe():t==="fa"?hZe():t==="ar"?pZe():t==="es"?mZe():t==="hi"?gZe():fZe()}),bZe=()=>"Context window",yZe=()=>"上下文窗口",xZe=()=>"پنجرهٔ زمینه",wZe=()=>"نافذة السياق",kZe=()=>"Ventana de contexto",SZe=()=>"कॉन्टेक्स्ट विंडो",CZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yZe():t==="fa"?xZe():t==="ar"?wZe():t==="es"?kZe():t==="hi"?SZe():bZe()}),EZe=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",NZe=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",zZe=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",jZe=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",TZe=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",AZe=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",RZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NZe():t==="fa"?zZe():t==="ar"?jZe():t==="es"?TZe():t==="hi"?AZe():EZe()}),MZe=()=>"Custom Endpoint",OZe=()=>"自定义端点",DZe=()=>"نقطهٔ اتصال سفارشی",LZe=()=>"نقطة نهاية مخصصة",IZe=()=>"Endpoint personalizado",$Ze=()=>"कस्टम एंडपॉइंट",Gk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZe():t==="fa"?DZe():t==="ar"?LZe():t==="es"?IZe():t==="hi"?$Ze():MZe()}),BZe=e=>`Disconnect ${e==null?void 0:e.name}`,PZe=e=>`断开 ${e==null?void 0:e.name}`,FZe=e=>`قطع اتصال ${e==null?void 0:e.name}`,HZe=e=>`قطع اتصال ${e==null?void 0:e.name}`,qZe=e=>`Desconectar ${e==null?void 0:e.name}`,UZe=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,GZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PZe(e):t==="fa"?FZe(e):t==="ar"?HZe(e):t==="es"?qZe(e):t==="hi"?UZe(e):BZe(e)}),VZe=()=>"Get OpenCode",KZe=()=>"获取 OpenCode",WZe=()=>"دریافت OpenCode",QZe=()=>"الحصول على OpenCode",XZe=()=>"Obtener OpenCode",YZe=()=>"OpenCode लें",ZZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KZe():t==="fa"?WZe():t==="ar"?QZe():t==="es"?XZe():t==="hi"?YZe():VZe()}),JZe=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",eJe=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",tJe=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",nJe=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",rJe=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",sJe=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",iJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eJe():t==="fa"?tJe():t==="ar"?nJe():t==="es"?rJe():t==="hi"?sJe():JZe()}),aJe=()=>"API key (optional)",oJe=()=>"API 密钥(可选)",cJe=()=>"کلید API (اختیاری)",lJe=()=>"مفتاح API (اختياري)",uJe=()=>"Clave de API (opcional)",_Je=()=>"API की (वैकल्पिक)",fJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oJe():t==="fa"?cJe():t==="ar"?lJe():t==="es"?uJe():t==="hi"?_Je():aJe()}),dJe=()=>"Save model",hJe=()=>"保存模型",pJe=()=>"ذخیرهٔ مدل",mJe=()=>"حفظ النموذج",gJe=()=>"Guardar modelo",vJe=()=>"मॉडल सेव करें",bJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hJe():t==="fa"?pJe():t==="ar"?mJe():t==="es"?gJe():t==="hi"?vJe():dJe()}),yJe=()=>"Model server",xJe=()=>"模型服务器",wJe=()=>"سرور مدل",kJe=()=>"خادم النموذج",SJe=()=>"Servidor del modelo",CJe=()=>"मॉडल सर्वर",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xJe():t==="fa"?wJe():t==="ar"?kJe():t==="es"?SJe():t==="hi"?CJe():yJe()}),EJe=()=>"Local models",NJe=()=>"本地模型",zJe=()=>"مدل‌های محلی",jJe=()=>"النماذج المحلية",TJe=()=>"Modelos locales",AJe=()=>"लोकल मॉडल",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NJe():t==="fa"?zJe():t==="ar"?jJe():t==="es"?TJe():t==="hi"?AJe():EJe()}),RJe=()=>"API token (optional)",MJe=()=>"API 令牌(可选)",OJe=()=>"توکن API (اختیاری)",DJe=()=>"رمز API (اختياري)",LJe=()=>"Token de API (opcional)",IJe=()=>"API टोकन (वैकल्पिक)",$Je=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MJe():t==="fa"?OJe():t==="ar"?DJe():t==="es"?LJe():t==="hi"?IJe():RJe()}),BJe=()=>"Copy",PJe=()=>"复制",FJe=()=>"کپی",HJe=()=>"نسخ",qJe=()=>"Copiar",UJe=()=>"कॉपी करें",Vk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PJe():t==="fa"?FJe():t==="ar"?HJe():t==="es"?qJe():t==="hi"?UJe():BJe()}),GJe=()=>"Copy code",VJe=()=>"复制代码",KJe=()=>"کپی کد",WJe=()=>"نسخ الشيفرة",QJe=()=>"Copiar código",XJe=()=>"कोड कॉपी करें",YJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VJe():t==="fa"?KJe():t==="ar"?WJe():t==="es"?QJe():t==="hi"?XJe():GJe()}),ZJe=()=>"Download",JJe=()=>"下载",eet=()=>"بارگیری",tet=()=>"تنزيل",net=()=>"Descargar",ret=()=>"डाउनलोड करें",Ev=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JJe():t==="fa"?eet():t==="ar"?tet():t==="es"?net():t==="hi"?ret():ZJe()}),set=()=>"This browser can’t preview this media format.",iet=()=>"此浏览器无法预览该媒体格式。",aet=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",oet=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",cet=()=>"Este navegador no puede mostrar este formato multimedia.",uet=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",_et=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iet():t==="fa"?aet():t==="ar"?oet():t==="es"?cet():t==="hi"?uet():set()}),fet=()=>"Choose the model for this chat",det=()=>"选择此聊天的模型",het=()=>"انتخاب مدل این گفت‌وگو",pet=()=>"اختيار نموذج هذه المحادثة",met=()=>"Elige el modelo de este chat",get=()=>"इस चैट के लिए मॉडल चुनें",vet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?det():t==="fa"?het():t==="ar"?pet():t==="es"?met():t==="hi"?get():fet()}),bet=()=>"Add Local Model",yet=()=>"添加本地模型",xet=()=>"افزودن مدل محلی",wet=()=>"إضافة نموذج محلي",ket=()=>"Añadir modelo local",Cet=()=>"लोकल मॉडल जोड़ें",Eet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yet():t==="fa"?xet():t==="ar"?wet():t==="es"?ket():t==="hi"?Cet():bet()}),Net=()=>" · CLI configuration",zet=()=>" · CLI 配置",jet=()=>" · پیکربندی CLI",Tet=()=>" · إعداد واجهة سطر الأوامر",Aet=()=>" · Configuración de la CLI",Ret=()=>" · CLI कॉन्फ़िगरेशन",FD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zet():t==="fa"?jet():t==="ar"?Tet():t==="es"?Aet():t==="hi"?Ret():Net()}),Met=()=>"· Default",Oet=()=>"· 默认",Det=()=>"· پیش‌فرض",Let=()=>"· الافتراضي",Iet=()=>"· Predeterminado",$et=()=>"· डिफ़ॉल्ट",HD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oet():t==="fa"?Det():t==="ar"?Let():t==="es"?Iet():t==="hi"?$et():Met()}),Bet=()=>"Default model",Pet=()=>"默认模型",Fet=()=>"مدل پیش‌فرض",Het=()=>"النموذج الافتراضي",qet=()=>"Modelo predeterminado",Uet=()=>"डिफ़ॉल्ट मॉडल",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pet():t==="fa"?Fet():t==="ar"?Het():t==="es"?qet():t==="hi"?Uet():Bet()}),Get=()=>"Detecting harnesses…",Vet=()=>"正在检测智能体工具…",Ket=()=>"در حال شناسایی ابزارهای عامل…",Wet=()=>"جارٍ اكتشاف أدوات البرمجة…",Qet=()=>"Detectando agentes…",Xet=()=>"हार्नेस पहचाने जा रहे हैं…",Yet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vet():t==="fa"?Ket():t==="ar"?Wet():t==="es"?Qet():t==="hi"?Xet():Get()}),Zet=()=>"Effort",Jet=()=>"推理强度",ett=()=>"میزان استدلال",ttt=()=>"الجهد",ntt=()=>"Esfuerzo",rtt=()=>"प्रयास स्तर",stt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jet():t==="fa"?ett():t==="ar"?ttt():t==="es"?ntt():t==="hi"?rtt():Zet()}),itt=()=>"Fast speed ·",att=()=>"快速 ·",ott=()=>"سرعت بالا ·",ctt=()=>"سرعة عالية ·",ltt=()=>"Modo rápido ·",utt=()=>"तेज़ गति ·",_tt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?att():t==="fa"?ott():t==="ar"?ctt():t==="es"?ltt():t==="hi"?utt():itt()}),ftt=()=>"Mode",dtt=()=>"模式",htt=()=>"حالت",ptt=()=>"الوضع",mtt=()=>"Modo",gtt=()=>"मोड",QN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dtt():t==="fa"?htt():t==="ar"?ptt():t==="es"?mtt():t==="hi"?gtt():ftt()}),vtt=()=>"Model",btt=()=>"模型",ytt=()=>"مدل",xtt=()=>"النموذج",wtt=()=>"Modelo",ktt=()=>"मॉडल",u0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?btt():t==="fa"?ytt():t==="ar"?xtt():t==="es"?wtt():t==="hi"?ktt():vtt()}),Stt=e=>`${e==null?void 0:e.count} more — search to find`,Ctt=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,Ett=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,Ntt=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,ztt=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,jtt=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,Ttt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ctt(e):t==="fa"?Ett(e):t==="ar"?Ntt(e):t==="es"?ztt(e):t==="hi"?jtt(e):Stt(e)}),Att=()=>"Not available",Rtt=()=>"不可用",Mtt=()=>"در دسترس نیست",Ott=()=>"غير متاح",Dtt=()=>"No disponible",Ltt=()=>"उपलब्ध नहीं",Itt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rtt():t==="fa"?Mtt():t==="ar"?Ott():t==="es"?Dtt():t==="hi"?Ltt():Att()}),$tt=()=>"Search models…",Btt=()=>"搜索模型…",Ptt=()=>"جست‌وجوی مدل‌ها…",Ftt=()=>"البحث في النماذج…",Htt=()=>"Buscar modelos…",qtt=()=>"मॉडल खोजें…",qD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Btt():t==="fa"?Ptt():t==="ar"?Ftt():t==="es"?Htt():t==="hi"?qtt():$tt()}),Utt=()=>"Sessions keep their harness. Start a new chat to switch.",Gtt=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Vtt=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Ktt=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Wtt=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Qtt=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Xtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gtt():t==="fa"?Vtt():t==="ar"?Ktt():t==="es"?Wtt():t==="hi"?Qtt():Utt()}),Ytt=()=>"Speed",Ztt=()=>"速度",Jtt=()=>"سرعت",ent=()=>"السرعة",tnt=()=>"Velocidad",nnt=()=>"गति",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ztt():t==="fa"?Jtt():t==="ar"?ent():t==="es"?tnt():t==="hi"?nnt():Ytt()}),rnt=()=>"Unavailable",snt=()=>"不可用",int=()=>"در دسترس نیست",ant=()=>"غير متاح",ont=()=>"No disponible",cnt=()=>"उपलब्ध नहीं",ro=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?snt():t==="fa"?int():t==="ar"?ant():t==="es"?ont():t==="hi"?cnt():rnt()}),lnt=e=>`Use “${e==null?void 0:e.id}” as the model ID`,unt=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,_nt=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,fnt=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,dnt=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,hnt=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,pnt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?unt(e):t==="fa"?_nt(e):t==="ar"?fnt(e):t==="es"?dnt(e):t==="hi"?hnt(e):lnt(e)}),mnt=()=>"Variant",gnt=()=>"变体",vnt=()=>"گونه",bnt=()=>"الصنف",ynt=()=>"Variante",xnt=()=>"वेरिएंट",wnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gnt():t==="fa"?vnt():t==="ar"?bnt():t==="es"?ynt():t==="hi"?xnt():mnt()}),knt=()=>"Start a new chat",Snt=()=>"开始新聊天",Cnt=()=>"شروع گفت‌وگوی جدید",Ent=()=>"بدء محادثة جديدة",Nnt=()=>"Inicia un chat nuevo",znt=()=>"नई चैट शुरू करें",jnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Snt():t==="fa"?Cnt():t==="ar"?Ent():t==="es"?Nnt():t==="hi"?znt():knt()}),Tnt=()=>"Advanced",Ant=()=>"高级",Rnt=()=>"پیشرفته",Mnt=()=>"متقدم",Ont=()=>"Avanzado",Dnt=()=>"उन्नत",UD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ant():t==="fa"?Rnt():t==="ar"?Mnt():t==="es"?Ont():t==="hi"?Dnt():Tnt()}),Lnt=()=>"Advanced · Connect GitHub",Int=()=>"高级 · 连接 GitHub",$nt=()=>"پیشرفته · اتصال GitHub",Bnt=()=>"متقدم · ربط GitHub",Pnt=()=>"Avanzado · Conectar GitHub",Fnt=()=>"उन्नत · GitHub कनेक्ट करें",Hnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Int():t==="fa"?$nt():t==="ar"?Bnt():t==="es"?Pnt():t==="hi"?Fnt():Lnt()}),qnt=()=>"Advanced · GitHub sync on",Unt=()=>"高级 · GitHub 同步已开启",Gnt=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Vnt=()=>"متقدم · مزامنة GitHub مفعّلة",Knt=()=>"Avanzado · Sincronización con GitHub activada",Wnt=()=>"उन्नत · GitHub सिंक चालू",Qnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Unt():t==="fa"?Gnt():t==="ar"?Vnt():t==="es"?Knt():t==="hi"?Wnt():qnt()}),Xnt=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Ynt=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Znt=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Jnt=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",ert=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",trt=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",nrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ynt():t==="fa"?Znt():t==="ar"?Jnt():t==="es"?ert():t==="hi"?trt():Xnt()}),rrt=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,srt=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,irt=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,art=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,ort=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,crt=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,lrt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?srt(e):t==="fa"?irt(e):t==="ar"?art(e):t==="es"?ort(e):t==="hi"?crt(e):rrt(e)}),urt=()=>"Choose an existing project folder",_rt=()=>"选择现有项目文件夹",frt=()=>"انتخاب پوشهٔ موجود پروژه",drt=()=>"اختر مجلد مشروع موجود",hrt=()=>"Elige una carpeta de proyecto existente",prt=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_rt():t==="fa"?frt():t==="ar"?drt():t==="es"?hrt():t==="hi"?prt():urt()}),mrt=()=>"Choosing…",grt=()=>"正在选择…",vrt=()=>"در حال انتخاب…",brt=()=>"جارٍ الاختيار…",yrt=()=>"Eligiendo…",xrt=()=>"चुना जा रहा है…",wrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?grt():t==="fa"?vrt():t==="ar"?brt():t==="es"?yrt():t==="hi"?xrt():mrt()}),krt=()=>"Clone destination",Srt=()=>"克隆位置",Crt=()=>"مقصد کلون",Ert=()=>"وجهة الاستنساخ",Nrt=()=>"Destino del clon",zrt=()=>"क्लोन गंतव्य",jrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Srt():t==="fa"?Crt():t==="ar"?Ert():t==="es"?Nrt():t==="hi"?zrt():krt()}),Trt=()=>"Clone paper project",Art=()=>"克隆论文项目",Rrt=()=>"کلون پروژهٔ مقاله",Mrt=()=>"استنساخ مشروع الورقة",Ort=()=>"Clonar proyecto del paper",Drt=()=>"पेपर प्रोजेक्ट क्लोन करें",Lrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Art():t==="fa"?Rrt():t==="ar"?Mrt():t==="es"?Ort():t==="hi"?Drt():Trt()}),Irt=()=>"Create project",$rt=()=>"创建项目",Brt=()=>"ایجاد پروژه",Prt=()=>"إنشاء المشروع",Frt=()=>"Crear proyecto",Hrt=()=>"प्रोजेक्ट बनाएं",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$rt():t==="fa"?Brt():t==="ar"?Prt():t==="es"?Frt():t==="hi"?Hrt():Irt()}),qrt=()=>"Creating…",Urt=()=>"正在创建…",Grt=()=>"در حال ایجاد…",Vrt=()=>"جارٍ الإنشاء…",Krt=()=>"Creando…",Wrt=()=>"बनाया जा रहा है…",Qrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Urt():t==="fa"?Grt():t==="ar"?Vrt():t==="es"?Krt():t==="hi"?Wrt():qrt()}),Xrt=()=>"Choose a different destination. This path is a file, not a folder.",Yrt=()=>"请选择其他位置。此路径是文件,不是文件夹。",Zrt=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Jrt=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",est=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",tst=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",X2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yrt():t==="fa"?Zrt():t==="ar"?Jrt():t==="es"?est():t==="hi"?tst():Xrt()}),nst=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",rst=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",sst=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",ist=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",ast=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",ost=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rst():t==="fa"?sst():t==="ar"?ist():t==="es"?ast():t==="hi"?ost():nst()}),cst=()=>"Blank project",lst=()=>"空白项目",ust=()=>"پروژهٔ خالی",_st=()=>"مشروع فارغ",fst=()=>"Proyecto en blanco",dst=()=>"खाली प्रोजेक्ट",hst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lst():t==="fa"?ust():t==="ar"?_st():t==="es"?fst():t==="hi"?dst():cst()}),pst=()=>"Cancel",mst=()=>"取消",gst=()=>"لغو",vst=()=>"إلغاء",bst=()=>"Cancelar",yst=()=>"रद्द करें",xst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mst():t==="fa"?gst():t==="ar"?vst():t==="es"?bst():t==="hi"?yst():pst()}),wst=()=>"Change",kst=()=>"更改",Sst=()=>"تغییر",Cst=()=>"تغيير",Est=()=>"Cambiar",Nst=()=>"बदलें",zst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kst():t==="fa"?Sst():t==="ar"?Cst():t==="es"?Est():t==="hi"?Nst():wst()}),jst=()=>"Change selected paper",Tst=()=>"更改所选论文",Ast=()=>"تغییر مقالهٔ انتخاب‌شده",Rst=()=>"تغيير الورقة المحددة",Mst=()=>"Cambiar el paper seleccionado",Ost=()=>"चयनित पेपर बदलें",Dst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tst():t==="fa"?Ast():t==="ar"?Rst():t==="es"?Mst():t==="hi"?Ost():jst()}),Lst=()=>"Check out a Git branch before using this folder.",Ist=()=>"使用此文件夹前,请先检出一个 Git 分支。",$st=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",Bst=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Pst=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Fst=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Hst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ist():t==="fa"?$st():t==="ar"?Bst():t==="es"?Pst():t==="hi"?Fst():Lst()}),qst=()=>"Checking project location.",Ust=()=>"正在检查项目位置。",Gst=()=>"در حال بررسی محل پروژه.",Vst=()=>"جارٍ التحقق من موقع المشروع.",Kst=()=>"Comprobando la ubicación del proyecto.",Wst=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ust():t==="fa"?Gst():t==="ar"?Vst():t==="es"?Kst():t==="hi"?Wst():qst()}),Qst=()=>"Existing folder",Xst=()=>"现有文件夹",Yst=()=>"پوشهٔ موجود",Zst=()=>"مجلد موجود",Jst=()=>"Carpeta existente",eit=()=>"मौजूदा फ़ोल्डर",tit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xst():t==="fa"?Yst():t==="ar"?Zst():t==="es"?Jst():t==="hi"?eit():Qst()}),nit=()=>"Experiment branches will be pushed to the remote GitHub repository.",rit=()=>"实验分支将推送到远程 GitHub 仓库。",sit=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",iit=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",ait=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",oit=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",cit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rit():t==="fa"?sit():t==="ar"?iit():t==="es"?ait():t==="hi"?oit():nit()}),lit=()=>"From a paper",uit=()=>"从论文创建",_it=()=>"از یک مقاله",fit=()=>"من ورقة بحثية",dit=()=>"A partir de un paper",hit=()=>"एक पेपर से",pit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uit():t==="fa"?_it():t==="ar"?fit():t==="es"?dit():t==="hi"?hit():lit()}),mit=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",git=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",vit=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",bit=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",yit=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",xit=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",wit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?git():t==="fa"?vit():t==="ar"?bit():t==="es"?yit():t==="hi"?xit():mit()}),kit=()=>"my-research",Sit=()=>"my-research",Cit=()=>"my-research",Eit=()=>"my-research",Nit=()=>"mi-investigacion",zit=()=>"मेरा-शोध",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sit():t==="fa"?Cit():t==="ar"?Eit():t==="es"?Nit():t==="hi"?zit():kit()}),jit=()=>"No papers found. Try an arXiv ID, URL, or a different title.",Tit=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Ait=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",Rit=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",Mit=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Oit=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",Dit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tit():t==="fa"?Ait():t==="ar"?Rit():t==="es"?Mit():t==="hi"?Oit():jit()}),Lit=()=>"No public repository found on alphaXiv",Iit=()=>"在 alphaXiv 上未找到公开仓库",$it=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Bit=()=>"لم يُعثر على مستودع عام على alphaXiv",Pit=()=>"No se encontró ningún repositorio público en alphaXiv",Fit=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Hit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iit():t==="fa"?$it():t==="ar"?Bit():t==="es"?Pit():t==="hi"?Fit():Lit()}),qit=()=>"OpenResearch will start a blank project with this paper's PDF.",Uit=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Git=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Vit=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Kit=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Wit=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Qit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uit():t==="fa"?Git():t==="ar"?Vit():t==="es"?Kit():t==="hi"?Wit():qit()}),Xit=()=>"Paper",Yit=()=>"论文",Zit=()=>"مقاله",Jit=()=>"ورقة بحثية",eat=()=>"Paper",tat=()=>"पेपर",nat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yit():t==="fa"?Zit():t==="ar"?Jit():t==="es"?eat():t==="hi"?tat():Xit()}),rat=()=>"Project location",sat=()=>"项目位置",iat=()=>"محل پروژه",aat=()=>"موقع المشروع",oat=()=>"Ubicación del proyecto",cat=()=>"प्रोजेक्ट स्थान",Y2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sat():t==="fa"?iat():t==="ar"?aat():t==="es"?oat():t==="hi"?cat():rat()}),lat=()=>"Project name",uat=()=>"项目名称",_at=()=>"نام پروژه",fat=()=>"اسم المشروع",dat=()=>"Nombre del proyecto",hat=()=>"प्रोजेक्ट नाम",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uat():t==="fa"?_at():t==="ar"?fat():t==="es"?dat():t==="hi"?hat():lat()}),pat=()=>"Search for a paper by arXiv ID, URL, or title",mat=()=>"按 arXiv ID、网址或标题搜索论文",gat=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",vat=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",bat=()=>"Busca un paper por ID de arXiv, URL o título",yat=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",xat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mat():t==="fa"?gat():t==="ar"?vat():t==="es"?bat():t==="hi"?yat():pat()}),wat=()=>"Sync experiments to GitHub",kat=()=>"将实验同步到 GitHub",Sat=()=>"همگام‌سازی آزمایش‌ها با GitHub",Cat=()=>"مزامنة التجارب مع GitHub",Eat=()=>"Sincronizar experimentos con GitHub",Nat=()=>"प्रयोग GitHub पर सिंक करें",zat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kat():t==="fa"?Sat():t==="ar"?Cat():t==="es"?Eat():t==="hi"?Nat():wat()}),jat=()=>"That folder no longer exists. Choose it again.",Tat=()=>"该文件夹已不存在。请重新选择。",Aat=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",Rat=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",Mat=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",Oat=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",Dat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tat():t==="fa"?Aat():t==="ar"?Rat():t==="es"?Mat():t==="hi"?Oat():jat()}),Lat=()=>"The selected folder contains an invalid Git repository.",Iat=()=>"所选文件夹包含无效的 Git 仓库。",$at=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",Bat=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Pat=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Fat=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Hat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iat():t==="fa"?$at():t==="ar"?Bat():t==="es"?Pat():t==="hi"?Fat():Lat()}),qat=()=>"The selected path is not a folder.",Uat=()=>"所选路径不是文件夹。",Gat=()=>"مسیر انتخاب‌شده پوشه نیست.",Vat=()=>"المسار المحدد ليس مجلدًا.",Kat=()=>"La ruta seleccionada no es una carpeta.",Wat=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Qat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uat():t==="fa"?Gat():t==="ar"?Vat():t==="es"?Kat():t==="hi"?Wat():qat()}),Xat=e=>`Checking ${e==null?void 0:e.repository}.`,Yat=e=>`正在检查 ${e==null?void 0:e.repository}。`,Zat=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Jat=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,eot=e=>`Comprobando ${e==null?void 0:e.repository}.`,tot=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,not=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yat(e):t==="fa"?Zat(e):t==="ar"?Jat(e):t==="es"?eot(e):t==="hi"?tot(e):Xat(e)}),rot=e=>`Creates ${e==null?void 0:e.repository}.`,sot=e=>`将创建 ${e==null?void 0:e.repository}。`,iot=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,aot=e=>`ينشئ ${e==null?void 0:e.repository}.`,oot=e=>`Crea ${e==null?void 0:e.repository}.`,cot=e=>`${e==null?void 0:e.repository} बनाता है।`,lot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sot(e):t==="fa"?iot(e):t==="ar"?aot(e):t==="es"?oot(e):t==="hi"?cot(e):rot(e)}),uot=e=>`Pushes to ${e==null?void 0:e.repository}.`,_ot=e=>`将推送到 ${e==null?void 0:e.repository}。`,fot=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,dot=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,hot=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,pot=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,mot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_ot(e):t==="fa"?fot(e):t==="ar"?dot(e):t==="es"?hot(e):t==="hi"?pot(e):uot(e)}),got=()=>"Project location is required.",vot=()=>"必须填写项目位置。",bot=()=>"محل پروژه الزامی است.",yot=()=>"موقع المشروع مطلوب.",xot=()=>"La ubicación del proyecto es obligatoria.",wot=()=>"प्रोजेक्ट स्थान ज़रूरी है।",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vot():t==="fa"?bot():t==="ar"?yot():t==="es"?xot():t==="hi"?wot():got()}),kot=()=>"Choose a different destination. The paper repository needs a new or empty folder.",Sot=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",Cot=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",Eot=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",Not=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",zot=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sot():t==="fa"?Cot():t==="ar"?Eot():t==="es"?Not():t==="hi"?zot():kot()}),jot=()=>"A linked public code repository is cloned without credentials.",Tot=()=>"关联的公开代码仓库无需凭据即可克隆。",Aot=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",Rot=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",Mot=()=>"El repositorio de código público vinculado se clona sin credenciales.",Oot=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",Dot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tot():t==="fa"?Aot():t==="ar"?Rot():t==="es"?Mot():t==="hi"?Oot():jot()}),Lot=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Iot=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,$ot=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,Bot=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,Pot=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Fot=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Hot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iot(e):t==="fa"?$ot(e):t==="ar"?Bot(e):t==="es"?Pot(e):t==="hi"?Fot(e):Lot(e)}),qot=()=>"Searching alphaXiv…",Uot=()=>"正在搜索 alphaXiv…",Got=()=>"در حال جست‌وجوی alphaXiv…",Vot=()=>"جارٍ البحث في alphaXiv…",Kot=()=>"Buscando en alphaXiv…",Wot=()=>"alphaXiv खोजा जा रहा है…",Qot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uot():t==="fa"?Got():t==="ar"?Vot():t==="es"?Kot():t==="hi"?Wot():qot()}),Xot=()=>"Use folder",Yot=()=>"使用文件夹",Zot=()=>"استفاده از پوشه",Jot=()=>"استخدام المجلد",ect=()=>"Usar carpeta",tct=()=>"फ़ोल्डर इस्तेमाल करें",nct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yot():t==="fa"?Zot():t==="ar"?Jot():t==="es"?ect():t==="hi"?tct():Xot()}),rct=()=>"Can’t reach OpenResearch. This page is no longer live.",sct=()=>"无法连接 OpenResearch。此页面已不再实时同步。",ict=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",act=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",oct=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",cct=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",o3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sct():t==="fa"?ict():t==="ar"?act():t==="es"?oct():t==="hi"?cct():rct()}),lct=()=>"A workspace for your research agents",uct=()=>"面向研究智能体的工作空间",_ct=()=>"فضای کاری برای عامل‌های پژوهشی شما",fct=()=>"مساحة عمل لوكلاء بحثك",dct=()=>"Un espacio de trabajo para tus agentes de investigación",hct=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",pct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uct():t==="fa"?_ct():t==="ar"?fct():t==="es"?dct():t==="hi"?hct():lct()}),mct=()=>"Add papers that represent your research interests, including papers by other authors.",gct=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",vct=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",bct=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",yct=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",xct=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",wct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gct():t==="fa"?vct():t==="ar"?bct():t==="es"?yct():t==="hi"?xct():mct()}),kct=()=>"API key",Sct=()=>"API 密钥",Cct=()=>"کلید API",Ect=()=>"مفتاح API",Nct=()=>"Clave de API",zct=()=>"API की",Kk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sct():t==="fa"?Cct():t==="ar"?Ect():t==="es"?Nct():t==="hi"?zct():kct()}),jct=()=>"AI/ML",Tct=()=>"人工智能与机器学习",Act=()=>"هوش مصنوعی و یادگیری ماشین",Rct=()=>"الذكاء الاصطناعي/تعلّم الآلة",Mct=()=>"IA/ML",Oct=()=>"AI/ML",Dct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tct():t==="fa"?Act():t==="ar"?Rct():t==="es"?Mct():t==="hi"?Oct():jct()}),Lct=()=>"Biology",Ict=()=>"生物学",$ct=()=>"زیست‌شناسی",Bct=()=>"الأحياء",Pct=()=>"Biología",Fct=()=>"जीव विज्ञान",Hct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ict():t==="fa"?$ct():t==="ar"?Bct():t==="es"?Pct():t==="hi"?Fct():Lct()}),qct=()=>"Other",Uct=()=>"其他",Gct=()=>"سایر",Vct=()=>"أخرى",Kct=()=>"Otra",Wct=()=>"अन्य",Qct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uct():t==="fa"?Gct():t==="ar"?Vct():t==="es"?Kct():t==="hi"?Wct():qct()}),Xct=()=>"Physics",Yct=()=>"物理学",Zct=()=>"فیزیک",Jct=()=>"الفيزياء",elt=()=>"Física",tlt=()=>"भौतिकी",nlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yct():t==="fa"?Zct():t==="ar"?Jct():t==="es"?elt():t==="hi"?tlt():Xct()}),rlt=()=>"Back",slt=()=>"返回",ilt=()=>"بازگشت",alt=()=>"رجوع",olt=()=>"Atrás",clt=()=>"वापस",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?slt():t==="fa"?ilt():t==="ar"?alt():t==="es"?olt():t==="hi"?clt():rlt()}),llt=()=>"Check failed",ult=()=>"检查失败",_lt=()=>"بررسی ناموفق بود",flt=()=>"فشل الفحص",dlt=()=>"Error en la comprobación",hlt=()=>"जाँच विफल",plt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ult():t==="fa"?_lt():t==="ar"?flt():t==="es"?dlt():t==="hi"?hlt():llt()}),mlt=()=>"Checking",glt=()=>"正在检查",vlt=()=>"در حال بررسی",blt=()=>"جارٍ الفحص",ylt=()=>"Comprobando",xlt=()=>"जाँचा जा रहा है",V_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?glt():t==="fa"?vlt():t==="ar"?blt():t==="es"?ylt():t==="hi"?xlt():mlt()}),wlt=()=>"Checking Git…",klt=()=>"正在检查 Git…",Slt=()=>"در حال بررسی Git…",Clt=()=>"جارٍ فحص Git…",Elt=()=>"Comprobando Git…",Nlt=()=>"Git जाँचा जा रहा है…",zlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?klt():t==="fa"?Slt():t==="ar"?Clt():t==="es"?Elt():t==="hi"?Nlt():wlt()}),jlt=()=>"Choose a coding agent",Tlt=()=>"选择编程智能体",Alt=()=>"یک عامل کدنویسی انتخاب کنید",Rlt=()=>"اختر وكيل برمجة",Mlt=()=>"Elige un agente de programación",Olt=()=>"एक कोडिंग एजेंट चुनें",Dlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tlt():t==="fa"?Alt():t==="ar"?Rlt():t==="es"?Mlt():t==="hi"?Olt():jlt()}),Llt=()=>"Choose a coding agent to continue.",Ilt=()=>"选择一个编程智能体以继续。",$lt=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Blt=()=>"اختر وكيل برمجة للمتابعة.",Plt=()=>"Elige un agente de programación para continuar.",Flt=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Hlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ilt():t==="fa"?$lt():t==="ar"?Blt():t==="es"?Plt():t==="hi"?Flt():Llt()}),qlt=()=>"Choose another coding agent",Ult=()=>"选择其他编程智能体",Glt=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Vlt=()=>"اختيار وكيل برمجة آخر",Klt=()=>"Elegir otro agente de programación",Wlt=()=>"दूसरा कोडिंग एजेंट चुनें",Qlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ult():t==="fa"?Glt():t==="ar"?Vlt():t==="es"?Klt():t==="hi"?Wlt():qlt()}),Xlt=()=>"Choose at least one research area to continue.",Ylt=()=>"请至少选择一个研究领域后再继续。",Zlt=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Jlt=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",eut=()=>"Elige al menos un área de investigación para continuar.",tut=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",nut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ylt():t==="fa"?Zlt():t==="ar"?Jlt():t==="es"?eut():t==="hi"?tut():Xlt()}),rut=()=>"Choose one or more.",sut=()=>"请选择一项或多项。",iut=()=>"یک یا چند مورد را انتخاب کنید.",aut=()=>"اختر واحدًا أو أكثر.",out=()=>"Elige una o varias.",cut=()=>"एक या अधिक चुनें।",lut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sut():t==="fa"?iut():t==="ar"?aut():t==="es"?out():t==="hi"?cut():rut()}),uut=()=>"Choose your preferred coding agent",_ut=()=>"请选择首选编程智能体",fut=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",dut=()=>"اختر وكيل البرمجة المفضّل لديك",hut=()=>"Elige tu agente de programación preferido",put=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",mut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ut():t==="fa"?fut():t==="ar"?dut():t==="es"?hut():t==="hi"?put():uut()}),gut=()=>"Consolidate your research",vut=()=>"集中管理研究",but=()=>"پژوهش خود را یکپارچه کنید",yut=()=>"وحّد أبحاثك",xut=()=>"Consolida tu investigación",wut=()=>"अपने शोध को एक जगह लाएं",kut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vut():t==="fa"?but():t==="ar"?yut():t==="es"?xut():t==="hi"?wut():gut()}),Sut=()=>"Continue",Cut=()=>"继续",Eut=()=>"ادامه",Nut=()=>"متابعة",zut=()=>"Continuar",jut=()=>"जारी रखें",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cut():t==="fa"?Eut():t==="ar"?Nut():t==="es"?zut():t==="hi"?jut():Sut()}),Tut=()=>"Describe your research area to continue.",Aut=()=>"请描述你的研究领域后再继续。",Rut=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",Mut=()=>"صِف مجالك البحثي للمتابعة.",Out=()=>"Describe tu área de investigación para continuar.",Dut=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",Lut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aut():t==="fa"?Rut():t==="ar"?Mut():t==="es"?Out():t==="hi"?Dut():Tut()}),Iut=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",$ut=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",But=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Put=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Fut=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Hut=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",qut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ut():t==="fa"?But():t==="ar"?Put():t==="es"?Fut():t==="hi"?Hut():Iut()}),Uut=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Gut=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Vut=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Kut=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",Wut=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",Qut=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",Xut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gut():t==="fa"?Vut():t==="ar"?Kut():t==="es"?Wut():t==="hi"?Qut():Uut()}),Yut=()=>"Error details",Zut=()=>"错误详情",Jut=()=>"جزئیات خطا",e_t=()=>"تفاصيل الخطأ",t_t=()=>"Detalles del error",n_t=()=>"त्रुटि विवरण",r_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zut():t==="fa"?Jut():t==="ar"?e_t():t==="es"?t_t():t==="hi"?n_t():Yut()}),s_t=()=>"Everything stays local",i_t=()=>"一切都保留在本地",a_t=()=>"همه‌چیز محلی می‌ماند",o_t=()=>"كل شيء يبقى محليًا",c_t=()=>"Todo se queda en local",l_t=()=>"सब कुछ लोकल ही रहता है",u_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i_t():t==="fa"?a_t():t==="ar"?o_t():t==="es"?c_t():t==="hi"?l_t():s_t()}),__t=()=>"Get started",f_t=()=>"开始使用",d_t=()=>"شروع",h_t=()=>"ابدأ الآن",p_t=()=>"Empezar",m_t=()=>"शुरू करें",g_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f_t():t==="fa"?d_t():t==="ar"?h_t():t==="es"?p_t():t==="hi"?m_t():__t()}),v_t=()=>"Git is required for local experiments. Install Git, then re-check.",b_t=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",y_t=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",x_t=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",w_t=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",k_t=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_t():t==="fa"?y_t():t==="ar"?x_t():t==="es"?w_t():t==="hi"?k_t():v_t()}),S_t=()=>"Ground your agents",C_t=()=>"为智能体提供可靠依据",E_t=()=>"عامل‌هایتان را به منابع متصل کنید",N_t=()=>"زوّد وكلاءك بأساس بحثي",z_t=()=>"Dale contexto a tus agentes",j_t=()=>"अपने एजेंटों को आधार दें",T_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C_t():t==="fa"?E_t():t==="ar"?N_t():t==="es"?z_t():t==="hi"?j_t():S_t()}),A_t=()=>"Install broken",R_t=()=>"安装损坏",M_t=()=>"نصب خراب است",O_t=()=>"التثبيت معطوب",D_t=()=>"Instalación dañada",L_t=()=>"इंस्टॉल खराब है",I_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R_t():t==="fa"?M_t():t==="ar"?O_t():t==="es"?D_t():t==="hi"?L_t():A_t()}),$_t=()=>"Install Git to continue",B_t=()=>"请安装 Git 后再继续",P_t=()=>"برای ادامه Git را نصب کنید",F_t=()=>"ثبّت Git للمتابعة",H_t=()=>"Instala Git para continuar",q_t=()=>"जारी रखने के लिए Git इंस्टॉल करें",U_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B_t():t==="fa"?P_t():t==="ar"?F_t():t==="es"?H_t():t==="hi"?q_t():$_t()}),G_t=()=>"Loading account details…",V_t=()=>"正在加载账户信息…",K_t=()=>"در حال بارگذاری اطلاعات حساب…",W_t=()=>"جارٍ تحميل تفاصيل الحساب…",Q_t=()=>"Cargando los datos de la cuenta…",X_t=()=>"खाता विवरण लोड हो रहा है…",Y_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V_t():t==="fa"?K_t():t==="ar"?W_t():t==="es"?Q_t():t==="hi"?X_t():G_t()}),Z_t=()=>"Local Git",J_t=()=>"本地 Git",eft=()=>"Git محلی",tft=()=>"Git محلي",nft=()=>"Git local",rft=()=>"लोकल Git",sft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J_t():t==="fa"?eft():t==="ar"?tft():t==="es"?nft():t==="hi"?rft():Z_t()}),ift=()=>"Install needed",aft=()=>"需要安装",oft=()=>"نیاز به نصب",cft=()=>"التثبيت مطلوب",lft=()=>"No detectado",uft=()=>"इंस्टॉल ज़रूरी है",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aft():t==="fa"?oft():t==="ar"?cft():t==="es"?lft():t==="hi"?uft():ift()}),_ft=()=>"Not found",fft=()=>"未找到",dft=()=>"پیدا نشد",hft=()=>"غير موجود",pft=()=>"No encontrado",mft=()=>"नहीं मिला",GD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fft():t==="fa"?dft():t==="ar"?hft():t==="es"?pft():t==="hi"?mft():_ft()}),gft=()=>"Signed out",vft=()=>"未登录",bft=()=>"وارد نشده",yft=()=>"غير مسجل الدخول",xft=()=>"Sin iniciar sesión",wft=()=>"साइन आउट",VD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vft():t==="fa"?bft():t==="ar"?yft():t==="es"?xft():t==="hi"?wft():gft()}),kft=()=>"OpenResearch uses a coding agent already installed on this machine.",Sft=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",Cft=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",Eft=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",Nft=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",zft=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",jft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sft():t==="fa"?Cft():t==="ar"?Eft():t==="es"?Nft():t==="hi"?zft():kft()}),Tft=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",Aft=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",Rft=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",Mft=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",Oft=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",Dft=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",Lft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aft():t==="fa"?Rft():t==="ar"?Mft():t==="es"?Oft():t==="hi"?Dft():Tft()}),Ift=()=>"Other research area",$ft=()=>"其他研究领域",Bft=()=>"حوزهٔ پژوهشی دیگر",Pft=()=>"مجال بحثي آخر",Fft=()=>"Otra área de investigación",Hft=()=>"अन्य शोध क्षेत्र",qft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ft():t==="fa"?Bft():t==="ar"?Pft():t==="es"?Fft():t==="hi"?Hft():Ift()}),Uft=()=>"Re-check",Gft=()=>"重新检查",Vft=()=>"بررسی دوباره",Kft=()=>"إعادة الفحص",Wft=()=>"Volver a comprobar",Qft=()=>"फिर से जाँचें",Nv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gft():t==="fa"?Vft():t==="ar"?Kft():t==="es"?Wft():t==="hi"?Qft():Uft()}),Xft=()=>"Ready",Yft=()=>"已就绪",Zft=()=>"آماده",Jft=()=>"جاهز",edt=()=>"Listo",tdt=()=>"तैयार",Wk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yft():t==="fa"?Zft():t==="ar"?Jft():t==="es"?edt():t==="hi"?tdt():Xft()}),ndt=()=>"Re-check Git before continuing",rdt=()=>"请重新检查 Git 后再继续",sdt=()=>"پیش از ادامه Git را دوباره بررسی کنید",idt=()=>"أعد فحص Git قبل المتابعة",adt=()=>"Vuelve a comprobar Git antes de continuar",odt=()=>"जारी रखने से पहले Git फिर से जाँचें",cdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rdt():t==="fa"?sdt():t==="ar"?idt():t==="es"?adt():t==="hi"?odt():ndt()}),ldt=()=>"Representative papers",udt=()=>"代表性论文",_dt=()=>"مقاله‌های شاخص",fdt=()=>"أوراق تمثّل اهتماماتك البحثية",ddt=()=>"Papers representativos",hdt=()=>"प्रतिनिधि पेपर",pdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?udt():t==="fa"?_dt():t==="ar"?fdt():t==="es"?ddt():t==="hi"?hdt():ldt()}),mdt=()=>"Research background",gdt=()=>"研究背景",vdt=()=>"پیشینهٔ پژوهشی",bdt=()=>"الخلفية البحثية",ydt=()=>"Trayectoria de investigación",xdt=()=>"शोध पृष्ठभूमि",wdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gdt():t==="fa"?vdt():t==="ar"?bdt():t==="es"?ydt():t==="hi"?xdt():mdt()}),kdt=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",Sdt=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",Cdt=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",Edt=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",Ndt=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",zdt=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",Z2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sdt():t==="fa"?Cdt():t==="ar"?Edt():t==="es"?Ndt():t==="hi"?zdt():kdt()}),jdt=()=>"Search alphaXiv by title to link a paper…",Tdt=()=>"按标题搜索 alphaXiv 以关联论文…",Adt=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",Rdt=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",Mdt=()=>"Busca en alphaXiv por título para vincular un paper…",Odt=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",Ddt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tdt():t==="fa"?Adt():t==="ar"?Rdt():t==="es"?Mdt():t==="hi"?Odt():jdt()}),Ldt=()=>"Searching alphaXiv…",Idt=()=>"正在搜索 alphaXiv…",$dt=()=>"در حال جست‌وجوی alphaXiv…",Bdt=()=>"جارٍ البحث في alphaXiv…",Pdt=()=>"Buscando en alphaXiv…",Fdt=()=>"alphaXiv खोजा जा रहा है…",Hdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Idt():t==="fa"?$dt():t==="ar"?Bdt():t==="es"?Pdt():t==="hi"?Fdt():Ldt()}),qdt=()=>"Selected",Udt=()=>"已选择",Gdt=()=>"انتخاب‌شده",Vdt=()=>"محدد",Kdt=()=>"Seleccionado",Wdt=()=>"चयनित",Qdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Udt():t==="fa"?Gdt():t==="ar"?Vdt():t==="es"?Kdt():t==="hi"?Wdt():qdt()}),Xdt=()=>"Local model unavailable",Ydt=()=>"本地模型不可用",Zdt=()=>"مدل محلی در دسترس نیست",Jdt=()=>"النموذج المحلي غير متاح",eht=()=>"Modelo local no disponible",tht=()=>"लोकल मॉडल उपलब्ध नहीं",KD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ydt():t==="fa"?Zdt():t==="ar"?Jdt():t==="es"?eht():t==="hi"?tht():Xdt()}),nht=()=>"Setting things up…",rht=()=>"正在设置…",sht=()=>"در حال راه‌اندازی…",iht=()=>"جارٍ التهيئة…",aht=()=>"Preparando todo…",oht=()=>"सेट अप किया जा रहा है…",cht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rht():t==="fa"?sht():t==="ar"?iht():t==="es"?aht():t==="hi"?oht():nht()}),lht=()=>"Connect a local model or sign in to a coding agent to continue",uht=()=>"连接本地模型或登录编码智能体以继续",_ht=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",fht=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",dht=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",hht=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",pht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uht():t==="fa"?_ht():t==="ar"?fht():t==="es"?dht():t==="hi"?hht():lht()}),mht=()=>"Connect a local model or sign in to an agent to continue.",ght=()=>"连接本地模型或登录一个智能体以继续。",vht=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",bht=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",yht=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",xht=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",wht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ght():t==="fa"?vht():t==="ar"?bht():t==="es"?yht():t==="hi"?xht():mht()}),kht=()=>"Signed in",Sht=()=>"已登录",Cht=()=>"وارد شده",Eht=()=>"تم تسجيل الدخول",Nht=()=>"Sesión iniciada",zht=()=>"साइन इन",jht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sht():t==="fa"?Cht():t==="ar"?Eht():t==="es"?Nht():t==="hi"?zht():kht()}),Tht=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",Aht=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",Rht=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",Mht=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex ليستند وكلاؤك إلى أحدث الأبحاث.",Oht=()=>"Conectado a alphaXiv, bioRxiv y OpenAlex para que tus agentes trabajen con la investigación más reciente.",Dht=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv और OpenAlex से कनेक्ट किया गया।",Lht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aht():t==="fa"?Rht():t==="ar"?Mht():t==="es"?Oht():t==="hi"?Dht():Tht()}),Iht=()=>"· Step 1 of 2",$ht=()=>"· 第 1 步,共 2 步",Bht=()=>"· مرحلهٔ ۱ از ۲",Pht=()=>"· الخطوة 1 من 2",Fht=()=>"· Paso 1 de 2",Hht=()=>"· चरण 1 / 2",qht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ht():t==="fa"?Bht():t==="ar"?Pht():t==="es"?Fht():t==="hi"?Hht():Iht()}),Uht=()=>"· Step 2 of 2",Ght=()=>"· 第 2 步,共 2 步",Vht=()=>"· مرحلهٔ ۲ از ۲",Kht=()=>"· الخطوة 2 من 2",Wht=()=>"· Paso 2 de 2",Qht=()=>"· चरण 2 / 2",Xht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ght():t==="fa"?Vht():t==="ar"?Kht():t==="es"?Wht():t==="hi"?Qht():Uht()}),Yht=()=>"Tell us about your research",Zht=()=>"介绍一下你的研究",Jht=()=>"از پژوهش خود بگویید",ept=()=>"أخبرنا عن بحثك",tpt=()=>"Cuéntanos sobre tu investigación",npt=()=>"हमें अपने शोध के बारे में बताएं",rpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zht():t==="fa"?Jht():t==="ar"?ept():t==="es"?tpt():t==="hi"?npt():Yht()}),spt=()=>"Tell us your other research area",ipt=()=>"告诉我们你的其他研究领域",apt=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",opt=()=>"أخبرنا عن مجالك البحثي الآخر",cpt=()=>"Cuéntanos cuál es tu otra área de investigación",lpt=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",upt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ipt():t==="fa"?apt():t==="ar"?opt():t==="es"?cpt():t==="hi"?lpt():spt()}),_pt=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",fpt=()=>"在一处跟踪实验、产物、算力、技能和代码。",dpt=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",hpt=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",ppt=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",mpt=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",gpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fpt():t==="fa"?dpt():t==="ar"?hpt():t==="es"?ppt():t==="hi"?mpt():_pt()}),vpt=()=>"Unable to verify",bpt=()=>"无法验证",ypt=()=>"تأیید ممکن نیست",xpt=()=>"تعذّر التحقق",wpt=()=>"No se pudo verificar",kpt=()=>"सत्यापित नहीं हो सका",Spt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bpt():t==="fa"?ypt():t==="ar"?xpt():t==="es"?wpt():t==="hi"?kpt():vpt()}),Cpt=()=>"Update required",Ept=()=>"需要更新",Npt=()=>"نیازمند به‌روزرسانی",zpt=()=>"مطلوب تحديث",jpt=()=>"Actualización necesaria",Tpt=()=>"अपडेट ज़रूरी है",Apt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ept():t==="fa"?Npt():t==="ar"?zpt():t==="es"?jpt():t==="hi"?Tpt():Cpt()}),Rpt=()=>"Waiting for the Git check",Mpt=()=>"正在等待 Git 检查",Opt=()=>"در انتظار بررسی Git",Dpt=()=>"في انتظار فحص Git",Lpt=()=>"Esperando la comprobación de Git",Ipt=()=>"Git जाँच का इंतज़ार है",$pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mpt():t==="fa"?Opt():t==="ar"?Dpt():t==="es"?Lpt():t==="hi"?Ipt():Rpt()}),Bpt=()=>"Waiting for the local tool checks",Ppt=()=>"正在等待本地工具检查",Fpt=()=>"در انتظار بررسی ابزارهای محلی",Hpt=()=>"في انتظار فحوص الأدوات المحلية",qpt=()=>"Esperando las comprobaciones de las herramientas locales",Upt=()=>"लोकल टूल जाँच का इंतज़ार है",Gpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ppt():t==="fa"?Fpt():t==="ar"?Hpt():t==="es"?qpt():t==="hi"?Upt():Bpt()}),Vpt=()=>"What areas are you interested in?",Kpt=()=>"你对哪些领域感兴趣?",Wpt=()=>"به چه حوزه‌هایی علاقه دارید؟",Qpt=()=>"ما المجالات التي تهتم بها؟",Xpt=()=>"¿Qué áreas te interesan?",Ypt=()=>"आपकी रुचि किन क्षेत्रों में है?",Zpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kpt():t==="fa"?Wpt():t==="ar"?Qpt():t==="es"?Xpt():t==="hi"?Ypt():Vpt()}),Jpt=()=>"Your code, data, and experiment history stay on your machine.",e0t=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",t0t=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",n0t=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",r0t=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",s0t=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",i0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e0t():t==="fa"?t0t():t==="ar"?n0t():t==="es"?r0t():t==="hi"?s0t():Jpt()}),a0t=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",o0t=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",c0t=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",l0t=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",u0t=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",_0t=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",f0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o0t():t==="fa"?c0t():t==="ar"?l0t():t==="es"?u0t():t==="hi"?_0t():a0t()}),d0t=()=>"Add cookie",h0t=()=>"添加 cookie",p0t=()=>"افزودن کوکی",m0t=()=>"إضافة ملف تعريف الارتباط",g0t=()=>"Añadir cookie",v0t=()=>"कुकी जोड़ें",b0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h0t():t==="fa"?p0t():t==="ar"?m0t():t==="es"?g0t():t==="hi"?v0t():d0t()}),y0t=()=>"Changed here and on Overleaf — choose which copy to keep",x0t=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",w0t=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",k0t=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",S0t=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",C0t=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",E0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x0t():t==="fa"?w0t():t==="ar"?k0t():t==="es"?S0t():t==="hi"?C0t():y0t()}),N0t=()=>"Create a token ↗",z0t=()=>"创建令牌 ↗",j0t=()=>"ساخت توکن ↗",T0t=()=>"إنشاء رمز ↗",A0t=()=>"Crear un token ↗",R0t=()=>"एक टोकन बनाएं ↗",M0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z0t():t==="fa"?j0t():t==="ar"?T0t():t==="es"?A0t():t==="hi"?R0t():N0t()}),O0t=()=>"Overleaf Git token",D0t=()=>"Overleaf Git 令牌",L0t=()=>"توکن Git در Overleaf",I0t=()=>"رمز Git لـ Overleaf",$0t=()=>"Token de Git de Overleaf",B0t=()=>"Overleaf Git टोकन",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D0t():t==="fa"?L0t():t==="ar"?I0t():t==="es"?$0t():t==="hi"?B0t():O0t()}),P0t=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",F0t=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",H0t=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",q0t=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",U0t=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",G0t=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",V0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F0t():t==="fa"?H0t():t==="ar"?q0t():t==="es"?U0t():t==="hi"?G0t():P0t()}),K0t=()=>"Import from browser",W0t=()=>"从浏览器导入",Q0t=()=>"وارد کردن از مرورگر",X0t=()=>"الاستيراد من المتصفح",Y0t=()=>"Importar desde el navegador",Z0t=()=>"ब्राउज़र से इंपोर्ट करें",J0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W0t():t==="fa"?Q0t():t==="ar"?X0t():t==="es"?Y0t():t==="hi"?Z0t():K0t()}),emt=()=>"In step with Overleaf",tmt=()=>"已与 Overleaf 同步",nmt=()=>"با Overleaf همگام است",rmt=()=>"متزامن مع Overleaf",smt=()=>"Sincronizado con Overleaf",imt=()=>"Overleaf के साथ मेल में",WD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tmt():t==="fa"?nmt():t==="ar"?rmt():t==="es"?smt():t==="hi"?imt():emt()}),amt=()=>"The last sync did not finish.",omt=()=>"上次同步未完成。",cmt=()=>"آخرین همگام‌سازی کامل نشد.",lmt=()=>"لم تكتمل آخر مزامنة.",umt=()=>"La última sincronización no terminó.",_mt=()=>"पिछला सिंक पूरा नहीं हुआ।",fmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?omt():t==="fa"?cmt():t==="ar"?lmt():t==="es"?umt():t==="hi"?_mt():amt()}),dmt=()=>"Link and sync",hmt=()=>"关联并同步",pmt=()=>"پیوند و همگام‌سازی",mmt=()=>"الربط والمزامنة",gmt=()=>"Vincular y sincronizar",vmt=()=>"लिंक करें और सिंक करें",bmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hmt():t==="fa"?pmt():t==="ar"?mmt():t==="es"?gmt():t==="hi"?vmt():dmt()}),ymt=()=>"Connecting to Overleaf…",xmt=()=>"正在连接 Overleaf…",wmt=()=>"در حال اتصال به Overleaf…",kmt=()=>"جارٍ الاتصال بـ Overleaf…",Smt=()=>"Conectando con Overleaf…",Cmt=()=>"Overleaf से कनेक्ट हो रहा है…",Emt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xmt():t==="fa"?wmt():t==="ar"?kmt():t==="es"?Smt():t==="hi"?Cmt():ymt()}),Nmt=()=>"Edits are live on Overleaf",zmt=()=>"编辑已在 Overleaf 实时同步",jmt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",Tmt=()=>"تظهر التعديلات فورًا على Overleaf",Amt=()=>"Los cambios se sincronizan en directo con Overleaf",Rmt=()=>"बदलाव Overleaf पर लाइव हैं",Mmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zmt():t==="fa"?jmt():t==="ar"?Tmt():t==="es"?Amt():t==="hi"?Rmt():Nmt()}),Omt=()=>"Retry",Dmt=()=>"重试",Lmt=()=>"تلاش دوباره",Imt=()=>"إعادة المحاولة",$mt=()=>"Reintentar",Bmt=()=>"फिर से कोशिश करें",Pmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dmt():t==="fa"?Lmt():t==="ar"?Imt():t==="es"?$mt():t==="hi"?Bmt():Omt()}),Fmt=()=>"Live sync stopped.",Hmt=()=>"实时同步已停止。",qmt=()=>"همگام‌سازی زنده متوقف شد.",Umt=()=>"توقفت المزامنة المباشرة.",Gmt=()=>"Sincronización en directo detenida.",Vmt=()=>"लाइव सिंक रुक गया।",Kmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hmt():t==="fa"?qmt():t==="ar"?Umt():t==="es"?Gmt():t==="hi"?Vmt():Fmt()}),Wmt=()=>"Live sync starts once the paper is in step with Overleaf.",Qmt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Xmt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Ymt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Zmt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Jmt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",egt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qmt():t==="fa"?Xmt():t==="ar"?Ymt():t==="es"?Zmt():t==="hi"?Jmt():Wmt()}),tgt=()=>"My projects ↗",ngt=()=>"我的项目 ↗",rgt=()=>"پروژه‌های من ↗",sgt=()=>"مشاريعي ↗",igt=()=>"Mis proyectos ↗",agt=()=>"मेरे प्रोजेक्ट ↗",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ngt():t==="fa"?rgt():t==="ar"?sgt():t==="es"?igt():t==="hi"?agt():tgt()}),ogt=()=>"Nothing could be synced.",cgt=()=>"没有内容可以同步。",lgt=()=>"هیچ موردی قابل همگام‌سازی نبود.",ugt=()=>"تعذّرت مزامنة أي شيء.",_gt=()=>"No se pudo sincronizar nada.",fgt=()=>"कुछ भी सिंक नहीं हो सका।",dgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cgt():t==="fa"?lgt():t==="ar"?ugt():t==="es"?_gt():t==="hi"?fgt():ogt()}),hgt=()=>"Open Overleaf ↗",pgt=()=>"打开 Overleaf ↗",mgt=()=>"باز کردن Overleaf ↗",ggt=()=>"فتح Overleaf ↗",vgt=()=>"Abrir Overleaf ↗",bgt=()=>"Overleaf खोलें ↗",ygt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pgt():t==="fa"?mgt():t==="ar"?ggt():t==="es"?vgt():t==="hi"?bgt():hgt()}),xgt=()=>"Cancel",wgt=()=>"取消",kgt=()=>"لغو",Sgt=()=>"إلغاء",Cgt=()=>"Cancelar",Egt=()=>"रद्द करें",QD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wgt():t==="fa"?kgt():t==="ar"?Sgt():t==="es"?Cgt():t==="hi"?Egt():xgt()}),Ngt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",zgt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",jgt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Tgt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",Agt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",Rgt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",Mgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zgt():t==="fa"?jgt():t==="ar"?Tgt():t==="es"?Agt():t==="hi"?Rgt():Ngt()}),Ogt=()=>"Keep this copy",Dgt=()=>"保留此副本",Lgt=()=>"نگه داشتن این نسخه",Igt=()=>"الاحتفاظ بهذه النسخة",$gt=()=>"Conservar esta copia",Bgt=()=>"यह कॉपी रखें",Pgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dgt():t==="fa"?Lgt():t==="ar"?Igt():t==="es"?$gt():t==="hi"?Bgt():Ogt()}),Fgt=()=>"Open in Overleaf",Hgt=()=>"在 Overleaf 中打开",qgt=()=>"باز کردن در Overleaf",Ugt=()=>"فتح في Overleaf",Ggt=()=>"Abrir en Overleaf",Vgt=()=>"Overleaf में खोलें",Kgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hgt():t==="fa"?qgt():t==="ar"?Ugt():t==="es"?Ggt():t==="hi"?Vgt():Fgt()}),Wgt=()=>"Replace the Overleaf token",Qgt=()=>"替换 Overleaf 令牌",Xgt=()=>"جایگزینی توکن Overleaf",Ygt=()=>"استبدال رمز Overleaf",Zgt=()=>"Reemplazar el token de Overleaf",Jgt=()=>"Overleaf टोकन बदलें",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qgt():t==="fa"?Xgt():t==="ar"?Ygt():t==="es"?Zgt():t==="hi"?Jgt():Wgt()}),e1t=()=>"Sync files",t1t=()=>"同步文件",n1t=()=>"همگام‌سازی فایل‌ها",r1t=()=>"مزامنة الملفات",s1t=()=>"Sincronizar archivos",i1t=()=>"फ़ाइलें सिंक करें",a1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t1t():t==="fa"?n1t():t==="ar"?r1t():t==="es"?s1t():t==="hi"?i1t():e1t()}),o1t=()=>"Unlink",c1t=()=>"取消关联",l1t=()=>"قطع پیوند",u1t=()=>"إلغاء الربط",_1t=()=>"Desvincular",f1t=()=>"लिंक हटाएं",d1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c1t():t==="fa"?l1t():t==="ar"?u1t():t==="es"?_1t():t==="hi"?f1t():o1t()}),h1t=()=>"Upload a copy as a new project ↗",p1t=()=>"上传副本作为新项目 ↗",m1t=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",g1t=()=>"رفع نسخة كمشروع جديد ↗",v1t=()=>"Subir una copia como proyecto nuevo ↗",b1t=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",XD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p1t():t==="fa"?m1t():t==="ar"?g1t():t==="es"?v1t():t==="hi"?b1t():h1t()}),y1t=()=>"Use Overleaf's",x1t=()=>"使用 Overleaf 的副本",w1t=()=>"استفاده از نسخهٔ Overleaf",k1t=()=>"استخدام نسخة Overleaf",S1t=()=>"Usar la de Overleaf",C1t=()=>"Overleaf का इस्तेमाल करें",E1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x1t():t==="fa"?w1t():t==="ar"?k1t():t==="es"?S1t():t==="hi"?C1t():y1t()}),N1t=()=>"This paper stays in step with Overleaf.",z1t=()=>"此论文将与 Overleaf 保持同步。",j1t=()=>"این مقاله با Overleaf همگام می‌ماند.",T1t=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",A1t=()=>"Este paper se mantiene sincronizado con Overleaf.",R1t=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",M1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z1t():t==="fa"?j1t():t==="ar"?T1t():t==="es"?A1t():t==="hi"?R1t():N1t()}),O1t=()=>"Paste it instead",D1t=()=>"改为粘贴",L1t=()=>"به‌جایش بچسبانید",I1t=()=>"الصقه بدلًا من ذلك",$1t=()=>"Pegarla manualmente",B1t=()=>"इसके बजाय पेस्ट करें",P1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D1t():t==="fa"?L1t():t==="ar"?I1t():t==="es"?$1t():t==="hi"?B1t():O1t()}),F1t=e=>`Pulled ${e==null?void 0:e.paths}.`,H1t=e=>`已拉取 ${e==null?void 0:e.paths}。`,q1t=e=>`${e==null?void 0:e.paths} دریافت شد.`,U1t=e=>`سُحب ${e==null?void 0:e.paths}.`,G1t=e=>`Descargado: ${e==null?void 0:e.paths}.`,V1t=e=>`${e==null?void 0:e.paths} पुल किया।`,K1t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H1t(e):t==="fa"?q1t(e):t==="ar"?U1t(e):t==="es"?G1t(e):t==="hi"?V1t(e):F1t(e)}),W1t=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,Q1t=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,X1t=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,Y1t=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,Z1t=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,J1t=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,evt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q1t(e):t==="fa"?X1t(e):t==="ar"?Y1t(e):t==="es"?Z1t(e):t==="hi"?J1t(e):W1t(e)}),tvt=e=>`Pushed ${e==null?void 0:e.paths}.`,nvt=e=>`已推送 ${e==null?void 0:e.paths}。`,rvt=e=>`${e==null?void 0:e.paths} ارسال شد.`,svt=e=>`رُفع ${e==null?void 0:e.paths}.`,ivt=e=>`Subido: ${e==null?void 0:e.paths}.`,avt=e=>`${e==null?void 0:e.paths} पुश किया।`,ovt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nvt(e):t==="fa"?rvt(e):t==="ar"?svt(e):t==="es"?ivt(e):t==="hi"?avt(e):tvt(e)}),cvt=()=>"Add a fresh Overleaf session cookie to start following again.",lvt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",uvt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",_vt=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",fvt=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",dvt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",hvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lvt():t==="fa"?uvt():t==="ar"?_vt():t==="es"?fvt():t==="hi"?dvt():cvt()}),pvt=()=>"Save the file first",mvt=()=>"请先保存文件",gvt=()=>"ابتدا فایل را ذخیره کنید",vvt=()=>"احفظ الملف أولًا",bvt=()=>"Guarda el archivo primero",yvt=()=>"पहले फ़ाइल सेव करें",xvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mvt():t==="fa"?gvt():t==="ar"?vvt():t==="es"?bvt():t==="hi"?yvt():pvt()}),wvt=()=>"Save this file to sync it with Overleaf",kvt=()=>"保存此文件以与 Overleaf 同步",Svt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",Cvt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",Evt=()=>"Guarda este archivo para sincronizarlo con Overleaf",Nvt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",YD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kvt():t==="fa"?Svt():t==="ar"?Cvt():t==="es"?Evt():t==="hi"?Nvt():wvt()}),zvt=()=>"Save token",jvt=()=>"保存令牌",Tvt=()=>"ذخیرهٔ توکن",Avt=()=>"حفظ الرمز",Rvt=()=>"Guardar token",Mvt=()=>"टोकन सेव करें",Ovt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jvt():t==="fa"?Tvt():t==="ar"?Avt():t==="es"?Rvt():t==="hi"?Mvt():zvt()}),Dvt=()=>"Send this paper to Overleaf",Lvt=()=>"将此论文发送到 Overleaf",Ivt=()=>"ارسال مقاله به Overleaf",$vt=()=>"أرسل هذه الورقة إلى Overleaf",Bvt=()=>"Enviar este paper a Overleaf",Pvt=()=>"यह पेपर Overleaf को भेजें",Fvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lvt():t==="fa"?Ivt():t==="ar"?$vt():t==="es"?Bvt():t==="hi"?Pvt():Dvt()}),Hvt=()=>"Overleaf session cookie",qvt=()=>"Overleaf 会话 cookie",Uvt=()=>"کوکی نشست Overleaf",Gvt=()=>"ملف تعريف ارتباط جلسة Overleaf",Vvt=()=>"Cookie de sesión de Overleaf",Kvt=()=>"Overleaf सेशन कुकी",c3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qvt():t==="fa"?Uvt():t==="ar"?Gvt():t==="es"?Vvt():t==="hi"?Kvt():Hvt()}),Wvt=()=>"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.",Qvt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Xvt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Yvt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Zvt=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",Jvt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",ebt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qvt():t==="fa"?Xvt():t==="ar"?Yvt():t==="es"?Zvt():t==="hi"?Jvt():Wvt()}),tbt=()=>"Overleaf sync failed",nbt=()=>"Overleaf 同步失败",rbt=()=>"همگام‌سازی با Overleaf ناموفق بود",sbt=()=>"فشلت مزامنة Overleaf",ibt=()=>"Error al sincronizar con Overleaf",abt=()=>"Overleaf सिंक विफल",l3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nbt():t==="fa"?rbt():t==="ar"?sbt():t==="es"?ibt():t==="hi"?abt():tbt()}),obt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",cbt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",lbt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",ubt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",_bt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",fbt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",dbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cbt():t==="fa"?lbt():t==="ar"?ubt():t==="es"?_bt():t==="hi"?fbt():obt()}),hbt=()=>"Syncing with Overleaf…",pbt=()=>"正在与 Overleaf 同步…",mbt=()=>"در حال همگام‌سازی با Overleaf…",gbt=()=>"جارٍ المزامنة مع Overleaf…",vbt=()=>"Sincronizando con Overleaf…",bbt=()=>"Overleaf के साथ सिंक हो रहा है…",ZD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pbt():t==="fa"?mbt():t==="ar"?gbt():t==="es"?vbt():t==="hi"?bbt():hbt()}),ybt=()=>"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.",xbt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",wbt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",kbt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",Sbt=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",Cbt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",Ebt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xbt():t==="fa"?wbt():t==="ar"?kbt():t==="es"?Sbt():t==="hi"?Cbt():ybt()}),Nbt=()=>"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.",zbt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",jbt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",Tbt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",Abt=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",Rbt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",Mbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zbt():t==="fa"?jbt():t==="ar"?Tbt():t==="es"?Abt():t==="hi"?Rbt():Nbt()}),Obt=()=>"Toggle Plan mode for this chat",Dbt=()=>"切换此聊天的计划模式",Lbt=()=>"تغییر حالت طرح این گفت‌وگو",Ibt=()=>"تبديل وضع التخطيط لهذه المحادثة",$bt=()=>"Activa o desactiva el modo Plan en este chat",Bbt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",Pbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dbt():t==="fa"?Lbt():t==="ar"?Ibt():t==="es"?$bt():t==="hi"?Bbt():Obt()}),Fbt=()=>"Accept and auto mode",Hbt=()=>"接受并使用自动模式",qbt=()=>"پذیرش و حالت خودکار",Ubt=()=>"قبول وتفعيل الوضع التلقائي",Gbt=()=>"Aceptar en modo automático",Vbt=()=>"स्वीकार करें और ऑटो मोड",Kbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hbt():t==="fa"?qbt():t==="ar"?Ubt():t==="es"?Gbt():t==="hi"?Vbt():Fbt()}),Wbt=()=>"Accept and bypass all",Qbt=()=>"接受并跳过所有审批",Xbt=()=>"پذیرش و عبور از همهٔ تأییدها",Ybt=()=>"القبول وتجاوز الكل",Zbt=()=>"Aceptar y omitir permisos",Jbt=()=>"स्वीकार करें और सब बायपास करें",eyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qbt():t==="fa"?Xbt():t==="ar"?Ybt():t==="es"?Zbt():t==="hi"?Jbt():Wbt()}),tyt=()=>"Accept plan",nyt=()=>"接受计划",ryt=()=>"پذیرش طرح",syt=()=>"قبول الخطة",iyt=()=>"Aceptar plan",ayt=()=>"प्लान स्वीकार करें",oyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nyt():t==="fa"?ryt():t==="ar"?syt():t==="es"?iyt():t==="hi"?ayt():tyt()}),cyt=e=>`${e==null?void 0:e.agent} proposed a plan`,lyt=e=>`${e==null?void 0:e.agent} 提出了一个计划`,uyt=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,_yt=e=>`${e==null?void 0:e.agent} اقترح خطة`,fyt=e=>`${e==null?void 0:e.agent} propuso un plan`,dyt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,hyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lyt(e):t==="fa"?uyt(e):t==="ar"?_yt(e):t==="es"?fyt(e):t==="hi"?dyt(e):cyt(e)}),pyt=e=>`${e==null?void 0:e.agent} is ready to proceed`,myt=e=>`${e==null?void 0:e.agent} 已准备好继续`,gyt=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,vyt=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,byt=e=>`${e==null?void 0:e.agent} está listo para continuar`,yyt=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,xyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?myt(e):t==="fa"?gyt(e):t==="ar"?vyt(e):t==="es"?byt(e):t==="hi"?yyt(e):pyt(e)}),wyt=()=>"Back",kyt=()=>"返回",Syt=()=>"بازگشت",Cyt=()=>"رجوع",Eyt=()=>"Atrás",Nyt=()=>"वापस",JD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kyt():t==="fa"?Syt():t==="ar"?Cyt():t==="es"?Eyt():t==="hi"?Nyt():wyt()}),zyt=()=>"More approval options",jyt=()=>"更多批准选项",Tyt=()=>"گزینه‌های تأیید بیشتر",Ayt=()=>"خيارات موافقة إضافية",Ryt=()=>"Más opciones de aprobación",Myt=()=>"और स्वीकृति विकल्प",Oyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jyt():t==="fa"?Tyt():t==="ar"?Ayt():t==="es"?Ryt():t==="hi"?Myt():zyt()}),Dyt=()=>"Open plan",Lyt=()=>"打开计划",Iyt=()=>"باز کردن طرح",$yt=()=>"فتح الخطة",Byt=()=>"Abrir plan",Pyt=()=>"प्लान खोलें",Fyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lyt():t==="fa"?Iyt():t==="ar"?$yt():t==="es"?Byt():t==="hi"?Pyt():Dyt()}),Hyt=()=>"Reject",qyt=()=>"拒绝",Uyt=()=>"رد کردن",Gyt=()=>"رفض",Vyt=()=>"Rechazar",Kyt=()=>"अस्वीकार करें",Wyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qyt():t==="fa"?Uyt():t==="ar"?Gyt():t==="es"?Vyt():t==="hi"?Kyt():Hyt()}),Qyt=()=>"Revise",Xyt=()=>"修改",Yyt=()=>"بازنگری",Zyt=()=>"طلب تعديل",Jyt=()=>"Pedir cambios",ext=()=>"संशोधित करें",txt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xyt():t==="fa"?Yyt():t==="ar"?Zyt():t==="es"?Jyt():t==="hi"?ext():Qyt()}),nxt=()=>"Revise…",rxt=()=>"修改…",sxt=()=>"بازنگری…",ixt=()=>"طلب تعديل…",axt=()=>"Pedir cambios…",oxt=()=>"संशोधित करें…",cxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rxt():t==="fa"?sxt():t==="ar"?ixt():t==="es"?axt():t==="hi"?oxt():nxt()}),lxt=()=>"What should change? (optional)",uxt=()=>"需要更改什么?(可选)",_xt=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",fxt=()=>"ما الذي ينبغي تغييره؟ (اختياري)",dxt=()=>"¿Qué debería cambiar? (opcional)",hxt=()=>"क्या बदलना चाहिए? (वैकल्पिक)",pxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uxt():t==="fa"?_xt():t==="ar"?fxt():t==="es"?dxt():t==="hi"?hxt():lxt()}),mxt=e=>`${e==null?void 0:e.count} active`,gxt=e=>`${e==null?void 0:e.count} 个活跃`,vxt=e=>`${e==null?void 0:e.count} فعال`,bxt=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,yxt=e=>`${e==null?void 0:e.count} activos`,xxt=e=>`${e==null?void 0:e.count} सक्रिय`,wxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gxt(e):t==="fa"?vxt(e):t==="ar"?bxt(e):t==="es"?yxt(e):t==="hi"?xxt(e):mxt(e)}),kxt=e=>`${e==null?void 0:e.count} total agents`,Sxt=e=>`共 ${e==null?void 0:e.count} 个智能体`,Cxt=e=>`در مجموع ${e==null?void 0:e.count} عامل`,Ext=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,Nxt=e=>`${e==null?void 0:e.count} agentes en total`,zxt=e=>`${e==null?void 0:e.count} कुल एजेंट`,jxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxt(e):t==="fa"?Cxt(e):t==="ar"?Ext(e):t==="es"?Nxt(e):t==="hi"?zxt(e):kxt(e)}),Txt=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,Axt=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,Rxt=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,Mxt=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,Oxt=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,Dxt=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,Lxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Axt(e):t==="fa"?Rxt(e):t==="ar"?Mxt(e):t==="es"?Oxt(e):t==="hi"?Dxt(e):Txt(e)}),Ixt=()=>"Agents",$xt=()=>"智能体",Bxt=()=>"عامل‌ها",Pxt=()=>"الوكلاء",Fxt=()=>"Agentes",Hxt=()=>"एजेंट",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$xt():t==="fa"?Bxt():t==="ar"?Pxt():t==="es"?Fxt():t==="hi"?Hxt():Ixt()}),qxt=()=>"arXiv paper ID:",Uxt=()=>"arXiv 论文 ID:",Gxt=()=>"شناسهٔ مقالهٔ arXiv:",Vxt=()=>"معرّف ورقة arXiv:",Kxt=()=>"ID del paper en arXiv:",Wxt=()=>"arXiv पेपर ID:",Qxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uxt():t==="fa"?Gxt():t==="ar"?Vxt():t==="es"?Kxt():t==="hi"?Wxt():qxt()}),Xxt=()=>"Cancel",Yxt=()=>"取消",Zxt=()=>"لغو",Jxt=()=>"إلغاء",e2t=()=>"Cancelar",t2t=()=>"रद्द करें",n2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxt():t==="fa"?Zxt():t==="ar"?Jxt():t==="es"?e2t():t==="hi"?t2t():Xxt()}),r2t=()=>"Created",s2t=()=>"创建时间",i2t=()=>"ایجادشده",a2t=()=>"أُنشئ",o2t=()=>"Creado",c2t=()=>"बनाया गया",l2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s2t():t==="fa"?i2t():t==="ar"?a2t():t==="es"?o2t():t==="hi"?c2t():r2t()}),u2t=()=>"Delete project?",_2t=()=>"删除项目?",f2t=()=>"پروژه حذف شود؟",d2t=()=>"حذف المشروع؟",h2t=()=>"¿Eliminar el proyecto?",p2t=()=>"प्रोजेक्ट हटाएं?",m2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_2t():t==="fa"?f2t():t==="ar"?d2t():t==="es"?h2t():t==="hi"?p2t():u2t()}),g2t=()=>"Delete project",v2t=()=>"删除项目",b2t=()=>"حذف پروژه",y2t=()=>"حذف المشروع",x2t=()=>"Eliminar proyecto",w2t=()=>"प्रोजेक्ट हटाएं",k2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v2t():t==="fa"?b2t():t==="ar"?y2t():t==="es"?x2t():t==="hi"?w2t():g2t()}),S2t=()=>"Deleting…",C2t=()=>"正在删除…",E2t=()=>"در حال حذف…",N2t=()=>"جارٍ الحذف…",z2t=()=>"Eliminando…",j2t=()=>"हटाया जा रहा है…",T2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C2t():t==="fa"?E2t():t==="ar"?N2t():t==="es"?z2t():t==="hi"?j2t():S2t()}),A2t=()=>"Experiments",R2t=()=>"实验",M2t=()=>"آزمایش‌ها",O2t=()=>"التجارب",D2t=()=>"Experimentos",L2t=()=>"प्रयोग",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R2t():t==="fa"?M2t():t==="ar"?O2t():t==="es"?D2t():t==="hi"?L2t():A2t()}),I2t=()=>"The local folder and linked GitHub repository are kept.",$2t=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",B2t=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",P2t=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",F2t=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",H2t=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",q2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$2t():t==="fa"?B2t():t==="ar"?P2t():t==="es"?F2t():t==="hi"?H2t():I2t()}),U2t=()=>"The local folder is kept.",G2t=()=>"本地文件夹会保留。",V2t=()=>"پوشهٔ محلی نگه داشته می‌شود.",K2t=()=>"يُحتفظ بالمجلد المحلي.",W2t=()=>"La carpeta local se conserva.",Q2t=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",X2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G2t():t==="fa"?V2t():t==="ar"?K2t():t==="es"?W2t():t==="hi"?Q2t():U2t()}),Y2t=()=>"New project",Z2t=()=>"新建项目",J2t=()=>"پروژهٔ جدید",ewt=()=>"مشروع جديد",twt=()=>"Nuevo proyecto",nwt=()=>"नया प्रोजेक्ट",eL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z2t():t==="fa"?J2t():t==="ar"?ewt():t==="es"?twt():t==="hi"?nwt():Y2t()}),rwt=()=>"No projects yet — create one to get started.",swt=()=>"尚无项目——新建一个即可开始。",iwt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",awt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",owt=()=>"Aún no hay proyectos — crea uno para empezar.",cwt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",lwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?swt():t==="fa"?iwt():t==="ar"?awt():t==="es"?owt():t==="hi"?cwt():rwt()}),uwt=()=>"Project",_wt=()=>"项目",fwt=()=>"پروژه",dwt=()=>"المشروع",hwt=()=>"Proyecto",pwt=()=>"प्रोजेक्ट",mwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_wt():t==="fa"?fwt():t==="ar"?dwt():t==="es"?hwt():t==="hi"?pwt():uwt()}),gwt=()=>"Projects",vwt=()=>"项目",bwt=()=>"پروژه‌ها",ywt=()=>"المشاريع",xwt=()=>"Proyectos",wwt=()=>"प्रोजेक्ट",kwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vwt():t==="fa"?bwt():t==="ar"?ywt():t==="es"?xwt():t==="hi"?wwt():gwt()}),Swt=()=>"Repository",Cwt=()=>"仓库",Ewt=()=>"مخزن",Nwt=()=>"المستودع",zwt=()=>"Repositorio",jwt=()=>"रिपॉज़िटरी",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cwt():t==="fa"?Ewt():t==="ar"?Nwt():t==="es"?zwt():t==="hi"?jwt():Swt()}),Twt=()=>"Idle",Awt=()=>"空闲",Rwt=()=>"بیکار",Mwt=()=>"خامل",Owt=()=>"Inactivo",Dwt=()=>"निष्क्रिय",Lwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Awt():t==="fa"?Rwt():t==="ar"?Mwt():t==="es"?Owt():t==="hi"?Dwt():Twt()}),Iwt=()=>"Local",$wt=()=>"本地",Bwt=()=>"محلی",Pwt=()=>"محلي",Fwt=()=>"Local",Hwt=()=>"लोकल",zv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$wt():t==="fa"?Bwt():t==="ar"?Pwt():t==="es"?Fwt():t==="hi"?Hwt():Iwt()}),qwt=()=>"1 total agent",Uwt=()=>"共 1 个智能体",Gwt=()=>"در مجموع ۱ عامل",Vwt=()=>"وكيل واحد إجمالًا",Kwt=()=>"1 agente en total",Wwt=()=>"1 कुल एजेंट",Qwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uwt():t==="fa"?Gwt():t==="ar"?Vwt():t==="es"?Kwt():t==="hi"?Wwt():qwt()}),Xwt=e=>`${e==null?void 0:e.count} running`,Ywt=e=>`${e==null?void 0:e.count} 个运行中`,Zwt=e=>`${e==null?void 0:e.count} در حال اجرا`,Jwt=e=>`${e==null?void 0:e.count} قيد التشغيل`,e4t=e=>`${e==null?void 0:e.count} en ejecución`,t4t=e=>`${e==null?void 0:e.count} चल रहे`,n4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ywt(e):t==="fa"?Zwt(e):t==="ar"?Jwt(e):t==="es"?e4t(e):t==="hi"?t4t(e):Xwt(e)}),r4t=e=>`${e==null?void 0:e.count} total`,s4t=e=>`共 ${e==null?void 0:e.count} 个`,i4t=e=>`در مجموع ${e==null?void 0:e.count}`,a4t=e=>`${e==null?void 0:e.count} إجمالًا`,o4t=e=>`${e==null?void 0:e.count} en total`,c4t=e=>`${e==null?void 0:e.count} कुल`,pz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?s4t(e):t==="fa"?i4t(e):t==="ar"?a4t(e):t==="es"?o4t(e):t==="hi"?c4t(e):r4t(e)}),l4t=()=>"Installing the compatible binary. This may take a few minutes.",u4t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",_4t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",f4t=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",d4t=()=>"Instalando el binario compatible. Puede tardar unos minutos.",h4t=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",p4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u4t():t==="fa"?_4t():t==="ar"?f4t():t==="es"?d4t():t==="hi"?h4t():l4t()}),m4t=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,g4t=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,v4t=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,b4t=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,y4t=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,x4t=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,w4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g4t(e):t==="fa"?v4t(e):t==="ar"?b4t(e):t==="es"?y4t(e):t==="hi"?x4t(e):m4t(e)}),k4t=()=>"Check again",S4t=()=>"再次检查",C4t=()=>"بررسی دوباره",E4t=()=>"تحقق مجددًا",N4t=()=>"Volver a comprobar",z4t=()=>"फिर से जाँचें",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S4t():t==="fa"?C4t():t==="ar"?E4t():t==="es"?N4t():t==="hi"?z4t():k4t()}),j4t=()=>"Closing…",T4t=()=>"正在关闭…",A4t=()=>"در حال بستن…",R4t=()=>"جارٍ الإغلاق…",M4t=()=>"Cerrando…",O4t=()=>"बंद हो रहा है…",D4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T4t():t==="fa"?A4t():t==="ar"?R4t():t==="es"?M4t():t==="hi"?O4t():j4t()}),L4t=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,I4t=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,$4t=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,B4t=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,P4t=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,F4t=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,H4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?I4t(e):t==="fa"?$4t(e):t==="ar"?B4t(e):t==="es"?P4t(e):t==="hi"?F4t(e):L4t(e)}),q4t=()=>"Preparing your remote workspace…",U4t=()=>"正在准备远程工作区…",G4t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",V4t=()=>"جارٍ تحضير مساحة عملك البعيدة…",K4t=()=>"Preparando tu espacio de trabajo remoto…",W4t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",Q4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U4t():t==="fa"?G4t():t==="ar"?V4t():t==="es"?K4t():t==="hi"?W4t():q4t()}),X4t=e=>`Connecting to ${e==null?void 0:e.host}`,Y4t=e=>`正在连接到 ${e==null?void 0:e.host}`,Z4t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,J4t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,e3t=e=>`Conectando a ${e==null?void 0:e.host}`,t3t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,n3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Y4t(e):t==="fa"?Z4t(e):t==="ar"?J4t(e):t==="es"?e3t(e):t==="hi"?t3t(e):X4t(e)}),r3t=()=>"Close remote host picker",s3t=()=>"关闭远程主机选择器",i3t=()=>"بستن انتخاب‌گر میزبان راه‌دور",a3t=()=>"إغلاق مُنتقي المضيف البعيد",o3t=()=>"Cerrar el selector de hosts remotos",c3t=()=>"रिमोट होस्ट पिकर बंद करें",l3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s3t():t==="fa"?i3t():t==="ar"?a3t():t==="es"?o3t():t==="hi"?c3t():r3t()}),u3t=()=>"Choose a configured SSH host.",_3t=()=>"选择已配置的 SSH 主机。",f3t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",d3t=()=>"اختر مضيف SSH مُعدًّا.",h3t=()=>"Elige un host SSH configurado.",p3t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",m3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_3t():t==="fa"?f3t():t==="ar"?d3t():t==="es"?h3t():t==="hi"?p3t():u3t()}),g3t=()=>"Connect to remote",v3t=()=>"连接到远程主机",b3t=()=>"اتصال به میزبان راه‌دور",y3t=()=>"الاتصال بجهاز بعيد",x3t=()=>"Conectar a un host remoto",w3t=()=>"रिमोट से कनेक्ट करें",u3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v3t():t==="fa"?b3t():t==="ar"?y3t():t==="es"?x3t():t==="hi"?w3t():g3t()}),k3t=()=>"Disconnect",S3t=()=>"断开连接",C3t=()=>"قطع اتصال",E3t=()=>"قطع الاتصال",N3t=()=>"Desconectar",z3t=()=>"डिस्कनेक्ट करें",_3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S3t():t==="fa"?C3t():t==="ar"?E3t():t==="es"?N3t():t==="hi"?z3t():k3t()}),j3t=()=>"Your remote work is still running. Reconnect when you’re ready.",T3t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",A3t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",R3t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",M3t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",O3t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",D3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T3t():t==="fa"?A3t():t==="ar"?R3t():t==="es"?M3t():t==="hi"?O3t():j3t()}),L3t=e=>`Disconnected from ${e==null?void 0:e.host}`,I3t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,$3t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,B3t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,P3t=e=>`Desconectado de ${e==null?void 0:e.host}`,F3t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,tL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?I3t(e):t==="fa"?$3t(e):t==="ar"?B3t(e):t==="es"?P3t(e):t==="hi"?F3t(e):L3t(e)}),H3t=e=>`Could not connect to ${e==null?void 0:e.host}`,q3t=e=>`无法连接到 ${e==null?void 0:e.host}`,U3t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,G3t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,V3t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,K3t=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,W3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q3t(e):t==="fa"?U3t(e):t==="ar"?G3t(e):t==="es"?V3t(e):t==="hi"?K3t(e):H3t(e)}),Q3t=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",X3t=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",Y3t=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",Z3t=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",J3t=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",e5t=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",t5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X3t():t==="fa"?Y3t():t==="ar"?Z3t():t==="es"?J3t():t==="hi"?e5t():Q3t()}),n5t=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",r5t=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",s5t=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",i5t=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",a5t=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",o5t=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",c5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r5t():t==="fa"?s5t():t==="ar"?i5t():t==="es"?a5t():t==="hi"?o5t():n5t()}),l5t=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,u5t=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,_5t=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,f5t=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,d5t=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,h5t=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,p5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?u5t(e):t==="fa"?_5t(e):t==="ar"?f5t(e):t==="es"?d5t(e):t==="hi"?h5t(e):l5t(e)}),m5t=()=>"OpenResearch binary",g5t=()=>"OpenResearch 二进制文件",v5t=()=>"فایل اجرایی OpenResearch",b5t=()=>"الملف التنفيذي لـ OpenResearch",y5t=()=>"Binario de OpenResearch",x5t=()=>"OpenResearch बाइनरी",w5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g5t():t==="fa"?v5t():t==="ar"?b5t():t==="es"?y5t():t==="hi"?x5t():m5t()}),k5t=()=>"OpenResearch Database",S5t=()=>"OpenResearch 数据库",C5t=()=>"پایگاه دادهٔ OpenResearch",E5t=()=>"قاعدة بيانات OpenResearch",N5t=()=>"Base de datos de OpenResearch",z5t=()=>"OpenResearch डेटाबेस",j5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S5t():t==="fa"?C5t():t==="ar"?E5t():t==="es"?N5t():t==="hi"?z5t():k5t()}),T5t=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",A5t=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",R5t=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",M5t=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",O5t=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",D5t=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",L5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A5t():t==="fa"?R5t():t==="ar"?M5t():t==="es"?O5t():t==="hi"?D5t():T5t()}),I5t=()=>"Install OpenResearch?",$5t=()=>"安装 OpenResearch?",B5t=()=>"OpenResearch نصب شود؟",P5t=()=>"تثبيت OpenResearch؟",F5t=()=>"¿Instalar OpenResearch?",H5t=()=>"OpenResearch इंस्टॉल करें?",q5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$5t():t==="fa"?B5t():t==="ar"?P5t():t==="es"?F5t():t==="hi"?H5t():I5t()}),U5t=()=>"Installing…",G5t=()=>"正在安装…",V5t=()=>"در حال نصب…",K5t=()=>"جارٍ التثبيت…",W5t=()=>"Instalando…",Q5t=()=>"इंस्टॉल हो रहा है…",X5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G5t():t==="fa"?V5t():t==="ar"?K5t():t==="es"?W5t():t==="hi"?Q5t():U5t()}),Y5t=()=>"No matching SSH hosts",Z5t=()=>"没有匹配的 SSH 主机",J5t=()=>"میزبان SSH منطبقی پیدا نشد",ekt=()=>"لا توجد مضيفات SSH مطابقة",tkt=()=>"No hay hosts SSH que coincidan",nkt=()=>"कोई मेल खाता SSH होस्ट नहीं",rkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z5t():t==="fa"?J5t():t==="ar"?ekt():t==="es"?tkt():t==="hi"?nkt():Y5t()}),skt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,ikt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,akt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,okt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,ckt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,lkt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,ukt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ikt(e):t==="fa"?akt(e):t==="ar"?okt(e):t==="es"?ckt(e):t==="hi"?lkt(e):skt(e)}),_kt=()=>"Open remote",fkt=()=>"打开远程工作区",dkt=()=>"باز کردن راه‌دور",hkt=()=>"فتح مساحة العمل البعيدة",pkt=()=>"Abrir remoto",mkt=()=>"रिमोट खोलें",gkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fkt():t==="fa"?dkt():t==="ar"?hkt():t==="es"?pkt():t==="hi"?mkt():_kt()}),vkt=()=>"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.",bkt=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",ykt=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",xkt=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",wkt=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",kkt=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",Skt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bkt():t==="fa"?ykt():t==="ar"?xkt():t==="es"?wkt():t==="hi"?kkt():vkt()}),Ckt=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",Ekt=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",Nkt=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",zkt=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",jkt=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",Tkt=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",Akt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ekt():t==="fa"?Nkt():t==="ar"?zkt():t==="es"?jkt():t==="hi"?Tkt():Ckt()}),Rkt=()=>"Preparing remote workspace…",Mkt=()=>"正在准备远程工作区…",Okt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",Dkt=()=>"جارٍ تحضير مساحة العمل البعيدة…",Lkt=()=>"Preparando el espacio de trabajo remoto…",Ikt=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",$kt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mkt():t==="fa"?Okt():t==="ar"?Dkt():t==="es"?Lkt():t==="hi"?Ikt():Rkt()}),Bkt=()=>"Reconnect",Pkt=()=>"重新连接",Fkt=()=>"اتصال دوباره",Hkt=()=>"إعادة الاتصال",qkt=()=>"Reconectar",Ukt=()=>"फिर से कनेक्ट करें",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pkt():t==="fa"?Fkt():t==="ar"?Hkt():t==="es"?qkt():t==="hi"?Ukt():Bkt()}),Gkt=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",Vkt=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",Kkt=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",Wkt=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",Qkt=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",Xkt=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",Ykt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vkt():t==="fa"?Kkt():t==="ar"?Wkt():t==="es"?Qkt():t==="hi"?Xkt():Gkt()}),Zkt=e=>`Reconnecting to ${e==null?void 0:e.host}`,Jkt=e=>`正在重新连接到 ${e==null?void 0:e.host}`,eSt=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,tSt=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,nSt=e=>`Reconectando a ${e==null?void 0:e.host}`,rSt=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,sSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jkt(e):t==="fa"?eSt(e):t==="ar"?tSt(e):t==="es"?nSt(e):t==="hi"?rSt(e):Zkt(e)}),iSt=()=>"Search SSH hosts",aSt=()=>"搜索 SSH 主机",oSt=()=>"جستجوی میزبان‌های SSH",cSt=()=>"البحث في مضيفات SSH",lSt=()=>"Buscar hosts SSH",uSt=()=>"SSH होस्ट खोजें",vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aSt():t==="fa"?oSt():t==="ar"?cSt():t==="es"?lSt():t==="hi"?uSt():iSt()}),_St=e=>`SSH: ${e==null?void 0:e.host}`,fSt=e=>`SSH:${e==null?void 0:e.host}`,dSt=e=>`SSH: ${e==null?void 0:e.host}`,hSt=e=>`SSH: ${e==null?void 0:e.host}`,pSt=e=>`SSH: ${e==null?void 0:e.host}`,mSt=e=>`SSH: ${e==null?void 0:e.host}`,J2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fSt(e):t==="fa"?dSt(e):t==="ar"?hSt(e):t==="es"?pSt(e):t==="hi"?mSt(e):_St(e)}),gSt=()=>"Start a new OpenResearch host",vSt=()=>"启动新的 OpenResearch 主机",bSt=()=>"راه‌اندازی میزبان جدید OpenResearch",ySt=()=>"بدء مضيف OpenResearch جديد",xSt=()=>"Iniciar un nuevo host de OpenResearch",wSt=()=>"एक नया OpenResearch होस्ट शुरू करें",kSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vSt():t==="fa"?bSt():t==="ar"?ySt():t==="es"?xSt():t==="hi"?wSt():gSt()}),SSt=e=>`End ${e==null?void 0:e.count} pending approvals.`,CSt=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,ESt=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,NSt=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,zSt=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,jSt=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,TSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CSt(e):t==="fa"?ESt(e):t==="ar"?NSt(e):t==="es"?zSt(e):t==="hi"?jSt(e):SSt(e)}),ASt=()=>"Stop OpenResearch",RSt=()=>"停止 OpenResearch",MSt=()=>"توقف OpenResearch",OSt=()=>"إيقاف OpenResearch",DSt=()=>"Detener OpenResearch",LSt=()=>"OpenResearch रोकें",ISt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RSt():t==="fa"?MSt():t==="ar"?OSt():t==="es"?DSt():t==="hi"?LSt():ASt()}),$St=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,BSt=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,PSt=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,FSt=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,HSt=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,qSt=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,USt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BSt(e):t==="fa"?PSt(e):t==="ar"?FSt(e):t==="es"?HSt(e):t==="hi"?qSt(e):$St(e)}),GSt=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,VSt=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,KSt=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,WSt=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,QSt=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,XSt=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,YSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VSt(e):t==="fa"?KSt(e):t==="ar"?WSt(e):t==="es"?QSt(e):t==="hi"?XSt(e):GSt(e)}),ZSt=()=>"Stop OpenResearch on host",JSt=()=>"停止主机上的 OpenResearch",e6t=()=>"توقف OpenResearch روی میزبان",t6t=()=>"إيقاف OpenResearch على المضيف",n6t=()=>"Detener OpenResearch en el host",r6t=()=>"होस्ट पर OpenResearch रोकें",nL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JSt():t==="fa"?e6t():t==="ar"?t6t():t==="es"?n6t():t==="hi"?r6t():ZSt()}),s6t=()=>"This will also:",i6t=()=>"这还将:",a6t=()=>"این کار همچنین:",o6t=()=>"سيؤدي هذا أيضًا إلى:",c6t=()=>"Esto también:",l6t=()=>"इससे यह भी होगा:",u6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i6t():t==="fa"?a6t():t==="ar"?o6t():t==="es"?c6t():t==="hi"?l6t():s6t()}),_6t=()=>"End 1 pending approval.",f6t=()=>"结束 1 个待审批请求。",d6t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",h6t=()=>"إنهاء طلب موافقة معلّق واحد.",p6t=()=>"Cancelará 1 aprobación pendiente.",m6t=()=>"1 लंबित स्वीकृति खत्म होगी।",g6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f6t():t==="fa"?d6t():t==="ar"?h6t():t==="es"?p6t():t==="hi"?m6t():_6t()}),v6t=()=>"Leave 1 submitted experiment running.",b6t=()=>"让 1 个已提交实验继续运行。",y6t=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",x6t=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",w6t=()=>"Dejará 1 experimento enviado en ejecución.",k6t=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",S6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b6t():t==="fa"?y6t():t==="ar"?x6t():t==="es"?w6t():t==="hi"?k6t():v6t()}),C6t=()=>"Disconnect 1 other client.",E6t=()=>"断开 1 个其他客户端。",N6t=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",z6t=()=>"قطع اتصال عميل آخر واحد.",j6t=()=>"Desconectará a otro cliente.",T6t=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",A6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E6t():t==="fa"?N6t():t==="ar"?z6t():t==="es"?j6t():t==="hi"?T6t():C6t()}),R6t=()=>"Keep 1 queued message saved.",M6t=()=>"保留 1 条排队消息。",O6t=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",D6t=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",L6t=()=>"Conservará 1 mensaje en cola.",I6t=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",$6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M6t():t==="fa"?O6t():t==="ar"?D6t():t==="es"?L6t():t==="hi"?I6t():R6t()}),B6t=()=>"Interrupt 1 active agent turn.",P6t=()=>"中断 1 个活动代理任务。",F6t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",H6t=()=>"مقاطعة جولة وكيل نشطة واحدة.",q6t=()=>"Interrumpirá 1 turno activo de un agente.",U6t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",G6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P6t():t==="fa"?F6t():t==="ar"?H6t():t==="es"?q6t():t==="hi"?U6t():B6t()}),V6t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,K6t=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,W6t=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,Q6t=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,X6t=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,Y6t=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,Z6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K6t(e):t==="fa"?W6t(e):t==="ar"?Q6t(e):t==="es"?X6t(e):t==="hi"?Y6t(e):V6t(e)}),J6t=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,eCt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,tCt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,nCt=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,rCt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,sCt=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,iCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eCt(e):t==="fa"?tCt(e):t==="ar"?nCt(e):t==="es"?rCt(e):t==="hi"?sCt(e):J6t(e)}),aCt=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,oCt=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,cCt=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,lCt=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,uCt=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,_Ct=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,fCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oCt(e):t==="fa"?cCt(e):t==="ar"?lCt(e):t==="es"?uCt(e):t==="hi"?_Ct(e):aCt(e)}),dCt=()=>"Stopping host…",hCt=()=>"正在停止主机…",pCt=()=>"در حال توقف میزبان…",mCt=()=>"جارٍ إيقاف المضيف…",gCt=()=>"Deteniendo el host…",vCt=()=>"होस्ट रोका जा रहा है…",bCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hCt():t==="fa"?pCt():t==="ar"?mCt():t==="es"?gCt():t==="hi"?vCt():dCt()}),yCt=()=>"Update",xCt=()=>"更新",wCt=()=>"به‌روزرسانی",kCt=()=>"تحديث",SCt=()=>"Actualizar",CCt=()=>"अपडेट करें",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xCt():t==="fa"?wCt():t==="ar"?kCt():t==="es"?SCt():t==="hi"?CCt():yCt()}),ECt=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,NCt=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,zCt=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,jCt=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,TCt=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,ACt=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,RCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NCt(e):t==="fa"?zCt(e):t==="ar"?jCt(e):t==="es"?TCt(e):t==="hi"?ACt(e):ECt(e)}),MCt=()=>"Update OpenResearch?",OCt=()=>"更新 OpenResearch?",DCt=()=>"OpenResearch به‌روزرسانی شود؟",LCt=()=>"تحديث OpenResearch؟",ICt=()=>"¿Actualizar OpenResearch?",$Ct=()=>"OpenResearch अपडेट करें?",BCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OCt():t==="fa"?DCt():t==="ar"?LCt():t==="es"?ICt():t==="hi"?$Ct():MCt()}),PCt=()=>"Updating…",FCt=()=>"正在更新…",HCt=()=>"در حال به‌روزرسانی…",qCt=()=>"جارٍ التحديث…",UCt=()=>"Actualizando…",GCt=()=>"अपडेट हो रहा है…",VCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FCt():t==="fa"?HCt():t==="ar"?qCt():t==="es"?UCt():t==="hi"?GCt():PCt()}),KCt=()=>"Disable syncing",WCt=()=>"关闭同步",QCt=()=>"غیرفعال کردن همگام‌سازی",XCt=()=>"تعطيل المزامنة",YCt=()=>"Desactivar sincronización",ZCt=()=>"सिंकिंग बंद करें",JCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WCt():t==="fa"?QCt():t==="ar"?XCt():t==="es"?YCt():t==="hi"?ZCt():KCt()}),e7t=()=>"Enable GitHub syncing",t7t=()=>"启用 GitHub 同步",n7t=()=>"فعال‌سازی همگام‌سازی GitHub",r7t=()=>"تفعيل مزامنة GitHub",s7t=()=>"Activar sincronización con GitHub",i7t=()=>"GitHub सिंकिंग चालू करें",a7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t7t():t==="fa"?n7t():t==="ar"?r7t():t==="es"?s7t():t==="hi"?i7t():e7t()}),o7t=()=>"Enabling…",c7t=()=>"正在启用…",l7t=()=>"در حال فعال‌سازی…",u7t=()=>"جارٍ التفعيل…",_7t=()=>"Activando…",f7t=()=>"चालू हो रहा है…",d7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c7t():t==="fa"?l7t():t==="ar"?u7t():t==="es"?_7t():t==="hi"?f7t():o7t()}),h7t=()=>"Updating…",p7t=()=>"正在更新…",m7t=()=>"در حال به‌روزرسانی…",g7t=()=>"جارٍ التحديث…",v7t=()=>"Actualizando…",b7t=()=>"अपडेट हो रहा है…",y7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p7t():t==="fa"?m7t():t==="ar"?g7t():t==="es"?v7t():t==="hi"?b7t():h7t()}),x7t=()=>"Reopen a previous chat",w7t=()=>"重新打开之前的聊天",k7t=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",S7t=()=>"إعادة فتح محادثة سابقة",C7t=()=>"Vuelve a abrir un chat anterior",E7t=()=>"पिछली चैट फिर से खोलें",N7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w7t():t==="fa"?k7t():t==="ar"?S7t():t==="es"?C7t():t==="hi"?E7t():x7t()}),z7t=()=>"No chats to resume",j7t=()=>"没有可恢复的聊天",T7t=()=>"گفت‌وگویی برای ادامه وجود ندارد",A7t=()=>"لا توجد محادثات لاستئنافها",R7t=()=>"No hay chats que reanudar",M7t=()=>"फिर से शुरू करने के लिए कोई चैट नहीं है",O7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j7t():t==="fa"?T7t():t==="ar"?A7t():t==="es"?R7t():t==="hi"?M7t():z7t()}),D7t=()=>"From your terminal — adopting copies the transcript, and new turns continue there",L7t=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",I7t=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",$7t=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",B7t=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",P7t=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L7t():t==="fa"?I7t():t==="ar"?$7t():t==="es"?B7t():t==="hi"?P7t():D7t()}),F7t=()=>"Search chats",H7t=()=>"搜索聊天",q7t=()=>"جست‌وجوی گفت‌وگوها",U7t=()=>"البحث في المحادثات",G7t=()=>"Buscar chats",V7t=()=>"चैट खोजें",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H7t():t==="fa"?q7t():t==="ar"?U7t():t==="es"?G7t():t==="hi"?V7t():F7t()}),K7t=()=>"Resume a chat",W7t=()=>"恢复聊天",Q7t=()=>"ادامهٔ یک گفت‌وگو",X7t=()=>"استئناف محادثة",Y7t=()=>"Reanudar un chat",Z7t=()=>"चैट फिर से शुरू करें",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W7t():t==="fa"?Q7t():t==="ar"?X7t():t==="es"?Y7t():t==="hi"?Z7t():K7t()}),J7t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,e8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,t8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,n8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,r8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,s8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,i8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e8t(e):t==="fa"?t8t(e):t==="ar"?n8t(e):t==="es"?r8t(e):t==="hi"?s8t(e):J7t(e)}),a8t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,o8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,c8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,l8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,u8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,_8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,f8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?o8t(e):t==="fa"?c8t(e):t==="ar"?l8t(e):t==="es"?u8t(e):t==="hi"?_8t(e):a8t(e)}),d8t=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`,h8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,p8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,m8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,g8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,v8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,b8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?h8t(e):t==="fa"?p8t(e):t==="ar"?m8t(e):t==="es"?g8t(e):t==="hi"?v8t(e):d8t(e)}),y8t=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,x8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,w8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,k8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,S8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,C8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,E8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?x8t(e):t==="fa"?w8t(e):t==="ar"?k8t(e):t==="es"?S8t(e):t==="hi"?C8t(e):y8t(e)}),N8t=()=>"CLI is retrying…",z8t=()=>"CLI 正在重试…",j8t=()=>"CLI در حال تلاش دوباره است…",T8t=()=>"تعيد واجهة سطر الأوامر المحاولة…",A8t=()=>"La CLI está reintentando…",R8t=()=>"CLI फिर से कोशिश कर रहा है…",M8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z8t():t==="fa"?j8t():t==="ar"?T8t():t==="es"?A8t():t==="hi"?R8t():N8t()}),O8t=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,D8t=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,L8t=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,I8t=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,$8t=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,B8t=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,P8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D8t(e):t==="fa"?L8t(e):t==="ar"?I8t(e):t==="es"?$8t(e):t==="hi"?B8t(e):O8t(e)}),F8t=()=>"Sending again…",H8t=()=>"正在重新发送…",q8t=()=>"در حال ارسال دوباره…",U8t=()=>"جارٍ إعادة الإرسال…",G8t=()=>"Reenviando…",V8t=()=>"फिर से भेजा जा रहा है…",K8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H8t():t==="fa"?q8t():t==="ar"?U8t():t==="es"?G8t():t==="hi"?V8t():F8t()}),W8t=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,Q8t=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,X8t=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,Y8t=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,Z8t=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,J8t=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,e9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q8t(e):t==="fa"?X8t(e):t==="ar"?Y8t(e):t==="es"?Z8t(e):t==="hi"?J8t(e):W8t(e)}),t9t=()=>"Retrying…",n9t=()=>"正在重试…",r9t=()=>"در حال تلاش دوباره…",s9t=()=>"جارٍ إعادة المحاولة…",i9t=()=>"Reintentando…",a9t=()=>"फिर से कोशिश हो रही है…",rL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9t():t==="fa"?r9t():t==="ar"?s9t():t==="es"?i9t():t==="hi"?a9t():t9t()}),o9t=()=>"Default speed",c9t=()=>"默认速度",l9t=()=>"سرعت پیش‌فرض",u9t=()=>"السرعة الافتراضية",_9t=()=>"Velocidad predeterminada",f9t=()=>"डिफ़ॉल्ट गति",d9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c9t():t==="fa"?l9t():t==="ar"?u9t():t==="es"?_9t():t==="hi"?f9t():o9t()}),h9t=()=>"Standard",p9t=()=>"标准",m9t=()=>"استاندارد",g9t=()=>"قياسي",v9t=()=>"Estándar",b9t=()=>"स्टैंडर्ड",y9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p9t():t==="fa"?m9t():t==="ar"?g9t():t==="es"?v9t():t==="hi"?b9t():h9t()}),x9t=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,w9t=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,k9t=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,S9t=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,C9t=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,E9t=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,N9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w9t(e):t==="fa"?k9t(e):t==="ar"?S9t(e):t==="es"?C9t(e):t==="hi"?E9t(e):x9t(e)}),z9t=()=>"Appearance",j9t=()=>"外观",T9t=()=>"ظاهر",A9t=()=>"المظهر",R9t=()=>"Apariencia",M9t=()=>"रूप-रंग",O9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j9t():t==="fa"?T9t():t==="ar"?A9t():t==="es"?R9t():t==="hi"?M9t():z9t()}),D9t=()=>"Check",L9t=()=>"检查",I9t=()=>"بررسی",$9t=()=>"فحص",B9t=()=>"Comprobar",P9t=()=>"जाँचें",F9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L9t():t==="fa"?I9t():t==="ar"?$9t():t==="es"?B9t():t==="hi"?P9t():D9t()}),H9t=()=>"Check again",q9t=()=>"再次检查",U9t=()=>"بررسی دوباره",G9t=()=>"تحقق مجددًا",V9t=()=>"Volver a comprobar",K9t=()=>"फिर से जाँचें",xm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q9t():t==="fa"?U9t():t==="ar"?G9t():t==="es"?V9t():t==="hi"?K9t():H9t()}),W9t=()=>"Check for updates",Q9t=()=>"检查更新",X9t=()=>"بررسی به‌روزرسانی",Y9t=()=>"التحقق من التحديثات",Z9t=()=>"Buscar actualizaciones",J9t=()=>"अपडेट के लिए जाँचें",eEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q9t():t==="fa"?X9t():t==="ar"?Y9t():t==="es"?Z9t():t==="hi"?J9t():W9t()}),tEt=()=>"Check now",nEt=()=>"立即检查",rEt=()=>"اکنون بررسی کن",sEt=()=>"التحقق الآن",iEt=()=>"Comprobar ahora",aEt=()=>"अभी जाँचें",oEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nEt():t==="fa"?rEt():t==="ar"?sEt():t==="es"?iEt():t==="hi"?aEt():tEt()}),cEt=()=>"Check setup",lEt=()=>"检查设置",uEt=()=>"بررسی راه‌اندازی",_Et=()=>"فحص الإعداد",fEt=()=>"Comprobar configuración",dEt=()=>"सेटअप जाँचें",hEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lEt():t==="fa"?uEt():t==="ar"?_Et():t==="es"?fEt():t==="hi"?dEt():cEt()}),pEt=()=>"orx checks a few times a day on its own.",mEt=()=>"orx 每天会自动检查几次。",gEt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",vEt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",bEt=()=>"orx lo comprueba por sí solo varias veces al día.",yEt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",xEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mEt():t==="fa"?gEt():t==="ar"?vEt():t==="es"?bEt():t==="hi"?yEt():pEt()}),wEt=()=>"Choose a flavor",kEt=()=>"选择配置",SEt=()=>"انتخاب پیکربندی",CEt=()=>"اختر تكوين الموارد",EEt=()=>"Elige una opción",NEt=()=>"एक फ़्लेवर चुनें",zEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kEt():t==="fa"?SEt():t==="ar"?CEt():t==="es"?EEt():t==="hi"?NEt():wEt()}),jEt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,TEt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,AEt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,REt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,MEt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,OEt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,DEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TEt(e):t==="fa"?AEt(e):t==="ar"?REt(e):t==="es"?MEt(e):t==="hi"?OEt(e):jEt(e)}),LEt=()=>"clean",IEt=()=>"无更改",$Et=()=>"بدون تغییر",BEt=()=>"نظيف",PEt=()=>"sin cambios",FEt=()=>"साफ़",HEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IEt():t==="fa"?$Et():t==="ar"?BEt():t==="es"?PEt():t==="hi"?FEt():LEt()}),qEt=e=>`Already linked at ${e==null?void 0:e.link}.`,UEt=e=>`已链接到 ${e==null?void 0:e.link}。`,GEt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,VEt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,KEt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,WEt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,QEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UEt(e):t==="fa"?GEt(e):t==="ar"?VEt(e):t==="es"?KEt(e):t==="hi"?WEt(e):qEt(e)}),XEt=e=>`Linked ${e==null?void 0:e.link}.`,YEt=e=>`已链接 ${e==null?void 0:e.link}。`,ZEt=e=>`${e==null?void 0:e.link} پیوند شد.`,JEt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,eNt=e=>`Enlazado en ${e==null?void 0:e.link}.`,tNt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,nNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YEt(e):t==="fa"?ZEt(e):t==="ar"?JEt(e):t==="es"?eNt(e):t==="hi"?tNt(e):XEt(e)}),rNt=()=>"Close terminal",sNt=()=>"关闭终端",iNt=()=>"بستن ترمینال",aNt=()=>"إغلاق الطرفية",oNt=()=>"Cerrar la terminal",cNt=()=>"टर्मिनल बंद करें",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sNt():t==="fa"?iNt():t==="ar"?aNt():t==="es"?oNt():t==="hi"?cNt():rNt()}),lNt=()=>"Terminal closed",uNt=()=>"终端已关闭",_Nt=()=>"ترمینال بسته شد",fNt=()=>"أُغلقت الطرفية",dNt=()=>"Terminal cerrada",hNt=()=>"टर्मिनल बंद हो गया",pNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uNt():t==="fa"?_Nt():t==="ar"?fNt():t==="es"?dNt():t==="hi"?hNt():lNt()}),mNt=()=>"Finished",gNt=()=>"已完成",vNt=()=>"انجام شد",bNt=()=>"اكتمل",yNt=()=>"Finalizado",xNt=()=>"पूर्ण",wNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gNt():t==="fa"?vNt():t==="ar"?bNt():t==="es"?yNt():t==="hi"?xNt():mNt()}),kNt=()=>"Command failed",SNt=()=>"命令失败",CNt=()=>"دستور ناموفق بود",ENt=()=>"فشل الأمر",NNt=()=>"El comando falló",zNt=()=>"कमांड विफल रही",jNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SNt():t==="fa"?CNt():t==="ar"?ENt():t==="es"?NNt():t==="hi"?zNt():kNt()}),TNt=()=>"Running…",ANt=()=>"运行中…",RNt=()=>"در حال اجرا…",MNt=()=>"قيد التشغيل…",ONt=()=>"Ejecutando…",DNt=()=>"चल रहा है…",LNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ANt():t==="fa"?RNt():t==="ar"?MNt():t==="es"?ONt():t==="hi"?DNt():TNt()}),INt=()=>"Connect",$Nt=()=>"连接",BNt=()=>"اتصال",PNt=()=>"اتصال",FNt=()=>"Conectar",HNt=()=>"कनेक्ट करें",Qk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Nt():t==="fa"?BNt():t==="ar"?PNt():t==="es"?FNt():t==="hi"?HNt():INt()}),qNt=()=>"Connected via GitHub CLI",UNt=()=>"已通过 GitHub CLI 连接",GNt=()=>"از طریق GitHub CLI متصل است",VNt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",KNt=()=>"Conectado mediante GitHub CLI",WNt=()=>"GitHub CLI के ज़रिए कनेक्टेड",sL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UNt():t==="fa"?GNt():t==="ar"?VNt():t==="es"?KNt():t==="hi"?WNt():qNt()}),QNt=()=>"Connecting…",XNt=()=>"正在连接…",YNt=()=>"در حال اتصال…",ZNt=()=>"جارٍ الاتصال…",JNt=()=>"Conectando…",ezt=()=>"कनेक्ट हो रहा है…",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XNt():t==="fa"?YNt():t==="ar"?ZNt():t==="es"?JNt():t==="hi"?ezt():QNt()}),tzt=e=>`CPU cores: ${e==null?void 0:e.count}`,nzt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,rzt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,szt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,izt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,azt=e=>`CPU कोर: ${e==null?void 0:e.count}`,ozt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nzt(e):t==="fa"?rzt(e):t==="ar"?szt(e):t==="es"?izt(e):t==="hi"?azt(e):tzt(e)}),czt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",lzt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",uzt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",_zt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",fzt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",dzt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",hzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lzt():t==="fa"?uzt():t==="ar"?_zt():t==="es"?fzt():t==="hi"?dzt():czt()}),pzt=()=>"the current project",mzt=()=>"当前项目",gzt=()=>"پروژهٔ فعلی",vzt=()=>"المشروع الحالي",bzt=()=>"el proyecto actual",yzt=()=>"मौजूदा प्रोजेक्ट",xzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mzt():t==="fa"?gzt():t==="ar"?vzt():t==="es"?bzt():t==="hi"?yzt():pzt()}),wzt=e=>`${e==null?void 0:e.value} (custom)`,kzt=e=>`${e==null?void 0:e.value}(自定义)`,Szt=e=>`${e==null?void 0:e.value} (سفارشی)`,Czt=e=>`${e==null?void 0:e.value} (مخصص)`,Ezt=e=>`${e==null?void 0:e.value} (personalizado)`,Nzt=e=>`${e==null?void 0:e.value} (कस्टम)`,zzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kzt(e):t==="fa"?Szt(e):t==="ar"?Czt(e):t==="es"?Ezt(e):t==="hi"?Nzt(e):wzt(e)}),jzt=()=>"detached",Tzt=()=>"分离头指针",Azt=()=>"جدا از شاخه",Rzt=()=>"منفصل",Mzt=()=>"desacoplado",Ozt=()=>"डिटैच्ड",Xk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tzt():t==="fa"?Azt():t==="ar"?Rzt():t==="es"?Mzt():t==="hi"?Ozt():jzt()}),Dzt=()=>"Disconnected",Lzt=()=>"已断开连接",Izt=()=>"قطع اتصال",$zt=()=>"غير متصل",Bzt=()=>"Desconectado",Pzt=()=>"डिस्कनेक्ट हो गया",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lzt():t==="fa"?Izt():t==="ar"?$zt():t==="es"?Bzt():t==="hi"?Pzt():Dzt()}),Fzt=()=>"Environment tab",Hzt=()=>"环境标签页",qzt=()=>"زبانهٔ محیط",Uzt=()=>"تبويب البيئة",Gzt=()=>"pestaña Entorno",Vzt=()=>"एनवायरनमेंट टैब",Kzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hzt():t==="fa"?qzt():t==="ar"?Uzt():t==="es"?Gzt():t==="hi"?Vzt():Fzt()}),Wzt=()=>"Free models · No sign-in required",Qzt=()=>"免费模型 · 无需登录",Xzt=()=>"مدل‌های رایگان · بدون نیاز به ورود",Yzt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",Zzt=()=>"Modelos gratuitos · No es necesario iniciar sesión",Jzt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",ejt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qzt():t==="fa"?Xzt():t==="ar"?Yzt():t==="es"?Zzt():t==="hi"?Jzt():Wzt()}),tjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,njt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,rjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,sjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,ijt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,ajt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,ojt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?njt(e):t==="fa"?rjt(e):t==="ar"?sjt(e):t==="es"?ijt(e):t==="hi"?ajt(e):tjt(e)}),cjt=()=>"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.",ljt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",ujt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",_jt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",fjt=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",djt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",hjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ljt():t==="fa"?ujt():t==="ar"?_jt():t==="es"?fjt():t==="hi"?djt():cjt()}),pjt=()=>"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.",mjt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",gjt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",vjt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",bjt=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",yjt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",xjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mjt():t==="fa"?gjt():t==="ar"?vjt():t==="es"?bjt():t==="hi"?yjt():pjt()}),wjt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",kjt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",Sjt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",Cjt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",Ejt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",Njt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",zjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kjt():t==="fa"?Sjt():t==="ar"?Cjt():t==="es"?Ejt():t==="hi"?Njt():wjt()}),jjt=e=>`GPU × ${e==null?void 0:e.count}`,Tjt=e=>`${e==null?void 0:e.count} 个 GPU`,Ajt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,Rjt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,Mjt=e=>`GPU × ${e==null?void 0:e.count}`,Ojt=e=>`GPU × ${e==null?void 0:e.count}`,Djt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tjt(e):t==="fa"?Ajt(e):t==="ar"?Rjt(e):t==="es"?Mjt(e):t==="hi"?Ojt(e):jjt(e)}),Ljt=()=>"has changes",Ijt=()=>"有更改",$jt=()=>"دارای تغییر",Bjt=()=>"به تغييرات",Pjt=()=>"con cambios",Fjt=()=>"बदलाव हैं",Hjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ijt():t==="fa"?$jt():t==="ar"?Bjt():t==="es"?Pjt():t==="hi"?Fjt():Ljt()}),qjt=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}.`,Ujt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,Gjt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,Vjt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,Kjt=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,Wjt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,Qjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ujt(e):t==="fa"?Gjt(e):t==="ar"?Vjt(e):t==="es"?Kjt(e):t==="hi"?Wjt(e):qjt(e)}),Xjt=()=>"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.",Yjt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",Zjt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",Jjt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",eTt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",tTt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",nTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yjt():t==="fa"?Zjt():t==="ar"?Jjt():t==="es"?eTt():t==="hi"?tTt():Xjt()}),rTt=()=>"Install",sTt=()=>"安装",iTt=()=>"نصب",aTt=()=>"تثبيت",oTt=()=>"Instalar",cTt=()=>"इंस्टॉल करें",lTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sTt():t==="fa"?iTt():t==="ar"?aTt():t==="es"?oTt():t==="hi"?cTt():rTt()}),uTt=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.`,_Tt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,fTt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,dTt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,hTt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,pTt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,mTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Tt(e):t==="fa"?fTt(e):t==="ar"?dTt(e):t==="es"?hTt(e):t==="hi"?pTt(e):uTt(e)}),gTt=e=>`Install the ${e==null?void 0:e.command} command`,vTt=e=>`安装 ${e==null?void 0:e.command} 命令`,bTt=e=>`نصب فرمان ${e==null?void 0:e.command}`,yTt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,xTt=e=>`Instalar el comando ${e==null?void 0:e.command}`,wTt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,kTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vTt(e):t==="fa"?bTt(e):t==="ar"?yTt(e):t==="es"?xTt(e):t==="hi"?wTt(e):gTt(e)}),STt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",CTt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",ETt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",NTt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",zTt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",jTt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",TTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CTt():t==="fa"?ETt():t==="ar"?NTt():t==="es"?zTt():t==="hi"?jTt():STt()}),ATt=()=>"Install the new release now instead of waiting for the background update.",RTt=()=>"立即安装新版本,无需等待后台更新。",MTt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",OTt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",DTt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",LTt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",ITt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RTt():t==="fa"?MTt():t==="ar"?OTt():t==="es"?DTt():t==="hi"?LTt():ATt()}),$Tt=()=>"Discard your unsaved Kubernetes changes?",BTt=()=>"要放弃未保存的 Kubernetes 更改吗?",PTt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",FTt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",HTt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",qTt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",UTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BTt():t==="fa"?PTt():t==="ar"?FTt():t==="es"?HTt():t==="hi"?qTt():$Tt()}),GTt=()=>"Key from",VTt=()=>"密钥来自",KTt=()=>"کلید از",WTt=()=>"المفتاح من",QTt=()=>"Clave tomada de la",XTt=()=>"की स्रोत",YTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VTt():t==="fa"?KTt():t==="ar"?WTt():t==="es"?QTt():t==="hi"?XTt():GTt()}),ZTt=()=>"Use current kubectl context",JTt=()=>"使用当前 kubectl 上下文",eAt=()=>"استفاده از کانتکست فعلی kubectl",tAt=()=>"استخدام سياق kubectl الحالي",nAt=()=>"Usar el contexto actual de kubectl",rAt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",sAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JTt():t==="fa"?eAt():t==="ar"?tAt():t==="es"?nAt():t==="hi"?rAt():ZTt()}),iAt=e=>`Use current context (${e==null?void 0:e.context})`,aAt=e=>`使用当前上下文(${e==null?void 0:e.context})`,oAt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,cAt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,lAt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,uAt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,_At=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aAt(e):t==="fa"?oAt(e):t==="ar"?cAt(e):t==="es"?lAt(e):t==="hi"?uAt(e):iAt(e)}),fAt=()=>"Language",dAt=()=>"语言",hAt=()=>"زبان",pAt=()=>"اللغة",mAt=()=>"Idioma",gAt=()=>"भाषा",vAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dAt():t==="fa"?hAt():t==="ar"?pAt():t==="es"?mAt():t==="hi"?gAt():fAt()}),bAt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,yAt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,xAt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,wAt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,kAt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,SAt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,CAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yAt(e):t==="fa"?xAt(e):t==="ar"?wAt(e):t==="es"?kAt(e):t==="hi"?SAt(e):bAt(e)}),EAt=()=>"Make default",NAt=()=>"设为默认值",zAt=()=>"پیش‌فرض شود",jAt=()=>"جعله افتراضيًا",TAt=()=>"Establecer como predeterminado",AAt=()=>"डिफ़ॉल्ट बनाएं",RAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NAt():t==="fa"?zAt():t==="ar"?jAt():t==="es"?TAt():t==="hi"?AAt():EAt()}),MAt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",OAt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",DAt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",LAt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",IAt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",$At=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",BAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OAt():t==="fa"?DAt():t==="ar"?LAt():t==="es"?IAt():t==="hi"?$At():MAt()}),PAt=()=>"Replace token ID",FAt=()=>"替换令牌 ID",HAt=()=>"جایگزینی شناسهٔ توکن",qAt=()=>"استبدال معرّف الرمز",UAt=()=>"Reemplazar ID del token",GAt=()=>"टोकन ID बदलें",VAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FAt():t==="fa"?HAt():t==="ar"?qAt():t==="es"?UAt():t==="hi"?GAt():PAt()}),KAt=()=>"Replace token secret",WAt=()=>"替换令牌密钥",QAt=()=>"جایگزینی رمز توکن",XAt=()=>"استبدال سرّ الرمز",YAt=()=>"Reemplazar secreto del token",ZAt=()=>"टोकन सीक्रेट बदलें",JAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WAt():t==="fa"?QAt():t==="ar"?XAt():t==="es"?YAt():t==="hi"?ZAt():KAt()}),eRt=()=>"How to get a Modal token",tRt=()=>"如何获取 Modal 令牌",nRt=()=>"روش دریافت توکن Modal",rRt=()=>"كيفية الحصول على رمز Modal",sRt=()=>"Cómo obtener un token de Modal",iRt=()=>"Modal टोकन कैसे लें",aRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tRt():t==="fa"?nRt():t==="ar"?rRt():t==="es"?sRt():t==="hi"?iRt():eRt()}),oRt=()=>"Token ID",cRt=()=>"令牌 ID",lRt=()=>"شناسهٔ توکن",uRt=()=>"معرّف الرمز",_Rt=()=>"ID del token",fRt=()=>"टोकन ID",dRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cRt():t==="fa"?lRt():t==="ar"?uRt():t==="es"?_Rt():t==="hi"?fRt():oRt()}),hRt=()=>"Token secret",pRt=()=>"令牌密钥",mRt=()=>"رمز توکن",gRt=()=>"سرّ الرمز",vRt=()=>"Secreto del token",bRt=()=>"टोकन सीक्रेट",yRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pRt():t==="fa"?mRt():t==="ar"?gRt():t==="es"?vRt():t==="hi"?bRt():hRt()}),xRt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,wRt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,kRt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,SRt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,CRt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,ERt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,NRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wRt(e):t==="fa"?kRt(e):t==="ar"?SRt(e):t==="es"?CRt(e):t==="hi"?ERt(e):xRt(e)}),zRt=e=>`Needs ${e==null?void 0:e.tool}`,jRt=e=>`需要 ${e==null?void 0:e.tool}`,TRt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,ARt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,RRt=e=>`Requiere ${e==null?void 0:e.tool}`,MRt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,ORt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jRt(e):t==="fa"?TRt(e):t==="ar"?ARt(e):t==="es"?RRt(e):t==="hi"?MRt(e):zRt(e)}),DRt=()=>"Needs tools",LRt=()=>"缺少工具",IRt=()=>"به ابزارها نیاز دارد",$Rt=()=>"يحتاج إلى أدوات",BRt=()=>"Requiere herramientas",PRt=()=>"टूल की ज़रूरत है",FRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LRt():t==="fa"?IRt():t==="ar"?$Rt():t==="es"?BRt():t==="hi"?PRt():DRt()}),HRt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,qRt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,URt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,GRt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,VRt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,KRt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,WRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qRt(e):t==="fa"?URt(e):t==="ar"?GRt(e):t==="es"?VRt(e):t==="hi"?KRt(e):HRt(e)}),QRt=()=>"New runs use SSH; choose a host when launching.",XRt=()=>"新运行将使用 SSH;启动时请选择主机。",YRt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",ZRt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",JRt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",eMt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",tMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XRt():t==="fa"?YRt():t==="ar"?ZRt():t==="es"?JRt():t==="hi"?eMt():QRt()}),nMt=()=>"New token",rMt=()=>"新令牌",sMt=()=>"توکن جدید",iMt=()=>"رمز جديد",aMt=()=>"Nuevo token",oMt=()=>"नया टोकन",cMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rMt():t==="fa"?sMt():t==="ar"?iMt():t==="es"?aMt():t==="hi"?oMt():nMt()}),lMt=()=>"No default flavor",uMt=()=>"不设默认配置",_Mt=()=>"بدون پیکربندی پیش‌فرض",fMt=()=>"لا يوجد تكوين افتراضي للموارد",dMt=()=>"Sin opción predeterminada",hMt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",pMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uMt():t==="fa"?_Mt():t==="ar"?fMt():t==="es"?dMt():t==="hi"?hMt():lMt()}),mMt=()=>"none",gMt=()=>"无",vMt=()=>"هیچ‌کدام",bMt=()=>"لا شيء",yMt=()=>"ninguno",xMt=()=>"कोई नहीं",Yk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gMt():t==="fa"?vMt():t==="ar"?bMt():t==="es"?yMt():t==="hi"?xMt():mMt()}),wMt=()=>"Not connected",kMt=()=>"未连接",SMt=()=>"متصل نیست",CMt=()=>"غير متصل",EMt=()=>"No conectado",NMt=()=>"कनेक्टेड नहीं",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kMt():t==="fa"?SMt():t==="ar"?CMt():t==="es"?EMt():t==="hi"?NMt():wMt()}),zMt=()=>"not found on PATH",jMt=()=>"在 PATH 中未找到",TMt=()=>"در PATH پیدا نشد",AMt=()=>"غير موجود في PATH",RMt=()=>"no se encontró en el PATH",MMt=()=>"PATH पर नहीं मिला",OMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jMt():t==="fa"?TMt():t==="ar"?AMt():t==="es"?RMt():t==="hi"?MMt():zMt()}),DMt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,LMt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,IMt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,$Mt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,BMt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,PMt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,FMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LMt(e):t==="fa"?IMt(e):t==="ar"?$Mt(e):t==="es"?BMt(e):t==="hi"?PMt(e):DMt(e)}),HMt=()=>"not initialized",qMt=()=>"尚未初始化",UMt=()=>"راه‌اندازی نشده",GMt=()=>"غير مهيّأ",VMt=()=>"sin inicializar",KMt=()=>"शुरू नहीं किया गया",WMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qMt():t==="fa"?UMt():t==="ar"?GMt():t==="es"?VMt():t==="hi"?KMt():HMt()}),QMt=()=>"Not set",XMt=()=>"未设置",YMt=()=>"تنظیم نشده",ZMt=()=>"غير مضبوط",JMt=()=>"Sin definir",eOt=()=>"सेट नहीं",f3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XMt():t==="fa"?YMt():t==="ar"?ZMt():t==="es"?JMt():t==="hi"?eOt():QMt()}),tOt=()=>"OAuth (subscription login)",nOt=()=>"OAuth(订阅登录)",rOt=()=>"OAuth (ورود با اشتراک)",sOt=()=>"OAuth (تسجيل دخول الاشتراك)",iOt=()=>"OAuth (inicio de sesión con suscripción)",aOt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",oOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nOt():t==="fa"?rOt():t==="ar"?sOt():t==="es"?iOt():t==="hi"?aOt():tOt()}),cOt=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.`,lOt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,uOt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,_Ot=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,fOt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,dOt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,hOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lOt(e):t==="fa"?uOt(e):t==="ar"?_Ot(e):t==="es"?fOt(e):t==="hi"?dOt(e):cOt(e)}),pOt=()=>"Setting up…",mOt=()=>"正在设置…",gOt=()=>"در حال راه‌اندازی…",vOt=()=>"جارٍ الإعداد…",bOt=()=>"Configurando…",yOt=()=>"सेट अप हो रहा है…",xOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mOt():t==="fa"?gOt():t==="ar"?vOt():t==="es"?bOt():t==="hi"?yOt():pOt()}),wOt=()=>"Account",kOt=()=>"账户",SOt=()=>"حساب",COt=()=>"الحساب",EOt=()=>"Cuenta",NOt=()=>"खाता",Zk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kOt():t==="fa"?SOt():t==="ar"?COt():t==="es"?EOt():t==="hi"?NOt():wOt()}),zOt=()=>"Add one with",jOt=()=>"使用以下命令添加:",TOt=()=>"یکی با این فرمان اضافه کنید:",AOt=()=>"أضِف واحدًا عبر",ROt=()=>"Añade una con",MOt=()=>"इसके साथ एक जोड़ें",OOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jOt():t==="fa"?TOt():t==="ar"?AOt():t==="es"?ROt():t==="hi"?MOt():zOt()}),DOt=()=>"Add variable",LOt=()=>"添加变量",IOt=()=>"افزودن متغیر",$Ot=()=>"إضافة متغيّر",BOt=()=>"Añadir variable",POt=()=>"वेरिएबल जोड़ें",FOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LOt():t==="fa"?IOt():t==="ar"?$Ot():t==="es"?BOt():t==="hi"?POt():DOt()}),HOt=()=>"Agent models",qOt=()=>"智能体模型",UOt=()=>"مدل‌های عامل",GOt=()=>"نماذج الوكيل",VOt=()=>"Modelos de los agentes",KOt=()=>"एजेंट मॉडल",WOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qOt():t==="fa"?UOt():t==="ar"?GOt():t==="es"?VOt():t==="hi"?KOt():HOt()}),QOt=()=>"Anonymous usage analytics",XOt=()=>"匿名使用情况分析",YOt=()=>"تحلیل ناشناس استفاده",ZOt=()=>"تحليلات استخدام مجهولة الهوية",JOt=()=>"Estadísticas de uso anónimas",eDt=()=>"अनाम उपयोग एनालिटिक्स",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XOt():t==="fa"?YOt():t==="ar"?ZOt():t==="es"?JOt():t==="hi"?eDt():QOt()}),tDt=()=>"Auth",nDt=()=>"身份验证",rDt=()=>"احراز هویت",sDt=()=>"المصادقة",iDt=()=>"Autenticación",aDt=()=>"ऑथ",oDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nDt():t==="fa"?rDt():t==="ar"?sDt():t==="es"?iDt():t==="hi"?aDt():tDt()}),cDt=()=>"Authentication",lDt=()=>"身份验证",uDt=()=>"احراز هویت",_Dt=()=>"المصادقة",fDt=()=>"Autenticación",dDt=()=>"प्रमाणीकरण",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lDt():t==="fa"?uDt():t==="ar"?_Dt():t==="es"?fDt():t==="hi"?dDt():cDt()}),hDt=()=>"Back to Compute",pDt=()=>"返回算力设置",mDt=()=>"بازگشت به رایانش",gDt=()=>"العودة إلى الحوسبة",vDt=()=>"Volver a Cómputo",bDt=()=>"कंप्यूट पर वापस जाएं",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pDt():t==="fa"?mDt():t==="ar"?gDt():t==="es"?vDt():t==="hi"?bDt():hDt()}),yDt=()=>"Backend",xDt=()=>"后端",wDt=()=>"بک‌اند",kDt=()=>"بيئة التنفيذ",SDt=()=>"Backend",CDt=()=>"बैकएंड",EDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xDt():t==="fa"?wDt():t==="ar"?kDt():t==="es"?SDt():t==="hi"?CDt():yDt()}),NDt=()=>"Baseline",zDt=()=>"基线",jDt=()=>"خط مبنا",TDt=()=>"الأساس المرجعي",ADt=()=>"Rama base",RDt=()=>"बेसलाइन",MDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zDt():t==="fa"?jDt():t==="ar"?TDt():t==="es"?ADt():t==="hi"?RDt():NDt()}),ODt=()=>"Binary",DDt=()=>"可执行文件",LDt=()=>"فایل اجرایی",IDt=()=>"الملف التنفيذي",$Dt=()=>"Binario",BDt=()=>"बाइनरी",PDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DDt():t==="fa"?LDt():t==="ar"?IDt():t==="es"?$Dt():t==="hi"?BDt():ODt()}),FDt=()=>"Cancel",HDt=()=>"取消",qDt=()=>"لغو",UDt=()=>"إلغاء",GDt=()=>"Cancelar",VDt=()=>"रद्द करें",K_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HDt():t==="fa"?qDt():t==="ar"?UDt():t==="es"?GDt():t==="hi"?VDt():FDt()}),KDt=()=>"Cancel new variable",WDt=()=>"取消新变量",QDt=()=>"لغو متغیر جدید",XDt=()=>"إلغاء المتغيّر الجديد",YDt=()=>"Cancelar nueva variable",ZDt=()=>"नया वेरिएबल रद्द करें",JDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WDt():t==="fa"?QDt():t==="ar"?XDt():t==="es"?YDt():t==="hi"?ZDt():KDt()}),eLt=()=>"Checking compute targets…",tLt=()=>"正在检查算力目标…",nLt=()=>"در حال بررسی مقصدهای رایانشی…",rLt=()=>"جارٍ التحقق من أهداف الحوسبة…",sLt=()=>"Comprobando destinos de cómputo…",iLt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",aLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tLt():t==="fa"?nLt():t==="ar"?rLt():t==="es"?sLt():t==="hi"?iLt():eLt()}),oLt=()=>"Checking kubectl…",cLt=()=>"正在检查 kubectl…",lLt=()=>"در حال بررسی kubectl…",uLt=()=>"جارٍ التحقق من kubectl…",_Lt=()=>"Comprobando kubectl…",fLt=()=>"kubectl जाँचा जा रहा है…",dLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cLt():t==="fa"?lLt():t==="ar"?uLt():t==="es"?_Lt():t==="hi"?fLt():oLt()}),hLt=()=>"Checking Modal…",pLt=()=>"正在检查 Modal…",mLt=()=>"در حال بررسی Modal…",gLt=()=>"جارٍ التحقق من Modal…",vLt=()=>"Comprobando Modal…",bLt=()=>"Modal जाँचा जा रहा है…",yLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pLt():t==="fa"?mLt():t==="ar"?gLt():t==="es"?vLt():t==="hi"?bLt():hLt()}),xLt=()=>"Choose a preset flavor",wLt=()=>"选择预设规格",kLt=()=>"یک پیکربندی آماده انتخاب کنید",SLt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",CLt=()=>"Elige una opción predefinida",ELt=()=>"एक प्रीसेट फ़्लेवर चुनें",Cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wLt():t==="fa"?kLt():t==="ar"?SLt():t==="es"?CLt():t==="hi"?ELt():xLt()}),NLt=()=>"cluster default",zLt=()=>"集群默认值",jLt=()=>"پیش‌فرض خوشه",TLt=()=>"افتراضي العنقود",ALt=()=>"valor predeterminado del clúster",RLt=()=>"क्लस्टर डिफ़ॉल्ट",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zLt():t==="fa"?jLt():t==="ar"?TLt():t==="es"?ALt():t==="hi"?RLt():NLt()}),MLt=()=>"cluster default (e.g. 4h, 30m)",OLt=()=>"集群默认值(例如 4h、30m)",DLt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",LLt=()=>"افتراضي العنقود (مثل 4h أو 30m)",ILt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",$Lt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",BLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OLt():t==="fa"?DLt():t==="ar"?LLt():t==="es"?ILt():t==="hi"?$Lt():MLt()}),PLt=()=>"Cluster unreachable",FLt=()=>"无法连接集群",HLt=()=>"خوشه در دسترس نیست",qLt=()=>"تعذّر الوصول إلى العنقود",ULt=()=>"Clúster inaccesible",GLt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",VLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FLt():t==="fa"?HLt():t==="ar"?qLt():t==="es"?ULt():t==="hi"?GLt():PLt()}),KLt=()=>"Compute",WLt=()=>"算力",QLt=()=>"رایانش",XLt=()=>"الحوسبة",YLt=()=>"Cómputo",ZLt=()=>"कंप्यूट",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WLt():t==="fa"?QLt():t==="ar"?XLt():t==="es"?YLt():t==="hi"?ZLt():KLt()}),JLt=()=>"Connect compute backends and choose where new runs execute.",eIt=()=>"连接算力后端,并选择新运行的执行位置。",tIt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",nIt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",rIt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",sIt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",iIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eIt():t==="fa"?tIt():t==="ar"?nIt():t==="es"?rIt():t==="hi"?sIt():JLt()}),aIt=()=>"Connected",oIt=()=>"已连接",cIt=()=>"متصل",lIt=()=>"متصل",uIt=()=>"Conectado",_It=()=>"कनेक्टेड",fIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oIt():t==="fa"?cIt():t==="ar"?lIt():t==="es"?uIt():t==="hi"?_It():aIt()}),dIt=()=>"Context",hIt=()=>"上下文",pIt=()=>"زمینه",mIt=()=>"السياق",gIt=()=>"Contexto",vIt=()=>"कॉन्टेक्स्ट",bIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hIt():t==="fa"?pIt():t==="ar"?mIt():t==="es"?gIt():t==="hi"?vIt():dIt()}),yIt=()=>"Current",xIt=()=>"当前",wIt=()=>"فعلی",kIt=()=>"الحالي",SIt=()=>"Actual",CIt=()=>"मौजूदा",EIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xIt():t==="fa"?wIt():t==="ar"?kIt():t==="es"?SIt():t==="hi"?CIt():yIt()}),NIt=()=>"Currently off:",zIt=()=>"当前已关闭:",jIt=()=>"اکنون خاموش است:",TIt=()=>"معطّل حاليًا:",AIt=()=>"Desactivado actualmente:",RIt=()=>"फ़िलहाल बंद:",MIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zIt():t==="fa"?jIt():t==="ar"?TIt():t==="es"?AIt():t==="hi"?RIt():NIt()}),OIt=()=>"Custom flavor",DIt=()=>"自定义规格",LIt=()=>"پیکربندی سفارشی",IIt=()=>"تكوين موارد مخصّص",$It=()=>"Opción personalizada",BIt=()=>"कस्टम फ़्लेवर",PIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DIt():t==="fa"?LIt():t==="ar"?IIt():t==="es"?$It():t==="hi"?BIt():OIt()}),FIt=()=>"Custom flavor…",HIt=()=>"自定义规格…",qIt=()=>"پیکربندی سفارشی…",UIt=()=>"تكوين موارد مخصّص…",GIt=()=>"Opción personalizada…",VIt=()=>"कस्टम फ़्लेवर…",KIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HIt():t==="fa"?qIt():t==="ar"?UIt():t==="es"?GIt():t==="hi"?VIt():FIt()}),WIt=()=>"Data directory",QIt=()=>"数据目录",XIt=()=>"پوشهٔ داده",YIt=()=>"دليل البيانات",ZIt=()=>"Directorio de datos",JIt=()=>"डेटा डायरेक्टरी",e$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QIt():t==="fa"?XIt():t==="ar"?YIt():t==="es"?ZIt():t==="hi"?JIt():WIt()}),t$t=()=>"default",n$t=()=>"默认",r$t=()=>"پیش‌فرض",s$t=()=>"افتراضي",i$t=()=>"predeterminado",a$t=()=>"डिफ़ॉल्ट",o$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n$t():t==="fa"?r$t():t==="ar"?s$t():t==="es"?i$t():t==="hi"?a$t():t$t()}),c$t=()=>"Default",l$t=()=>"默认",u$t=()=>"پیش‌فرض",_$t=()=>"الافتراضي",f$t=()=>"Predeterminado",d$t=()=>"डिफ़ॉल्ट",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l$t():t==="fa"?u$t():t==="ar"?_$t():t==="es"?f$t():t==="hi"?d$t():c$t()}),h$t=()=>"Default destination",p$t=()=>"默认目标",m$t=()=>"مقصد پیش‌فرض",g$t=()=>"الوجهة الافتراضية",v$t=()=>"Destino predeterminado",b$t=()=>"डिफ़ॉल्ट गंतव्य",y$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p$t():t==="fa"?m$t():t==="ar"?g$t():t==="es"?v$t():t==="hi"?b$t():h$t()}),x$t=()=>"Detecting hardware…",w$t=()=>"正在检测硬件…",k$t=()=>"در حال شناسایی سخت‌افزار…",S$t=()=>"جارٍ اكتشاف العتاد…",C$t=()=>"Detectando hardware…",E$t=()=>"हार्डवेयर पहचाना जा रहा है…",N$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w$t():t==="fa"?k$t():t==="ar"?S$t():t==="es"?C$t():t==="hi"?E$t():x$t()}),z$t=()=>"Detecting harnesses…",j$t=()=>"正在检测智能体工具…",T$t=()=>"در حال شناسایی ابزارهای عامل…",A$t=()=>"جارٍ اكتشاف أدوات البرمجة…",R$t=()=>"Detectando agentes…",M$t=()=>"हार्नेस पहचाने जा रहे हैं…",O$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j$t():t==="fa"?T$t():t==="ar"?A$t():t==="es"?R$t():t==="hi"?M$t():z$t()}),D$t=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",L$t=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",I$t=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",$$t=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",B$t=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",P$t=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",F$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L$t():t==="fa"?I$t():t==="ar"?$$t():t==="es"?B$t():t==="hi"?P$t():D$t()}),H$t=()=>"Effective URL",q$t=()=>"实际使用的网址",U$t=()=>"نشانی مؤثر",G$t=()=>"الرابط الفعّال",V$t=()=>"URL efectiva",K$t=()=>"प्रभावी URL",W$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q$t():t==="fa"?U$t():t==="ar"?G$t():t==="es"?V$t():t==="hi"?K$t():H$t()}),Q$t=()=>"Enable GitHub syncing for new projects",X$t=()=>"为新项目启用 GitHub 同步",Y$t=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",Z$t=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",J$t=()=>"Activar la sincronización con GitHub en proyectos nuevos",eBt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X$t():t==="fa"?Y$t():t==="ar"?Z$t():t==="es"?J$t():t==="hi"?eBt():Q$t()}),tBt=()=>"Environment",nBt=()=>"环境",rBt=()=>"محیط",sBt=()=>"البيئة",iBt=()=>"Entorno",aBt=()=>"एनवायरनमेंट",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nBt():t==="fa"?rBt():t==="ar"?sBt():t==="es"?iBt():t==="hi"?aBt():tBt()}),oBt=()=>"Failed",cBt=()=>"失败",lBt=()=>"ناموفق",uBt=()=>"فشل",_Bt=()=>"Error",fBt=()=>"विफल",Jk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cBt():t==="fa"?lBt():t==="ar"?uBt():t==="es"?_Bt():t==="hi"?fBt():oBt()}),dBt=()=>"General",hBt=()=>"常规",pBt=()=>"عمومی",mBt=()=>"عام",gBt=()=>"General",vBt=()=>"सामान्य",bBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hBt():t==="fa"?pBt():t==="ar"?mBt():t==="es"?gBt():t==="hi"?vBt():dBt()}),yBt=()=>"GitHub publishing",xBt=()=>"GitHub 发布",wBt=()=>"انتشار در GitHub",kBt=()=>"النشر على GitHub",SBt=()=>"Publicación en GitHub",CBt=()=>"GitHub प्रकाशन",EBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xBt():t==="fa"?wBt():t==="ar"?kBt():t==="es"?SBt():t==="hi"?CBt():yBt()}),NBt=()=>"Git token",zBt=()=>"Git 令牌",jBt=()=>"توکن Git",TBt=()=>"رمز Git",ABt=()=>"Token de Git",RBt=()=>"Git टोकन",MBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBt():t==="fa"?jBt():t==="ar"?TBt():t==="es"?ABt():t==="hi"?RBt():NBt()}),OBt=()=>"Harnesses",DBt=()=>"智能体工具",LBt=()=>"ابزارهای عامل",IBt=()=>"أدوات البرمجة",$Bt=()=>"Agentes",BBt=()=>"हार्नेस",d3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBt():t==="fa"?LBt():t==="ar"?IBt():t==="es"?$Bt():t==="hi"?BBt():OBt()}),PBt=()=>"hf_…",FBt=()=>"hf_…",HBt=()=>"hf_…",qBt=()=>"hf_…",UBt=()=>"hf_…",GBt=()=>"hf_…",VBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FBt():t==="fa"?HBt():t==="ar"?qBt():t==="es"?UBt():t==="hi"?GBt():PBt()}),KBt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",WBt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",QBt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",XBt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",YBt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",ZBt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",JBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WBt():t==="fa"?QBt():t==="ar"?XBt():t==="es"?YBt():t==="hi"?ZBt():KBt()}),ePt=()=>"Initialize Git",tPt=()=>"初始化 Git",nPt=()=>"راه‌اندازی Git",rPt=()=>"تهيئة Git",sPt=()=>"Inicializar Git",iPt=()=>"Git शुरू करें",aPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tPt():t==="fa"?nPt():t==="ar"?rPt():t==="es"?sPt():t==="hi"?iPt():ePt()}),oPt=()=>"Install",cPt=()=>"安装",lPt=()=>"نصب",uPt=()=>"تثبيت",_Pt=()=>"Instalar",fPt=()=>"इंस्टॉल करें",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cPt():t==="fa"?lPt():t==="ar"?uPt():t==="es"?_Pt():t==="hi"?fPt():oPt()}),dPt=()=>"Install broken",hPt=()=>"安装损坏",pPt=()=>"نصب خراب است",mPt=()=>"التثبيت معطوب",gPt=()=>"Instalación dañada",vPt=()=>"इंस्टॉल खराब है",bPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hPt():t==="fa"?pPt():t==="ar"?mPt():t==="es"?gPt():t==="hi"?vPt():dPt()}),yPt=()=>"Install GitHub CLI",xPt=()=>"安装 GitHub CLI",wPt=()=>"نصب GitHub CLI",kPt=()=>"تثبيت واجهة GitHub لسطر الأوامر",SPt=()=>"Instalar GitHub CLI",CPt=()=>"GitHub CLI इंस्टॉल करें",EPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xPt():t==="fa"?wPt():t==="ar"?kPt():t==="es"?SPt():t==="hi"?CPt():yPt()}),NPt=()=>"Install updates automatically",zPt=()=>"自动安装更新",jPt=()=>"نصب خودکار به‌روزرسانی‌ها",TPt=()=>"تثبيت التحديثات تلقائيًا",APt=()=>"Instalar actualizaciones automáticamente",RPt=()=>"अपडेट अपने आप इंस्टॉल करें",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zPt():t==="fa"?jPt():t==="ar"?TPt():t==="es"?APt():t==="hi"?RPt():NPt()}),MPt=()=>"Instance history",OPt=()=>"实例历史",DPt=()=>"تاریخچهٔ نمونه‌ها",LPt=()=>"سجل المثيلات",IPt=()=>"Historial de instancias",$Pt=()=>"इंस्टेंस इतिहास",BPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OPt():t==="fa"?DPt():t==="ar"?LPt():t==="es"?IPt():t==="hi"?$Pt():MPt()}),PPt=()=>"Invalid Token",FPt=()=>"令牌无效",HPt=()=>"توکن نامعتبر",qPt=()=>"رمز غير صالح",UPt=()=>"Token no válido",GPt=()=>"अमान्य टोकन",VPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FPt():t==="fa"?HPt():t==="ar"?qPt():t==="es"?UPt():t==="hi"?GPt():PPt()}),KPt=()=>"Jobs / Dashboard URL",WPt=()=>"Jobs / 控制台网址",QPt=()=>"نشانی Jobs / داشبورد",XPt=()=>"رابط المهام / لوحة التحكم",YPt=()=>"URL de jobs / dashboard",ZPt=()=>"Jobs / डैशबोर्ड URL",JPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WPt():t==="fa"?QPt():t==="ar"?XPt():t==="es"?YPt():t==="hi"?ZPt():KPt()}),eFt=()=>"kubectl not found",tFt=()=>"未找到 kubectl",nFt=()=>"kubectl پیدا نشد",rFt=()=>"لم يُعثر على kubectl",sFt=()=>"No se encontró kubectl",iFt=()=>"kubectl नहीं मिला",aFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tFt():t==="fa"?nFt():t==="ar"?rFt():t==="es"?sFt():t==="hi"?iFt():eFt()}),oFt=()=>"Latest",cFt=()=>"最新版本",lFt=()=>"جدیدترین",uFt=()=>"الأحدث",_Ft=()=>"Última",fFt=()=>"नवीनतम",dFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cFt():t==="fa"?lFt():t==="ar"?uFt():t==="es"?_Ft():t==="hi"?fFt():oFt()}),hFt=()=>"Loading…",pFt=()=>"正在加载…",mFt=()=>"در حال بارگیری…",gFt=()=>"جارٍ التحميل…",vFt=()=>"Cargando…",bFt=()=>"लोड हो रहा है…",Au=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pFt():t==="fa"?mFt():t==="ar"?gFt():t==="es"?vFt():t==="hi"?bFt():hFt()}),yFt=()=>"Loading Ray settings…",xFt=()=>"正在加载 Ray 设置…",wFt=()=>"در حال بارگیری تنظیمات Ray…",kFt=()=>"جارٍ تحميل إعدادات Ray…",SFt=()=>"Cargando configuración de Ray…",CFt=()=>"Ray सेटिंग्स लोड हो रही हैं…",EFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xFt():t==="fa"?wFt():t==="ar"?kFt():t==="es"?SFt():t==="hi"?CFt():yFt()}),NFt=()=>"Loading slurm settings…",zFt=()=>"正在加载 Slurm 设置…",jFt=()=>"در حال بارگیری تنظیمات Slurm…",TFt=()=>"جارٍ تحميل إعدادات slurm…",AFt=()=>"Cargando configuración de Slurm…",RFt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",MFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFt():t==="fa"?jFt():t==="ar"?TFt():t==="es"?AFt():t==="hi"?RFt():NFt()}),OFt=()=>"Loading status…",DFt=()=>"正在加载状态…",LFt=()=>"در حال بارگیری وضعیت…",IFt=()=>"جارٍ تحميل الحالة…",$Ft=()=>"Cargando estado…",BFt=()=>"स्थिति लोड हो रही है…",PFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DFt():t==="fa"?LFt():t==="ar"?IFt():t==="es"?$Ft():t==="hi"?BFt():OFt()}),FFt=()=>"Local only",HFt=()=>"仅本地",qFt=()=>"فقط محلی",UFt=()=>"محلي فقط",GFt=()=>"Solo local",VFt=()=>"केवल लोकल",KFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFt():t==="fa"?qFt():t==="ar"?UFt():t==="es"?GFt():t==="hi"?VFt():FFt()}),WFt=()=>"Local repository",QFt=()=>"本地仓库",XFt=()=>"مخزن محلی",YFt=()=>"مستودع محلي",ZFt=()=>"Repositorio local",JFt=()=>"लोकल रिपॉज़िटरी",eHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QFt():t==="fa"?XFt():t==="ar"?YFt():t==="es"?ZFt():t==="hi"?JFt():WFt()}),tHt=()=>"Login node",nHt=()=>"登录节点",rHt=()=>"گرهٔ ورود",sHt=()=>"عقدة الدخول",iHt=()=>"Nodo de acceso",aHt=()=>"लॉगिन नोड",oHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nHt():t==="fa"?rHt():t==="ar"?sHt():t==="es"?iHt():t==="hi"?aHt():tHt()}),cHt=()=>"Make GitHub syncing the default?",lHt=()=>"将 GitHub 同步设为默认值?",uHt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",_Ht=()=>"جعل مزامنة GitHub افتراضية؟",fHt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",dHt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",hHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lHt():t==="fa"?uHt():t==="ar"?_Ht():t==="es"?fHt():t==="hi"?dHt():cHt()}),pHt=()=>"Missing bash/tar",mHt=()=>"缺少 bash/tar",gHt=()=>"bash/tar موجود نیست",vHt=()=>"‏bash/tar مفقودان",bHt=()=>"Falta bash/tar",yHt=()=>"bash/tar गुम है",xHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mHt():t==="fa"?gHt():t==="ar"?vHt():t==="es"?bHt():t==="hi"?yHt():pHt()}),wHt=()=>"More compute options",kHt=()=>"更多算力选项",SHt=()=>"گزینه‌های رایانشی بیشتر",CHt=()=>"خيارات حوسبة إضافية",EHt=()=>"Más opciones de cómputo",NHt=()=>"और कंप्यूट विकल्प",zHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kHt():t==="fa"?SHt():t==="ar"?CHt():t==="es"?EHt():t==="hi"?NHt():wHt()}),jHt=()=>"Move failed:",THt=()=>"移动失败:",AHt=()=>"انتقال ناموفق بود:",RHt=()=>"فشل النقل:",MHt=()=>"Error al mover:",OHt=()=>"स्थानांतरण विफल:",DHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?THt():t==="fa"?AHt():t==="ar"?RHt():t==="es"?MHt():t==="hi"?OHt():jHt()}),LHt=()=>"Moved. orx is now using the new location.",IHt=()=>"已移动。orx 现在使用新位置。",$Ht=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",BHt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",PHt=()=>"Movido. orx ya usa la nueva ubicación.",FHt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",HHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IHt():t==="fa"?$Ht():t==="ar"?BHt():t==="es"?PHt():t==="hi"?FHt():LHt()}),qHt=()=>"Namespace",UHt=()=>"命名空间",GHt=()=>"فضای نام",VHt=()=>"مساحة الأسماء",KHt=()=>"Namespace",WHt=()=>"नेमस्पेस",QHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UHt():t==="fa"?GHt():t==="ar"?VHt():t==="es"?KHt():t==="hi"?WHt():qHt()}),XHt=()=>"New location",YHt=()=>"新位置",ZHt=()=>"محل جدید",JHt=()=>"الموقع الجديد",eqt=()=>"Nueva ubicación",tqt=()=>"नया स्थान",nqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YHt():t==="fa"?ZHt():t==="ar"?JHt():t==="es"?eqt():t==="hi"?tqt():XHt()}),rqt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",sqt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",iqt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",aqt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",oqt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",cqt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",lqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sqt():t==="fa"?iqt():t==="ar"?aqt():t==="es"?oqt():t==="hi"?cqt():rqt()}),uqt=()=>"New variable key",_qt=()=>"新变量键名",fqt=()=>"کلید متغیر جدید",dqt=()=>"مفتاح المتغيّر الجديد",hqt=()=>"Nombre de la nueva variable",pqt=()=>"नई वेरिएबल की",mqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_qt():t==="fa"?fqt():t==="ar"?dqt():t==="es"?hqt():t==="hi"?pqt():uqt()}),gqt=()=>"New variable value",vqt=()=>"新变量值",bqt=()=>"مقدار متغیر جدید",yqt=()=>"قيمة المتغيّر الجديد",xqt=()=>"Valor de la nueva variable",wqt=()=>"नई वेरिएबल वैल्यू",kqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vqt():t==="fa"?bqt():t==="ar"?yqt():t==="es"?xqt():t==="hi"?wqt():gqt()}),Sqt=()=>"No code, prompts, file contents, or account identifiers are sent.",Cqt=()=>"不会发送代码、提示词、文件内容或账户标识符。",Eqt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",Nqt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",zqt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",jqt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",Tqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cqt():t==="fa"?Eqt():t==="ar"?Nqt():t==="es"?zqt():t==="hi"?jqt():Sqt()}),Aqt=()=>"No hosts found in ~/.ssh/config.",Rqt=()=>"在 ~/.ssh/config 中未找到主机。",Mqt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",Oqt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",Dqt=()=>"No se encontraron hosts en ~/.ssh/config.",Lqt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",Iqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rqt():t==="fa"?Mqt():t==="ar"?Oqt():t==="es"?Dqt():t==="hi"?Lqt():Aqt()}),$qt=()=>"No job-create permission",Bqt=()=>"没有创建 Job 的权限",Pqt=()=>"مجوز ساخت Job وجود ندارد",Fqt=()=>"لا صلاحية لإنشاء المهام",Hqt=()=>"Sin permiso para crear jobs",qqt=()=>"जॉब बनाने की अनुमति नहीं",Uqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bqt():t==="fa"?Pqt():t==="ar"?Fqt():t==="es"?Hqt():t==="hi"?qqt():$qt()}),Gqt=()=>"No Write Permissions",Vqt=()=>"无写入权限",Kqt=()=>"بدون مجوز نوشتن",Wqt=()=>"لا صلاحيات كتابة",Qqt=()=>"Sin permisos de escritura",Xqt=()=>"लिखने की अनुमति नहीं",Yqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vqt():t==="fa"?Kqt():t==="ar"?Wqt():t==="es"?Qqt():t==="hi"?Xqt():Gqt()}),Zqt=()=>"No key on this computer to register — load a registered key with",Jqt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",eUt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",tUt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",nUt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",rUt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",sUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jqt():t==="fa"?eUt():t==="ar"?tUt():t==="es"?nUt():t==="hi"?rUt():Zqt()}),iUt=()=>"No key on this computer yet — create one with",aUt=()=>"此计算机上还没有密钥——使用以下命令创建:",oUt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",cUt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",lUt=()=>"Aún no hay ninguna clave en este equipo — crea una con",uUt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",_Ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aUt():t==="fa"?oUt():t==="ar"?cUt():t==="es"?lUt():t==="hi"?uUt():iUt()}),fUt=()=>"No Slurm CLI",dUt=()=>"无 Slurm CLI",hUt=()=>"بدون CLI اسلورم",pUt=()=>"لا توجد واجهة Slurm لسطر الأوامر",mUt=()=>"Sin CLI de Slurm",gUt=()=>"कोई Slurm CLI नहीं",vUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUt():t==="fa"?hUt():t==="ar"?pUt():t==="es"?mUt():t==="hi"?gUt():fUt()}),bUt=()=>"None registered",yUt=()=>"未注册任何密钥",xUt=()=>"هیچ‌کدام ثبت نشده",wUt=()=>"لا شيء مسجّل",kUt=()=>"Ninguna registrada",SUt=()=>"कोई रजिस्टर्ड नहीं",CUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yUt():t==="fa"?xUt():t==="ar"?wUt():t==="es"?kUt():t==="hi"?SUt():bUt()}),EUt=()=>"Not checked",NUt=()=>"未检查",zUt=()=>"بررسی نشده",jUt=()=>"لم يُفحص",TUt=()=>"Sin comprobar",AUt=()=>"जाँचा नहीं गया",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NUt():t==="fa"?zUt():t==="ar"?jUt():t==="es"?TUt():t==="hi"?AUt():EUt()}),RUt=()=>"Not configured",MUt=()=>"未配置",OUt=()=>"پیکربندی نشده",DUt=()=>"غير مُعَد",LUt=()=>"Sin configurar",IUt=()=>"कॉन्फ़िगर नहीं किया गया",jb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUt():t==="fa"?OUt():t==="ar"?DUt():t==="es"?LUt():t==="hi"?IUt():RUt()}),$Ut=()=>"Not installed",BUt=()=>"未安装",PUt=()=>"نصب نیست",FUt=()=>"غير مثبّت",HUt=()=>"No instalado",qUt=()=>"इंस्टॉल नहीं है",UUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BUt():t==="fa"?PUt():t==="ar"?FUt():t==="es"?HUt():t==="hi"?qUt():$Ut()}),GUt=()=>"Not now",VUt=()=>"暂不",KUt=()=>"اکنون نه",WUt=()=>"ليس الآن",QUt=()=>"Ahora no",XUt=()=>"अभी नहीं",YUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VUt():t==="fa"?KUt():t==="ar"?WUt():t==="es"?QUt():t==="hi"?XUt():GUt()}),ZUt=()=>"Not on this computer",JUt=()=>"不在此计算机上",eGt=()=>"روی این رایانه نیست",tGt=()=>"ليس على هذا الحاسوب",nGt=()=>"No en este equipo",rGt=()=>"इस कंप्यूटर पर नहीं",sGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JUt():t==="fa"?eGt():t==="ar"?tGt():t==="es"?nGt():t==="hi"?rGt():ZUt()}),iGt=()=>"Not set (pass --host per launch)",aGt=()=>"未设置(每次启动时传入 --host)",oGt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",cGt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",lGt=()=>"Sin definir (pasa --host en cada lanzamiento)",uGt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGt():t==="fa"?oGt():t==="ar"?cGt():t==="es"?lGt():t==="hi"?uGt():iGt()}),_Gt=()=>"Not signed in",fGt=()=>"未登录",dGt=()=>"وارد نشده",hGt=()=>"لم يتم تسجيل الدخول",pGt=()=>"Sin iniciar sesión",mGt=()=>"साइन इन नहीं है",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fGt():t==="fa"?dGt():t==="ar"?hGt():t==="es"?pGt():t==="hi"?mGt():_Gt()}),gGt=()=>"On this computer",vGt=()=>"在此计算机上",bGt=()=>"روی این رایانه",yGt=()=>"على هذا الحاسوب",xGt=()=>"En este equipo",wGt=()=>"इस कंप्यूटर पर",kGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vGt():t==="fa"?bGt():t==="ar"?yGt():t==="es"?xGt():t==="hi"?wGt():gGt()}),SGt=()=>"Open a project to inspect its repository and GitHub publication state.",CGt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",EGt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",NGt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",zGt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",jGt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",TGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CGt():t==="fa"?EGt():t==="ar"?NGt():t==="es"?zGt():t==="hi"?jGt():SGt()}),AGt=()=>"Open job page",RGt=()=>"打开作业页面",MGt=()=>"باز کردن صفحهٔ کار",OGt=()=>"فتح صفحة المهمة",DGt=()=>"Abrir página del job",LGt=()=>"जॉब पेज खोलें",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RGt():t==="fa"?MGt():t==="ar"?OGt():t==="es"?DGt():t==="hi"?LGt():AGt()}),IGt=()=>"Open on GitHub",$Gt=()=>"在 GitHub 上打开",BGt=()=>"باز کردن در GitHub",PGt=()=>"فتح على GitHub",FGt=()=>"Abrir en GitHub",HGt=()=>"GitHub पर खोलें",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Gt():t==="fa"?BGt():t==="ar"?PGt():t==="es"?FGt():t==="hi"?HGt():IGt()}),qGt=()=>", or create one with",UGt=()=>",或使用以下命令创建:",GGt=()=>"، یا با این فرمان یکی بسازید:",VGt=()=>"، أو أنشئ واحدًا عبر",KGt=()=>", o crea una con",WGt=()=>", या इसके साथ एक बनाएं",QGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UGt():t==="fa"?GGt():t==="ar"?VGt():t==="es"?KGt():t==="hi"?WGt():qGt()}),XGt=()=>"Org",YGt=()=>"组织",ZGt=()=>"سازمان",JGt=()=>"المؤسسة",eVt=()=>"Org.",tVt=()=>"संगठन",nVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YGt():t==="fa"?ZGt():t==="ar"?JGt():t==="es"?eVt():t==="hi"?tVt():XGt()}),rVt=()=>"Orgs",sVt=()=>"组织",iVt=()=>"سازمان‌ها",aVt=()=>"المؤسسات",oVt=()=>"Orgs.",cVt=()=>"संगठन",lVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sVt():t==="fa"?iVt():t==="ar"?aVt():t==="es"?oVt():t==="hi"?cVt():rVt()}),uVt=()=>"orx can't update this install",_Vt=()=>"orx 无法更新此安装",fVt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",dVt=()=>"لا يستطيع orx تحديث هذا التثبيت",hVt=()=>"orx no puede actualizar esta instalación",pVt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",mVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Vt():t==="fa"?fVt():t==="ar"?dVt():t==="es"?hVt():t==="hi"?pVt():uVt()}),gVt=()=>"Overleaf",vVt=()=>"Overleaf",bVt=()=>"Overleaf",yVt=()=>"Overleaf",xVt=()=>"Overleaf",wVt=()=>"Overleaf",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVt():t==="fa"?bVt():t==="ar"?yVt():t==="es"?xVt():t==="hi"?wVt():gVt()}),kVt=()=>"Overleaf Git authentication token",SVt=()=>"Overleaf Git 身份验证令牌",CVt=()=>"توکن احراز هویت Git در Overleaf",EVt=()=>"رمز مصادقة Git لـ Overleaf",NVt=()=>"Token de autenticación de Git de Overleaf",zVt=()=>"Overleaf Git प्रमाणीकरण टोकन",jVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SVt():t==="fa"?CVt():t==="ar"?EVt():t==="es"?NVt():t==="hi"?zVt():kVt()}),TVt=()=>"Overridden by env",AVt=()=>"已被环境变量覆盖",RVt=()=>"بازنویسی‌شده توسط محیط",MVt=()=>"متجاوَز عبر متغيّر البيئة",OVt=()=>"Sobrescrito por el entorno",DVt=()=>"env द्वारा ओवरराइड किया गया",LVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AVt():t==="fa"?RVt():t==="ar"?MVt():t==="es"?OVt():t==="hi"?DVt():TVt()}),IVt=()=>"Partition",$Vt=()=>"分区",BVt=()=>"پارتیشن",PVt=()=>"القسم",FVt=()=>"Partición",HVt=()=>"पार्टीशन",qVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Vt():t==="fa"?BVt():t==="ar"?PVt():t==="es"?FVt():t==="hi"?HVt():IVt()}),UVt=()=>"Path",GVt=()=>"路径",VVt=()=>"مسیر",KVt=()=>"المسار",WVt=()=>"Ruta",QVt=()=>"पथ",XVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GVt():t==="fa"?VVt():t==="ar"?KVt():t==="es"?WVt():t==="hi"?QVt():UVt()}),YVt=()=>"Plan",ZVt=()=>"方案",JVt=()=>"سطح اشتراک",eKt=()=>"الخطة",tKt=()=>"Plan",nKt=()=>"प्लान",rKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZVt():t==="fa"?JVt():t==="ar"?eKt():t==="es"?tKt():t==="hi"?nKt():YVt()}),sKt=()=>"Project",iKt=()=>"项目",aKt=()=>"پروژه",oKt=()=>"المشروع",cKt=()=>"Proyecto",lKt=()=>"प्रोजेक्ट",uKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iKt():t==="fa"?aKt():t==="ar"?oKt():t==="es"?cKt():t==="hi"?lKt():sKt()}),_Kt=()=>"Ray version",fKt=()=>"Ray 版本",dKt=()=>"نسخهٔ Ray",hKt=()=>"إصدار Ray",pKt=()=>"Versión de Ray",mKt=()=>"Ray वर्शन",gKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fKt():t==="fa"?dKt():t==="ar"?hKt():t==="es"?pKt():t==="hi"?mKt():_Kt()}),vKt=()=>"Reachable",bKt=()=>"可访问",yKt=()=>"در دسترس",xKt=()=>"يمكن الوصول إليه",wKt=()=>"Accesible",kKt=()=>"पहुँच योग्य",SKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bKt():t==="fa"?yKt():t==="ar"?xKt():t==="es"?wKt():t==="hi"?kKt():vKt()}),CKt=()=>"Reading ~/.ssh/config…",EKt=()=>"正在读取 ~/.ssh/config…",NKt=()=>"در حال خواندن ‎~/.ssh/config…",zKt=()=>"جارٍ قراءة ‎~/.ssh/config…",jKt=()=>"Leyendo ~/.ssh/config…",TKt=()=>"~/.ssh/config पढ़ा जा रहा है…",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EKt():t==="fa"?NKt():t==="ar"?zKt():t==="es"?jKt():t==="hi"?TKt():CKt()}),AKt=()=>"Ready",RKt=()=>"就绪",MKt=()=>"آماده",OKt=()=>"جاهز",DKt=()=>"Listo",LKt=()=>"तैयार",wm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RKt():t==="fa"?MKt():t==="ar"?OKt():t==="es"?DKt():t==="hi"?LKt():AKt()}),IKt=()=>"Ready to move",$Kt=()=>"可以移动",BKt=()=>"آمادهٔ انتقال",PKt=()=>"جاهز للنقل",FKt=()=>"Listo para mover",HKt=()=>"स्थानांतरण के लिए तैयार",qKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Kt():t==="fa"?BKt():t==="ar"?PKt():t==="es"?FKt():t==="hi"?HKt():IKt()}),UKt=()=>"Configured",GKt=()=>"已配置",VKt=()=>"پیکربندی‌شده",KKt=()=>"مُعَد",WKt=()=>"Configurado",QKt=()=>"कॉन्फ़िगर किया गया",eS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GKt():t==="fa"?VKt():t==="ar"?KKt():t==="es"?WKt():t==="hi"?QKt():UKt()}),XKt=()=>"Refresh",YKt=()=>"刷新",ZKt=()=>"تازه‌سازی",JKt=()=>"تحديث",eWt=()=>"Actualizar",tWt=()=>"रीफ़्रेश करें",km=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YKt():t==="fa"?ZKt():t==="ar"?JKt():t==="es"?eWt():t==="hi"?tWt():XKt()}),nWt=()=>"Remotes",rWt=()=>"远程仓库",sWt=()=>"مخزن‌های دوردست",iWt=()=>"المستودعات البعيدة",aWt=()=>"Remotos",oWt=()=>"रिमोट",cWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rWt():t==="fa"?sWt():t==="ar"?iWt():t==="es"?aWt():t==="hi"?oWt():nWt()}),lWt=()=>"Repository",uWt=()=>"仓库",_Wt=()=>"مخزن",fWt=()=>"المستودع",dWt=()=>"Repositorio",hWt=()=>"रिपॉज़िटरी",pWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uWt():t==="fa"?_Wt():t==="ar"?fWt():t==="es"?dWt():t==="hi"?hWt():lWt()}),mWt=()=>"Restart to finish updating",gWt=()=>"重新启动以完成更新",vWt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",bWt=()=>"أعد التشغيل لإكمال التحديث",yWt=()=>"Reinicia para terminar la actualización",xWt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",wWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gWt():t==="fa"?vWt():t==="ar"?bWt():t==="es"?yWt():t==="hi"?xWt():mWt()}),kWt=()=>"Running instances",SWt=()=>"正在运行的实例",CWt=()=>"نمونه‌های در حال اجرا",EWt=()=>"المثيلات قيد التشغيل",NWt=()=>"Instancias en ejecución",zWt=()=>"चल रहे इंस्टेंस",jWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SWt():t==="fa"?CWt():t==="ar"?EWt():t==="es"?NWt():t==="hi"?zWt():kWt()}),TWt=()=>"Runtime",AWt=()=>"运行时间",RWt=()=>"زمان اجرا",MWt=()=>"مدة التشغيل",OWt=()=>"Runtime",DWt=()=>"रनटाइम",LWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AWt():t==="fa"?RWt():t==="ar"?MWt():t==="es"?OWt():t==="hi"?DWt():TWt()}),IWt=()=>". Save it under that key if it's meant for HF Jobs.",$Wt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",BWt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",PWt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",FWt=()=>". Guárdalo con ese nombre si es para HF Jobs.",HWt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",qWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Wt():t==="fa"?BWt():t==="ar"?PWt():t==="es"?FWt():t==="hi"?HWt():IWt()}),UWt=()=>"Session cookie",GWt=()=>"会话 cookie",VWt=()=>"کوکی نشست",KWt=()=>"ملف تعريف ارتباط الجلسة",WWt=()=>"Cookie de sesión",QWt=()=>"सेशन कुकी",XWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GWt():t==="fa"?VWt():t==="ar"?KWt():t==="es"?WWt():t==="hi"?QWt():UWt()}),YWt=()=>"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.",ZWt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",JWt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",eQt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",tQt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",nQt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",rQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZWt():t==="fa"?JWt():t==="ar"?eQt():t==="es"?tQt():t==="hi"?nQt():YWt()}),sQt=()=>"Settings",iQt=()=>"设置",aQt=()=>"تنظیمات",oQt=()=>"الإعدادات",cQt=()=>"Configuración",lQt=()=>"सेटिंग्स",tS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iQt():t==="fa"?aQt():t==="ar"?oQt():t==="es"?cQt():t==="hi"?lQt():sQt()}),uQt=()=>"Signed in",_Qt=()=>"已登录",fQt=()=>"وارد شده",dQt=()=>"تم تسجيل الدخول",hQt=()=>"Sesión iniciada",pQt=()=>"साइन इन है",mQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Qt():t==="fa"?fQt():t==="ar"?dQt():t==="es"?hQt():t==="hi"?pQt():uQt()}),gQt=()=>"Source",vQt=()=>"来源",bQt=()=>"منبع",yQt=()=>"المصدر",xQt=()=>"Origen",wQt=()=>"स्रोत",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vQt():t==="fa"?bQt():t==="ar"?yQt():t==="es"?xQt():t==="hi"?wQt():gQt()}),kQt=()=>"SSH Key",SQt=()=>"SSH 密钥",CQt=()=>"کلید SSH",EQt=()=>"مفتاح SSH",NQt=()=>"Clave SSH",zQt=()=>"SSH की",jQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SQt():t==="fa"?CQt():t==="ar"?EQt():t==="es"?NQt():t==="hi"?zQt():kQt()}),TQt=()=>"Started",AQt=()=>"开始时间",RQt=()=>"آغاز",MQt=()=>"بدأ",OQt=()=>"Inicio",DQt=()=>"शुरू हुआ",LQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AQt():t==="fa"?RQt():t==="ar"?MQt():t==="es"?OQt():t==="hi"?DQt():TQt()}),IQt=()=>"State",$Qt=()=>"状态",BQt=()=>"وضعیت",PQt=()=>"الحالة",FQt=()=>"Estado",HQt=()=>"स्थिति",qQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Qt():t==="fa"?BQt():t==="ar"?PQt():t==="es"?FQt():t==="hi"?HQt():IQt()}),UQt=()=>"Status",GQt=()=>"状态",VQt=()=>"وضعیت",KQt=()=>"الحالة",WQt=()=>"Estado",QQt=()=>"स्थिति",Mh=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GQt():t==="fa"?VQt():t==="ar"?KQt():t==="es"?WQt():t==="hi"?QQt():UQt()}),XQt=()=>"Storage",YQt=()=>"存储",ZQt=()=>"ذخیره‌سازی",JQt=()=>"التخزين",eXt=()=>"Almacenamiento",tXt=()=>"स्टोरेज",nXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YQt():t==="fa"?ZQt():t==="ar"?JQt():t==="es"?eXt():t==="hi"?tXt():XQt()}),rXt=()=>"Sync",sXt=()=>"同步",iXt=()=>"همگام‌سازی",aXt=()=>"مزامنة",oXt=()=>"Sincronización",cXt=()=>"सिंक",lXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sXt():t==="fa"?iXt():t==="ar"?aXt():t==="es"?oXt():t==="hi"?cXt():rXt()}),uXt=()=>"Syncing off",_Xt=()=>"同步已关闭",fXt=()=>"همگام‌سازی خاموش",dXt=()=>"المزامنة معطّلة",hXt=()=>"Sincronización desactivada",pXt=()=>"सिंकिंग बंद है",mXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Xt():t==="fa"?fXt():t==="ar"?dXt():t==="es"?hXt():t==="hi"?pXt():uXt()}),gXt=()=>"Test connection",vXt=()=>"测试连接",bXt=()=>"آزمایش اتصال",yXt=()=>"اختبار الاتصال",xXt=()=>"Probar conexión",wXt=()=>"कनेक्शन जाँचें",kXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vXt():t==="fa"?bXt():t==="ar"?yXt():t==="es"?xXt():t==="hi"?wXt():gXt()}),SXt=()=>"Testing…",CXt=()=>"正在测试…",EXt=()=>"در حال آزمایش…",NXt=()=>"جارٍ الاختبار…",zXt=()=>"Probando…",jXt=()=>"जाँचा जा रहा है…",TXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CXt():t==="fa"?EXt():t==="ar"?NXt():t==="es"?zXt():t==="hi"?jXt():SXt()}),AXt=()=>", then add it with",RXt=()=>",然后使用以下命令添加:",MXt=()=>"، سپس با این فرمان اضافه‌اش کنید:",OXt=()=>"، ثم أضِفه عبر",DXt=()=>" y luego añádela con",LXt=()=>", फिर इसे इसके साथ जोड़ें",IXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RXt():t==="fa"?MXt():t==="ar"?OXt():t==="es"?DXt():t==="hi"?LXt():AXt()}),$Xt=()=>"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.",BXt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",PXt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",FXt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",HXt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",qXt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",UXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BXt():t==="fa"?PXt():t==="ar"?FXt():t==="es"?HXt():t==="hi"?qXt():$Xt()}),GXt=()=>"This saved destination is not configured. Set it up below or choose another backend.",VXt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",KXt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",WXt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",QXt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",XXt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",YXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VXt():t==="fa"?KXt():t==="ar"?WXt():t==="es"?QXt():t==="hi"?XXt():GXt()}),ZXt=()=>"This value looks like a Hugging Face token — compute runs only read it from",JXt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",eYt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",tYt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",nYt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",rYt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",sYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JXt():t==="fa"?eYt():t==="ar"?tYt():t==="es"?nYt():t==="hi"?rYt():ZXt()}),iYt=()=>"Time limit",aYt=()=>"时间限制",oYt=()=>"محدودیت زمانی",cYt=()=>"الحد الزمني",lYt=()=>"Límite de tiempo",uYt=()=>"समय सीमा",_Yt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aYt():t==="fa"?oYt():t==="ar"?cYt():t==="es"?lYt():t==="hi"?uYt():iYt()}),fYt=()=>"Unable to verify",dYt=()=>"无法验证",hYt=()=>"تأیید ممکن نیست",pYt=()=>"تعذّر التحقق",mYt=()=>"No se pudo verificar",gYt=()=>"सत्यापित नहीं हो सका",h3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dYt():t==="fa"?hYt():t==="ar"?pYt():t==="es"?mYt():t==="hi"?gYt():fYt()}),vYt=()=>"Unknown",bYt=()=>"未知",yYt=()=>"نامشخص",xYt=()=>"غير معروف",wYt=()=>"Desconocido",kYt=()=>"अज्ञात",yL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bYt():t==="fa"?yYt():t==="ar"?xYt():t==="es"?wYt():t==="hi"?kYt():vYt()}),SYt=()=>"Update required",CYt=()=>"需要更新",EYt=()=>"نیازمند به‌روزرسانی",NYt=()=>"مطلوب تحديث",zYt=()=>"Actualización necesaria",jYt=()=>"अपडेट ज़रूरी है",TYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CYt():t==="fa"?EYt():t==="ar"?NYt():t==="es"?zYt():t==="hi"?jYt():SYt()}),AYt=()=>"Updates",RYt=()=>"更新",MYt=()=>"به‌روزرسانی‌ها",OYt=()=>"التحديثات",DYt=()=>"Actualizaciones",LYt=()=>"अपडेट",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RYt():t==="fa"?MYt():t==="ar"?OYt():t==="es"?DYt():t==="hi"?LYt():AYt()}),IYt=()=>"Usage analytics",$Yt=()=>"使用情况分析",BYt=()=>"تحلیل استفاده",PYt=()=>"تحليلات الاستخدام",FYt=()=>"Estadísticas de uso",HYt=()=>"उपयोग एनालिटिक्स",qYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Yt():t==="fa"?BYt():t==="ar"?PYt():t==="es"?FYt():t==="hi"?HYt():IYt()}),UYt=()=>"value",GYt=()=>"值",VYt=()=>"مقدار",KYt=()=>"القيمة",WYt=()=>"valor",QYt=()=>"वैल्यू",xL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GYt():t==="fa"?VYt():t==="ar"?KYt():t==="es"?WYt():t==="hi"?QYt():UYt()}),XYt=()=>"Variables available to runs and the research agent (API keys, tokens).",YYt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",ZYt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",JYt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",eZt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",tZt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",nZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YYt():t==="fa"?ZYt():t==="ar"?JYt():t==="es"?eZt():t==="hi"?tZt():XYt()}),rZt=()=>"Version",sZt=()=>"版本",iZt=()=>"نسخه",aZt=()=>"الإصدار",oZt=()=>"Versión",cZt=()=>"वर्शन",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sZt():t==="fa"?iZt():t==="ar"?aZt():t==="es"?oZt():t==="hi"?cZt():rZt()}),lZt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",uZt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",_Zt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",fZt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",dZt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",hZt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",pZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uZt():t==="fa"?_Zt():t==="ar"?fZt():t==="es"?dZt():t==="hi"?hZt():lZt()}),mZt=()=>"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.",gZt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",vZt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",bZt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",yZt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",xZt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",wZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gZt():t==="fa"?vZt():t==="ar"?bZt():t==="es"?yZt():t==="hi"?xZt():mZt()}),kZt=()=>"Pick a login node first",SZt=()=>"请先选择登录节点",CZt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",EZt=()=>"اختر عقدة دخول أولًا",NZt=()=>"Elige primero un nodo de acceso",zZt=()=>"पहले एक लॉगिन नोड चुनें",jZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SZt():t==="fa"?CZt():t==="ar"?EZt():t==="es"?NZt():t==="hi"?zZt():kZt()}),TZt=()=>"Providers",AZt=()=>"提供商",RZt=()=>"ارائه‌دهندگان",MZt=()=>"المزوّدون",OZt=()=>"Proveedores",DZt=()=>"प्रोवाइडर",LZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AZt():t==="fa"?RZt():t==="ar"?MZt():t==="es"?OZt():t==="hi"?DZt():TZt()}),IZt=()=>"Reconnect",$Zt=()=>"重新连接",BZt=()=>"اتصال دوباره",PZt=()=>"إعادة الاتصال",FZt=()=>"Reconectar",HZt=()=>"फिर से कनेक्ट करें",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Zt():t==="fa"?BZt():t==="ar"?PZt():t==="es"?FZt():t==="hi"?HZt():IZt()}),qZt=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,UZt=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,GZt=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,VZt=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,KZt=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,WZt=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,QZt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UZt(e):t==="fa"?GZt(e):t==="ar"?VZt(e):t==="es"?KZt(e):t==="hi"?WZt(e):qZt(e)}),XZt=()=>"Reinstall with the orx installer to get automatic updates.",YZt=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",ZZt=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",JZt=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",eJt=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",tJt=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",nJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YZt():t==="fa"?ZZt():t==="ar"?JZt():t==="es"?eJt():t==="hi"?tJt():XZt()}),rJt=()=>"Re-link",sJt=()=>"重新链接",iJt=()=>"پیوند دوباره",aJt=()=>"إعادة الربط",oJt=()=>"Volver a enlazar",cJt=()=>"फिर से लिंक करें",lJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sJt():t==="fa"?iJt():t==="ar"?aJt():t==="es"?oJt():t==="hi"?cJt():rJt()}),uJt=()=>"Remove cookie",_Jt=()=>"移除 cookie",fJt=()=>"حذف کوکی",dJt=()=>"إزالة ملف تعريف الارتباط",hJt=()=>"Quitar cookie",pJt=()=>"कुकी हटाएं",mJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Jt():t==="fa"?fJt():t==="ar"?dJt():t==="es"?hJt():t==="hi"?pJt():uJt()}),gJt=()=>"Remove token",vJt=()=>"移除令牌",bJt=()=>"حذف توکن",yJt=()=>"إزالة الرمز",xJt=()=>"Quitar token",wJt=()=>"टोकन हटाएं",kJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vJt():t==="fa"?bJt():t==="ar"?yJt():t==="es"?xJt():t==="hi"?wJt():gJt()}),SJt=()=>"Removing…",CJt=()=>"正在移除…",EJt=()=>"در حال حذف…",NJt=()=>"جارٍ الإزالة…",zJt=()=>"Quitando…",jJt=()=>"हटाया जा रहा है…",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CJt():t==="fa"?EJt():t==="ar"?NJt():t==="es"?zJt():t==="hi"?jJt():SJt()}),TJt=()=>"Replace anyway",AJt=()=>"仍要替换",RJt=()=>"به‌هرحال جایگزین کن",MJt=()=>"الاستبدال على أي حال",OJt=()=>"Reemplazar de todos modos",DJt=()=>"फिर भी बदलें",LJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AJt():t==="fa"?RJt():t==="ar"?MJt():t==="es"?OJt():t==="hi"?DJt():TJt()}),IJt=()=>"Replace key",$Jt=()=>"替换密钥",BJt=()=>"جایگزینی کلید",PJt=()=>"استبدال المفتاح",FJt=()=>"Reemplazar clave",HJt=()=>"की बदलें",qJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Jt():t==="fa"?BJt():t==="ar"?PJt():t==="es"?FJt():t==="hi"?HJt():IJt()}),UJt=()=>"Replace token",GJt=()=>"替换令牌",VJt=()=>"جایگزینی توکن",KJt=()=>"استبدال الرمز",WJt=()=>"Reemplazar token",QJt=()=>"टोकन बदलें",XJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJt():t==="fa"?VJt():t==="ar"?KJt():t==="es"?WJt():t==="hi"?QJt():UJt()}),YJt=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,ZJt=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,JJt=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,een=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,ten=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,nen=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,ren=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJt(e):t==="fa"?JJt(e):t==="ar"?een(e):t==="es"?ten(e):t==="hi"?nen(e):YJt(e)}),sen=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,ien=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,aen=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,oen=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,cen=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,len=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,uen=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ien(e):t==="fa"?aen(e):t==="ar"?oen(e):t==="es"?cen(e):t==="hi"?len(e):sen(e)}),_en=()=>"Run `gh auth login` in your terminal.",fen=()=>"请在终端中运行 `gh auth login`。",den=()=>"در پایانه `gh auth login` را اجرا کنید.",hen=()=>"نفّذ `gh auth login` في طرفيتك.",pen=()=>"Ejecuta `gh auth login` en tu terminal.",men=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",gen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fen():t==="fa"?den():t==="ar"?hen():t==="es"?pen():t==="hi"?men():_en()}),ven=()=>"Saved",ben=()=>"已保存",yen=()=>"ذخیره شده",xen=()=>"تم الحفظ",wen=()=>"Guardado",ken=()=>"सेव हो गया",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ben():t==="fa"?yen():t==="ar"?xen():t==="es"?wen():t==="hi"?ken():ven()}),Sen=()=>"Set up",Cen=()=>"设置",Een=()=>"راه‌اندازی",Nen=()=>"إعداد",zen=()=>"Configurar",jen=()=>"सेट अप करें",Ten=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cen():t==="fa"?Een():t==="ar"?Nen():t==="es"?zen():t==="hi"?jen():Sen()}),Aen=()=>"Set up SSH key",Ren=()=>"设置 SSH 密钥",Men=()=>"راه‌اندازی کلید SSH",Oen=()=>"إعداد مفتاح SSH",Den=()=>"Configurar clave SSH",Len=()=>"SSH की सेट अप करें",Ien=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ren():t==="fa"?Men():t==="ar"?Oen():t==="es"?Den():t==="hi"?Len():Aen()}),$en=()=>"Sign in",Ben=()=>"登录",Pen=()=>"ورود",Fen=()=>"تسجيل الدخول",Hen=()=>"Iniciar sesión",qen=()=>"साइन इन करें",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ben():t==="fa"?Pen():t==="ar"?Fen():t==="es"?Hen():t==="hi"?qen():$en()}),Uen=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,Gen=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,Ven=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,Ken=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,Wen=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,Qen=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,CL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gen(e):t==="fa"?Ven(e):t==="ar"?Ken(e):t==="es"?Wen(e):t==="hi"?Qen(e):Uen(e)}),Xen=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",Yen=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",Zen=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",Jen=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",etn=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",ttn=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",ntn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yen():t==="fa"?Zen():t==="ar"?Jen():t==="es"?etn():t==="hi"?ttn():Xen()}),rtn=()=>"The terminal disconnected before setup completed. Try again.",stn=()=>"设置完成前终端连接已断开。请重试。",itn=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",atn=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",otn=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",ctn=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",jv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?stn():t==="fa"?itn():t==="ar"?atn():t==="es"?otn():t==="hi"?ctn():rtn()}),ltn=()=>"Dark",utn=()=>"深色",_tn=()=>"تیره",ftn=()=>"داكن",dtn=()=>"Oscuro",htn=()=>"डार्क",ptn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?utn():t==="fa"?_tn():t==="ar"?ftn():t==="es"?dtn():t==="hi"?htn():ltn()}),mtn=()=>"Theme",gtn=()=>"主题",vtn=()=>"پوسته",btn=()=>"السمة",ytn=()=>"Tema",xtn=()=>"थीम",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gtn():t==="fa"?vtn():t==="ar"?btn():t==="es"?ytn():t==="hi"?xtn():mtn()}),wtn=()=>"Light",ktn=()=>"浅色",Stn=()=>"روشن",Ctn=()=>"فاتح",Etn=()=>"Claro",Ntn=()=>"लाइट",ztn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ktn():t==="fa"?Stn():t==="ar"?Ctn():t==="es"?Etn():t==="hi"?Ntn():wtn()}),jtn=()=>"System",Ttn=()=>"系统",Atn=()=>"سیستم",Rtn=()=>"النظام",Mtn=()=>"Sistema",Otn=()=>"सिस्टम",Dtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ttn():t==="fa"?Atn():t==="ar"?Rtn():t==="es"?Mtn():t==="hi"?Otn():jtn()}),Ltn=()=>"Set up billing in the Tinker console",Itn=()=>"在 Tinker 控制台设置账单",$tn=()=>"تنظیم پرداخت در کنسول Tinker",Btn=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Ptn=()=>"Configura la facturación en la consola de Tinker",Ftn=()=>"Tinker कंसोल में बिलिंग सेट अप करें",Htn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Itn():t==="fa"?$tn():t==="ar"?Btn():t==="es"?Ptn():t==="hi"?Ftn():Ltn()}),qtn=()=>"Billing setup required",Utn=()=>"需要设置账单",Gtn=()=>"تنظیم پرداخت لازم است",Vtn=()=>"مطلوب إعداد الفوترة",Ktn=()=>"Hay que configurar la facturación",Wtn=()=>"बिलिंग सेटअप ज़रूरी है",Qtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Utn():t==="fa"?Gtn():t==="ar"?Vtn():t==="es"?Ktn():t==="hi"?Wtn():qtn()}),Xtn=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",Ytn=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",Ztn=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",Jtn=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",enn=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",tnn=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",nnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ytn():t==="fa"?Ztn():t==="ar"?Jtn():t==="es"?enn():t==="hi"?tnn():Xtn()}),rnn=()=>"Invalid Key",snn=()=>"密钥无效",inn=()=>"کلید نامعتبر",ann=()=>"مفتاح غير صالح",onn=()=>"Clave no válida",cnn=()=>"अमान्य की",lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?snn():t==="fa"?inn():t==="ar"?ann():t==="es"?onn():t==="hi"?cnn():rnn()}),unn=()=>"Token from",_nn=()=>"令牌来自",fnn=()=>"توکن از",dnn=()=>"الرمز من",hnn=()=>"Token tomado de la",pnn=()=>"टोकन स्रोत",mnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_nn():t==="fa"?fnn():t==="ar"?dnn():t==="es"?hnn():t==="hi"?pnn():unn()}),gnn=()=>"Update now",vnn=()=>"立即更新",bnn=()=>"اکنون به‌روزرسانی کن",ynn=()=>"التحديث الآن",xnn=()=>"Actualizar ahora",wnn=()=>"अभी अपडेट करें",knn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vnn():t==="fa"?bnn():t==="ar"?ynn():t==="es"?xnn():t==="hi"?wnn():gnn()}),Snn=e=>`Update to ${e==null?void 0:e.version}`,Cnn=e=>`更新到 ${e==null?void 0:e.version}`,Enn=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,Nnn=e=>`التحديث إلى ${e==null?void 0:e.version}`,znn=e=>`Actualizar a ${e==null?void 0:e.version}`,jnn=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,Tnn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cnn(e):t==="fa"?Enn(e):t==="ar"?Nnn(e):t==="es"?znn(e):t==="hi"?jnn(e):Snn(e)}),Ann=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",Rnn=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Mnn=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Onn=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",Dnn=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",Lnn=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",Inn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rnn():t==="fa"?Mnn():t==="ar"?Onn():t==="es"?Dnn():t==="hi"?Lnn():Ann()}),$nn=()=>"Updating default destination…",Bnn=()=>"正在更新默认运行位置…",Pnn=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",Fnn=()=>"جارٍ تحديث الوجهة الافتراضية…",Hnn=()=>"Actualizando el destino predeterminado…",qnn=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",Unn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bnn():t==="fa"?Pnn():t==="ar"?Fnn():t==="es"?Hnn():t==="hi"?qnn():$nn()}),Gnn=()=>"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.",Vnn=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",Knn=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",Wnn=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",Qnn=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",Xnn=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",Ynn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vnn():t==="fa"?Knn():t==="ar"?Wnn():t==="es"?Qnn():t==="hi"?Xnn():Gnn()}),Znn=()=>"Validating…",Jnn=()=>"正在验证…",ern=()=>"در حال اعتبارسنجی…",trn=()=>"جارٍ التحقق…",nrn=()=>"Validando…",rrn=()=>"सत्यापित हो रहा है…",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jnn():t==="fa"?ern():t==="ar"?trn():t==="es"?nrn():t==="hi"?rrn():Znn()}),srn=()=>"View settings",irn=()=>"查看设置",arn=()=>"مشاهدهٔ تنظیمات",orn=()=>"عرض الإعدادات",crn=()=>"Ver configuración",lrn=()=>"सेटिंग्स देखें",urn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?irn():t==="fa"?arn():t==="ar"?orn():t==="es"?crn():t==="hi"?lrn():srn()}),_rn=()=>"Skill",frn=()=>"技能",drn=()=>"مهارت",hrn=()=>"مهارة",prn=()=>"Skill",mrn=()=>"स्किल",grn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?frn():t==="fa"?drn():t==="ar"?hrn():t==="es"?prn():t==="hi"?mrn():_rn()}),vrn=()=>"Loading skill…",brn=()=>"正在加载技能…",yrn=()=>"در حال بارگیری مهارت…",xrn=()=>"جارٍ تحميل المهارة…",wrn=()=>"Cargando skill…",krn=()=>"स्किल लोड हो रही है…",Srn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?brn():t==="fa"?yrn():t==="ar"?xrn():t==="es"?wrn():t==="hi"?krn():vrn()}),Crn=()=>"Personal",Ern=()=>"个人",Nrn=()=>"شخصی",zrn=()=>"شخصي",jrn=()=>"Personal",Trn=()=>"व्यक्तिगत",Arn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ern():t==="fa"?Nrn():t==="ar"?zrn():t==="es"?jrn():t==="hi"?Trn():Crn()}),Rrn=()=>"Alternatively, tell your agent to save a reusable skill for you.",Mrn=()=>"或者,请你的智能体为你保存可重复使用的技能。",Orn=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",Drn=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",Lrn=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",Irn=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",$rn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mrn():t==="fa"?Orn():t==="ar"?Drn():t==="es"?Lrn():t==="hi"?Irn():Rrn()}),Brn=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Prn=e=>`删除技能“${e==null?void 0:e.name}”?`,Frn=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,Hrn=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,qrn=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Urn=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Grn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Prn(e):t==="fa"?Frn(e):t==="ar"?Hrn(e):t==="es"?qrn(e):t==="hi"?Urn(e):Brn(e)}),Vrn=e=>`Delete skill ${e==null?void 0:e.name}`,Krn=e=>`删除技能 ${e==null?void 0:e.name}`,Wrn=e=>`حذف مهارت ${e==null?void 0:e.name}`,Qrn=e=>`حذف المهارة ${e==null?void 0:e.name}`,Xrn=e=>`Eliminar la skill ${e==null?void 0:e.name}`,Yrn=e=>`${e==null?void 0:e.name} स्किल हटाएं`,Zrn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Krn(e):t==="fa"?Wrn(e):t==="ar"?Qrn(e):t==="es"?Xrn(e):t==="hi"?Yrn(e):Vrn(e)}),Jrn=e=>`Delete the “${e==null?void 0:e.name}” template?`,esn=e=>`删除模板“${e==null?void 0:e.name}”?`,tsn=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,nsn=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,rsn=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,ssn=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,isn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?esn(e):t==="fa"?tsn(e):t==="ar"?nsn(e):t==="es"?rsn(e):t==="hi"?ssn(e):Jrn(e)}),asn=e=>`Delete template ${e==null?void 0:e.name}`,osn=e=>`删除模板 ${e==null?void 0:e.name}`,csn=e=>`حذف قالب ${e==null?void 0:e.name}`,lsn=e=>`حذف القالب ${e==null?void 0:e.name}`,usn=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,_sn=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,fsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?osn(e):t==="fa"?csn(e):t==="ar"?lsn(e):t==="es"?usn(e):t==="hi"?_sn(e):asn(e)}),dsn=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",hsn=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",psn=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",msn=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",gsn=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",vsn=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",bsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hsn():t==="fa"?psn():t==="ar"?msn():t==="es"?gsn():t==="hi"?vsn():dsn()}),ysn=()=>"Drop a SKILL.md or .zip here, or click to choose",xsn=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",wsn=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",ksn=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Ssn=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",Csn=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",Esn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xsn():t==="fa"?wsn():t==="ar"?ksn():t==="es"?Ssn():t==="hi"?Csn():ysn()}),Nsn=()=>"Drop a .tex or .zip here, or click to choose",zsn=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",jsn=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Tsn=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Asn=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",Rsn=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",Msn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zsn():t==="fa"?jsn():t==="ar"?Tsn():t==="es"?Asn():t==="hi"?Rsn():Nsn()}),Osn=()=>"File too large (max 20 MB).",Dsn=()=>"文件过大(最大 20 MB)。",Lsn=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Isn=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",$sn=()=>"Archivo demasiado grande (máx. 20 MB).",Bsn=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",NL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dsn():t==="fa"?Lsn():t==="ar"?Isn():t==="es"?$sn():t==="hi"?Bsn():Osn()}),Psn=()=>" + 1 file",Fsn=()=>" + 1 个文件",Hsn=()=>" + ۱ فایل",qsn=()=>" + ملف واحد",Usn=()=>" + 1 archivo",Gsn=()=>" + 1 फ़ाइल",Vsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fsn():t==="fa"?Hsn():t==="ar"?qsn():t==="es"?Usn():t==="hi"?Gsn():Psn()}),Ksn=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",Wsn=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",Qsn=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",Xsn=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",Ysn=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",Zsn=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",Jsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wsn():t==="fa"?Qsn():t==="ar"?Xsn():t==="es"?Ysn():t==="hi"?Zsn():Ksn()}),ein=()=>"Remove from OpenResearch",tin=()=>"从 OpenResearch 移除",nin=()=>"حذف از OpenResearch",rin=()=>"إزالة من OpenResearch",sin=()=>"Quitar de OpenResearch",iin=()=>"OpenResearch से हटाएं",ain=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tin():t==="fa"?nin():t==="ar"?rin():t==="es"?sin():t==="hi"?iin():ein()}),oin=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,cin=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,lin=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,uin=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,_in=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,fin=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,din=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cin(e):t==="fa"?lin(e):t==="ar"?uin(e):t==="es"?_in(e):t==="hi"?fin(e):oin(e)}),hin=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,pin=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,min=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,gin=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,vin=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,bin=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,yin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pin(e):t==="fa"?min(e):t==="ar"?gin(e):t==="es"?vin(e):t==="hi"?bin(e):hin(e)}),xin=e=>` + ${e==null?void 0:e.count} files`,win=e=>` + ${e==null?void 0:e.count} 个文件`,kin=e=>` + ${e==null?void 0:e.count} فایل`,Sin=e=>` + ملفات (${e==null?void 0:e.count})`,Cin=e=>` + ${e==null?void 0:e.count} archivos`,Ein=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,Nin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?win(e):t==="fa"?kin(e):t==="ar"?Sin(e):t==="es"?Cin(e):t==="hi"?Ein(e):xin(e)}),zin=()=>"Could not load skills:",jin=()=>"无法加载技能:",Tin=()=>"بارگیری مهارت‌ها ممکن نشد:",Ain=()=>"تعذّر تحميل المهارات:",Rin=()=>"No se pudieron cargar las skills:",Min=()=>"स्किल लोड नहीं हो सकीं:",Oin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jin():t==="fa"?Tin():t==="ar"?Ain():t==="es"?Rin():t==="hi"?Min():zin()}),Din=()=>"Could not load templates:",Lin=()=>"无法加载模板:",Iin=()=>"بارگیری قالب‌ها ممکن نشد:",$in=()=>"تعذّر تحميل القوالب:",Bin=()=>"No se pudieron cargar las plantillas:",Pin=()=>"टेम्पलेट लोड नहीं हो सके:",Fin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lin():t==="fa"?Iin():t==="ar"?$in():t==="es"?Bin():t==="hi"?Pin():Din()}),Hin=()=>"Customize",qin=()=>"自定义",Uin=()=>"سفارشی‌سازی",Gin=()=>"تخصيص",Vin=()=>"Personalizar",Kin=()=>"कस्टमाइज़ करें",Win=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qin():t==="fa"?Uin():t==="ar"?Gin():t==="es"?Vin():t==="hi"?Kin():Hin()}),Qin=()=>"Delete skill",Xin=()=>"删除技能",Yin=()=>"حذف مهارت",Zin=()=>"حذف المهارة",Jin=()=>"Eliminar skill",ean=()=>"स्किल हटाएं",tan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xin():t==="fa"?Yin():t==="ar"?Zin():t==="es"?Jin():t==="hi"?ean():Qin()}),nan=()=>"Delete template",ran=()=>"删除模板",san=()=>"حذف قالب",ian=()=>"حذف القالب",aan=()=>"Eliminar plantilla",oan=()=>"टेम्पलेट हटाएं",can=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ran():t==="fa"?san():t==="ar"?ian():t==="es"?aan():t==="hi"?oan():nan()}),lan=()=>"LaTeX templates",uan=()=>"LaTeX 模板",_an=()=>"قالب‌های LaTeX",fan=()=>"قوالب LaTeX",dan=()=>"Plantillas de LaTeX",han=()=>"LaTeX टेम्पलेट",pan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uan():t==="fa"?_an():t==="ar"?fan():t==="es"?dan():t==="hi"?han():lan()}),man=()=>"Loading skills…",gan=()=>"正在加载技能…",van=()=>"در حال بارگیری مهارت‌ها…",ban=()=>"جارٍ تحميل المهارات…",yan=()=>"Cargando skills…",xan=()=>"स्किल लोड हो रही हैं…",wan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gan():t==="fa"?van():t==="ar"?ban():t==="es"?yan():t==="hi"?xan():man()}),kan=()=>"Loading templates…",San=()=>"正在加载模板…",Can=()=>"در حال بارگیری قالب‌ها…",Ean=()=>"جارٍ تحميل القوالب…",Nan=()=>"Cargando plantillas…",zan=()=>"टेम्पलेट लोड हो रहे हैं…",jan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?San():t==="fa"?Can():t==="ar"?Ean():t==="es"?Nan():t==="hi"?zan():kan()}),Tan=()=>"No skills yet.",Aan=()=>"尚无技能。",Ran=()=>"هنوز مهارتی وجود ندارد.",Man=()=>"لا توجد مهارات بعد.",Oan=()=>"Aún no hay skills.",Dan=()=>"अभी तक कोई स्किल नहीं।",Lan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aan():t==="fa"?Ran():t==="ar"?Man():t==="es"?Oan():t==="hi"?Dan():Tan()}),Ian=()=>"No templates yet.",$an=()=>"尚无模板。",Ban=()=>"هنوز قالبی وجود ندارد.",Pan=()=>"لا توجد قوالب بعد.",Fan=()=>"Aún no hay plantillas.",Han=()=>"अभी तक कोई टेम्पलेट नहीं।",qan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$an():t==="fa"?Ban():t==="ar"?Pan():t==="es"?Fan():t==="hi"?Han():Ian()}),Uan=()=>"Skills",Gan=()=>"技能",Van=()=>"مهارت‌ها",Kan=()=>"المهارات",Wan=()=>"Skills",Qan=()=>"स्किल",Xan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gan():t==="fa"?Van():t==="ar"?Kan():t==="es"?Wan():t==="hi"?Qan():Uan()}),Yan=()=>"Uploading…",Zan=()=>"正在上传…",Jan=()=>"در حال بارگذاری…",eon=()=>"جارٍ الرفع…",ton=()=>"Subiendo…",non=()=>"अपलोड हो रहा है…",ron=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zan():t==="fa"?Jan():t==="ar"?eon():t==="es"?ton():t==="hi"?non():Yan()}),son=()=>"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. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",ion=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",aon=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",oon=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",con=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",lon=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",uon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ion():t==="fa"?aon():t==="ar"?oon():t==="es"?con():t==="hi"?lon():son()}),_on=()=>"Upload a SKILL.md file or a .zip of a skill folder.",fon=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",don=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",hon=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",pon=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",mon=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",gon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fon():t==="fa"?don():t==="ar"?hon():t==="es"?pon():t==="hi"?mon():_on()}),von=()=>"Upload a .tex file or a .zip of a template folder.",bon=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",yon=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",xon=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",won=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",kon=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",Son=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bon():t==="fa"?yon():t==="ar"?xon():t==="es"?won():t==="hi"?kon():von()}),Con=()=>"Close SSH config",Eon=()=>"关闭 SSH 配置",Non=()=>"بستن پیکربندی SSH",zon=()=>"إغلاق إعداد SSH",jon=()=>"Cerrar la configuración SSH",Ton=()=>"SSH कॉन्फ़िग बंद करें",Aon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eon():t==="fa"?Non():t==="ar"?zon():t==="es"?jon():t==="hi"?Ton():Con()}),Ron=()=>"Discard your unsaved SSH config changes?",Mon=()=>"要放弃未保存的 SSH 配置更改吗?",Oon=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Don=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",Lon=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Ion=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",$on=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mon():t==="fa"?Oon():t==="ar"?Don():t==="es"?Lon():t==="hi"?Ion():Ron()}),Bon=()=>"Loading SSH config…",Pon=()=>"正在加载 SSH 配置…",Fon=()=>"در حال بارگیری پیکربندی SSH…",Hon=()=>"جارٍ تحميل إعداد SSH…",qon=()=>"Cargando la configuración SSH…",Uon=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Gon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pon():t==="fa"?Fon():t==="ar"?Hon():t==="es"?qon():t==="hi"?Uon():Bon()}),Von=()=>"SSH config saved",Kon=()=>"SSH 配置已保存",Won=()=>"پیکربندی SSH ذخیره شد",Qon=()=>"تم حفظ إعداد SSH",Xon=()=>"Configuración SSH guardada",Yon=()=>"SSH कॉन्फ़िग सेव हो गया",Zon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kon():t==="fa"?Won():t==="ar"?Qon():t==="es"?Xon():t==="hi"?Yon():Von()}),Jon=()=>"SSH config",ecn=()=>"SSH 配置",tcn=()=>"پیکربندی SSH",ncn=()=>"إعداد SSH",rcn=()=>"Configuración SSH",scn=()=>"SSH कॉन्फ़िग",icn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ecn():t==="fa"?tcn():t==="ar"?ncn():t==="es"?rcn():t==="hi"?scn():Jon()}),acn=()=>"Configure SSH hosts…",ocn=()=>"配置 SSH 主机…",ccn=()=>"پیکربندی میزبان‌های SSH…",lcn=()=>"إعداد مضيفات SSH…",ucn=()=>"Configurar hosts SSH…",_cn=()=>"SSH होस्ट कॉन्फ़िगर करें…",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ocn():t==="fa"?ccn():t==="ar"?lcn():t==="es"?ucn():t==="hi"?_cn():acn()}),fcn=()=>"Container name or ID",dcn=()=>"容器名称或 ID",hcn=()=>"نام یا شناسهٔ کانتینر",pcn=()=>"اسم الحاوية أو معرّفها",mcn=()=>"Nombre o ID del contenedor",gcn=()=>"कंटेनर का नाम या ID",vcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dcn():t==="fa"?hcn():t==="ar"?pcn():t==="es"?mcn():t==="hi"?gcn():fcn()}),bcn=()=>"Default SSH host",ycn=()=>"默认 SSH 主机",xcn=()=>"میزبان پیش‌فرض SSH",wcn=()=>"مضيف SSH الافتراضي",kcn=()=>"Servidor SSH predeterminado",Scn=()=>"डिफ़ॉल्ट SSH होस्ट",Ccn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ycn():t==="fa"?xcn():t==="ar"?wcn():t==="es"?kcn():t==="hi"?Scn():bcn()}),Ecn=()=>"Direct host",Ncn=()=>"直接在主机上",zcn=()=>"مستقیماً روی میزبان",jcn=()=>"المضيف مباشرة",Tcn=()=>"Servidor directamente",Acn=()=>"सीधे होस्ट पर",Rcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ncn():t==="fa"?zcn():t==="ar"?jcn():t==="es"?Tcn():t==="hi"?Acn():Ecn()}),Mcn=()=>"Existing container",Ocn=()=>"现有容器",Dcn=()=>"کانتینر موجود",Lcn=()=>"حاوية موجودة",Icn=()=>"Contenedor existente",$cn=()=>"मौजूदा कंटेनर",Bcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ocn():t==="fa"?Dcn():t==="ar"?Lcn():t==="es"?Icn():t==="hi"?$cn():Mcn()}),Pcn=()=>"Run in",Fcn=()=>"运行位置",Hcn=()=>"اجرا در",qcn=()=>"التشغيل في",Ucn=()=>"Ejecutar en",Gcn=()=>"यहाँ चलाएँ",Vcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fcn():t==="fa"?Hcn():t==="ar"?qcn():t==="es"?Ucn():t==="hi"?Gcn():Pcn()}),Kcn=()=>"Cancelled",Wcn=()=>"已取消",Qcn=()=>"لغوشده",Xcn=()=>"ملغى",Ycn=()=>"Cancelado",Zcn=()=>"रद्द किया गया",Jcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wcn():t==="fa"?Qcn():t==="ar"?Xcn():t==="es"?Ycn():t==="hi"?Zcn():Kcn()}),eln=()=>"Cancelling",tln=()=>"正在取消",nln=()=>"در حال لغو",rln=()=>"جارٍ الإلغاء",sln=()=>"Cancelando",iln=()=>"रद्द हो रहा है",aln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tln():t==="fa"?nln():t==="ar"?rln():t==="es"?sln():t==="hi"?iln():eln()}),oln=()=>"Done",cln=()=>"已完成",lln=()=>"انجام‌شده",uln=()=>"تم",_ln=()=>"Completado",fln=()=>"पूरा हुआ",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cln():t==="fa"?lln():t==="ar"?uln():t==="es"?_ln():t==="hi"?fln():oln()}),dln=()=>"Editing",hln=()=>"正在编辑",pln=()=>"در حال ویرایش",mln=()=>"قيد التعديل",gln=()=>"Editando",vln=()=>"संपादित हो रहा है",bln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hln():t==="fa"?pln():t==="ar"?mln():t==="es"?gln():t==="hi"?vln():dln()}),yln=()=>"Failed",xln=()=>"失败",wln=()=>"ناموفق",kln=()=>"فشل",Sln=()=>"Error",Cln=()=>"विफल",Eln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xln():t==="fa"?wln():t==="ar"?kln():t==="es"?Sln():t==="hi"?Cln():yln()}),Nln=()=>"Idle",zln=()=>"空闲",jln=()=>"بی‌کار",Tln=()=>"خامل",Aln=()=>"Inactivo",Rln=()=>"निष्क्रिय",Mln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zln():t==="fa"?jln():t==="ar"?Tln():t==="es"?Aln():t==="hi"?Rln():Nln()}),Oln=()=>"Running",Dln=()=>"运行中",Lln=()=>"در حال اجرا",Iln=()=>"قيد التشغيل",$ln=()=>"En ejecución",Bln=()=>"चल रहा है",Pln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dln():t==="fa"?Lln():t==="ar"?Iln():t==="es"?$ln():t==="hi"?Bln():Oln()}),Fln=()=>"Starting",Hln=()=>"正在启动",qln=()=>"در حال آغاز",Uln=()=>"جارٍ البدء",Gln=()=>"Iniciando",Vln=()=>"शुरू हो रहा है",Kln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hln():t==="fa"?qln():t==="ar"?Uln():t==="es"?Gln():t==="hi"?Vln():Fln()}),Wln=()=>"Copying…",Qln=()=>"正在复制…",Xln=()=>"در حال کپی…",Yln=()=>"جارٍ النسخ…",Zln=()=>"Copiando…",Jln=()=>"कॉपी हो रहा है…",eun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qln():t==="fa"?Xln():t==="ar"?Yln():t==="es"?Zln():t==="hi"?Jln():Wln()}),tun=()=>"Finalizing…",nun=()=>"正在完成…",run=()=>"در حال نهایی‌سازی…",sun=()=>"جارٍ الإنهاء…",iun=()=>"Finalizando…",aun=()=>"अंतिम रूप दिया जा रहा है…",oun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nun():t==="fa"?run():t==="ar"?sun():t==="es"?iun():t==="hi"?aun():tun()}),cun=e=>`${e==null?void 0:e.size} free at target`,lun=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,uun=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,_un=e=>`${e==null?void 0:e.size} متاح في الوجهة`,fun=e=>`${e==null?void 0:e.size} libres en el destino`,dun=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,hun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lun(e):t==="fa"?uun(e):t==="ar"?_un(e):t==="es"?fun(e):t==="hi"?dun(e):cun(e)}),pun=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.`,mun=e=>`将所有 orx 数据移动到: -${e==null?void 0:e.path} - -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,gun=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ -${e==null?void 0:e.path} - -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,vun=e=>`نقل كل بيانات orx إلى: -${e==null?void 0:e.path} - -يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,bun=e=>`¿Mover todos los datos de orx a esta ubicación? -${e==null?void 0:e.path} - -El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,yun=e=>`सारा orx डेटा यहाँ ले जाएं: -${e==null?void 0:e.path} - -स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,xun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mun(e):t==="fa"?gun(e):t==="ar"?vun(e):t==="es"?bun(e):t==="hi"?yun(e):pun(e)}),wun=()=>"Move data here",kun=()=>"将数据移动到此处",Sun=()=>"انتقال داده به اینجا",Cun=()=>"نقل البيانات إلى هنا",Eun=()=>"Mover los datos aquí",Nun=()=>"डेटा यहाँ ले जाएं",zun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kun():t==="fa"?Sun():t==="ar"?Cun():t==="es"?Eun():t==="hi"?Nun():wun()}),jun=()=>"Moving…",Tun=()=>"正在移动…",Aun=()=>"در حال جابه‌جایی…",Run=()=>"جارٍ النقل…",Mun=()=>"Moviendo…",Oun=()=>"स्थानांतरित हो रहा है…",Dun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tun():t==="fa"?Aun():t==="ar"?Run():t==="es"?Mun():t==="hi"?Oun():jun()}),Lun=()=>"Preparing…",Iun=()=>"正在准备…",$un=()=>"در حال آماده‌سازی…",Bun=()=>"جارٍ التحضير…",Pun=()=>"Preparando…",Fun=()=>"तैयार हो रहा है…",Hun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iun():t==="fa"?$un():t==="ar"?Bun():t==="es"?Pun():t==="hi"?Fun():Lun()}),qun=()=>" (same disk, instant)",Uun=()=>"(同一磁盘,可立即完成)",Gun=()=>" (روی همان دیسک، فوری)",Vun=()=>" (القرص نفسه، فوري)",Kun=()=>" (mismo disco, instantáneo)",Wun=()=>" (उसी डिस्क पर, तुरंत)",Qun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uun():t==="fa"?Gun():t==="ar"?Vun():t==="es"?Kun():t==="hi"?Wun():qun()}),Xun=()=>"default location",Yun=()=>"默认位置",Zun=()=>"محل پیش‌فرض",Jun=()=>"الموقع الافتراضي",e_n=()=>"ubicación predeterminada",t_n=()=>"डिफ़ॉल्ट स्थान",n_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yun():t==="fa"?Zun():t==="ar"?Jun():t==="es"?e_n():t==="hi"?t_n():Xun()}),r_n=()=>"ORX_DATA_DIR environment variable",s_n=()=>"ORX_DATA_DIR 环境变量",i_n=()=>"متغیر محیطی ORX_DATA_DIR",a_n=()=>"متغيّر البيئة ORX_DATA_DIR",o_n=()=>"variable de entorno ORX_DATA_DIR",c_n=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",l_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s_n():t==="fa"?i_n():t==="ar"?a_n():t==="es"?o_n():t==="hi"?c_n():r_n()}),u_n=()=>"your saved setting",__n=()=>"已保存的设置",f_n=()=>"تنظیم ذخیره‌شدهٔ شما",d_n=()=>"إعدادك المحفوظ",h_n=()=>"tu ajuste guardado",p_n=()=>"आपकी सेव की गई सेटिंग",m_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?__n():t==="fa"?f_n():t==="ar"?d_n():t==="es"?h_n():t==="hi"?p_n():u_n()}),g_n=()=>"XDG_DATA_HOME",v_n=()=>"XDG_DATA_HOME",b_n=()=>"XDG_DATA_HOME",y_n=()=>"XDG_DATA_HOME",x_n=()=>"XDG_DATA_HOME",w_n=()=>"XDG_DATA_HOME",k_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v_n():t==="fa"?b_n():t==="ar"?y_n():t==="es"?x_n():t==="hi"?w_n():g_n()}),S_n=()=>"Verifying…",C_n=()=>"正在验证…",E_n=()=>"در حال بررسی…",N_n=()=>"جارٍ التحقق…",z_n=()=>"Verificando…",j_n=()=>"सत्यापित हो रहा है…",T_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C_n():t==="fa"?E_n():t==="ar"?N_n():t==="es"?z_n():t==="hi"?j_n():S_n()}),A_n=()=>"Loading…",R_n=()=>"正在加载…",M_n=()=>"در حال بارگیری…",O_n=()=>"جارٍ التحميل…",D_n=()=>"Cargando…",L_n=()=>"लोड हो रहा है…",I_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R_n():t==="fa"?M_n():t==="ar"?O_n():t==="es"?D_n():t==="hi"?L_n():A_n()}),$_n=()=>"This sub-agent is no longer available.",B_n=()=>"此子智能体已不可用。",P_n=()=>"این عامل فرعی دیگر در دسترس نیست.",F_n=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",H_n=()=>"Este subagente ya no está disponible.",q_n=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",U_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B_n():t==="fa"?P_n():t==="ar"?F_n():t==="es"?H_n():t==="hi"?q_n():$_n()}),G_n=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,V_n=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,K_n=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,W_n=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,Q_n=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,X_n=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Y_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V_n(e):t==="fa"?K_n(e):t==="ar"?W_n(e):t==="es"?Q_n(e):t==="hi"?X_n(e):G_n(e)}),Z_n=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,J_n=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,efn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,tfn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,nfn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,rfn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,sfn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J_n(e):t==="fa"?efn(e):t==="ar"?tfn(e):t==="es"?nfn(e):t==="hi"?rfn(e):Z_n(e)}),ifn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",afn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",ofn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",cfn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",lfn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",ufn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",_fn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?afn():t==="fa"?ofn():t==="ar"?cfn():t==="es"?lfn():t==="hi"?ufn():ifn()}),ffn=()=>", a repo for training a mini-GPT from scratch.",dfn=()=>",一个从零训练迷你 GPT 的仓库。",hfn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",pfn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",mfn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",gfn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",vfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dfn():t==="fa"?hfn():t==="ar"?pfn():t==="es"?mfn():t==="hi"?gfn():ffn()}),bfn=()=>"Close",yfn=()=>"关闭",xfn=()=>"بستن",wfn=()=>"إغلاق",kfn=()=>"Cerrar",Sfn=()=>"बंद करें",p3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yfn():t==="fa"?xfn():t==="ar"?wfn():t==="es"?kfn():t==="hi"?Sfn():bfn()}),Cfn=()=>"Create a new project",Efn=()=>"新建项目",Nfn=()=>"ایجاد پروژهٔ جدید",zfn=()=>"إنشاء مشروع جديد",jfn=()=>"Crear un proyecto nuevo",Tfn=()=>"नया प्रोजेक्ट बनाएं",Afn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Efn():t==="fa"?Nfn():t==="ar"?zfn():t==="es"?jfn():t==="hi"?Tfn():Cfn()}),Rfn=()=>"Demo project",Mfn=()=>"演示项目",Ofn=()=>"پروژهٔ نمایشی",Dfn=()=>"مشروع توضيحي",Lfn=()=>"Proyecto de demostración",Ifn=()=>"डेमो प्रोजेक्ट",$fn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mfn():t==="fa"?Ofn():t==="ar"?Dfn():t==="es"?Lfn():t==="hi"?Ifn():Rfn()}),Bfn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Pfn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Ffn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Hfn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",qfn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Ufn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Gfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pfn():t==="fa"?Ffn():t==="ar"?Hfn():t==="es"?qfn():t==="hi"?Ufn():Bfn()}),Vfn=()=>"nanochat",Kfn=()=>"nanochat",Wfn=()=>"nanochat",Qfn=()=>"nanochat",Xfn=()=>"nanochat",Yfn=()=>"nanochat",Zfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kfn():t==="fa"?Wfn():t==="ar"?Qfn():t==="es"?Xfn():t==="hi"?Yfn():Vfn()}),Jfn=()=>"Try the demo experiment",edn=()=>"试试演示实验",tdn=()=>"آزمایش نمایشی را امتحان کنید",ndn=()=>"جرّب التجربة التوضيحية",rdn=()=>"Probar el experimento de demostración",sdn=()=>"डेमो प्रयोग आज़माएं",idn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?edn():t==="fa"?tdn():t==="ar"?ndn():t==="es"?rdn():t==="hi"?sdn():Jfn()}),adn=()=>"Couldn’t save your progress. Try again.",odn=()=>"无法保存进度。请重试。",cdn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",ldn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",udn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",_dn=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",fdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?odn():t==="fa"?cdn():t==="ar"?ldn():t==="es"?udn():t==="hi"?_dn():adn()}),ddn=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",hdn=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",pdn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",mdn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",gdn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",vdn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",bdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hdn():t==="fa"?pdn():t==="ar"?mdn():t==="es"?gdn():t==="hi"?vdn():ddn()}),ydn=()=>"Welcome to OpenResearch",xdn=()=>"欢迎使用 OpenResearch",wdn=()=>"به OpenResearch خوش آمدید",kdn=()=>"مرحبًا بك في OpenResearch",Sdn=()=>"Te damos la bienvenida a OpenResearch",Cdn=()=>"OpenResearch में आपका स्वागत है",Edn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xdn():t==="fa"?wdn():t==="ar"?kdn():t==="es"?Sdn():t==="hi"?Cdn():ydn()}),Ndn=()=>"Baseline",zdn=()=>"基线",jdn=()=>"مبنا",Tdn=()=>"الأساس",Adn=()=>"Base",Rdn=()=>"बेसलाइन",Mdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zdn():t==="fa"?jdn():t==="ar"?Tdn():t==="es"?Adn():t==="hi"?Rdn():Ndn()}),Odn=()=>"Experiment",Ddn=()=>"实验",Ldn=()=>"آزمایش",Idn=()=>"تجربة",$dn=()=>"Experimento",Bdn=()=>"प्रयोग",Vc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ddn():t==="fa"?Ldn():t==="ar"?Idn():t==="es"?$dn():t==="hi"?Bdn():Odn()}),Pdn=e=>`${e==null?void 0:e.count} experiments`,Fdn=e=>`${e==null?void 0:e.count} 个实验`,Hdn=e=>`${e==null?void 0:e.count} آزمایش`,qdn=e=>`التجارب: ${e==null?void 0:e.count}`,Udn=e=>`${e==null?void 0:e.count} experimentos`,Gdn=e=>`${e==null?void 0:e.count} प्रयोग`,Vdn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fdn(e):t==="fa"?Hdn(e):t==="ar"?qdn(e):t==="es"?Udn(e):t==="hi"?Gdn(e):Pdn(e)}),Kdn=()=>"1 experiment",Wdn=()=>"1 个实验",Qdn=()=>"۱ آزمایش",Xdn=()=>"تجربة واحدة",Ydn=()=>"1 experimento",Zdn=()=>"1 प्रयोग",Jdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wdn():t==="fa"?Qdn():t==="ar"?Xdn():t==="es"?Ydn():t==="hi"?Zdn():Kdn()}),ehn=()=>"Running",thn=()=>"运行中",nhn=()=>"در حال اجرا",rhn=()=>"قيد التشغيل",shn=()=>"En ejecución",ihn=()=>"चल रहा है",ahn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?thn():t==="fa"?nhn():t==="ar"?rhn():t==="es"?shn():t==="hi"?ihn():ehn()}),ohn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",chn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",lhn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",uhn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",_hn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",fhn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",dhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?chn():t==="fa"?lhn():t==="ar"?uhn():t==="es"?_hn():t==="hi"?fhn():ohn()}),hhn=()=>"Ask the agent in chat to create and run your first experiment.",phn=()=>"在聊天中让智能体创建并运行你的第一个实验。",mhn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",ghn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",vhn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",bhn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",yhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?phn():t==="fa"?mhn():t==="ar"?ghn():t==="es"?vhn():t==="hi"?bhn():hhn()}),xhn=()=>"Code",whn=()=>"代码",khn=()=>"کد",Shn=()=>"الشيفرة",Chn=()=>"Código",Ehn=()=>"कोड",Nhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?whn():t==="fa"?khn():t==="ar"?Shn():t==="es"?Chn():t==="hi"?Ehn():xhn()}),zhn=()=>"Logs",jhn=()=>"日志",Thn=()=>"گزارش‌ها",Ahn=()=>"السجلات",Rhn=()=>"Logs",Mhn=()=>"लॉग",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jhn():t==="fa"?Thn():t==="ar"?Ahn():t==="es"?Rhn():t==="hi"?Mhn():zhn()}),Ohn=()=>"No experiments from the current task yet",Dhn=()=>"当前任务尚无实验",Lhn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",Ihn=()=>"لا توجد تجارب من المهمة الحالية بعد",$hn=()=>"Aún no hay experimentos de la tarea actual",Bhn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Phn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dhn():t==="fa"?Lhn():t==="ar"?Ihn():t==="es"?$hn():t==="hi"?Bhn():Ohn()}),Fhn=()=>"No experiments yet",Hhn=()=>"尚无实验",qhn=()=>"هنوز آزمایشی وجود ندارد",Uhn=()=>"لا توجد تجارب بعد",Ghn=()=>"Aún no hay experimentos",Vhn=()=>"अभी तक कोई प्रयोग नहीं",Khn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hhn():t==="fa"?qhn():t==="ar"?Uhn():t==="es"?Ghn():t==="hi"?Vhn():Fhn()}),Whn=()=>"no runs",Qhn=()=>"无运行",Xhn=()=>"بدون اجرا",Yhn=()=>"لا عمليات تشغيل",Zhn=()=>"sin ejecuciones",Jhn=()=>"कोई रन नहीं",epn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qhn():t==="fa"?Xhn():t==="ar"?Yhn():t==="es"?Zhn():t==="hi"?Jhn():Whn()}),tpn=()=>"Open logs",npn=()=>"打开日志",rpn=()=>"باز کردن گزارش‌ها",spn=()=>"فتح السجلات",ipn=()=>"Abrir logs",apn=()=>"लॉग खोलें",opn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?npn():t==="fa"?rpn():t==="ar"?spn():t==="es"?ipn():t==="hi"?apn():tpn()}),cpn=()=>"other tasks",lpn=()=>"其他任务",upn=()=>"وظایف دیگر",_pn=()=>"مهام أخرى",fpn=()=>"otras tareas",dpn=()=>"अन्य टास्क",hpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lpn():t==="fa"?upn():t==="ar"?_pn():t==="es"?fpn():t==="hi"?dpn():cpn()}),ppn=()=>"Runs",mpn=()=>"运行",gpn=()=>"اجراها",vpn=()=>"عمليات التشغيل",bpn=()=>"Ejecuciones",ypn=()=>"रन",xpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mpn():t==="fa"?gpn():t==="ar"?vpn():t==="es"?bpn():t==="hi"?ypn():ppn()}),wpn=()=>"Switch to Entire project to see all experiments",kpn=()=>"切换到“整个项目”以查看所有实验",Spn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Cpn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Epn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Npn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",zpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kpn():t==="fa"?Spn():t==="ar"?Cpn():t==="es"?Epn():t==="hi"?Npn():wpn()}),jpn=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,Tpn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,Apn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,Rpn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,Mpn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,Opn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,Dpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tpn(e):t==="fa"?Apn(e):t==="ar"?Rpn(e):t==="es"?Mpn(e):t==="hi"?Opn(e):jpn(e)}),Lpn=()=>"Dismiss",Ipn=()=>"关闭",$pn=()=>"بستن",Bpn=()=>"تجاهل",Ppn=()=>"Descartar",Fpn=()=>"खारिज करें",Hpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ipn():t==="fa"?$pn():t==="ar"?Bpn():t==="es"?Ppn():t==="hi"?Fpn():Lpn()}),qpn=()=>"Restart now",Upn=()=>"立即重新启动",Gpn=()=>"هم‌اکنون دوباره راه‌اندازی کن",Vpn=()=>"أعد التشغيل الآن",Kpn=()=>"Reiniciar ahora",Wpn=()=>"अभी फिर से शुरू करें",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Upn():t==="fa"?Gpn():t==="ar"?Vpn():t==="es"?Kpn():t==="hi"?Wpn():qpn()}),Qpn=e=>`Could not restart: ${e==null?void 0:e.error}`,Xpn=e=>`无法重新启动:${e==null?void 0:e.error}`,Ypn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,Zpn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Jpn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,e0n=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,RL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xpn(e):t==="fa"?Ypn(e):t==="ar"?Zpn(e):t==="es"?Jpn(e):t==="hi"?e0n(e):Qpn(e)}),t0n=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",n0n=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",r0n=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",s0n=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",i0n=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",a0n=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",o0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n0n():t==="fa"?r0n():t==="ar"?s0n():t==="es"?i0n():t==="hi"?a0n():t0n()}),c0n=()=>"Restarting…",l0n=()=>"正在重新启动…",u0n=()=>"در حال راه‌اندازی مجدد…",_0n=()=>"جارٍ إعادة التشغيل…",f0n=()=>"Reiniciando…",d0n=()=>"फिर से शुरू हो रहा है…",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l0n():t==="fa"?u0n():t==="ar"?_0n():t==="es"?f0n():t==="hi"?d0n():c0n()}),h0n=()=>"macOS app",p0n=()=>"macOS 应用",m0n=()=>"برنامهٔ macOS",g0n=()=>"تطبيق macOS",v0n=()=>"App de macOS",b0n=()=>"macOS ऐप",y0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p0n():t==="fa"?m0n():t==="ar"?g0n():t==="es"?v0n():t==="hi"?b0n():h0n()}),x0n=()=>"Installed with cargo",w0n=()=>"通过 cargo 安装",k0n=()=>"نصب‌شده با cargo",S0n=()=>"مثبّت عبر cargo",C0n=()=>"Instalado con cargo",E0n=()=>"cargo से इंस्टॉल किया गया",N0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w0n():t==="fa"?k0n():t==="ar"?S0n():t==="es"?C0n():t==="hi"?E0n():x0n()}),z0n=()=>"Installed with Homebrew",j0n=()=>"通过 Homebrew 安装",T0n=()=>"نصب‌شده با Homebrew",A0n=()=>"مثبّت عبر Homebrew",R0n=()=>"Instalado con Homebrew",M0n=()=>"Homebrew से इंस्टॉल किया गया",O0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j0n():t==="fa"?T0n():t==="ar"?A0n():t==="es"?R0n():t==="hi"?M0n():z0n()}),D0n=()=>"Installed with the orx installer",L0n=()=>"通过 orx 安装程序安装",I0n=()=>"نصب‌شده با نصب‌کنندهٔ orx",$0n=()=>"مثبّت عبر مُثبّت orx",B0n=()=>"Instalado con el instalador de orx",P0n=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",F0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L0n():t==="fa"?I0n():t==="ar"?$0n():t==="es"?B0n():t==="hi"?P0n():D0n()}),H0n=()=>"Managed by Nix",q0n=()=>"由 Nix 管理",U0n=()=>"مدیریت‌شده با Nix",G0n=()=>"مُدار بواسطة Nix",V0n=()=>"Gestionado por Nix",K0n=()=>"Nix द्वारा प्रबंधित",W0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q0n():t==="fa"?U0n():t==="ar"?G0n():t==="es"?V0n():t==="hi"?K0n():H0n()}),Q0n=()=>"Portable orx.exe",X0n=()=>"便携版 orx.exe",Y0n=()=>"orx.exe قابل‌حمل",Z0n=()=>"‏orx.exe المحمول",J0n=()=>"orx.exe portable",emn=()=>"पोर्टेबल orx.exe",tmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X0n():t==="fa"?Y0n():t==="ar"?Z0n():t==="es"?J0n():t==="hi"?emn():Q0n()}),nmn=()=>"Unknown install",rmn=()=>"未知安装方式",smn=()=>"روش نصب نامشخص",imn=()=>"تثبيت غير معروف",amn=()=>"Instalación desconocida",omn=()=>"अज्ञात इंस्टॉल",cmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rmn():t==="fa"?smn():t==="ar"?imn():t==="es"?amn():t==="hi"?omn():nmn()}),lmn=()=>"Re-run your cargo install to update.",umn=()=>"重新运行 cargo 安装命令以更新。",_mn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",fmn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",dmn=()=>"Vuelve a ejecutar cargo install para actualizar.",hmn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",pmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?umn():t==="fa"?_mn():t==="ar"?fmn():t==="es"?dmn():t==="hi"?hmn():lmn()}),mmn=()=>"Run brew upgrade to update.",gmn=()=>"运行 brew upgrade 以更新。",vmn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",bmn=()=>"نفّذ brew upgrade للتحديث.",ymn=()=>"Ejecuta brew upgrade para actualizar.",xmn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",wmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gmn():t==="fa"?vmn():t==="ar"?bmn():t==="es"?ymn():t==="hi"?xmn():mmn()}),kmn=()=>"Update it through your Nix configuration.",Smn=()=>"通过 Nix 配置进行更新。",Cmn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Emn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Nmn=()=>"Actualízalo desde tu configuración de Nix.",zmn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",jmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Smn():t==="fa"?Cmn():t==="ar"?Emn():t==="es"?Nmn():t==="hi"?zmn():kmn()}),Tmn=()=>"Active Experiments",Amn=()=>"活跃实验",Rmn=()=>"آزمایش‌های فعال",Mmn=()=>"التجارب النشطة",Omn=()=>"Experimentos activos",Dmn=()=>"सक्रिय प्रयोग",Lmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Amn():t==="fa"?Rmn():t==="ar"?Mmn():t==="es"?Omn():t==="hi"?Dmn():Tmn()}),Imn=()=>"Default compute",$mn=()=>"默认计算目标",Bmn=()=>"محاسبات پیش‌فرض",Pmn=()=>"الحوسبة الافتراضية",Fmn=()=>"Cómputo predeterminado",Hmn=()=>"डिफ़ॉल्ट कंप्यूट",qmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$mn():t==="fa"?Bmn():t==="ar"?Pmn():t==="es"?Fmn():t==="hi"?Hmn():Imn()}),Umn=()=>"Terminal",Gmn=()=>"终端",Vmn=()=>"ترمینال",Kmn=()=>"الطرفية",Wmn=()=>"Terminal",Qmn=()=>"टर्मिनल",Tv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gmn():t==="fa"?Vmn():t==="ar"?Kmn():t==="es"?Wmn():t==="hi"?Qmn():Umn()}),Xmn=()=>"The terminal disconnected.",Ymn=()=>"终端连接已断开。",Zmn=()=>"ارتباط ترمینال قطع شد.",Jmn=()=>"انقطعت الطرفية.",egn=()=>"La terminal se desconectó.",tgn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():Xmn()}),ngn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,rgn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,sgn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,ign=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,agn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,ogn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,cgn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rgn(e):t==="fa"?sgn(e):t==="ar"?ign(e):t==="es"?agn(e):t==="hi"?ogn(e):ngn(e)}),lgn=()=>"Restart shell",ugn=()=>"重新启动 Shell",_gn=()=>"راه‌اندازی دوباره پوسته",fgn=()=>"إعادة تشغيل Shell",dgn=()=>"Reiniciar shell",hgn=()=>"शेल फिर से शुरू करें",pgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ugn():t==="fa"?_gn():t==="ar"?fgn():t==="es"?dgn():t==="hi"?hgn():lgn()}),mgn=()=>"This worktree",ggn=()=>"当前工作树",vgn=()=>"این درخت کاری",bgn=()=>"شجرة العمل هذه",ygn=()=>"Este árbol de trabajo",xgn=()=>"यह वर्कट्री",wgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ggn():t==="fa"?vgn():t==="ar"?bgn():t==="es"?ygn():t==="hi"?xgn():mgn()}),kgn=()=>"Workspace",Sgn=()=>"工作区",Cgn=()=>"فضای کاری",Egn=()=>"مساحة العمل",Ngn=()=>"Espacio de trabajo",zgn=()=>"वर्कस्पेस",ew=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sgn():t==="fa"?Cgn():t==="ar"?Egn():t==="es"?Ngn():t==="hi"?zgn():kgn()}),jgn=e=>`Current worktree · ${e==null?void 0:e.branch}`,Tgn=e=>`当前工作树 · ${e==null?void 0:e.branch}`,Agn=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,Rgn=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,Mgn=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,Ogn=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,Dgn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tgn(e):t==="fa"?Agn(e):t==="ar"?Rgn(e):t==="es"?Mgn(e):t==="hi"?Ogn(e):jgn(e)}),Lgn=e=>`Default branch · ${e==null?void 0:e.branch}`,Ign=e=>`默认分支 · ${e==null?void 0:e.branch}`,$gn=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,Bgn=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,Pgn=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,Fgn=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,Hgn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ign(e):t==="fa"?$gn(e):t==="ar"?Bgn(e):t==="es"?Pgn(e):t==="hi"?Fgn(e):Lgn(e)}),qgn=e=>`detached at ${e==null?void 0:e.branch}`,Ugn=e=>`分离于 ${e==null?void 0:e.branch}`,Ggn=e=>`جدا در ${e==null?void 0:e.branch}`,Vgn=e=>`منفصل عند ${e==null?void 0:e.branch}`,Kgn=e=>`desacoplado en ${e==null?void 0:e.branch}`,Wgn=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,Qgn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ugn(e):t==="fa"?Ggn(e):t==="ar"?Vgn(e):t==="es"?Kgn(e):t==="hi"?Wgn(e):qgn(e)}),Xgn=()=>"Listing truncated.",Ygn=()=>"列表已截断。",Zgn=()=>"فهرست کوتاه شده است.",Jgn=()=>"القائمة مقتطعة.",e1n=()=>"Listado truncado.",t1n=()=>"सूची छोटी की गई।",n1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ygn():t==="fa"?Zgn():t==="ar"?Jgn():t==="es"?e1n():t==="hi"?t1n():Xgn()}),r1n=()=>"Loading…",s1n=()=>"正在加载…",i1n=()=>"در حال بارگیری…",a1n=()=>"جارٍ التحميل…",o1n=()=>"Cargando…",c1n=()=>"लोड हो रहा है…",l1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s1n():t==="fa"?i1n():t==="ar"?a1n():t==="es"?o1n():t==="hi"?c1n():r1n()}),u1n=()=>"No changes yet.",_1n=()=>"尚无更改。",f1n=()=>"هنوز تغییری وجود ندارد.",d1n=()=>"لا توجد تغييرات بعد.",h1n=()=>"Aún no hay cambios.",p1n=()=>"अभी तक कोई बदलाव नहीं।",m1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_1n():t==="fa"?f1n():t==="ar"?d1n():t==="es"?h1n():t==="hi"?p1n():u1n()}),g1n=()=>"No files.",v1n=()=>"没有文件。",b1n=()=>"فایلی وجود ندارد.",y1n=()=>"لا توجد ملفات.",x1n=()=>"No hay archivos.",w1n=()=>"कोई फ़ाइल नहीं।",k1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v1n():t==="fa"?b1n():t==="ar"?y1n():t==="es"?x1n():t==="hi"?w1n():g1n()}),S1n=()=>"Refresh failed:",C1n=()=>"刷新失败:",E1n=()=>"تازه‌سازی ناموفق بود:",N1n=()=>"فشل التحديث:",z1n=()=>"Error al actualizar:",j1n=()=>"रीफ़्रेश विफल:",T1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C1n():t==="fa"?E1n():t==="ar"?N1n():t==="es"?z1n():t==="hi"?j1n():S1n()}),Ne=e=>`⁦${e}⁩`,Gi=e=>`⁨${e}⁩`,Xt=e=>new Intl.NumberFormat(E()).format(e),$p="demo_nanochat_v1",Uc=e=>e.startsWith("demo_"),Od="chat_demo_nanochat_v1",Tb="chat_demo_nanochat_figures_v1",Ab="chat_demo_nanochat_literature_v1",A1n={[Od]:"cpu_end_to_end",[Tb]:"figures",[Ab]:"literature"},tw="cpu-apple-silicon-pipeline-results.md",R1n={[Od]:"msg_demo_nanochat_assistant_v1",[Tb]:"msg_demo_nanochat_figures_assistant_v1",[Ab]:"msg_demo_nanochat_literature_assistant_v1"},Lz="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 m3 extends Error{constructor(t,r,s){super(t);Bs(this,"currentVersion");Bs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Qi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const OL=new WeakMap;async function fi(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 m3(s,a,i.exists)}}catch(i){if(i instanceof m3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=OL.get(e);if(t&&!An(t))throw new DOMException("Workspace changed","AbortError");return n}const jt=(e,n)=>fetch(e,{signal:n}).then(t=>fi(t));async function aa(e,n){const t=Ia(),r=await fetch(e,n);if(!An(t))throw new DOMException("Workspace changed","AbortError");return OL.set(r,t),r.ok&&aQ(e,t),r}const xt=(e,n,t=!1)=>aa(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>fi(r)),df=(e,n)=>aa(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),DL=(e,n)=>aa(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),M1n=e=>jt("/api/projects",e).then(n=>n.projects),O1n=e=>jt("/api/projects/activity",e).then(n=>n.activity),D1n=e=>jt("/api/settings/ui-state",e),L1n=(e,n)=>jt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),I1n=(e,n,t=!1)=>xt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),$1n=(e,n=!1)=>xt("/api/settings/ui-state",{workspace:e},n),B1n=e=>xt("/api/settings/ui-state",e),P1n=(e,n)=>xt("/api/onboarding/complete",{...e,...n}),F1n=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return jt(`/api/project-path/status${t}`,n)},H1n=()=>xt("/api/project-path/pick").then(e=>e.path),q1n=e=>xt("/api/projects",e),U1n=(e,n)=>jt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),G1n=e=>jt("/api/github/account",e),V1n=(e,n)=>jt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),K1n=(e,n,t)=>jt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),W1n=(e,n)=>jt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Q1n=e=>xt("/api/projects/starter-prompts/prewarm",e),X1n=(e,n,t,r,s)=>jt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Y1n=e=>xt(`/api/projects/${e}/open`).then(n=>n.project),Z1n=e=>aa(`/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})`)}sQ(e)}),J1n=(e,n)=>jt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),evn=(e,n)=>jt(`/api/projects/${e}/runs`,n).then(t=>t.runs),LL=e=>xt(`/api/runs/${e}/cancel`).then(()=>{}),tvn=(e,n)=>jt(`/api/runs/${e}/log?offset=${n}`),nvn=(e,n)=>jt(`/api/runs/${e}/diff`,n),rvn=(e,n)=>jt(`/api/experiments/${e}/diff`,n),Ru=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),svn=(e,n,t={},r)=>jt(`/api/projects/${e}/file?${Ru(t,new URLSearchParams({path:n}))}`,r),g3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Ru(t,new URLSearchParams({path:n}))}`,ivn=(e,n)=>jt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),IL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,avn=(e,n,t,r)=>DL(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),ovn=(e,n,t,r={})=>df(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),cvn=(e,n,t={})=>xt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),lvn=e=>jt("/api/latex/engine",e),uvn=(e,n,t={})=>xt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),_vn=e=>jt("/api/overleaf/settings",e),$L=e=>xt("/api/overleaf/token",{token:e}),fvn=()=>aa("/api/overleaf/token",{method:"DELETE"}).then(e=>fi(e)),BL=(e,n={})=>xt("/api/overleaf/session",{session:e,host:n.host}),dvn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>fi(e)),hvn=(e={})=>xt("/api/overleaf/session/import",{host:e.host}),pvn=(e,n,t={})=>xt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),mvn=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Ru(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),gvn=(e,n,t={},r)=>jt(`/api/projects/${e}/file/overleaf?${Ru(t,new URLSearchParams({path:n}))}`,r),vvn=(e,n,t)=>xt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),bvn=(e,n,t={})=>aa(`/api/projects/${e}/file/overleaf?${Ru(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),yvn=(e,n,t={})=>xt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),xvn=(e,n,t={},r)=>jt(`/api/projects/${e}/file/overleaf/status?${Ru(t,new URLSearchParams({path:n}))}`,r),wvn=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Ru(t,new URLSearchParams({path:n}))}`,kvn=(e,n={},t)=>{const r=Ru(n).toString();return jt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},Svn=(e,n)=>jt(`/api/chat/sessions/${e}/worktree`,n),Rb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,Cvn=e=>jt("/api/settings/hf",e),Evn=e=>xt("/api/settings/hf",{token:e}),Nvn=e=>jt("/api/settings/tinker",e),zvn=e=>xt("/api/settings/tinker",{key:e}),jvn=e=>jt("/api/update",e),Tvn=()=>xt("/api/update/apply"),Avn=()=>xt("/api/update/restart"),Rvn=e=>xt("/api/update/auto",{enabled:e}),Mvn=(e=!1)=>xt("/api/update/install-cli",{force:e}),Ovn=e=>jt("/api/settings/k8s",e),Dvn=e=>xt("/api/settings/k8s",e),Lvn=e=>jt("/api/settings/modal",e),Ivn=(e,n)=>xt("/api/settings/modal",{tokenId:e,tokenSecret:n}),$vn=e=>jt("/api/settings/env",e).then(n=>n.vars),PL=(e,n)=>xt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),Bvn=e=>aa(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)).then(n=>n.vars),Pvn=e=>jt("/api/settings/data-dir",e),Fvn=e=>xt("/api/settings/data-dir/validate",{path:e}),Hvn=e=>xt("/api/settings/data-dir/move",{path:e}),qvn=e=>jt("/api/settings/ssh",e),Uvn=e=>xt("/api/settings/ssh",e),Gvn=e=>xt("/api/settings/ssh/default",{host:e}),Vvn=(e,n)=>xt("/api/settings/ssh/preflight",{host:e,container:n}),Kvn=e=>jt("/api/settings/ssh/config",e),Wvn=(e,n)=>DL("/api/settings/ssh/config",{content:e,previousContent:n}),Qvn=(e,n)=>jt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),Xvn=e=>jt("/_orx/runtime",e),Yvn=e=>jt("/api/remote/sessions",e).then(n=>n.sessions),Zvn=(e,n)=>xt("/api/remote/sessions",{host:e,uiPreferences:n}),Jvn=e=>xt("/_orx/install",e),ebn=()=>xt("/_orx/reconnect"),FL=()=>xt("/_orx/disconnect"),tbn=()=>xt("/_orx/start-host"),HL=()=>jt("/_orx/stop-host"),qL=e=>xt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),nbn=e=>jt("/api/settings/slurm",e),rbn=e=>xt("/api/settings/slurm",e),sbn=e=>jt("/api/settings/ray",e),ibn=e=>xt("/api/settings/ray",e),abn=e=>xt("/api/settings/ray/preflight",{address:e??null}),obn=(e,n)=>jt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),cbn=e=>xt("/api/settings/compute/default",e),lbn=e=>jt("/api/settings/local",e),ubn=e=>jt("/api/settings/openresearch",e),_bn=(e,n)=>jt(`/api/projects/${e}/files`,n),fbn=(e,n)=>aa(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),dbn=(e,n,t)=>df(`/api/projects/${e}/files`,{path:n,...t}),W_=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,UL=512e3,hbn=(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}}},pbn=(e,n,t)=>fetch(W_(e,n),{signal:t,headers:{Range:`bytes=0-${UL-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=>hbn(a,Number.isFinite(s)&&s>a.byteLength))}),mbn=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",gbn=(e,n,t)=>fetch(W_(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:mbn(s)?s:"download"}}),vbn=e=>jt("/api/settings/profile",e),bbn=e=>jt("/api/settings/lit-sources",e),ybn=e=>xt("/api/settings/lit-sources",e),xbn=e=>jt("/api/settings/projects",e),GL=(e,n)=>xt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),wbn=(e,n)=>jt(`/api/projects/${e}/git`,n),kbn=e=>xt(`/api/projects/${e}/git/init`),Sbn=e=>xt(`/api/projects/${e}/github`),Cbn=e=>xt(`/api/projects/${e}/github/disable`),Ebn=e=>jt("/api/settings/telemetry",e),Nbn=e=>xt("/api/settings/telemetry",{enabled:e}),ru=e=>{xt("/api/telemetry/event",e).catch(()=>{})};function K1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??b3(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?Gk():n,r=b3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Av="default";function Mb(e,n){var a,o,c;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===Av)?Av:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:i}}const v3="default";function VL(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:v3,label:y9t(),description:d9t()},...t]:[]}function Rv(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=VL(e,n);return s.length===0?v3:t!=null&&s.some(a=>a.id===t)?t:v3}function KL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Mb(e,n);return r.length===0?Av:t&&r.some(i=>i.id===t)?t:s}const zbn=e=>jt("/api/harnesses/setup/commands",e),WL=(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 jt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},jbn=(e,n)=>jt(`/api/skills${n?`?harness=${encodeURIComponent(n)}`:""}`,e),Tbn=(e,n,t,r)=>jt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),Abn=e=>jt("/api/latex-templates",e).then(n=>n.templates),Rbn=e=>xt("/api/latex-templates",e).then(n=>n.template),Mbn=e=>aa(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),Obn=e=>jt("/api/user-skills",e),Dbn=e=>xt("/api/user-skills",e).then(n=>n.skill),Lbn=e=>aa(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n));function b3(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 Ibn=(e,n)=>jt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),$bn=e=>jt("/api/chat/native-sessions",e).then(n=>n.chats),Bbn=(e,n)=>xt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),Pbn=e=>jt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),Fbn=(e,n,t={})=>xt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Hbn=e=>aa(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>fi(n).then(t=>(zb(e),t))),qbn=(e,n)=>df(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Ubn=(e,n)=>df(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),Gbn=(e,n)=>df(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),Vbn=(e,n)=>df(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),Kbn=(e,n)=>df(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Wbn=(e,n)=>jt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Qbn=(e,n)=>aa(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),Xbn=(e,n)=>xt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),Ybn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,Iz=(e,n,t={},r,s,i,a)=>xt(`/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}),Zbn=e=>xt(`/api/chat/sessions/${e}/compact`,{}),Jbn=(e,n)=>xt(`/api/chat/sessions/${e}/shell`,{command:n}),eyn=(e,n,t,r={})=>xt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),tyn=(e,n,t)=>xt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),nyn=(e,n)=>xt(`/api/chat/sessions/${e}/branch`,{leafId:n}),ryn=e=>xt(`/api/chat/sessions/${e}/interrupt`),syn=(e,n)=>xt(`/api/chat/sessions/${e}/respond`,n);function co(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(E(),{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 T0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return rOe({value:Xt(n)});const t=Math.floor(n/60);if(t<60)return XMe({value:Xt(t)});const r=Math.floor(t/60);return r<24?qMe({hours:Xt(r),minutes:Xt(t%60)}):LMe({days:Xt(Math.floor(r/24)),hours:Xt(r%24)})}function el(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rjt("/api/local-models",e),oyn=e=>xt("/api/local-models/discover",e),cyn=e=>xt("/api/local-models",e),lyn=e=>xt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),uyn=e=>aa(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),$z=()=>({queryKey:Ct("getHfSettings"),queryFn:({signal:e})=>Cvn(e),staleTime:3e5}),Bz=()=>({queryKey:Ct("getTinkerSettings"),queryFn:({signal:e})=>Nvn(e),staleTime:3e5}),Pz=()=>({queryKey:Ct("getK8sSettings"),queryFn:({signal:e})=>Ovn(e),staleTime:3e4}),Fz=()=>({queryKey:Ct("getModalSettings"),queryFn:({signal:e})=>Lvn(e),staleTime:3e5}),_yn=()=>({queryKey:Ct("getSlurmSettings"),queryFn:({signal:e})=>nbn(e),staleTime:3e5}),fyn=()=>({queryKey:Ct("getRaySettings"),queryFn:({signal:e})=>sbn(e),staleTime:3e5}),QL=e=>({queryKey:Ct("getComputeSettings",e??null),queryFn:({signal:n})=>obn(e,n),staleTime:3e4}),dyn=()=>({queryKey:Ct("getLocalMachine"),queryFn:({signal:e})=>lbn(e),staleTime:3e5}),hyn=()=>({queryKey:Ct("getOpenResearchSettings"),queryFn:({signal:e})=>ubn(e),staleTime:3e4}),pyn=()=>({queryKey:Ct("getEnvVars"),queryFn:({signal:e})=>$vn(e),staleTime:3e5}),myn=()=>({queryKey:Ct("getDataDir"),queryFn:({signal:e})=>Pvn(e),staleTime:3e5}),XL=()=>({queryKey:Ct("getSshSettings"),queryFn:({signal:e})=>qvn(e),staleTime:3e4}),gyn=()=>({queryKey:Ct("getSshConfig"),queryFn:({signal:e})=>Kvn(e),staleTime:3e5}),Hz=e=>({queryKey:Ct("getSshMasterStatus",e),queryFn:({signal:n})=>Qvn(e,n),staleTime:5e3}),vyn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>Xvn(e),staleTime:2e3}),byn=()=>({queryKey:Ct("listRemoteSessions"),queryFn:({signal:e})=>Yvn(e),staleTime:3e4}),Mv=()=>({queryKey:Ct("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Rh(n,t,()=>jvn(e)),staleTime:3e4}),yyn=()=>({queryKey:Ct("getProfile"),queryFn:({signal:e})=>vbn(e),staleTime:3e5}),xyn=()=>({queryKey:Ct("getLitSources"),queryFn:({signal:e})=>bbn(e),staleTime:3e5}),rS=()=>({queryKey:Ct("getProjectDefaults"),queryFn:({signal:e})=>xbn(e),staleTime:3e5}),wyn=e=>({queryKey:Ct("getProjectGitStatus",e),queryFn:({signal:n})=>wbn(e,n),staleTime:3e4}),kyn=()=>({queryKey:Ct("getTelemetry"),queryFn:({signal:e})=>Ebn(e),staleTime:3e5}),YL=()=>({queryKey:Ct("getHarnessSetupCommands"),queryFn:({signal:e})=>zbn(e),staleTime:1/0}),ku=()=>({queryKey:Ct("getHarnesses"),queryFn:({signal:e})=>WL(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),Syn=e=>({queryKey:Ct("getSkills",e??null),queryFn:({signal:n})=>jbn(n,e),select:n=>n.skills,refetchInterval:n=>{var t;return(t=n.state.data)!=null&&t.importing?2e3:3e4},staleTime:3e5}),Cyn=(e,n,t)=>({queryKey:Ct("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>Tbn(e,n,r,t),staleTime:3e5}),Eyn=()=>({queryKey:Ct("listLatexTemplates"),queryFn:({signal:e})=>Abn(e),refetchInterval:3e4,staleTime:3e5}),Nyn=()=>({queryKey:Ct("listUserSkills"),queryFn:({signal:e})=>Obn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function Q_(e=!1,n=!1){const t=ku();if(!e&&!n)return tt.fetchQuery(t);await tt.cancelQueries(t);const r=await WL(e,n);return An(t.queryKey)&&tt.setQueryData(t.queryKey,r),r}const zyn=()=>({queryKey:Ct("getLocalModels"),queryFn:({signal:e})=>ayn(e),staleTime:3e4}),La=e=>({queryKey:Ct("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Rh(t,r,async()=>{const s=await Ibn(e,n),i=t.getQueryData(r);return s.filter(a=>!ll.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(c=>c.id===a.id))==null?void 0:o.contextUsage)}})},ym),staleTime:3e4}),ZL=()=>({queryKey:Ct("listNativeChats"),queryFn:({signal:e})=>$bn(e),staleTime:0}),jyn=()=>({queryKey:Ct("listAllChatSessions"),queryFn:async({signal:e})=>(await Pbn(e)).filter(n=>!ll.has(n.id)),staleTime:0}),il=e=>({queryKey:Ct("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Rh(t,r,()=>Wbn(e,n),(_,p,m)=>{if(!p)return _;const x=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:ym(_.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:_.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),c=s!==void 0&&i.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...c.filter(_=>!i.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),B_="local-",JL="bash";function qz(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(B_)),n]}function Tyn(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(B_),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:qz(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:`${B_}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:JL,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?qz(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:`${B_}${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 eI=0;function tI(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=>{tI(e)&&eI++});const Ayn=e=>tt.getQueryCache().subscribe(n=>{tI(n)&&e()}),Ryn=()=>eI;function Myn(e,n){const t=tt.getQueryData(La(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(il(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function nI(e,n,t=!1){if(n.type==="busy"){Za(tt,La(e).queryKey,n.sessionId),tt.setQueryData(La(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=il(n.sessionId);if(ll.has(n.sessionId))return;Za(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=Tyn(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 Oyn(e,n){const t=!!n&&!ll.has(n??""),r=lt({...il(n??""),enabled:t,subscribed:t}),s=A.useSyncExternalStore(Ayn,Ryn),i=A.useMemo(()=>Myn(e,n),[e,n,s]),a=Ia()[1],o=A.useCallback(c=>{An(["workspace",a])&&nI(e,c)},[e,a]);return[i,o,r]}const W1=new Map;function Dyn(e,n){let t=W1.get(e);return t||(t=new Set,W1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&W1.delete(e)}}function Lyn(e){var n;(n=W1.get(e.runId))==null||n.forEach(t=>t(e))}const y3=new Set;function Ov(e){return y3.add(e),()=>{y3.delete(e)}}function Ic(e){y3.forEach(n=>n(e))}const x3=new Set;function Iyn(e){return x3.add(e),()=>{x3.delete(e)}}function $c(){x3.forEach(e=>e())}const w3=new Set;function $yn(e){return w3.add(e),()=>{w3.delete(e)}}const k3=new Set;function Byn(e){return k3.add(e),()=>{k3.delete(e)}}function Pyn(){k3.forEach(e=>e())}function Uz(e){w3.forEach(n=>n(e))}const S3=new Set;function rI(e){return S3.add(e),()=>{S3.delete(e)}}function nw(e){S3.forEach(n=>n(e))}const C3=new Set;function Fyn(e){return C3.add(e),()=>{C3.delete(e)}}function Gz(e){C3.forEach(n=>n(e))}const E3=new Set;function Hyn(e){return E3.add(e),()=>{E3.delete(e)}}function qyn(e){E3.forEach(n=>n(e))}let N3=!0;const z3=new Set;function Uyn(e){return z3.add(e),()=>{z3.delete(e)}}function Vz(){return N3}function Kz(e){e!==N3&&(N3=e,z3.forEach(n=>n()))}const Gyn=8e3,Vyn=3e3;function Kyn(e){const n=A.useRef(e);n.current=e,A.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>Kz(!1),Gyn)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},Vyn)))},c.onopen=()=>{var h,_;r||(window.clearTimeout(s),s=void 0,Kz(!0),a&&(Ic({type:"reconnected"}),$c(),Uz({harness:"*",authState:"unknown"}),(_=(h=n.current).onReconnect)==null||_.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,_;Ic({type:"reconnected"}),$c(),(_=(h=n.current).onReconnect)==null||_.call(h)}),c.addEventListener("run.updated",h=>{const _=u(h);_!=null&&_.run&&($c(),n.current.onRun(_.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const _=u(h);_!=null&&_.experiment&&($c(),(m=(p=n.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const _=u(h);_!=null&&_.project&&($c(),(m=(p=n.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",h=>{var p,m;const _=u(h);_!=null&&_.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",h=>{const _=u(h);_!=null&&_.runId&&Lyn(_)}),c.addEventListener("chat.session",h=>{const _=u(h);_!=null&&_.session&&($c(),Ic({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",h=>{const _=u(h);_!=null&&_.sessionId&&($c(),Ic({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",h=>{const _=u(h);_!=null&&_.message&&($c(),Ic({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",h=>{const _=u(h);_!=null&&_.sessionId&&($c(),Ic({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",h=>{const _=u(h);_!=null&&_.sessionId&&_.usage&&Ic({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",h=>{const _=u(h);_!=null&&_.sessionId&&Ic({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",h=>{const _=u(h);_!=null&&_.sessionId&&Ic({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const _=u(h);_!=null&&_.harness&&_.authState&&Uz(_)}),c.addEventListener("harness.catalog",()=>Pyn()),c.addEventListener("datadir.move.progress",h=>{const _=u(h);_&&nw({type:"progress",..._})}),c.addEventListener("datadir.move.done",h=>{const _=u(h);_&&nw({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const _=u(h);_&&nw({type:"error",error:_.error})}),c.addEventListener("update.status",h=>{const _=u(h);_&&qyn(_)}),c.addEventListener("overleaf.live",h=>{const _=u(h);_!=null&&_.key&&_.status&&Gz({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",h=>{const _=u(h);_!=null&&_.key&&Array.isArray(_.paths)&&Gz({type:"pulled",key:_.key,paths:_.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Dv=new Set;function Wyn(e){const n=A.useRef(e);n.current=e,A.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 Dv.add(t),()=>{Dv.delete(t)}},[])}const Wz={onRun:e=>Dv.forEach(n=>n.onRun(e)),onReconnect:()=>Dv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},_h=()=>({queryKey:Ct("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Rh(n,t,()=>M1n(e),ym),staleTime:3e4}),Qyn=()=>({queryKey:Ct("listProjectActivity"),queryFn:({signal:e})=>O1n(e),staleTime:3e4}),Sm=()=>({queryKey:Ct("getUiState"),queryFn:({signal:e})=>D1n(e),staleTime:3e5}),sS=e=>({queryKey:Ct("getProjectUiState",e),queryFn:({signal:n})=>L1n(e,n),staleTime:3e5}),_0=(e="")=>({queryKey:Ct("getProjectPathStatus",e),queryFn:({signal:n})=>F1n(e,n),staleTime:3e4}),sI=e=>({queryKey:Ct("searchPapers",e),queryFn:({signal:n})=>U1n(e,n),staleTime:3e5}),Xyn=()=>({queryKey:Ct("githubAccount"),queryFn:({signal:e})=>G1n(e),staleTime:3e5}),Yyn=e=>({queryKey:Ct("githubProjectRepoPreview",e),queryFn:({signal:n})=>V1n(e,n),staleTime:3e4}),Qz=(e,n)=>({queryKey:Ct("repoAccess",e,n),queryFn:({signal:t})=>K1n(e,n,t),staleTime:3e4}),j3=e=>({queryKey:Ct("resolvePaper",e),queryFn:({signal:n})=>W1n(e,n),staleTime:36e5}),Zyn=(e,n,t,r)=>({queryKey:Ct("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>X1n(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),T3=e=>({queryKey:Ct("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Rh(t,r,()=>J1n(e,n),ym),staleTime:3e4}),mu=e=>({queryKey:Ct("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Rh(t,r,()=>evn(e,n),ym),staleTime:3e4});function t1(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 Xz(){const e=Ia();return Kyn({onRun(n){var r;if(!An(e))return;const t=(r=tt.getQueryData(mu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Za(tt,mu(n.projectId).queryKey,n.id),tt.setQueryData(mu(n.projectId).queryKey,s=>t1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Ta(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Ta(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),Wz.onRun(n)},onExperiment(n){An(e)&&(Za(tt,T3(n.projectId).queryKey,n.id),tt.setQueryData(T3(n.projectId).queryKey,t=>t1(t,n)),Ta(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Ta(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Ta(["getRunDiff"],e,t=>{var r;return((r=tt.getQueryData(mu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){An(e)&&(Za(tt,_h().queryKey,n.id),tt.setQueryData(_h().queryKey,t=>t1(t,n)))},onArtifacts(n){An(e)&&(Ta(Ik,e,t=>t.queryKey[3]===n),Ta(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){An(e)&&(Ta(nQ,e),Wz.onReconnect())}}),A.useEffect(()=>{let n;const t=Iyn(()=>{n??(n=setTimeout(()=>{n=void 0,Ta(["listProjectActivity"],e)},100))}),r=rI(c=>{c.type==="done"&&Ta(["getDataDir"],e)}),s=Ov(c=>{An(e)&&(c.type==="session"?Za(tt,La(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&Za(tt,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&nI("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!ll.has(c.session.id)?tt.setQueryData(La(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(_=>_.id===c.session.id);return h?t1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?zb(c.sessionId):(c.type==="busy"||c.type==="usage")&&tt.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=$yn(()=>{An(e)&&Q_(!0).catch(()=>{})}),a=Byn(()=>{An(e)&&tt.fetchQuery({...ku(),staleTime:0}).catch(()=>{})}),o=Hyn(c=>{An(e)&&(Za(tt,Mv().queryKey),tt.setQueryData(Mv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const A3=new Set;function iI(e){if(e!==E()){cD(e,{reload:!1}),document.documentElement.lang=e;for(const n of A3)n()}}function Jyn(e){return A3.add(e),()=>A3.delete(e)}function hf(){return A.useSyncExternalStore(Jyn,E,E)}const aI="orx:theme";function exn(){try{const e=localStorage.getItem(aI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let fh=exn();const R3=new Set;function txn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function iS(){document.documentElement.dataset.theme=txn(fh)}function oI(e){fh=e;try{localStorage.setItem(aI,e)}catch{}iS();for(const n of R3)n()}function nxn(){return fh}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{fh==="system"&&iS()});iS();function rxn(e){return R3.add(e),()=>R3.delete(e)}function cI(){return[A.useSyncExternalStore(rxn,()=>fh,()=>fh),oI]}const sxn=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),lI=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Lv="-",Yz=[],axn="arbitrary..",oxn=e=>{const n=lxn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return cxn(a);const o=a.split(Lv),c=o[0]===""&&o.length>1?1:0;return uI(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?sxn(u,c):c:u||Yz}return t[a]||Yz}}},uI=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=uI(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Lv):e.slice(n).join(Lv),c=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?axn+r:void 0})(),lxn=e=>{const{theme:n,classGroups:t}=e;return uxn(t,n)},uxn=(e,n)=>{const t=lI();for(const r in e){const s=e[r];aS(s,t,r,n)}return t},aS=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){fxn(e,n,t);return}if(typeof e=="function"){dxn(e,n,t,r);return}hxn(e,n,t,r)},fxn=(e,n,t)=>{const r=e===""?n:_I(n,e);r.classGroupId=t},dxn=(e,n,t,r)=>{if(pxn(e)){aS(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ixn(t,e))},hxn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Lv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,mxn=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)}}},M3="!",Zz=":",gxn=[],Jz=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),vxn=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return Jz(i,m,p,x)};if(n){const s=n+Zz,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Jz(gxn,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},bxn=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}},yxn=e=>({cache:mxn(e.cacheSize),parseClassName:vxn(e),sortModifiers:bxn(e),postfixLookupClassGroupIds:xxn(e),...oxn(e)}),xxn=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=[],c=e.trim().split(wxn);let u="";for(let h=c.length-1;h>=0;h-=1){const _=c[h],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const T=k.substring(0,v);w=r(T);const j=w&&a[w]?r(k):void 0;j&&j!==w&&(w=j,b=!1)}else w=r(k);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=r(k),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?y+M3:y,N=C+w;if(o.indexOf(N)>-1)continue;o.push(N);const z=s(w,b);for(let T=0;T0?" "+u:u)}return u},Sxn=(...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=c=>{const u=n.reduce((h,_)=>_(h),e());return t=yxn(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=kxn(c,t);return s(c,h),h};return i=a,(...c)=>i(Sxn(...c))},Cxn=[],ls=e=>{const n=t=>t[e]||Cxn;return n.isThemeGetter=!0,n},dI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Exn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Nxn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zxn=/\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$/,jxn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Txn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Axn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ql=e=>Exn.test(e),_n=e=>!!e&&!Number.isNaN(Number(e)),Mo=e=>!!e&&Number.isInteger(Number(e)),rw=e=>e.endsWith("%")&&_n(e.slice(0,-1)),Bc=e=>Nxn.test(e),pI=()=>!0,Rxn=e=>zxn.test(e)&&!jxn.test(e),oS=()=>!1,Mxn=e=>Txn.test(e),Oxn=e=>Axn.test(e),Dxn=e=>!gt(e)&&!vt(e),Lxn=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)),Ixn=e=>Mu(e,vI,oS),gt=e=>dI.test(e),l_=e=>Mu(e,bI,Rxn),tj=e=>Mu(e,Gxn,_n),$xn=e=>Mu(e,xI,pI),Bxn=e=>Mu(e,yI,oS),nj=e=>Mu(e,mI,oS),Pxn=e=>Mu(e,gI,Oxn),n1=e=>Mu(e,wI,Mxn),vt=e=>hI.test(e),Bp=e=>pf(e,bI),Fxn=e=>pf(e,yI),rj=e=>pf(e,mI),Hxn=e=>pf(e,vI),qxn=e=>pf(e,gI),r1=e=>pf(e,wI,!0),Uxn=e=>pf(e,xI,!0),Mu=(e,n,t)=>{const r=dI.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},pf=(e,n,t=!1)=>{const r=hI.exec(e);return r?r[1]?n(r[1]):t:!1},mI=e=>e==="position"||e==="percentage",gI=e=>e==="image"||e==="url",vI=e=>e==="length"||e==="size"||e==="bg-size",bI=e=>e==="length",Gxn=e=>e==="number",yI=e=>e==="family-name",xI=e=>e==="number"||e==="weight",wI=e=>e==="shadow",sj=()=>{const e=ls("color"),n=ls("font"),t=ls("text"),r=ls("font-weight"),s=ls("tracking"),i=ls("leading"),a=ls("breakpoint"),o=ls("container"),c=ls("spacing"),u=ls("radius"),h=ls("shadow"),_=ls("inset-shadow"),p=ls("text-shadow"),m=ls("drop-shadow"),x=ls("blur"),k=ls("perspective"),v=ls("aspect"),b=ls("ease"),w=ls("animate"),y=()=>["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(),vt,gt],z=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],j=()=>[vt,gt,c],M=()=>[Ql,"full","auto",...j()],D=()=>[Mo,"none","subgrid",vt,gt],I=()=>["auto",{span:["full",Mo,vt,gt]},Mo,vt,gt],$=()=>[Mo,"auto",vt,gt],q=()=>["auto","min","max","fr",vt,gt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...j()],J=()=>[Ql,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Z=()=>[Ql,"screen","full","dvw","lvw","svw","min","max","fit",...j()],B=()=>[Ql,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],L=()=>[e,vt,gt],F=()=>[...C(),rj,nj,{position:[vt,gt]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",Hxn,Ixn,{size:[vt,gt]}],ne=()=>[rw,Bp,l_],ce=()=>["","none","full",u,vt,gt],_e=()=>["",_n,Bp,l_],se=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[_n,rw,rj,nj],le=()=>["","none",x,vt,gt],fe=()=>["none",_n,vt,gt],me=()=>["none",_n,vt,gt],Re=()=>[_n,vt,gt],Oe=()=>[Ql,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bc],breakpoint:[Bc],color:[pI],container:[Bc],"drop-shadow":[Bc],ease:["in","out","in-out"],font:[Dxn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bc],shadow:[Bc],spacing:["px",_n],text:[Bc],"text-shadow":[Bc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ql,gt,vt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",vt,gt]}],"container-named":[Lxn],columns:[{columns:[_n,gt,vt,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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:[Mo,"auto",vt,gt]}],basis:[{basis:[Ql,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_n,Ql,"auto","initial","none",gt]}],grow:[{grow:["",_n,vt,gt]}],shrink:[{shrink:["",_n,vt,gt]}],order:[{order:[Mo,"first","last","none",vt,gt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[o,"screen",...J()]}],"min-w":[{"min-w":[o,"screen","none",...J()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,Bp,l_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Uxn,$xn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rw,gt]}],"font-family":[{font:[Fxn,Bxn,n]}],"font-features":[{"font-features":[gt]}],"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,vt,gt]}],"line-clamp":[{"line-clamp":[_n,"none",vt,tj]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",vt,gt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",vt,gt]}],"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:[_n,"from-font","auto",vt,l_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[_n,"auto",vt,gt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[Mo,vt,gt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",vt,gt]}],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",vt,gt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mo,vt,gt],radial:["",vt,gt],conic:[Mo,vt,gt]},qxn,Pxn]}],"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:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:_e()}],"border-w-x":[{"border-x":_e()}],"border-w-y":[{"border-y":_e()}],"border-w-s":[{"border-s":_e()}],"border-w-e":[{"border-e":_e()}],"border-w-bs":[{"border-bs":_e()}],"border-w-be":[{"border-be":_e()}],"border-w-t":[{"border-t":_e()}],"border-w-r":[{"border-r":_e()}],"border-w-b":[{"border-b":_e()}],"border-w-l":[{"border-l":_e()}],"divide-x":[{"divide-x":_e()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_e()}],"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":[_n,vt,gt]}],"outline-w":[{outline:["",_n,Bp,l_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,r1,n1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,r1,n1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:_e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[_n,l_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":_e()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,r1,n1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[_n,vt,gt]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[_n]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"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":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"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":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"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":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"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":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"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":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"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":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[vt,gt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"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":[_n]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"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:F()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",vt,gt]}],filter:[{filter:["","none",vt,gt]}],blur:[{blur:le()}],brightness:[{brightness:[_n,vt,gt]}],contrast:[{contrast:[_n,vt,gt]}],"drop-shadow":[{"drop-shadow":["","none",m,r1,n1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",_n,vt,gt]}],"hue-rotate":[{"hue-rotate":[_n,vt,gt]}],invert:[{invert:["",_n,vt,gt]}],saturate:[{saturate:[_n,vt,gt]}],sepia:[{sepia:["",_n,vt,gt]}],"backdrop-filter":[{"backdrop-filter":["","none",vt,gt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[_n,vt,gt]}],"backdrop-contrast":[{"backdrop-contrast":[_n,vt,gt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_n,vt,gt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_n,vt,gt]}],"backdrop-invert":[{"backdrop-invert":["",_n,vt,gt]}],"backdrop-opacity":[{"backdrop-opacity":[_n,vt,gt]}],"backdrop-saturate":[{"backdrop-saturate":[_n,vt,gt]}],"backdrop-sepia":[{"backdrop-sepia":["",_n,vt,gt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",vt,gt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_n,"initial",vt,gt]}],ease:[{ease:["linear","initial",b,vt,gt]}],delay:[{delay:[_n,vt,gt]}],animate:[{animate:["none",w,vt,gt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,vt,gt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[vt,gt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],zoom:[{zoom:[Mo,vt,gt]}],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",vt,gt]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",vt,gt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[_n,Bp,l_,tj]}],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"]}},Vxn=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(bd(e,"cacheSize",n),bd(e,"prefix",t),bd(e,"experimentalParseClassName",r),s1(e.theme,i.theme),s1(e.classGroups,i.classGroups),s1(e.conflictingClassGroups,i.conflictingClassGroups),s1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),bd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),bd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),i1(e.theme,s.theme),i1(e.classGroups,s.classGroups),i1(e.conflictingClassGroups,s.conflictingClassGroups),i1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),O3(e,s,"postfixLookupClassGroups"),O3(e,s,"orderSensitiveModifiers"),e),bd=(e,n,t)=>{t!==void 0&&(e[n]=t)},s1=(e,n)=>{if(n)for(const t in n)bd(e,t,n[t])},i1=(e,n)=>{if(n)for(const t in n)O3(e,n,t)},O3=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},Kxn=(e,...n)=>typeof e=="function"?ej(sj,e,...n):ej(()=>Vxn(sj(),e),...n),Wxn=Kxn({extend:{theme:{text:["menu"]}}});function fs(...e){return Wxn(...e)}const Qxn={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 Ut({variant:e="default",size:n="default",className:t,...r}){return f.jsx("span",{className:fs("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",Qxn[e],t),...r})}const Xxn=["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(" "),Yxn={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"},Zxn={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 kI(e,n,t,r){return fs(Xxn,Yxn[e],Zxn[n],t&&"active",r)}function De({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:kI(n,t,e,r),...s})}function dh({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:kI(n,t,e,r),...s})}const Jxn=["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(" "),e2n={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"},t2n={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function SI(e,n,t,r,s){return fs(Jxn,e2n[e],t2n[n],r==="circle"&&"rounded-full",t&&"active",s)}const Bt=A.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return f.jsx("button",{ref:o,className:SI(s,r,n,t,i),...a})});function Cm({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return f.jsx("a",{className:SI(r,t,e,n,s),...i})}const n2n={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 Ir({variant:e="default",className:n,...t}){return f.jsx("input",{className:fs("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",n2n[e],n),...t})}function Xn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return f.jsx("button",{className:fs("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 zt({className:e,...n}){return f.jsx("span",{className:fs("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 Br({className:e,...n}){return f.jsx("div",{className:fs("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const r2n={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 Dd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:fs("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:fs("h-[7px] w-[7px] shrink-0 rounded-full bg-current",r2n[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const s2n=["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 CI(e,n){return fs(s2n,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function cS({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:CI(e,n),...r,children:t??f.jsx("span",{})})}function i2n({checked:e=!1,className:n,...t}){return f.jsx("span",{className:CI(e,n),...t,children:f.jsx("span",{})})}var oa=CO();const a2n=gm(oa);function o2n(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 c2n=e=>{switch(e){case"success":return _2n;case"info":return d2n;case"warning":return f2n;case"error":return h2n;default:return null}},l2n=Array(12).fill(0),u2n=({visible:e,className:n})=>et.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},et.createElement("div",{className:"sonner-spinner"},l2n.map((t,r)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_2n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),f2n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),d2n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),h2n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),p2n=et.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"},et.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),et.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),m2n=()=>{const[e,n]=et.useState(document.hidden);return et.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let g2n=1;const v2n=100,ij=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:g2n++};class b2n{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-v2n;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=ij(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],et.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(x2n(u)&&!u.ok){i=!1;const _=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 _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const h=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:_,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=ij(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 Ni=new b2n,y2n=(e,n)=>Ni.message(e,n),x2n=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",w2n=y2n,k2n=()=>Ni.toasts,S2n=()=>Ni.getActiveToasts(),C2n=Object.assign(w2n,{success:Ni.success,info:Ni.info,warning:Ni.warning,error:Ni.error,custom:Ni.custom,message:Ni.message,promise:Ni.promise,dismiss:Ni.dismiss,loading:Ni.loading},{getHistory:k2n,getToasts:S2n});o2n("[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 a1(e){return e.label!==void 0}const E2n=3,N2n="24px",z2n="16px",aj=4e3,j2n=356,T2n=14,A2n=45,R2n=200;function Oo(...e){return e.filter(Boolean).join(" ")}function M2n(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const O2n=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:_,unstyled:p,interacting:m,setHeights:x,visibleToasts:k,heights:v,index:b,toasts:w,expanded:y,removeToast:C,defaultRichColors:N,closeButton:z,style:T,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:$,position:q,gap:H,expandByDefault:Q,classNames:V,icons:J,closeButtonAriaLabel:Z="Close toast"}=e,[B,L]=et.useState(null),[F,U]=et.useState(null),[K,ne]=et.useState(!1),[ce,_e]=et.useState(!1),[se,G]=et.useState(!1),[oe,le]=et.useState(!1),[fe,me]=et.useState(!1),[Re,Oe]=et.useState(0),[We,He]=et.useState(0),Se=et.useRef(_.duration||$||aj),it=et.useRef(null),Je=et.useRef(null),ot=b===0,wt=b+1<=k,Pt=_.type,dt=Pt??"default",ft=_.dismissible!==!1,Le=_.className||"",ge=_.descriptionClassName||"",Te=et.useMemo(()=>v.findIndex(Et=>Et.toastId===_.id)||0,[v,_.id]),Pe=et.useMemo(()=>{var Et;return(Et=_.closeButton)!=null?Et:z},[_.closeButton,z]),rt=et.useMemo(()=>_.duration||$||aj,[_.duration,$]),ut=et.useRef(0),pt=et.useRef(0),qe=et.useRef(0),Kt=et.useRef(null),[sn,Tt]=q.split("-"),mt=et.useMemo(()=>v.reduce((Et,un,zn)=>zn>=Te?Et:Et+un.height,0),[v,Te]),Bn=m2n(),Jt=et.useMemo(()=>{var Et;return(Et=e.swipeDirections)!=null?Et:M2n(q)},[e.swipeDirections,q]),xn=_.invert||h,vr=Pt==="loading";pt.current=et.useMemo(()=>Te*H+mt,[Te,mt]),et.useEffect(()=>{Se.current=rt},[rt]),et.useEffect(()=>{ne(!0)},[]),et.useEffect(()=>{const Et=Je.current;if(Et){const un=Et.getBoundingClientRect().height;return He(un),x(zn=>[{toastId:_.id,height:un,position:_.position},...zn]),()=>x(zn=>zn.filter(an=>an.toastId!==_.id))}},[x,_.id]),et.useLayoutEffect(()=>{if(!K)return;const Et=Je.current,un=Et.style.height;Et.style.height="auto";const zn=Et.getBoundingClientRect().height;Et.style.height=un,He(zn),x(an=>an.find(fn=>fn.toastId===_.id)?an.map(fn=>fn.toastId===_.id?{...fn,height:zn}:fn):[{toastId:_.id,height:zn,position:_.position},...an])},[K,_.title,_.description,x,_.id,_.jsx,_.action,_.cancel]);const Pn=et.useCallback(()=>{_e(!0),Oe(pt.current),x(Et=>Et.filter(un=>un.toastId!==_.id)),setTimeout(()=>{C(_)},R2n)},[_,C,x,pt]);et.useEffect(()=>{if(_.promise&&Pt==="loading"||_.duration===1/0||_.type==="loading")return;let Et;return y||m||Bn?(()=>{if(qe.current{Se.current!==1/0&&(ut.current=new Date().getTime(),Et=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),Pn()},Se.current))})(),()=>clearTimeout(Et)},[y,m,_,Pt,Bn,Pn]),et.useEffect(()=>{_.delete&&(Pn(),_.onDismiss==null||_.onDismiss.call(_,_))},[Pn,_.delete]);function Rn(){var Et;if(J!=null&&J.loading){var un;return et.createElement("div",{className:Oo(V==null?void 0:V.loader,_==null||(un=_.classNames)==null?void 0:un.loader,"sonner-loader"),"data-visible":Pt==="loading"},J.loading)}return et.createElement(u2n,{className:Oo(V==null?void 0:V.loader,_==null||(Et=_.classNames)==null?void 0:Et.loader),visible:Pt==="loading"})}const Fn=_.icon||(J==null?void 0:J[Pt])||c2n(Pt);var _r,Pr;return et.createElement("li",{tabIndex:0,ref:Je,className:Oo(D,Le,V==null?void 0:V.toast,_==null||(n=_.classNames)==null?void 0:n.toast,V==null?void 0:V[dt],_==null||(t=_.classNames)==null?void 0:t[dt]),"data-sonner-toast":"","data-rich-colors":(_r=_.richColors)!=null?_r:N,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":K,"data-promise":!!_.promise,"data-swiped":fe,"data-removed":ce,"data-visible":wt,"data-y-position":sn,"data-x-position":Tt,"data-index":b,"data-front":ot,"data-swiping":se,"data-dismissible":ft,"data-type":Pt,"data-invert":xn,"data-swipe-out":oe,"data-swipe-direction":F,"data-expanded":!!(y||Q&&K),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ce?Re:pt.current}px`,"--initial-height":Q?"auto":`${We}px`,...T,..._.style},onDragEnd:()=>{G(!1),L(null),Kt.current=null},onPointerDown:Et=>{Et.button!==2&&(vr||!ft||(it.current=new Date,Oe(pt.current),Et.target.setPointerCapture(Et.pointerId),Et.target.tagName!=="BUTTON"&&(G(!0),Kt.current={x:Et.clientX,y:Et.clientY})))},onPointerUp:()=>{var Et,un,zn;if(oe||!ft)return;Kt.current=null;const an=Number(((Et=Je.current)==null?void 0:Et.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),fr=Number(((un=Je.current)==null?void 0:un.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fn=new Date().getTime()-((zn=it.current)==null?void 0:zn.getTime()),wn=B==="x"?an:fr,Yn=Math.abs(wn)/fn;if((B==="x"?Jt.includes(an>0?"right":"left"):Jt.includes(fr>0?"bottom":"top"))&&(Math.abs(wn)>=A2n||Yn>.11)){Oe(pt.current),_.onDismiss==null||_.onDismiss.call(_,_),U(B==="x"?an>0?"right":"left":fr>0?"down":"up"),Pn(),le(!0);return}else{var At,Ve;(At=Je.current)==null||At.style.setProperty("--swipe-amount-x","0px"),(Ve=Je.current)==null||Ve.style.setProperty("--swipe-amount-y","0px")}me(!1),G(!1),L(null)},onPointerMove:Et=>{var un,zn,an;if(!Kt.current||!ft||((un=window.getSelection())==null?void 0:un.toString().length)>0)return;const fn=Et.clientY-Kt.current.y,wn=Et.clientX-Kt.current.x;!B&&(Math.abs(wn)>1||Math.abs(fn)>1)&&L(Math.abs(wn)>Math.abs(fn)?"x":"y");let Yn={x:0,y:0};const kt=At=>1/(1.5+Math.abs(At)/20);if(B==="y"){if(Jt.includes("top")||Jt.includes("bottom"))if(Jt.includes("top")&&fn<0||Jt.includes("bottom")&&fn>0)Yn.y=fn;else{const At=fn*kt(fn);Yn.y=Math.abs(At)0)Yn.x=wn;else{const At=wn*kt(wn);Yn.x=Math.abs(At)0||Math.abs(Yn.y)>0)&&me(!0),(zn=Je.current)==null||zn.style.setProperty("--swipe-amount-x",`${Yn.x}px`),(an=Je.current)==null||an.style.setProperty("--swipe-amount-y",`${Yn.y}px`)}},Pe&&!_.jsx&&Pt!=="loading"?et.createElement("button",{"aria-label":Z,"data-disabled":vr,"data-close-button":!0,onClick:vr||!ft?()=>{}:()=>{Pn(),_.onDismiss==null||_.onDismiss.call(_,_)},className:Oo(V==null?void 0:V.closeButton,_==null||(r=_.classNames)==null?void 0:r.closeButton)},(Pr=J==null?void 0:J.close)!=null?Pr:p2n):null,(Pt||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[Pt])!==null||_.icon)?et.createElement("div",{"data-icon":"",className:Oo(V==null?void 0:V.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},Pt==="loading"?_.icon||Rn():_.promise?Rn():null,Pt!=="loading"?Fn:null):null,et.createElement("div",{"data-content":"",className:Oo(V==null?void 0:V.content,_==null||(i=_.classNames)==null?void 0:i.content)},et.createElement("div",{"data-title":"",className:Oo(V==null?void 0:V.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?et.createElement("div",{"data-description":"",className:Oo(I,ge,V==null?void 0:V.description,_==null||(o=_.classNames)==null?void 0:o.description)},typeof _.description=="function"?_.description():_.description):null),et.isValidElement(_.cancel)?_.cancel:_.cancel&&a1(_.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:Et=>{a1(_.cancel)&&ft&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,Et),Pn())},className:Oo(V==null?void 0:V.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,et.isValidElement(_.action)?_.action:_.action&&a1(_.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:Et=>{a1(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,Et),!Et.defaultPrevented&&Pn())},className:Oo(V==null?void 0:V.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function oj(){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 D2n(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?z2n:N2n;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(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]}):c(o)}),t}const L2n=et.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:_,theme:p="light",richColors:m,duration:x,style:k,visibleToasts:v=E2n,toastOptions:b,dir:w=oj(),gap:y=T2n,icons:C,customAriaLabel:N,containerAriaLabel:z="Notifications"}=n,[T,j]=et.useState([]),M=et.useMemo(()=>r?T.filter(ne=>ne.toasterId===r):T.filter(ne=>!ne.toasterId),[T,r]),D=et.useMemo(()=>Array.from(new Set([i].concat(M.filter(ne=>ne.position).map(ne=>ne.position)))),[M,i]),[I,$]=et.useState([]),[q,H]=et.useState(!1),[Q,V]=et.useState(!1),[J,Z]=et.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=et.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=et.useRef(null),U=et.useRef(!1),K=et.useCallback(ne=>{j(ce=>{var _e;return(_e=ce.find(se=>se.id===ne.id))!=null&&_e.delete||Ni.dismiss(ne.id),ce.filter(({id:se})=>se!==ne.id)})},[]);return et.useEffect(()=>Ni.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{j(ce=>ce.map(_e=>_e.id===ne.id?{..._e,delete:!0}:_e))});return}setTimeout(()=>{a2n.flushSync(()=>{j(ce=>{const _e=ce.findIndex(se=>se.id===ne.id);return _e!==-1?[...ce.slice(0,_e),{...ce[_e],...ne},...ce.slice(_e+1)]:[ne,...ce]})})})}),[]),et.useEffect(()=>{if(p!=="system"){Z(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:ce})=>{Z(ce?"dark":"light")})}catch{ne.addListener(({matches:_e})=>{try{Z(_e?"dark":"light")}catch(se){console.error(se)}})}},[p]),et.useEffect(()=>{T.length<=1&&H(!1)},[T]),et.useEffect(()=>{const ne=ce=>{var _e;if(a.length>0&&a.every(oe=>ce[oe]||ce.code===oe)){var G;H(!0),(G=B.current)==null||G.focus()}ce.code==="Escape"&&(document.activeElement===B.current||(_e=B.current)!=null&&_e.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[a]),et.useEffect(()=>{if(B.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[B.current]),et.createElement("section",{ref:t,"aria-label":N??`${z} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ne,ce)=>{var _e;const[se,G]=ne.split("-");return M.length?et.createElement("ol",{key:ne,dir:w==="auto"?oj():w,tabIndex:-1,ref:B,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":se,"data-x-position":G,style:{"--front-toast-height":`${((_e=I[0])==null?void 0:_e.height)||0}px`,"--width":`${j2n}px`,"--gap":`${y}px`,...k,...D2n(h,_)},onBlur:oe=>{U.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},M.filter(oe=>!oe.position&&ce===0||oe.position===ne).map((oe,le)=>{var fe,me;return et.createElement(O2n,{key:oe.id,icons:C,index:le,toast:oe,defaultRichColors:m,duration:(fe=b==null?void 0:b.duration)!=null?fe:x,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(me=b==null?void 0:b.closeButton)!=null?me:c,interacting:Q,position:ne,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:K,toasts:M.filter(Re=>Re.position==oe.position),heights:I.filter(Re=>Re.position==oe.position),setHeights:$,expandByDefault:o,gap:y,expanded:q,swipeDirections:n.swipeDirections})})):null}))});function I2n(e){const[n]=cI();return f.jsx(L2n,{theme:n,...e})}function yn(e,n,t){C2n[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function lS({content:e,children:n,className:t}){const r=A.useRef(null),s=A.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),_=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${_}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return A.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),f.jsxs("span",{ref:r,className:fs("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 c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,f.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 $2n=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Em(e,n,t="[data-initial-focus]"){const r=A.useRef(n);r.current=n,A.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll($2n)];(s.querySelector(t)??a()[0]??s).focus();const o=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const u=a(),h=u[0],_=u.at(-1);!h||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function EI({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=A.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?G6t():fCt({count:Xt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?g6t():TSt({count:Xt(n.pendingPermissionCount)})),o>0&&c.push(o===1?A6t():Z6t({count:Xt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?$6t():iCt({count:Xt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?S6t():YSt({count:Xt(n.activeRunCount)})),Em(a,s),oa.createPortal(f.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:f.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":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:USt({host:Ne(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:u6t()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(De,{disabled:r,onClick:s,children:K_()}),f.jsx(De,{variant:"danger",disabled:r,onClick:i,children:r?bCt():ISt()})]})]})}),document.body)}/** - * @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 NI=(...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 B2n=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 P2n=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 cj=e=>{const n=P2n(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 sw={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 F2n=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},H2n=A.createContext({}),q2n=()=>A.useContext(H2n),U2n=A.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=q2n()??{},x=r??_?Number(t??h)*24/Number(n??u):t??h;return A.createElement("svg",{ref:c,...sw,width:n??u??sw.width,height:n??u??sw.height,stroke:e??p,strokeWidth:x,className:NI("lucide",m,s),...!i&&!F2n(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>A.createElement(k,v)),...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 at=(e,n)=>{const t=A.forwardRef(({className:r,...s},i)=>A.createElement(U2n,{ref:i,iconNode:n,className:NI(`lucide-${B2n(cj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=cj(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 G2n=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],V2n=at("arrow-down",G2n);/** - * @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 K2n=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],A0=at("arrow-left",K2n);/** - * @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 W2n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Q1=at("arrow-right",W2n);/** - * @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 Q2n=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],X2n=at("arrow-up-right",Q2n);/** - * @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 Y2n=[["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"}]],zI=at("blocks",Y2n);/** - * @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 Z2n=[["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"}]],jI=at("book-open",Z2n);/** - * @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 J2n=[["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"}]],ewn=at("calendar-days",J2n);/** - * @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 twn=[["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"}]],nwn=at("chart-spline",twn);/** - * @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 rwn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xi=at("check",rwn);/** - * @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 swn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rc=at("chevron-down",swn);/** - * @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 iwn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],TI=at("chevron-left",iwn);/** - * @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 awn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ba=at("chevron-right",awn);/** - * @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 own=[["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"}]],uS=at("circle-alert",own);/** - * @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 cwn=[["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"}]],lwn=at("circle-question-mark",cwn);/** - * @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 uwn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],AI=at("circle-stop",uwn);/** - * @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 _wn=[["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"}]],RI=at("circle-x",_wn);/** - * @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 fwn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],dwn=at("clock-3",fwn);/** - * @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 hwn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],pwn=at("clock",hwn);/** - * @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 mwn=[["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"}]],gwn=at("cloud-upload",mwn);/** - * @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 vwn=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],D3=at("code",vwn);/** - * @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 bwn=[["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"}]],Oh=at("copy",bwn);/** - * @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 ywn=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],MI=at("corner-down-left",ywn);/** - * @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 xwn=[["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"}]],_S=at("cpu",xwn);/** - * @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 wwn=[["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"}]],fS=at("download",wwn);/** - * @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 kwn=[["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"}]],dS=at("ellipsis",kwn);/** - * @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 Swn=[["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"}]],X_=at("external-link",Swn);/** - * @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 Cwn=[["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"}]],OI=at("file-code",Cwn);/** - * @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 Ewn=[["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"}]],Nwn=at("file-output",Ewn);/** - * @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 zwn=[["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"}]],Ob=at("file-text",zwn);/** - * @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 jwn=[["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"}]],hh=at("flask-conical",jwn);/** - * @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 Twn=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]],Awn=at("fold-vertical",Twn);/** - * @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 Rwn=[["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"}]],DI=at("folder-git-2",Rwn);/** - * @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 Mwn=[["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"}]],Y_=at("folder-open",Mwn);/** - * @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 Own=[["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"}]],Dwn=at("folder-plus",Own);/** - * @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 Lwn=[["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"}]],Db=at("folder-tree",Lwn);/** - * @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 Iwn=[["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"}]],$wn=at("funnel",Iwn);/** - * @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 Bwn=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Pwn=at("gauge",Bwn);/** - * @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 Fwn=[["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"}]],Nm=at("git-branch",Fwn);/** - * @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 Hwn=[["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"}]],qwn=at("git-commit-horizontal",Hwn);/** - * @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 Uwn=[["path",{d:"M12 13V2l8 4-8 4",key:"5wlwwj"}],["path",{d:"M20.561 10.222a9 9 0 1 1-12.55-5.29",key:"1c0wjv"}],["path",{d:"M8.002 9.997a5 5 0 1 0 8.9 2.02",key:"gb1g7m"}]],LI=at("goal",Uwn);/** - * @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 Gwn=[["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"}]],Vwn=at("globe",Gwn);/** - * @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 Kwn=[["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"}]],II=at("history",Kwn);/** - * @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 Wwn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hS=at("info",Wwn);/** - * @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 Qwn=[["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"}]],Xwn=at("laptop",Qwn);/** - * @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 Ywn=[["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"}]],Zwn=at("lightbulb",Ywn);/** - * @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 Jwn=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],$I=at("link-2",Jwn);/** - * @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 e4n=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],t4n=at("list-checks",e4n);/** - * @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 n4n=[["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"}]],lj=at("lock",n4n);/** - * @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 r4n=[["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"}]],s4n=at("maximize-2",r4n);/** - * @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 i4n=[["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"}]],BI=at("message-square-quote",i4n);/** - * @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 a4n=[["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"}]],o4n=at("minimize-2",a4n);/** - * @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 c4n=[["path",{d:"M5 12h14",key:"1ays0h"}]],l4n=at("minus",c4n);/** - * @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 u4n=[["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"}]],_4n=at("monitor",u4n);/** - * @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 f4n=[["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"}]],d4n=at("moon",f4n);/** - * @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 h4n=[["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"}]],p4n=at("mouse-pointer-click",h4n);/** - * @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 m4n=[["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"}]],pS=at("package",m4n);/** - * @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 g4n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],PI=at("panel-left",g4n);/** - * @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 v4n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],FI=at("panel-right",v4n);/** - * @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 b4n=[["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"}]],y4n=at("paperclip",b4n);/** - * @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 x4n=[["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"}]],mS=at("pencil",x4n);/** - * @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 w4n=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],k4n=at("play",w4n);/** - * @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 S4n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Dh=at("plus",S4n);/** - * @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 C4n=[["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"}]],Pa=at("refresh-cw",C4n);/** - * @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 E4n=[["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"}]],N4n=at("rotate-cw",E4n);/** - * @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 z4n=[["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"}]],gS=at("scroll-text",z4n);/** - * @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 j4n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],HI=at("search",j4n);/** - * @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 T4n=[["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"}]],uj=at("server",T4n);/** - * @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 A4n=[["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"}]],vS=at("settings",A4n);/** - * @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 R4n=[["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"}]],qI=at("sliders-horizontal",R4n);/** - * @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 M4n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],O4n=at("square-pen",M4n);/** - * @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 D4n=[["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"}]],mf=at("square-terminal",D4n);/** - * @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 L4n=[["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"}]],I4n=at("sun",L4n);/** - * @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 $4n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],lo=at("terminal",$4n);/** - * @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 B4n=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],P4n=at("toggle-right",B4n);/** - * @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 F4n=[["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"}]],gf=at("trash-2",F4n);/** - * @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 H4n=[["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"}]],bS=at("triangle-alert",H4n);/** - * @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 q4n=[["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"}]],U4n=at("upload",q4n);/** - * @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 G4n=[["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"}]],yS=at("users",G4n);/** - * @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 V4n=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],K4n=at("wand-sparkles",V4n);/** - * @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 W4n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],or=at("x",W4n);/** - * @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 Q4n=[["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"}]],X4n=at("zap",Q4n);function yu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const Y4n=["settings","harnesses","projects","compute","instances","environment","git","storage"],Z4n=e=>Y4n.some(n=>n===e),vf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Hi=e=>typeof e=="string"&&e.length>0,o1=e=>e==null||Hi(e);function xS(e){if(!vf(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"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Hi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&o1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Hi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Hi(e.path)&&o1(e.sessionId)&&o1(e.ref)&&o1(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}:{},...Hi(e.sessionId)?{sessionId:e.sessionId}:{},...Hi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Hi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Hi(e.experimentId)&&Hi(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")&&Hi(e.sessionId)&&Hi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Hi(e.sessionId)&&Hi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function Z_(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"&&Z4n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Lb(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=Z_(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(!xS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function X1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const _j=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function UI(e,n){let t,r,s=!1,i=!1,a;async function o(c=!1){if(clearTimeout(a),i||(i=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const h=i;i=!1;try{await e(u,h),r=void 0}catch(_){r=u,n(_)}finally{s=!1,t!==void 0&&o()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var iw={exports:{}},fj;function J4n(){return fj||(fj=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),c=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),_=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(_/i.css.cell.height))}}}})(),t})()))})(iw)),iw.exports}var e3n=J4n(),aw={exports:{}},dj;function t3n(){return dj||(dj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const _=new URL(h),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,_,p,m={}){this._terminal=h,this._regex=_,this._handler=p,this._options=m}provideLinks(h,_){const p=u.computeLink(h,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(h){return h.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:x}=_;this._options.hover(p,m,x)}},_)))}};class u{static computeLink(_,p,m,x){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const C=[];for(;y=k.exec(w);){const N=y[0];if(!c(N))continue;const[z,T]=u._mapStrIdx(m,b,0,y.index),[j,M]=u._mapStrIdx(m,z,T,N.length);if(z===-1||T===-1||j===-1||M===-1)continue;const D={start:{x:T+1,y:z+1},end:{x:M,y:j+1}};C.push({range:D,text:N,activate:x})}return C}static _getWindowedLineStrings(_,p){let m,x=_,k=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--x))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,x]}static _mapStrIdx(_,p,m,x){const k=_.buffer.active,v=k.getNullCell();let b=m;for(;x;){const w=k.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(h,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(h=u,_={}){this._handler=h,this._options=_}activate(h){this._terminal=h;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(aw)),aw.exports}var n3n=t3n(),ow={exports:{}},hj;function r3n(){return hj||(hj=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),x=c(4725),k=c(2585),v=c(3656);let b=o.AccessibilityManager=class extends m.Disposable{constructor(w,y,C,N){super(),this._terminal=w,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 z=0;zthis._handleBoundaryFocus(z,0),this._bottomBoundaryFocusListener=z=>this._handleBoundaryFocus(z,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((z=>this._handleResize(z.rows)))),this.register(this._terminal.onRender((z=>this._refreshRows(z.start,z.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((z=>this._handleChar(z)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` -`)))),this.register(this._terminal.onA11yTab((z=>this._handleTab(z)))),this.register(this._terminal.onKey((z=>this._handleKey(z.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.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(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){const C=this._terminal.buffer,N=C.lines.length.toString();for(let z=w;z<=y;z++){const T=C.lines.get(C.ydisp+z),j=[],M=(T==null?void 0:T.translateToString(!0,void 0,void 0,j))||"",D=(C.ydisp+z+1).toString(),I=this._rowElements[z];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,j)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){const C=w.target,N=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==N)return;let z,T;if(y===0?(z=C,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(z=this._rowElements.shift(),T=C,this._rowContainer.removeChild(z)),z.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},C={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.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 z=({node:D,offset:I})=>{const $=D instanceof Text?D.parentNode:D;let q=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get($);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=I=this._terminal.cols&&(++q,Q=0),{row:q,column:Q}},T=z(y),j=z(C);if(T&&j){if(T.row>j.row||T.row===j.row&&T.column>=j.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(j.row-T.row)*this._terminal.cols-T.column+j.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_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 w=0;w{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(p,m,x,k){p=u(p=c(p),x.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),m.value=""}function _(p,m,x){const k=x.getBoundingClientRect(),v=p.clientX-k.left-10,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}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=c,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,k){p.stopPropagation(),p.clipboardData&&h(p.clipboardData.getData("text/plain"),m,x,k)},o.paste=h,o.moveTextAreaUnderMouseCursor=_,o.rightClickHandler=function(p,m,x,k,v){_(p,m,x),v&&k.rightClickSelect(p),m.value=k.selectionText,m.select()}},7239:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=c(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(h,_,p){this._css.set(h,_,p)}getCss(h,_){return this._css.get(h,_)}setColor(h,_,p){this._color.set(h,_,p)}getColor(h,_){return this._color.get(h,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,u,h,_){c.addEventListener(u,h,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,_))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),x=c(2585),k=c(4725);let v=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,w,y,C,N){super(),this._element=b,this._mouseService=w,this._renderService=y,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 z;this._lastMouseEvent=void 0,(z=this._activeProviderReplies)==null||z.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const y=b.composedPath();for(let C=0;C{z==null||z.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[z,T]of this._linkProviderService.linkProviders.entries())w?(N=this._activeProviderReplies)!=null&&N.get(z)&&(y=this._checkLinkProviderResult(z,b,y)):T.provideLinks(b.y,(j=>{var D,I;if(this._isMouseOut)return;const M=j==null?void 0:j.map(($=>({link:$})));(D=this._activeProviderReplies)==null||D.set(z,M),y=this._checkLinkProviderResult(z,b,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const y=new Set;for(let C=0;Cb?this._bufferService.cols:T.link.range.end.x;for(let D=j;D<=M;D++){if(y.has(D)){N.splice(z--,1);break}y.add(D)}}}}_checkLinkProviderResult(b,w,y){var z;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(b);let N=!1;for(let T=0;Tthis._linkAtPosition(j.link,w)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;Tthis._linkAtPosition(M.link,w)));if(j){y=!0,this._handleNewLink(j);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,N,z;(C=this._currentLink)!=null&&C.state&&((z=(N=this._currentLink)==null?void 0:N.state)==null?void 0:z.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const z=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);z&&this._askForLink(z,!1)}}))))}_linkHover(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(b,w){const y=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(b,w){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=w.y*this._bufferService.cols+w.x;return y<=N&&N<=C}_positionFromMouseEvent(b,w,y){const C=y.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,y,C,N){return{x1:b,y1:w,x2:y,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,x.IBufferService),h(4,k.ILinkProviderService)],v)},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,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=o.OscLinkProvider=class{constructor(k,v,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const w=[],y=this._optionsService.rawOptions.linkHandler,C=new _.CellData,N=b.getTrimmedLength();let z=-1,T=-1,j=!1;for(let D=0;Dy?y.activate(H,Q,$):x(0,Q),hover:(H,Q)=>{var V;return(V=y==null?void 0:y.hover)==null?void 0:V.call(y,H,Q,$)},leave:(H,Q)=>{var V;return(V=y==null?void 0:y.leave)==null?void 0:V.call(y,H,Q,$)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(T=D,z=C.extended.urlId):(T=-1,z=-1)}}v(w)}};function x(k,v){if(confirm(`Do you want to navigate to ${v}? - -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,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 c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),h=c(3656),_=c(3551),p=c(9042),m=c(3730),x=c(1680),k=c(3107),v=c(5744),b=c(2950),w=c(1296),y=c(428),C=c(4269),N=c(5114),z=c(8934),T=c(3230),j=c(9312),M=c(4725),D=c(6731),I=c(8055),$=c(8969),q=c(8460),H=c(844),Q=c(6114),V=c(8437),J=c(2584),Z=c(7399),B=c(5941),L=c(9074),F=c(2585),U=c(5435),K=c(4567),ne=c(779);class ce extends $.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=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ne.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(((G,oe)=>this.refresh(G,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,H.toDisposable)((()=>{var G,oe;this._customKeyEventHandler=void 0,(oe=(G=this.element)==null?void 0:G.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const G of se){let oe,le="";switch(G.index){case 256:oe="foreground",le="10";break;case 257:oe="background",le="11";break;case 258:oe="cursor",le="12";break;default:oe="ansi",le="4;"+G.index}switch(G.type){case 0:const fe=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,B.toRgbString)(fe)}${J.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((me=>me.ansi[G.index]=I.channels.toColor(...G.color)));else{const me=oe;this._themeService.modifyColors((Re=>Re[me]=I.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.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(K.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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(J.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,G=this.buffer.lines.get(se);if(!G)return;const oe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,fe=G.getWidth(oe),me=this._renderService.dimensions.css.cell.width*fe,Re=this.buffer.y*this._renderService.dimensions.css.cell.height,Oe=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Oe+"px",this.textarea.style.top=Re+"px",this.textarea.style.width=me+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,u.copyHandler)(G,this._selectionService)})));const se=G=>(0,u.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,u.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var oe;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"),((oe=this.element)==null?void 0:oe.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 G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.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(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.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(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(z.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(G);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((le=>this.scrollLines(le.amount,le.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(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),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(K.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,G=this.element;function oe(me){const Re=se._mouseService.getMouseReportCoords(me,se.screenElement);if(!Re)return!1;let Oe,We;switch(me.overrideType||me.type){case"mousemove":We=32,me.buttons===void 0?(Oe=3,me.button!==void 0&&(Oe=me.button<3?me.button:3)):Oe=1&me.buttons?0:4&me.buttons?1:2&me.buttons?2:3;break;case"mouseup":We=0,Oe=me.button<3?me.button:3;break;case"mousedown":We=1,Oe=me.button<3?me.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(me)===!1||se.viewport.getLinesScrolled(me)===0)return!1;We=me.deltaY<0?0:1,Oe=4;break;default:return!1}return!(We===void 0||Oe===void 0||Oe>4)&&se.coreMouseService.triggerMouseEvent({col:Re.col,row:Re.row,x:Re.x,y:Re.y,button:Oe,action:We,ctrl:me.ctrlKey,alt:me.altKey,shift:me.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},fe={mouseup:me=>(oe(me),me.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(me)),wheel:me=>(oe(me),this.cancel(me,!0)),mousedrag:me=>{me.buttons&&oe(me)},mousemove:me=>{me.buttons||oe(me)}};this.register(this.coreMouseService.onProtocolChange((me=>{me?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(me)),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&me?le.mousemove||(G.addEventListener("mousemove",fe.mousemove),le.mousemove=fe.mousemove):(G.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&me?le.wheel||(G.addEventListener("wheel",fe.wheel,{passive:!1}),le.wheel=fe.wheel):(G.removeEventListener("wheel",le.wheel),le.wheel=null),2&me?le.mouseup||(le.mouseup=fe.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&me?le.mousedrag||(le.mousedrag=fe.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(G,"mousedown",(me=>{if(me.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(me))return oe(me),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(me)}))),this.register((0,h.addDisposableDomListener)(G,"wheel",(me=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(me)===!1)return!1;if(!this.buffer.hasScrollback){const Re=this.viewport.getLinesScrolled(me);if(Re===0)return;const Oe=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(me.deltaY<0?"A":"B");let We="";for(let He=0;He{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(me),this.cancel(me)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(G,"touchmove",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(me)?void 0:this.cancel(me)}),{passive:!1}))}refresh(se,G){var oe;(oe=this._renderService)==null||oe.refreshRows(se,G)}updateCursorStyle(se){var G;(G=this._selectionService)!=null&&G.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,G,oe=0){var le;oe===1?(super.scrollLines(se,G,oe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.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 G=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),G}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,G,oe){this._selectionService.setSelection(se,G,oe)}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,G){var oe;(oe=this._selectionService)==null||oe.selectLines(se,G)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!G&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,Z.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){const le=this.rows-1;return this.scrollLines(oe.type===2?-le:le),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.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):(oe.key!==J.C0.ETX&&oe.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,G){const oe=se.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||se.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||se.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?oe:oe&&(!G.keyCode||G.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)G=se.charCode;else if(se.which===null||se.which===void 0)G=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;G=se.which}return!(!G||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(G,!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 G=se.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(se),!0}return!1}resize(se,G){se!==this.cols||G!==this.rows?super.resize(se,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,G){var oe,le;(oe=this._charSizeService)==null||oe.measure(),(le=this.viewport)==null||le.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 G=1;G{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-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 c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),x=c(844),k=c(2585);let v=o.Viewport=class extends x.Disposable{constructor(b,w,y,C,N,z,T,j){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=C,this._charSizeService=N,this._renderService=z,this._coreBrowserService=T,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,_.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(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=$),C=""}}return{bufferElements:N,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let x=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,b,w,y){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,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 k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=k==null?void 0:k.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=k.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=x=u([h(1,m.IBufferService),h(2,_.ICoreBrowserService),h(3,m.IDecorationService),h(4,_.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(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,o,c){var u=this&&this.__decorate||function(y,C,N,z){var T,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,z);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,z){C(N,z,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),x=c(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,N,z,T,j,M){var I;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=N,this._decorationService=z,this._renderService=T,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new _.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 D=this._canvas.getContext("2d");if(!D)throw new Error("Ctx cannot be null");this._ctx=D,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var $;($=this._canvas)==null||$.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=C,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||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=w=u([h(2,x.IBufferService),h(3,x.IDecorationService),h(4,p.IRenderService),h(5,x.IOptionsService),h(6,p.ICoreBrowserService)],w)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let x=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,b,w,y,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,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(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=x=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,_.IRenderService)],x)},9806:(a,o)=>{function c(u,h,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),x=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-x,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,_,p,m,x,k,v,b){if(!x)return;const w=c(u,h,_);return w?(w[0]=Math.ceil((w[0]+(b?k/2:0))/k),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,w,y){const C=v-_(v,w),N=b-_(b,w),z=Math.abs(C-N)-(function(T,j,M){let D=0;const I=T-_(T,M),$=j-_(j,M);for(let q=0;q=0&&vb?"A":"B"}function m(v,b,w,y,C,N){let z=v,T=b,j="";for(;z!==w||T!==y;)z+=C?1:-1,C&&z>N.cols-1?(j+=N.buffer.translateBufferLineToString(T,!1,v,z),z=0,v=0,T++):!C&&z<0&&(j+=N.buffer.translateBufferLineToString(T,!1,0,v+1),z=N.cols-1,v=z,T--);return j+N.buffer.translateBufferLineToString(T,!1,v,z)}function x(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function k(v,b){v=Math.floor(v);let w="";for(let y=0;y0?I-_(I,$):M;const Q=I,V=(function(J,Z,B,L,F,U){let K;return K=h(B,L,F,U).length>0?L-_(L,F):Z,J=B&&Kv?"D":"C",k(Math.abs(C-v),x(z,y));z=N>b?"D":"C";const T=Math.abs(N-b);return k((function(j,M){return M.cols-j})(N>b?v:C,w)+(T-1)*w.cols+1+((N>b?C:v)-1),x(z,y))}},1296:function(a,o,c){var u=this&&this.__decorate||function(q,H,Q,V){var J,Z=arguments.length,B=Z<3?H:V===null?V=Object.getOwnPropertyDescriptor(H,Q):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(q,H,Q,V);else for(var L=q.length-1;L>=0;L--)(J=q[L])&&(B=(Z<3?J(B):Z>3?J(H,Q,B):J(H,Q))||B);return Z>3&&B&&Object.defineProperty(H,Q,B),B},h=this&&this.__param||function(q,H){return function(Q,V){H(Q,V,q)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),x=c(6171),k=c(6052),v=c(4725),b=c(8055),w=c(8460),y=c(844),C=c(2585),N="xterm-dom-renderer-owner-",z="xterm-rows",T="xterm-fg-",j="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,$=o.DomRenderer=class extends y.Disposable{constructor(q,H,Q,V,J,Z,B,L,F,U,K,ne,ce){super(),this._terminal=q,this._document=H,this._element=Q,this._screenElement=V,this._viewportElement=J,this._helperContainer=Z,this._linkifier2=B,this._charSizeService=F,this._optionsService=U,this._bufferService=K,this._coreBrowserService=ne,this._themeService=ce,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(z),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(D),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((_e=>this._injectCss(_e)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((_e=>this._handleLinkHover(_e)))),this.register(this._linkifier2.onHideLinkUnderline((_e=>this._handleLinkLeave(_e)))),this.register((0,y.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),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 Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${z} 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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${z} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${z} .xterm-dim { color: ${b.color.multiplyOpacity(q.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 Q=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${V} { 50% { box-shadow: none; }}`,H+=`@keyframes ${J} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,H+=`${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[Z,B]of q.ansi.entries())H+=`${this._terminalSelector} .${T}${Z} { color: ${B.css}; }${this._terminalSelector} .${T}${Z}.xterm-dim { color: ${b.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${j}${Z} { background-color: ${B.css}; }`;H+=`${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(q.background).css}; }${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,H){for(let Q=this._rowElements.length;Q<=H;Q++){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(q,H){this._refreshRowElements(q,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(q,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,H,Q),this.renderRows(0,this._bufferService.rows-1),!q||!H)return;this._selectionRenderModel.update(this._terminal,q,H,Q);const V=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,Z=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(Z>=this._bufferService.rows||B<0)return;const L=this._document.createDocumentFragment();if(Q){const F=q[0]>H[0];L.appendChild(this._createSelectionElement(Z,F?H[0]:q[0],F?q[0]:H[0],B-Z+1))}else{const F=V===Z?q[0]:0,U=Z===J?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Z,F,U));const K=B-Z-1;if(L.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,K)),Z!==B){const ne=J===B?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,0,ne))}}this._selectionContainer.appendChild(L)}_createSelectionElement(q,H,Q,V=1){const J=this._document.createElement("div"),Z=H*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(Q-H);return Z+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-Z),J.style.height=V*this.dimensions.css.cell.height+"px",J.style.top=q*this.dimensions.css.cell.height+"px",J.style.left=`${Z}px`,J.style.width=`${B}px`,J}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 q of this._rowElements)q.replaceChildren()}renderRows(q,H){const Q=this._bufferService.buffer,V=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=q;F<=H;F++){const U=F+Q.ydisp,K=this._rowElements[F],ne=Q.lines.get(U);if(!K||!ne)break;K.replaceChildren(...this._rowFactory.createRow(ne,U,U===V,B,L,J,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,H,Q,V,J,Z){Q<0&&(q=0),V<0&&(H=0);const B=this._bufferService.rows-1;Q=Math.max(Math.min(Q,B),0),V=Math.max(Math.min(V,B),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,U=Math.min(L.x,J-1),K=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let _e=Q;_e<=V;++_e){const se=_e+L.ydisp,G=this._rowElements[_e],oe=L.lines.get(se);if(!G||!oe)break;G.replaceChildren(...this._rowFactory.createRow(oe,se,se===F,ne,ce,U,K,this.dimensions.css.cell.width,this._widthCache,Z?_e===Q?q:0:-1,Z?(_e===V?H:J)-1:-1))}}};o.DomRenderer=$=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],$)},3787:function(a,o,c){var u=this&&this.__decorate||function(z,T,j,M){var D,I=arguments.length,$=I<3?T:M===null?M=Object.getOwnPropertyDescriptor(T,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(z,T,j,M);else for(var q=z.length-1;q>=0;q--)(D=z[q])&&($=(I<3?D($):I>3?D(T,j,$):D(T,j))||$);return I>3&&$&&Object.defineProperty(T,j,$),$},h=this&&this.__param||function(z,T){return function(j,M){T(j,M,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),x=c(2585),k=c(8055),v=c(4725),b=c(4269),w=c(6171),y=c(3734);let C=o.DomRendererRowFactory=class{constructor(z,T,j,M,D,I,$){this._document=z,this._characterJoinerService=T,this._optionsService=j,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=$,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(z,T,j){this._selectionStart=z,this._selectionEnd=T,this._columnSelectMode=j}createRow(z,T,j,M,D,I,$,q,H,Q,V){const J=[],Z=this._characterJoinerService.getJoinedCharacters(T),B=this._themeService.colors;let L,F=z.getNoBgTrimmedLength();j&&F0&&Re===Z[0][0]){We=!0;const qe=Z.shift();Se=new b.JoinedCellData(this._workCell,z.translateToString(!0,qe[0],qe[1]),qe[1]-qe[0]),He=qe[1]-1,Oe=Se.getWidth()}const it=this._isCellInSelection(Re,T),Je=j&&Re===I,ot=me&&Re>=Q&&Re<=V;let wt=!1;this._decorationService.forEachDecorationAtCell(Re,T,void 0,(qe=>{wt=!0}));let Pt=Se.getChars()||p.WHITESPACE_CELL_CHAR;if(Pt===" "&&(Se.isUnderline()||Se.isOverline())&&(Pt=" "),le=Oe*q-H.get(Pt,Se.isBold(),Se.isItalic()),L){if(U&&(it&&oe||!it&&!oe&&Se.bg===ne)&&(it&&oe&&B.selectionForeground||Se.fg===ce)&&Se.extended.ext===_e&&ot===se&&le===G&&!Je&&!We&&!wt){Se.isInvisible()?K+=p.WHITESPACE_CELL_CHAR:K+=Pt,U++;continue}U&&(L.textContent=K),L=this._document.createElement("span"),U=0,K=""}else L=this._document.createElement("span");if(ne=Se.bg,ce=Se.fg,_e=Se.extended.ext,se=ot,G=le,oe=it,We&&I>=Re&&I<=He&&(I=Re),!this._coreService.isCursorHidden&&Je&&this._coreService.isCursorInitialized){if(fe.push("xterm-cursor"),this._coreBrowserService.isFocused)$&&fe.push("xterm-cursor-blink"),fe.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":fe.push("xterm-cursor-outline");break;case"block":fe.push("xterm-cursor-block");break;case"bar":fe.push("xterm-cursor-bar");break;case"underline":fe.push("xterm-cursor-underline")}}if(Se.isBold()&&fe.push("xterm-bold"),Se.isItalic()&&fe.push("xterm-italic"),Se.isDim()&&fe.push("xterm-dim"),K=Se.isInvisible()?p.WHITESPACE_CELL_CHAR:Se.getChars()||p.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(fe.push(`xterm-underline-${Se.extended.underlineStyle}`),K===" "&&(K=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let qe=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&qe<8&&(qe+=8),L.style.textDecorationColor=B.ansi[qe].css}Se.isOverline()&&(fe.push("xterm-overline"),K===" "&&(K=" ")),Se.isStrikethrough()&&fe.push("xterm-strikethrough"),ot&&(L.style.textDecoration="underline");let dt=Se.getFgColor(),ft=Se.getFgColorMode(),Le=Se.getBgColor(),ge=Se.getBgColorMode();const Te=!!Se.isInverse();if(Te){const qe=dt;dt=Le,Le=qe;const Kt=ft;ft=ge,ge=Kt}let Pe,rt,ut,pt=!1;switch(this._decorationService.forEachDecorationAtCell(Re,T,void 0,(qe=>{qe.options.layer!=="top"&&pt||(qe.backgroundColorRGB&&(ge=50331648,Le=qe.backgroundColorRGB.rgba>>8&16777215,Pe=qe.backgroundColorRGB),qe.foregroundColorRGB&&(ft=50331648,dt=qe.foregroundColorRGB.rgba>>8&16777215,rt=qe.foregroundColorRGB),pt=qe.options.layer==="top")})),!pt&&it&&(Pe=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,Le=Pe.rgba>>8&16777215,ge=50331648,pt=!0,B.selectionForeground&&(ft=50331648,dt=B.selectionForeground.rgba>>8&16777215,rt=B.selectionForeground)),pt&&fe.push("xterm-decoration-top"),ge){case 16777216:case 33554432:ut=B.ansi[Le],fe.push(`xterm-bg-${Le}`);break;case 50331648:ut=k.channels.toColor(Le>>16,Le>>8&255,255&Le),this._addStyle(L,`background-color:#${N((Le>>>0).toString(16),"0",6)}`);break;default:Te?(ut=B.foreground,fe.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):ut=B.background}switch(Pe||Se.isDim()&&(Pe=k.color.multiplyOpacity(ut,.5)),ft){case 16777216:case 33554432:Se.isBold()&&dt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(dt+=8),this._applyMinimumContrast(L,ut,B.ansi[dt],Se,Pe,void 0)||fe.push(`xterm-fg-${dt}`);break;case 50331648:const qe=k.channels.toColor(dt>>16&255,dt>>8&255,255&dt);this._applyMinimumContrast(L,ut,qe,Se,Pe,rt)||this._addStyle(L,`color:#${N(dt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,ut,B.foreground,Se,Pe,rt)||Te&&fe.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}fe.length&&(L.className=fe.join(" "),fe.length=0),Je||We||wt?L.textContent=K:U++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Re=He}return L&&U&&(L.textContent=K),J}_applyMinimumContrast(z,T,j,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const $=this._getContrastCache(M);let q;if(D||I||(q=$.getColor(T.rgba,j.rgba)),q===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);q=k.color.ensureContrastRatio(D||T,I||j,H),$.setColor((D||T).rgba,(I||j).rgba,q??null)}return!!q&&(this._addStyle(z,`color:${q.css}`),!0)}_getContrastCache(z){return z.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(z,T){z.setAttribute("style",`${z.getAttribute("style")||""}${T};`)}_isCellInSelection(z,T){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?z>=j[0]&&T>=j[1]&&z=j[1]&&z>=M[0]&&T<=M[1]:T>j[1]&&T=j[0]&&z=j[0])}};function N(z,T,j){for(;z.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 h=c.createElement("span");h.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[h,_,p,m],this._container.appendChild(h),this._container.appendChild(_),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(c,u,h,_){c===this._font&&u===this._fontSize&&h===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,h){let _=0;if(!u&&!h&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const x=this._measure(c,0);return x>0&&(this._flat[_]=x),x}let p=c;u&&(p+="B"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),h&&(x|=2),m=this._measure(c,x),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.offsetWidth/32}}},2223:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function c(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(x){return 57344<=x&&x<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(_){return 9472<=_&&_<=9631})(h)},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(h,_,p=0){return(h-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{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(h,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const x=h.buffers.active.ydisp,k=_[1]-x,v=p[1]-x,b=Math.max(k,0),w=Math.min(v,h.rows-1);b>=h.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(h,_,p){return!!this.hasSelection&&(p-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let x=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};o.CharSizeService=x=u([h(2,_.IOptionsService)],x);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class v extends k{constructor(y,C,N){super(),this._document=y,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 b extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),x=c(2585);class k extends _.AttributeData{constructor(w,y,C){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class GI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const $=this._getJoinedRanges(N,j,T,y,z);for(let q=0;q<$.length;q++)C.push($[q])}z=I,j=T,M=this._workCell.fg,D=this._workCell.bg}T+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-z>1){const I=this._getJoinedRanges(N,j,T,y,z);for(let $=0;${Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),_=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,h.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(k){this._window!==k&&(this._window=k,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(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new h.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(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=c(844);class h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(x,k,v,b){var w,y=arguments.length,C=y<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,k,v,b);else for(var N=x.length-1;N>=0;N--)(w=x[N])&&(C=(y<3?w(C):y>3?w(k,v,C):w(k,v))||C);return y>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(x,k){return function(v,b){k(v,b,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const _=c(4725),p=c(9806);let m=o.MouseService=class{constructor(x,k){this._renderService=x,this._charSizeService=k}getCoords(x,k,v,b,w){return(0,p.getCoords)(window,x,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(x,k){const v=(0,p.getCoordsRelativeToElement)(window,x,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([h(0,_.IRenderService),h(1,_.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),x=c(844),k=c(7226),v=c(2585);let b=o.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,C,N,z,T,j,M){super(),this._rowCount=w,this._charSizeService=N,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new k.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 _.RenderDebouncer(((D,I)=>this._renderRows(D,I)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var D;return(D=this._renderer.value)==null?void 0:D.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(z.onDecorationRegistered((()=>this._fullRefresh()))),this.register(z.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,y),this.register(j.onWindowChange((D=>this._registerIntersectionObserver(D,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const C=new w.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.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(w,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,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(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,C){var N;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(w,y,C)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(j,M,D,I){var $,q=arguments.length,H=q<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(j,M,D,I);else for(var Q=j.length-1;Q>=0;Q--)($=j[Q])&&(H=(q<3?$(H):q>3?$(M,D,H):$(M,D))||H);return q>3&&H&&Object.defineProperty(M,D,H),H},h=this&&this.__param||function(j,M){return function(D,I){M(D,I,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),x=c(4725),k=c(8460),v=c(844),b=c(6114),w=c(4841),y=c(511),C=c(2585),N=" ",z=new RegExp(N,"g");let T=o.SelectionService=class extends v.Disposable{constructor(j,M,D,I,$,q,H,Q,V){super(),this._element=j,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=$,this._mouseService=q,this._optionsService=H,this._renderService=Q,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.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 j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const $=j[0]$.replace(z," "))).join(b.isWindows?`\r -`:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&j&&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(j){const M=this._getMouseBufferCoords(j),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(j,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([j,M],D,I)}_areCoordsInSelection(j,M,D){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var $,q;const D=(q=($=this._linkifier.currentLink)==null?void 0:$.link)==null?void 0:q.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(j);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=D?0:(M>D&&(M-=D),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return b.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),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(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!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(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.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(j),!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 D=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(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);D?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,D)}_fireOnSelectionChange(j,M,D){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let D=M;for(let I=0;M>=I;I++){const $=j.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:$>1&&M!==I&&(D+=$-1)}return D}setSelection(j,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,D=!0,I=!0){if(j[0]>=this._bufferService.cols)return;const $=this._bufferService.buffer,q=$.lines.get(j[1]);if(!q)return;const H=$.translateBufferLineToString(j[1],!1);let Q=this._convertViewportColToCharacterIndex(q,j[0]),V=Q;const J=j[0]-Q;let Z=0,B=0,L=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;V1&&(F+=_e-1,V+=_e-1);ne>0&&Q>0&&!this._isCharWordSeparator(q.loadCell(ne-1,this._workCell));){q.loadCell(ne-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,ne--):se>1&&(L+=se-1,Q-=se-1),Q--,ne--}for(;ce1&&(F+=se-1,V+=se-1),V++,ce++}}V++;let U=Q+J-Z+L,K=Math.min(this._bufferService.cols,V-Q+Z+B-L-F);if(M||H.slice(Q,V).trim()!==""){if(D&&U===0&&q.getCodePoint(0)!==32){const ne=$.lines.get(j[1]-1);if(ne&&q.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(ce){const _e=this._bufferService.cols-ce.start;U-=_e,K+=_e}}}if(I&&U+K===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ne=$.lines.get(j[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const ce=this._getWordAt([0,j[1]+1],!1,!1,!0);ce&&(K+=ce.length)}}return{start:U,length:K}}}_selectWordAt(j,M){const D=this._getWordAt(j,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[D.start,j[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let D=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,D]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),D={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,w.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=T=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,x.IMouseService),h(6,C.IOptionsService),h(7,x.IRenderService),h(8,x.ICoreBrowserService)],T)},4725:(a,o,c)=>{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=c(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,c){var u=this&&this.__decorate||function(T,j,M,D){var I,$=arguments.length,q=$<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(T,j,M,D);else for(var H=T.length-1;H>=0;H--)(I=T[H])&&(q=($<3?I(q):$>3?I(j,M,q):I(j,M))||q);return $>3&&q&&Object.defineProperty(j,M,q),q},h=this&&this.__param||function(T,j){return function(M,D){j(M,D,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),x=c(844),k=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[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")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=j[M/36%6|0],I=j[M/6%6|0],$=j[M%6];T.push({css:p.channels.toCss(D,I,$),rgba:p.channels.toRgba(D,I,$)})}for(let M=0;M<24;M++){const D=8+10*M;T.push({css:p.channels.toCss(D,D,D),rgba:p.channels.toRgba(D,D,D)})}return T})());let N=o.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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(T={}){const j=this._colors;if(j.foreground=z(T.foreground,v),j.background=z(T.background,b),j.cursor=z(T.cursor,w),j.cursorAccent=z(T.cursorAccent,y),j.selectionBackgroundTransparent=z(T.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=z(T.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=T.selectionForeground?z(T.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=z(T.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=z(T.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=z(T.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=z(T.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=z(T.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=z(T.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=z(T.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=z(T.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=z(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=z(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=z(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=z(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=z(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=z(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=z(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=z(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const M=Math.min(j.ansi.length-16,T.extendedAnsi.length);for(let D=0;D{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),h=c(844);class _ extends h.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 k=0;kthis._length)for(let x=this._length;x=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,k){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let b=x-1;b>=0;b--)this.set(m+b+k,this.get(m+b));const v=m+x+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,h=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=h<=1?u[p]:u[p]&&c(u[p],h-1);return _}},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 c=0,u=0,h=0,_=0;var p,m,x,k,v;function b(y){const C=y.toString(16);return C.length<2?"0"+C:C}function w(y,C){return y>>0},y.toColor=function(C,N,z,T){return{css:y.toCss(C,N,z,T),rgba:y.toRgba(C,N,z,T)}}})(p||(o.channels=p={})),(function(y){function C(N,z){return _=Math.round(255*z),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,_),rgba:p.toRgba(c,u,h,_)}}y.blend=function(N,z){if(_=(255&z.rgba)/255,_===1)return{css:z.css,rgba:z.rgba};const T=z.rgba>>24&255,j=z.rgba>>16&255,M=z.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,$=N.rgba>>8&255;return c=D+Math.round((T-D)*_),u=I+Math.round((j-I)*_),h=$+Math.round((M-$)*_),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},y.isOpaque=function(N){return(255&N.rgba)==255},y.ensureContrastRatio=function(N,z,T){const j=v.ensureContrastRatio(N.rgba,z.rgba,T);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},y.opaque=function(N){const z=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(z),{css:p.toCss(c,u,h),rgba:z}},y.opacity=C,y.multiplyOpacity=function(N,z){return _=255&N.rgba,C(N,_*z/255)},y.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(y){let C,N;try{const z=document.createElement("canvas");z.width=1,z.height=1;const T=z.getContext("2d",{willReadFrequently:!0});T&&(C=T,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(z){if(z.match(/#[\da-f]{3,8}/i))switch(z.length){case 4:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),h=parseInt(z.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),h=parseInt(z.slice(3,4).repeat(2),16),_=parseInt(z.slice(4,5).repeat(2),16),p.toColor(c,u,h,_);case 7:return{css:z,rgba:(parseInt(z.slice(1),16)<<8|255)>>>0};case 9:return{css:z,rgba:parseInt(z.slice(1),16)>>>0}}const T=z.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return c=parseInt(T[1]),u=parseInt(T[2]),h=parseInt(T[3]),_=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),p.toColor(c,u,h,_);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=z,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,_),css:z}}})(x||(o.css=x={})),(function(y){function C(N,z,T){const j=N/255,M=z/255,D=T/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))}y.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},y.relativeLuminance2=C})(k||(o.rgb=k={})),(function(y){function C(z,T,j){const M=z>>24&255,D=z>>16&255,I=z>>8&255;let $=T>>24&255,q=T>>16&255,H=T>>8&255,Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));for(;Q0||q>0||H>0);)$-=Math.max(0,Math.ceil(.1*$)),q-=Math.max(0,Math.ceil(.1*q)),H-=Math.max(0,Math.ceil(.1*H)),Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));return($<<24|q<<16|H<<8|255)>>>0}function N(z,T,j){const M=z>>24&255,D=z>>16&255,I=z>>8&255;let $=T>>24&255,q=T>>16&255,H=T>>8&255,Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));for(;Q>>0}y.blend=function(z,T){if(_=(255&T)/255,_===1)return T;const j=T>>24&255,M=T>>16&255,D=T>>8&255,I=z>>24&255,$=z>>16&255,q=z>>8&255;return c=I+Math.round((j-I)*_),u=$+Math.round((M-$)*_),h=q+Math.round((D-q)*_),p.toRgba(c,u,h)},y.ensureContrastRatio=function(z,T,j){const M=k.relativeLuminance(z>>8),D=k.relativeLuminance(T>>8);if(w(M,D)>8));if(Hw(M,k.relativeLuminance(Q>>8))?q:Q}return q}const I=N(z,T,j),$=w(M,k.relativeLuminance(I>>8));if($w(M,k.relativeLuminance(q>>8))?I:q}return I}},y.reduceLuminance=C,y.increaseLuminance=N,y.toChannels=function(z){return[z>>24&255,z>>16&255,z>>8&255,255&z]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=w},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),_=c(4348),p=c(7866),m=c(744),x=c(7302),k=c(6975),v=c(8460),b=c(1753),w=c(1480),y=c(7994),C=c(9282),N=c(5435),z=c(5981),T=c(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var $;($=this._onScrollApi)==null||$.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 $ in I)this.optionsService.options[$]=I[$]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new x.OptionsService(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(h.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,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.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(($=>{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(($=>{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 z.WriteBuffer((($,q)=>this._inputHandler.parse($,q)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,$){this._writeBuffer.write(I,$)}writeSync(I,$){this._logService.logLevel<=h.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(I,$)}input(I,$=!0){this.coreService.triggerDataEvent(I,$)}resize(I,$){isNaN(I)||isNaN($)||(I=Math.max(I,m.MINIMUM_COLS),$=Math.max($,m.MINIMUM_ROWS),this._bufferService.resize(I,$))}scroll(I,$=!1){this._bufferService.scroll(I,$)}scrollLines(I,$,q){this._bufferService.scrollLines(I,$,q)}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 $=I-this._bufferService.buffer.ydisp;$!==0&&this.scrollLines($)}registerEscHandler(I,$){return this._inputHandler.registerEscHandler(I,$)}registerDcsHandler(I,$){return this._inputHandler.registerDcsHandler(I,$)}registerCsiHandler(I,$){return this._inputHandler.registerCsiHandler(I,$)}registerOscHandler(I,$){return this._inputHandler.registerOscHandler(I,$)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const $=this.optionsService.rawOptions.windowsPty;$&&$.buildNumber!==void 0&&$.buildNumber!==void 0?I=$.backend==="conpty"&&$.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 $ of I)$.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=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(Z,B,L,F){var U,K=arguments.length,ne=K<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(Z,B,L,F);else for(var ce=Z.length-1;ce>=0;ce--)(U=Z[ce])&&(ne=(K<3?U(ne):K>3?U(B,L,ne):U(B,L))||ne);return K>3&&ne&&Object.defineProperty(B,L,ne),ne},h=this&&this.__param||function(Z,B){return function(L,F){B(L,F,Z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),x=c(844),k=c(482),v=c(8437),b=c(8460),w=c(643),y=c(511),C=c(3734),N=c(2585),z=c(1480),T=c(6242),j=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function $(Z,B){if(Z>24)return B.setWinLines||!1;switch(Z){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var q;(function(Z){Z[Z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Z[Z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(o.WindowsOptionsReportType=q={}));let H=0;class Q extends x.Disposable{getAttrData(){return this._curAttrData}constructor(B,L,F,U,K,ne,ce,_e,se=new m.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=L,this._coreService=F,this._logService=U,this._optionsService=K,this._oscLinkService=ne,this._coreMouseService=ce,this._unicodeService=_e,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:oe.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,oe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:oe,data:le})})),this._parser.setDcsHandlerFallback(((G,oe,le)=>{oe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:oe,payload:le})})),this._parser.setPrintHandler(((G,oe,le)=>this.print(G,oe,le))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new T.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new T.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new T.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new T.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new T.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new T.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new T.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new T.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new T.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new T.OscHandler((G=>this.restoreCursorColor(G)))),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 G in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((G,oe)=>this.requestStatusString(G,oe))))}_preserveStack(B,L,F,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=U}_logSlowResolvingAsync(B){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([B,new Promise(((L,F)=>setTimeout((()=>F("#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(B,L){let F,U=this._activeBuffer.x,K=this._activeBuffer.y,ne=0;const ce=this._parseStack.paused;if(ce){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;U=this._parseStack.cursorStartX,K=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>I&&(ne=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(G=>String.fromCharCode(G))).join("")}"`),typeof B=="string"?B.split("").map((G=>G.charCodeAt(0))):B),this._parseBuffer.lengthI)for(let G=ne;G0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let fe=this._parser.precedingJoinState;for(let me=L;me_e){if(se){const He=le;let Se=this._activeBuffer.x-We;for(this._activeBuffer.x=We,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),We>0&&le instanceof v.BufferLine&&le.copyCellsFrom(He,Se,0,We,!1);Se<_e;)He.setCellFromCodepoint(Se++,0,1,oe)}else if(this._activeBuffer.x=_e-1,K===2)continue}if(Oe&&this._activeBuffer.x){const He=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-He,U,K);for(let Se=K-We;--Se>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(G&&(le.insertCells(this._activeBuffer.x,K-We,this._activeBuffer.getNullCell(oe)),le.getWidth(_e-1)===2&&le.setCellFromCodepoint(_e-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),le.setCellFromCodepoint(this._activeBuffer.x++,U,K,oe),K>0)for(;--K;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=fe,this._activeBuffer.x<_e&&F-L>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,L){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,L):this._parser.registerCsiHandler(B,(F=>!$(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new j.DcsHandler(L))}registerEscHandler(B,L){return this._parser.registerEscHandler(B,L)}registerOscHandler(B,L){return this._parser.registerOscHandler(B,new T.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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=B,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+L)}cursorUp(B){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const L=B.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const L=B.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,L,F,U=!1,K=!1){const ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);ne.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),K),U&&(ne.isWrapped=!1)}_resetBufferLine(B,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),F.isWrapped=!1)}eraseInDisplay(B,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine(B,L=!1){switch(this._restrictCursor(this._bufferService.cols),B.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(B){this._restrictCursor();let L=B.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=_e;for(let G=1;G0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let L=0;LOe?1:2,fe=B.params[0];return me=fe,Re=L?fe===2?4:fe===4?le(ne.modes.insertMode):fe===12?3:fe===20?le(oe.convertEol):0:fe===1?le(F.applicationCursorKeys):fe===3?oe.windowOptions.setWinLines?_e===80?2:_e===132?1:0:0:fe===6?le(F.origin):fe===7?le(F.wraparound):fe===8?3:fe===9?le(U==="X10"):fe===12?le(oe.cursorBlink):fe===25?le(!ne.isCursorHidden):fe===45?le(F.reverseWraparound):fe===66?le(F.applicationKeypad):fe===67?4:fe===1e3?le(U==="VT200"):fe===1002?le(U==="DRAG"):fe===1003?le(U==="ANY"):fe===1004?le(F.sendFocus):fe===1005?4:fe===1006?le(K==="SGR"):fe===1015?4:fe===1016?le(K==="SGR_PIXELS"):fe===1048?1:fe===47||fe===1047||fe===1049?le(se===G):fe===2004?le(F.bracketedPasteMode):0,ne.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${me};${Re}$y`),!0;var me,Re}_updateAttrColor(B,L,F,U,K){return L===2?(B|=50331648,B&=-16777216,B|=C.AttributeData.fromColorRGB([F,U,K])):L===5&&(B&=-50331904,B|=33554432|255&F),B}_extractColor(B,L,F){const U=[0,0,-1,0,0,0];let K=0,ne=0;do{if(U[ne+K]=B.params[L+ne],B.hasSubParams(L+ne)){const ce=B.getSubParams(L+ne);let _e=0;do U[1]===5&&(K=1),U[ne+_e+1+K]=ce[_e];while(++_e=2||U[1]===2&&ne+K>=5)break;U[1]&&(K=1)}while(++ne+L5)&&(B=1),L.extended.underlineStyle=B,L.fg|=268435456,B===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(B){B.fg=v.DEFAULT_ATTR_DATA.fg,B.bg=v.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=B.length;let F;const U=this._curAttrData;for(let K=0;K=30&&F<=37?(U.fg&=-50331904,U.fg|=16777216|F-30):F>=40&&F<=47?(U.bg&=-50331904,U.bg|=16777216|F-40):F>=90&&F<=97?(U.fg&=-50331904,U.fg|=16777224|F-90):F>=100&&F<=107?(U.bg&=-50331904,U.bg|=16777224|F-100):F===0?this._processSGR0(U):F===1?U.fg|=134217728:F===3?U.bg|=67108864:F===4?(U.fg|=268435456,this._processUnderline(B.hasSubParams(K)?B.getSubParams(K)[0]:1,U)):F===5?U.fg|=536870912:F===7?U.fg|=67108864:F===8?U.fg|=1073741824:F===9?U.fg|=2147483648:F===2?U.bg|=134217728:F===21?this._processUnderline(2,U):F===22?(U.fg&=-134217729,U.bg&=-134217729):F===23?U.bg&=-67108865:F===24?(U.fg&=-268435457,this._processUnderline(0,U)):F===25?U.fg&=-536870913:F===27?U.fg&=-67108865:F===28?U.fg&=-1073741825:F===29?U.fg&=2147483647:F===39?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?K+=this._extractColor(B,K,U):F===53?U.bg|=1073741824:F===55?U.bg&=-1073741825:F===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):F===100?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.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(B){const L=B.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 F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(B){const L=B.params[0]||1;let F;return(B.length<2||(F=B.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(B){if(!$(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.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(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const L=[],F=B.split(";");for(;F.length>1;){const U=F.shift(),K=F.shift();if(/^\d+$/.exec(U)){const ne=parseInt(U);if(J(ne))if(K==="?")L.push({type:0,index:ne});else{const ce=(0,M.parseColor)(K);ce&&L.push({type:1,index:ne,color:ce})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(B){const L=B.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(B,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=B.split(":");let U;const K=F.findIndex((ne=>ne.startsWith("id=")));return K!==-1&&(U=F[K].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,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(B,L){const F=B.split(";");for(let U=0;U=this._specialColors.length);++U,++L)if(F[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const K=(0,M.parseColor)(F[U]);K&&this._onColor.fire([{type:1,index:this._specialColors[L],color:K}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const L=[],F=B.split(";");for(let U=0;U=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 B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${K}${_.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,L){this._dirtyRowTracker.markRangeDirty(B,L)}}o.InputHandler=Q;let V=class{constructor(Z){this._bufferService=Z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Z){Zthis.end&&(this.end=Z)}markRangeDirty(Z,B){Z>B&&(H=Z,Z=B,B=H),Zthis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(Z){return 0<=Z&&Z<256}V=u([h(0,N.IBufferService)],V)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(h,_,p){this._data[h]||(this._data[h]={}),this._data[h][_]=p}get(h,_){return this._data[h]?this._data[h][_]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,_,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(_,p,m)}get(u,h,_,p){var m;return(m=this._data.get(u,h))==null?void 0:m.get(_,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 c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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(c)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do h(this._array[c]);while(++c=h;){let p=h+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-x))}ms`),void this._start();v=b}this.clear()}}class _ extends h{_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=_,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(h){const _=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=_==null?void 0:_.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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 c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}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=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),h=c(7226),_=c(3734),p=c(8437),m=c(4634),x=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(w,y,C){this._hasScrollback=w,this._optionsService=y,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=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.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(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}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(w,y){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const z=this._getCorrectBufferLength(y);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,C)));else for(let j=this._rows;j>y;j--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=z}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let T=0;T.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,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(w,y,N.countRemoved)}}_reflowLargerAdjustViewport(w,y,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=C;for(;z-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;T--){let j=this.lines.get(T);if(!j||!j.isWrapped&&j.getTrimmedLength()<=w)continue;const M=[j];for(;j.isWrapped&&T>0;)j=this.lines.get(--T),M.unshift(j);const D=this.ybase+this.y;if(D>=T&&D0&&(N.push({start:T+M.length+z,newLines:Q}),z+=Q.length),M.push(...Q);let V=$.length-1,J=$[V];J===0&&(V--,J=$[V]);let Z=M.length-q-1,B=I;for(;Z>=0;){const F=Math.min(B,J);if(M[V]===void 0)break;if(M[V].copyCellsFrom(M[Z],B-F,J-F,F,!0),J-=F,J===0&&(V--,J=$[V]),B-=F,B===0){Z--;const U=Math.max(Z,0);B=(0,m.getWrappedLineTrimmedLength)(M,U,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const T=[],j=[];for(let V=0;V=0;V--)if($&&$.start>D+q){for(let J=$.newLines.length-1;J>=0;J--)this.lines.set(V--,$.newLines[J]);V++,T.push({index:D+1,amount:$.newLines.length}),q+=$.newLines.length,$=N[++I]}else this.lines.set(V,j[D--]);let H=0;for(let V=T.length-1;V>=0;V--)T[V].index+=H,this.lines.onInsertEmitter.fire(T[V]),H+=T[V].amount;const Q=Math.max(0,M+z-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(w,y,C=0,N){const z=this.lines.get(w);return z?z.translateToString(y,C,N):""}getWrappedRangeForLine(w){let y=w,C=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),_=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||h.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[z]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[z]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,C){const N=v._data;if(C)for(let T=y-1;T>=0;T--){for(let j=0;j<3;j++)this._data[3*(w+T)+j]=N[3*(b+T)+j];268435456&N[3*(b+T)+2]&&(this._extendedAttrs[w+T]=v._extendedAttrs[b+T])}else for(let T=0;T=b&&(this._combined[j-b+w]=v._combined[j])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;b>22||1}return y&&y.push(b),C}}o.BufferLine=x},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,o)=>{function c(u,h,_){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(_-1)&&u[h].getWidth(_-1)===1,m=u[h+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,h,_,p,m){const x=[];for(let k=0;k=k&&p0&&(j>y||w[j].getTrimmedLength()===0);j--)T++;T>0&&(x.push(k+w.length-T),x.push(T)),k+=w.length-1}return x},o.reflowLargerCreateNewLayout=function(u,h){const _=[];let p=0,m=h[p],x=0;for(let k=0;kc(u,w,h))).reduce(((b,w)=>b+w));let x=0,k=0,v=0;for(;vb&&(x-=b,k++);const w=u[k].getWidth(x-1)===2;w&&x--;const y=w?_-1:_;p.push(y),v+=y}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),_=c(9092);class p extends h.Disposable{constructor(x,k){super(),this._optionsService=x,this._bufferService=k,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 _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.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,k){this._normal.resize(x,k),this._alt.resize(x,k),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}o.BufferSet=p},511:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),h=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const k=new p;return k.setFromCharData(x),k}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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(x[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(x[h.CHAR_DATA_CHAR_INDEX].length===2){const v=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|x[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=x[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[h.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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),h=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._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,h.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=_,_._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 c,u,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` -`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(o.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(o.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(h||(o.C1_ESCAPED=h={}))},7399:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),h={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(_,p,m,x){const k={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:k.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(k.key=u.C0.ESC+k.key);break;case 9:if(_.shiftKey){k.key=u.C0.ESC+"[Z";break}k.key=u.C0.HT,k.cancel=!0;break;case 13:k.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,k.cancel=!0;break;case 27:k.key=u.C0.ESC,_.altKey&&(k.key=u.C0.ESC+u.C0.ESC),k.cancel=!0;break;case 37:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"D",k.key===u.C0.ESC+"[1;3D"&&(k.key=u.C0.ESC+(m?"b":"[1;5D"))):k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"C",k.key===u.C0.ESC+"[1;3C"&&(k.key=u.C0.ESC+(m?"f":"[1;5C"))):k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"A",m||k.key!==u.C0.ESC+"[1;3A"||(k.key=u.C0.ESC+"[1;5A")):k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"B",m||k.key!==u.C0.ESC+"[1;3B"||(k.key=u.C0.ESC+"[1;5B")):k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(k.key=u.C0.ESC+"[2~");break;case 46:k.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:k.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:k.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?k.type=2:_.ctrlKey?k.key=u.C0.ESC+"[5;"+(v+1)+"~":k.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?k.type=3:_.ctrlKey?k.key=u.C0.ESC+"[6;"+(v+1)+"~":k.key=u.C0.ESC+"[6~";break;case 112:k.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:k.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:k.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:k.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:k.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:k.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:k.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:k.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:k.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:k.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:k.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:k.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!x||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?k.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(k.key=u.C0.US),_.key==="@"&&(k.key=u.C0.NUL)):_.keyCode===65&&(k.type=1);else{const b=h[_.keyCode],w=b==null?void 0:b[_.shiftKey?1:0];if(w)k.key=u.C0.ESC+w;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let C=String.fromCharCode(y);_.shiftKey&&(C=C.toUpperCase()),k.key=u.C0.ESC+C}else if(_.keyCode===32)k.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),k.key=u.C0.ESC+y,k.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?k.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?k.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?k.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?k.key=u.C0.DEL:_.keyCode===219?k.key=u.C0.ESC:_.keyCode===220?k.key=u.C0.FS:_.keyCode===221&&(k.key=u.C0.GS)}return k}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,u=0,h=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const h=c.length;if(!h)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=h)return this._interim=x,_;const k=c.charCodeAt(m);56320<=k&&k<=57343?u[_++]=1024*(x-55296)+k-56320+65536:(u[_++]=x,u[_++]=k)}else x!==65279&&(u[_++]=x)}return _}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const h=c.length;if(!h)return 0;let _,p,m,x,k=0,v=0,b=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let z,T=0;for(;(z=63&this.interim[++T])&&T<4;)N<<=6,N|=z;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=j-T;for(;b=h)return 0;if(z=c[b++],(192&z)!=128){b--,C=!0;break}this.interim[T++]=z,N<<=6,N|=63&z}C||(j===2?N<128?b--:u[k++]=N:j===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const w=h-4;let y=b;for(;y=h)return this.interim[0]=_,k;if(p=c[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[k++]=v}else if((240&_)==224){if(y>=h)return this.interim[0]=_,k;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=c[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[k++]=v}else if((248&_)==240){if(y>=h)return this.interim[0]=_,k;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,k;if(x=c[y++],(192&x)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&x,v<65536||v>1114111)continue;u[k++]=v}}return k}}},225:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=c(1480),h=[[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]],_=[[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;mk[w][1])return!1;for(;w>=b;)if(v=b+w>>1,x>k[v][1])b=v+1;else{if(!(x=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,x){let k=this.wcwidth(m),v=k===0&&x!==0;if(v){const b=u.UnicodeService.extractWidth(x);b===0?v=!1:b>k&&(k=b)}return u.UnicodeService.createPropertyValue(0,k,v)}}},5981:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=c(8460),h=c(844);class _ extends h.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 k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const v=this._callbacks.shift();v&&v()}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 k=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,x);if(b){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void b.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-k>=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=_},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\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 h(_,p){const m=_.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(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.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 k=0;k<3;++k){const v=parseInt(p.slice(m*k,m*k+m),16);x[k]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return x}},o.toRgbString=function(_,p=16){const[m,x,k]=_;return`rgb:${h(m,p)}/${h(x,p)}/${h(k,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=c(482),h=c(8742),_=c(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,k){this._handlers[x]===void 0&&(this._handlers[x]=[]);const v=this._handlers[x];return v.push(k),{dispose:()=>{const b=v.indexOf(k);b!==-1&&v.splice(b,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,k){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(x,k,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(x,k,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(x,k,v))}unhook(x,k=!0){if(this._active.length){let v=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=k,w=this._stack.fallThrough,this._stack.paused=!1),!w&&v===!1){for(;b>=0&&(v=this._active[b].unhook(x),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const m=new h.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,k,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(x,k,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let k=!1;if(this._hitLimit)k=!1;else if(x&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,k}}},2015:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=c(844),h=c(8742),_=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,y,C){this.table[w<<8|b]=y<<4|C}addMany(b,w,y,C){for(let N=0;Nj)),w=(T,j)=>b.slice(T,j),y=w(32,127),C=w(0,24);C.push(25),C.push.apply(C,w(28,32));const N=w(0,14);let z;for(z in v.setDefault(1,0),v.addMany(y,0,2,0),N)v.addMany([24,26,153,154],z,3,0),v.addMany(w(128,144),z,3,0),v.addMany(w(144,152),z,3,0),v.add(156,z,0,0),v.add(27,z,11,1),v.add(157,z,4,8),v.addMany([152,158,159],z,0,7),v.add(155,z,11,3),v.add(144,z,11,9);return v.addMany(C,0,3,0),v.addMany(C,1,3,1),v.add(127,1,0,1),v.addMany(C,8,0,8),v.addMany(C,3,3,3),v.add(127,3,0,3),v.addMany(C,4,3,4),v.add(127,4,0,4),v.addMany(C,6,3,6),v.addMany(C,5,3,5),v.add(127,5,0,5),v.addMany(C,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(w(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(C,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(w(64,127),3,7,0),v.addMany(w(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(w(48,60),4,8,4),v.addMany(w(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(w(32,64),6,0,6),v.add(127,6,0,6),v.addMany(w(64,127),6,0,0),v.addMany(w(32,48),3,9,5),v.addMany(w(32,48),5,9,5),v.addMany(w(48,64),5,0,6),v.addMany(w(64,127),5,7,0),v.addMany(w(32,48),4,9,5),v.addMany(w(32,48),1,9,2),v.addMany(w(32,48),2,9,2),v.addMany(w(48,127),2,10,0),v.addMany(w(48,80),1,10,0),v.addMany(w(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(w(96,127),1,10,0),v.add(80,1,11,9),v.addMany(C,9,0,9),v.add(127,9,0,9),v.addMany(w(28,32),9,0,9),v.addMany(w(32,48),9,9,12),v.addMany(w(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(w(32,128),11,0,11),v.addMany(w(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(w(28,32),10,0,10),v.addMany(w(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(w(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(w(28,32),12,0,12),v.addMany(w(32,48),12,9,12),v.addMany(w(48,64),12,0,11),v.addMany(w(64,127),12,12,13),v.addMany(w(64,127),10,12,13),v.addMany(w(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(x,0,2,0),v.add(x,8,5,8),v.add(x,6,0,6),v.add(x,11,0,11),v.add(x,13,13,13),v})();class k extends u.Disposable{constructor(b=o.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,C)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,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 _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;Nz||z>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=z}}if(b.final.length!==1)throw new Error("final must be a single byte");const C=b.final.charCodeAt(0);if(w[0]>C||C>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=C,y}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(w),{dispose:()=>{const N=C.indexOf(w);N!==-1&&C.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(w),{dispose:()=>{const N=C.indexOf(w);N!==-1&&C.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}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(b,w,y,C,N){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(b,w,y){let C,N=0,z=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,y),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,y),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=T;j>4){case 2:for(let q=j+1;;++q){if(q>=w||(N=b[q])<32||N>126&&N=w||(N=b[q])<32||N>126&&N=w||(N=b[q])<32||N>126&&N=w||(N=b[q])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,z,j),C;D<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(++j47&&N<60);j--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let $=I?I.length-1:-1;for(;$>=0&&(C=I[$](),C!==!0);$--)if(C instanceof Promise)return this._preserveStack(4,I,$,z,j),C;$<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 q=j+1;;++q)if(q>=w||(N=b[q])===24||N===26||N===27||N>127&&N=w||(N=b[q])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),h=c(482),_=[];o.OscParser=class{constructor(){this._state=0,this._active=_,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 k=x.indexOf(m);k!==-1&&x.splice(k,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=_}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=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,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 k=this._active.length-1;k>=0;k--)this._active[k].put(p,m,x);else this._handlerFb(this._id,"PUT",(0,h.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,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,x=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&x===!1){for(;k>=0&&(x=this._active[k].end(p),x!==!0);k--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,x;k--}for(;k>=0;k--)if(x=this._active[k].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=_,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,h.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 c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const x=_[m];if(Array.isArray(x))for(let k=0;k256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,x))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&(_[p]=this._subParams.slice(m,x))}return _}addDigit(_){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+_,c):_}}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 c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let h=0;h{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),h=c(511);o.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,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(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new h.CellData}}},3785:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,_){if(!(h<0||h>=this._line.length))return _?(this._line.loadCell(h,_),_):this._line.loadCell(h,new u.CellData)}translateToString(h,_,p){return this._line.translateToString(h,_,p)}}},8285:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),h=c(8460),_=c(844);class p extends _.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new h.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(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(h=>u(h.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((h,_)=>u(h,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,o,c){var u=this&&this.__decorate||function(v,b,w,y){var C,N=arguments.length,z=N<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,b,w,y);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(z=(N<3?C(z):N>3?C(b,w,z):C(b,w))||z);return N>3&&z&&Object.defineProperty(b,w,z),z},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),x=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const w=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=w.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const C=w.ybase+w.scrollTop,N=w.ybase+w.scrollBottom;if(w.scrollTop===0){const z=w.lines.isFull;N===w.lines.length-1?z?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(N+1,0,y.clone()),z?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const z=N-C+1;w.lines.shiftElements(C+1,z-1,-1),w.lines.set(N,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),C!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};o.BufferService=k=u([h(0,x.IOptionsService)],k)},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(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,o,c){var u=this&&this.__decorate||function(y,C,N,z){var T,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,z);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,z){C(N,z,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let N=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(N|=64,N|=y.action):(N|=3&y.button,4&y.button&&(N|=64),8&y.button&&(N|=128),y.action===32?N|=32:y.action!==0||C||(N|=3)),N}const v=String.fromCharCode,b={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let w=o.CoreMouseService=class extends m.Disposable{constructor(y,C){super(),this._bufferService=y,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(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,N){if(N){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};o.CoreMouseService=w=u([h(0,_.IBufferService),h(1,_.ICoreService)],w)},6975:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),x=c(2585),k=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=o.CoreService=class extends m.Disposable{constructor(w,y,C){super(),this._bufferService=w,this._logService=y,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,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(w))}};o.CoreService=b=u([h(0,x.IBufferService),h(1,x.ILogService),h(2,x.IOptionsService)],b)},9074:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),h=c(8460),_=c(844),p=c(6106);let m=0,x=0;class k extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const y=new v(w);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,C){let N=0,z=0;for(const T of this._decorations.getKeyIterator(y))N=T.options.x??0,z=N+(T.options.width??1),w>=N&&w{m=z.options.x??0,x=m+(z.options.width??1),w>=m&&w{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),h=c(8343);class _{constructor(...m){this._entries=new Map;for(const[x,k]of m)this.set(x,k)}set(m,x){const k=this._entries.get(m);return this._entries.set(m,x),k}forEach(m){for(const[x,k]of this._entries.entries())m(x,k)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=_,o.InstantiationService=class{constructor(){this._services=new _,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,h.getServiceDependencies)(p).sort(((b,w)=>b.index-w.index)),k=[];for(const b of x){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);k.push(w)}const v=x.length>0?x[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...k)}}},7866:function(a,o,c){var u=this&&this.__decorate||function(v,b,w,y){var C,N=arguments.length,z=N<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,b,w,y);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(z=(N<3?C(z):N>3?C(b,w,z):C(b,w))||z);return N>3&&z&&Object.defineProperty(b,w,z),z},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const _=c(844),p=c(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,k=o.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,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(v){for(let b=0;bJSON.stringify(z))).join(", ")})`);const N=y.apply(this,C);return x.trace(`GlyphRenderer#${y.name} return`,N),N}}},7302:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=c(8460),h=c(844),_=c(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:_.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 h.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const b in k)if(b in v)try{const w=k[b];v[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((b=>{b===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((b=>{k.indexOf(b)!==-1&&v()}))}_setupOptions(){const k=b=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,w)=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:k.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${k}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${k} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${k} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=m},2660:function(a,o,c){var u=this&&this.__decorate||function(m,x,k,v){var b,w=arguments.length,y=w<3?x:v===null?v=Object.getOwnPropertyDescriptor(x,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,x,k,v);else for(var C=m.length-1;C>=0;C--)(b=m[C])&&(y=(w<3?b(y):w>3?b(x,k,y):b(x,k))||y);return w>3&&y&&Object.defineProperty(x,k,y),y},h=this&&this.__param||function(m,x){return function(k,v){x(k,v,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const _=c(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 k=m,v=this._getEntryIdKey(k),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,x.ybase+x.y),b.id;const w=x.addMarker(x.ybase+x.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(y,w))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,x){const k=this._dataByLinkId.get(m);if(k&&k.lines.every((v=>v.line!==x))){const v=this._bufferService.buffer.addMarker(x);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}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 k=m.lines.indexOf(x);k!==-1&&(m.lines.splice(k,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([h(0,_.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(h){return h[u]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);const _=function(p,m,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,v,b){v[c]===v?v[u].push({id:k,index:b}):(v[u]=[{id:k,index:b}],v[c]=v)})(_,p,x)};return _.toString=()=>h,o.serviceRegistry.set(h,_),_}},2585:(a,o,c)=>{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=c(8343);var h;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(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(h||(o.LogLevelEnum=h={})),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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=c(8460),h=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,x,k=!1){return(16777215&m)<<3|(3&x)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new h.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,k=0;const v=m.length;for(let b=0;b=v)return x+this.wcwidth(w);const N=m.charCodeAt(b);56320<=N&&N<=57343?w=1024*(w-55296)+N-56320+65536:x+=this.wcwidth(N)}const y=this.charProperties(w,k);let C=_.extractWidth(y);_.extractShouldJoin(y)&&(C-=_.extractWidth(k)),x+=C,k=y}return x}charProperties(m,x){return this._activeProvider.charProperties(m,x)}}o.UnicodeService=_}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var c=r[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),c=s(3236),u=s(844),h=s(5741),_=s(8285),p=s(7975),m=s(7090),x=["cols","rows"];class k extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const w=C=>this._core.options[C],y=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:w.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(b){if(x.includes(b))throw new Error(`Option "${b}" 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 _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,y){this._verifyIntegers(b,w,y),this._core.select(b,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r -`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(ow)),ow.exports}var VI=r3n();const s3n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function pj(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of s3n){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ib(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new VI.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:pj(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=pj(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new e3n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new n3n.WebLinksAddon((w,y)=>{let C;try{C=new URL(y)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,h=null;const _=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var j;const w=i.element,y=w==null?void 0:w.querySelector(".xterm-screen"),C=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let z=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=z;M--)if((j=N.getLine(N.viewportY+M))!=null&&j.translateToString(!0).trim()){z=M+1;break}const T=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(z,i.rows)*T/i.rows)}px`,w.style.overflow="hidden",C.style.height=`${T}px`},m=()=>{try{const w=o.proposeDimensions();w&&(i.resize(w.cols,Math.max(w.rows,n?1:40)),p())}catch{}};m();const x=new ResizeObserver(m);x.observe(e);const k=i.onWriteParsed(()=>{var y;const w=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),w){const C=(y=i.element)==null?void 0:y.querySelector(".xterm-screen");if(C instanceof HTMLElement){const N=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,N-e.clientHeight),h=e.scrollTop}}}),v=i.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function i3n(e){return vf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||WI(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function a3n(e){return vf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&WI(e.partitions)&&(e.error===null||typeof e.error=="string")}function o3n(e){return!vf(e)||e.type!=="complete"?null:e.backend==="ssh"&&i3n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&a3n(e.result)?{backend:"slurm",result:e.result}:null}function QI(e){return vf(e)&&e.type==="complete"}function c3n(e){return vf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function wS({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 f.jsx($b,{path:`${t}?${a}`,label:CL({host:Ne(e)}),active:r,onError:i,onComplete:o=>{const c=o3n(o);return c?(s(c),!0):!1}})}function l3n({login:e,onComplete:n,onError:t}){return f.jsx($b,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>QI(r)?(n(),!0):!1})}function u3n({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=A.useState("running");return f.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(zt,{className:"border-t-accent-amber"})," ",LNt()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(Xi,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",wNt()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(or,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",jNt()]}):pNt()}),f.jsx("button",{type:"button",onClick:s,"aria-label":kz(),title:kz(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(or,{size:14})})]}),f.jsx($b,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>QI(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function $b({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:c=!1,onComplete:u,onError:h,onClosed:_}){const p=A.useRef(null),m=A.useRef(null),x=A.useRef(u),k=A.useRef(h),v=A.useRef(_),[b,w]=A.useState(null);return x.current=u,k.current=h,v.current=_,A.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:C,dispose:N}=Ib(y,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const z=location.protocol==="https:"?"wss:":"ws:",T=new URL(e,`${z}//${location.host}`),j=new WebSocket(T);j.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const $=(Q,V)=>{var J;if(D){V||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(J=k.current)==null||J.call(k,Q,V),!(a&&!V)&&(C.options.disableStdin=!0,C.blur(),w(Q))},q=C.onData(Q=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(Q))}),H=C.onResize(({cols:Q,rows:V})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:Q,rows:V}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!0,C.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let V;try{V=JSON.parse(Q.data)}catch{return}if(x.current(V)){M=!0,a||j.close();return}const J=c3n(V);J&&(M?C.writeln(J):$(J,!a))},j.onerror=()=>$(jv(),!0),j.onclose=()=>{var Q;if(!M&&!D){$(jv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,q.dispose(),H.dispose(),j.close(),m.current=null,N()}},[e,t,c,i,a]),A.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?y.focus():y.blur())},[o,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[f.jsx("div",{className:`${r} ${s==="card"?KI:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function _3n({host:e,transcript:n}){const t=A.useRef(null);return A.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Ib(r,!0,!0);return s.write(n),i},[n]),f.jsx("div",{className:`mt-3 h-40 ${KI}`,role:"group","aria-label":CL({host:Ne(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Iv=null,t0=0;const kS=()=>Iv;function XI(){const e=t0;return UI(async(n,t)=>{if(e!==t0)return;const r=await $1n(n,t);e===t0&&tt.setQueryData(Sm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===t0&&yn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Vs(),onClick:()=>void Bb.retry()}})})}let Y1=XI();function f3n(){t0++,Iv=null,Y1=XI()}const Bb={flush:(e=!1)=>Y1.flush(e),retry:()=>Y1.retry(),queue(e,n=0){const t=Iv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Iv=e,Y1.queue(e,n))}};window.addEventListener("pagehide",()=>void Bb.flush(!0));function tl(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 Ja(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 YI(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),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=>[Mt(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=Mt(e.rightTab);return{tabs:[...r,...a].map(u=>tl(u,Mt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?tl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Mt(e.previewTab):null,history:e.tabHistory.map(Mt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Mt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function d3n(e,n){const t=CS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>Mt(Ja(a))===Mt(Ja(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=Ja(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Mt(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(Mt(a))}const s=new Map(r.map(i=>{const a=Ja(i);return[Mt(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?Ja(n):e!=null&&e.active?Ja(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,JI(t,n)}const cw=(e,n)=>e.id===n.id&&e.view===n.view,u_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,SS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,As=(e,n,t)=>`${e}:${n??""}:${SS(t)}`,ZI=e=>({...e,lineScrollRequest:void 0});function c1(e){return typeof e=="object"&&"path"in e?ZI(e):e}const ud=(e,n)=>e.branch===n.branch;function Mt(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:${SS(e)}`:`experiment:${e.id}:${e.view}`}function Pp(e,n){const t=e.filter(r=>Mt(r)!==n);return t.length===e.length?e:t}function h3n(e){return e!==void 0}function CS(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===Od&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===Tb){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(Mt),panelOpen:!0}}if(e===Ab){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Mt),panelOpen:!0}}return t}function ES(e,n){const t=CS(e,n);return t.panelOpen?YI(t,{},{}):void 0}function JI(e,n){if(!n)return e;const t=Ja(n),r=Mt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(c=>Mt(c)===r),i=(c,u)=>{const h=c.findIndex(_=>Mt(_)===r);return h<0?[...c,u]:JSON.stringify(tl(c[h]))===JSON.stringify(tl(u))?c:c.map((_,p)=>p===h?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!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&&Mt(o)===r&&JSON.stringify(tl(o))===JSON.stringify(tl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Mt(c)!==r),t]),a}let eo=0;const R0=new Map,$v=new Map,L3=new Set,I3=()=>{for(const e of L3)e()},p3n=e=>(L3.add(e),()=>{L3.delete(e)}),M0=new Map,to=new Map,e$=e=>to.get(e);function m3n(){eo++,to.clear(),M0.clear(),R0.clear(),$v.clear(),I3()}function g3n(e,n){const t=to.get(e);if(!(t!=null&&t.tasks.new)||yu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=Ja(o);if(typeof c=="string"||!("path"in c))return[];const u=As(e,null,c);return u in a?[[As(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,M0.set(e,n),to.set(e,{...t,tasks:i})}function v3n(e){let n=R0.get(e);if(!n){const t=eo;n=UI(async(r,s)=>{if(t!==eo)return;const i=await I1n(e,r,s);t===eo&&tt.setQueryData(sS(e).queryKey,i),t===eo&&$v.delete(e)&&I3()},r=>{t===eo&&($v.set(e,r instanceof Error?r.message:String(r)),I3())}),R0.set(e,n)}return n}function lw(e,n,t,r){const s=to.get(e);if(!s||t==="new"&&M0.has(e))return;const i=Lb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?yu(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const c={...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:{}});to.set(e,c),v3n(e).queue(c,u?250:0)}function mj(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>As(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=YI(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Mt(Ja(c)):null;return o.active=o.tabs.find(h=>Mt(Ja(h))===u)??null,o}function b3n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:_}=e,p=A.useRef(_j()),m=A.useSyncExternalStore(p3n,()=>n?$v.get(n)??null:null),[x,k]=A.useState(null),[v,b]=A.useState(0),[w,y]=A.useState(null),[C,N]=A.useState(null),z=A.useRef(null),T=A.useRef(null),j=A.useRef(null),M=A.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),$=A.useCallback(()=>{const H=j.current;if(!H)return;const Q=mj({...M.current,state:H.state,pane:H.pane},yu(to.get(H.projectId),H.taskKey),H.projectId,H.taskKey);lw(H.projectId,H.location,H.taskKey,Q)},[]);A.useEffect(()=>{let H=!0;const Q=eo;if(k(null),y(null),!!n)return to.has(n)?y(n):tt.fetchQuery(sS(n)).then(V=>{!H||Q!==eo||(to.set(n,V??_j()),y(n))}).catch(V=>{H&&Q===eo&&k(V instanceof Error?V.message:String(V))}),()=>{H=!1}},[n,v]),A.useLayoutEffect(()=>{if(j.current&&j.current.scope!==D){const V=j.current.projectId;$(),M0.get(V)===t&&M0.delete(V),j.current=null}if(!n||w!==n)return;const H=to.get(n);if(!H)return;if(p.current=H,z.current!==D){if(z.current=D,T.current=I,i){const V=yu(H,t)??(Uc(n)?ES(t,a):void 0);c(d3n(V,s),V,!0)}N(D);return}if(C!==D)return;let Q=o;T.current!==I&&(T.current=I,i&&s&&(Q=JI(o,s),c(Q,void 0,!1))),i?(lw(n,r,t,mj({state:Q,pane:s,getScroll:u,sourceModes:h},yu(H,t),n,t)),j.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):lw(n,r),p.current=to.get(n)??H},[n,t,r,s,I,i,a,o,c,u,h,_,w,D,C,$]),A.useEffect(()=>{const H=eo,Q=J=>{if(H===eo){$();for(const Z of R0.values())Z.flush(J)}},V=()=>Q(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Q(!1)}},[$]);const q=A.useCallback(()=>{var H;n&&(x?b(Q=>Q+1):(H=R0.get(n))==null||H.retry())},[n,x]);return{ready:n===null||w===n&&C===D,loaded:n===null||w===n,error:x??m,retry:q,capture:$,workspace:p}}const y3n="data:image/svg+xml,"+encodeURIComponent(''),$3=A.createContext(null);function x3n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function t$(){const e=A.useContext($3);if(!e)throw new Error("Runtime is not connected");return e}function w3n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?y3n:"/favicon.svg")}function gj(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function k3n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!gj("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&oI(n),!gj("orx:locale")&&t&&lD(t)&&iI(t)}function S3n(e){return e.includes("ssh ")&&e.includes("failed")}function vj({host:e,overlay:n=!1}){return f.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:tL({host:Ne(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:o3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:t5t()})]})})}function bj({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=A.useState(s.installPaths),[o,c]=A.useState(!1),[u,h]=A.useState(null);A.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function _(){if(i){c(!0);try{await Jvn(i)}catch($){yn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}}async function p($=!1){r($?s.error:null),c(!0);try{await ebn()}catch(q){yn(q instanceof Error?q.message:String(q),"error")}finally{c(!1)}}async function m(){c(!0);try{await FL()}catch($){yn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}async function x(){c(!0);try{h(await HL())}catch($){yn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await qL(u),h(null)}catch($){h(null),yn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}}async function v(){c(!0);try{await tbn()}catch($){yn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}const b=s.status==="applying"||o,w=s.status==="needsInstall",y=s.status==="needsUpdate",C=i&&w,N=["connecting","applying","reconnecting"].includes(s.status),z=s.status==="disconnected"&&s.error!==null&&S3n(s.error)&&t!==s.error&&!s.canStartNewHost,T=w?q5t():y?BCt():s.status==="applying"?w4t({host:Ne(s.host)}):s.status==="reconnecting"?sSt({host:Ne(s.host)}):s.status==="disconnected"?s.error?W3t({host:Ne(s.host)}):s.canStartNewHost?p5t({host:Ne(s.host)}):tL({host:Ne(s.host)}):n3t({host:Ne(s.host)}),j=s.error??(s.canStartNewHost?c5t():w?ukt({user:Ne(s.user??""),host:Ne(s.host)}):y?RCt({host:Ne(s.host)}):s.status==="applying"?p4t():s.status==="reconnecting"?Ykt():s.status==="disconnected"?D3t():Q4t());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[N&&f.jsx(zt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:T}),!z&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),z&&f.jsx(wS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:L5t()}),[["binary",w5t()],["database",j5t()]].map(([$,q])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[q,f.jsx(Ir,{value:i[$],onChange:H=>a({...i,[$]:H.target.value}),disabled:b,dir:"ltr"})]},$)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(De,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",X5t()]}):y?bz():dL()})})]}),y&&i&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(De,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",VCt()]}):bz()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(zt,{}):null,s.error?gz():kSt()]}):f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(zt,{}):null,gz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(De,{disabled:o,onClick:()=>void m(),children:_3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(De,{disabled:o,onClick:()=>void m(),children:_3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?f.jsx(zt,{}):null,mz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[o?f.jsx(zt,{}):null,nL()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(zt,{}):null,mz()]})})]})}),u&&f.jsx(EI,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function C3n({children:e}){const n=A.useRef(null);return A.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),f.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 E3n(){A.useSyncExternalStore(Z9,XV),A.useEffect(()=>Z9(()=>{f3n(),m3n()}),[]);const e=tQ({select:x=>x.pathname==="/remote-launch"}),[n,t]=A.useState(null),[r,s]=A.useState(null),i=A.useRef(!1),a=A.useRef(!1),o=A.useRef(!1),c=A.useRef(null),[u,h]=A.useState(null),_=lt({...vyn(),enabled:!e,refetchInterval:x=>{var k;return x.state.status==="error"||((k=x.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(A.useEffect(()=>{var v,b;if(e)return;const x=_.data;if(!x){s(((v=_.error)==null?void 0:v.message)??null);return}const k=x3n(x);YV(k),c.current!==null&&c.current!==k&&(i.current=!1,a.current=!1,o.current=!1),c.current=k,x.kind==="ssh"&&(o.current||(o.current=!0,k3n(x)),x.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):x.session.status==="disconnected"&&x.session.error===null&&(a.current=!1)),t(x),s(((b=_.error)==null?void 0:b.message)??null)},[e,_.data,_.error]),A.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";w3n(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(zt,{})," ",$kt()]});if(!n)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:r}),f.jsx(De,{onClick:()=>location.reload(),children:Vs()})]}):f.jsx(zt,{})});if(n.kind==="local")return f.jsxs($3,{value:n,children:[f.jsx(Xz,{}),f.jsx(C0,{})]},Ia()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(vj,{host:n.session.host}):f.jsx(bj,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});const m=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:m,children:f.jsxs($3,{value:n,children:[f.jsx(Xz,{}),f.jsx(C0,{})]},Ia()[1])}),m&&f.jsx(C3n,{children:r?f.jsx(vj,{host:n.session.host,overlay:!0}):f.jsx(bj,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const Pb=$W()({component:E3n}),NS="orx:demo-read-sessions";function n$(){try{const e=JSON.parse(sessionStorage.getItem(NS)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function N3n(e){try{const n=n$();n.add(e),sessionStorage.setItem(NS,JSON.stringify([...n]))}catch{}}function z3n(){try{sessionStorage.removeItem(NS)}catch{}}function r$(e,n){const t=Z_(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function j3n(e=tt){var i;const[n,t]=await Promise.all([e.fetchQuery(Sm()),e.fetchQuery(_h())]),r=Lb((i=kS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=Z_(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!r$(r,await e.fetchQuery(La(s.projectId)))?"/projects":r}async function T3n(e,n=tt){var h;const[t,r]=await Promise.all([n.fetchQuery(sS(e)),n.fetchQuery(La(e))]),s=e$(e)??t,i=Lb(s==null?void 0:s.lastLocation);if(i&&((h=Z_(i.split("?")[0]))==null?void 0:h.projectId)===e&&r$(i,r))return i;const a=r.find(_=>!_.archived),o=Uc(e)?ES(a==null?void 0:a.id,!(await n.fetchQuery(Sm())).tourCompleted):void 0,c=yu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return X1(e,(a==null?void 0:a.id)??null,u)}const Bv=360,A3n=272,R3n=380,M3n=A3n+56;function n0(){return Math.max(Bv,window.innerWidth-M3n-R3n)}function s$(){const e=n0();return Math.max(Bv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function zS(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.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 uw(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(zS,{}),"OpenResearch"]})}const yj="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";function O3n({cmd:e,onRun:n}){const[t,r]=A.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&f.jsx("button",{type:"button",className:`cmd-inline-run ${yj}`,onClick:n,"aria-label":PE({value:Ne(e)}),title:PE({value:Ne(e)}),children:f.jsx(k4n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${yj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?j0():CX({value:Ne(e)}),title:t?j0():Vk(),children:t?f.jsx(Xi,{size:11,strokeWidth:3}):f.jsx(Oh,{size:11})})]})}function ph(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?f.jsx(O3n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function mh({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.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"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.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"})})}function B3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function D3n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function xj(e,n){return n||e==="preview"}function L3n(e,n){if(!e||e.needsConfigRepair)return null;const t=B3(e);return t===n?null:t}function i$({harness:e,commands:n,onReady:t,onClose:r}){const s=A.useRef(null),i=A.useRef(!1),[a,o]=A.useState(()=>B3(e)),[c,u]=A.useState(0),[h,_]=A.useState(()=>D3n(e,B3(e))),[p,m]=A.useState(h==="running"),[x,k]=A.useState(e.needsConfigRepair),[v,b]=A.useState(e.needsConfigRepair?e.agentNote??null:null),w=h==="running"||h==="checking",y=n[a].includes(` -`)?void 0:n[a];A.useEffect(()=>{i.current=!1;const N=s.current;return N==null||N.showModal(),()=>{i.current=!0,N==null||N.close()}},[]);const C=async()=>{_("checking"),b(null);try{const N=await Q_(!0,!0);if(i.current)return;const z=N.find(T=>T.id===e.id);if(k((z==null?void 0:z.needsConfigRepair)??!1),z!=null&&z.agentReady&&(a!=="login"||z.authenticated))t==null||t(z),_("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(z!=null&&z.installed)&&!z.installBroken&&!z.needsConfigRepair&&z.authState==="needsLogin")o("login"),m(!0),_("running");else{const T=L3n(z,a);T&&(o(T),m(!1)),b((z==null?void 0:z.agentNote)??$D()),_("error")}}catch(N){if(i.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 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":"harness-setup-title",onKeyDown:N=>{N.key==="Escape"&&w&&N.preventDefault()},onCancel:N=>{N.preventDefault(),w||r()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(mh,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:PN({agent:e.name})})]}),h==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?vKe({agent:e.name}):SWe({agent:e.name})}):y&&xj(h,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:ph(sWe({command:y}))}):null,h!=="running"&&h!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&f.jsx(zt,{}),h==="success"?ZVe({agent:e.name}):h==="error"?LD():GVe()]}),a==="install"&&n.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:YKe()}),xj(h,p)&&f.jsx($b,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:PN({agent:e.name}),command:y,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:ph(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&f.jsx(De,{variant:"ghost",onClick:()=>{b(null),C()},children:Nv()}),h==="error"&&!x&&f.jsx(De,{onClick:()=>{b(null),m(!0),_("running"),u(N=>N+1)},children:Vs()}),f.jsx(De,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?jL():w?$Ve():z0()}),h==="preview"&&f.jsx(De,{variant:"primary",onClick:()=>{m(!0),_("running")},children:AVe()})]})]})}const I3n={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 O0({variant:e="list",className:n,...t}){return f.jsx("span",{className:fs("title",I3n[e],n),...t})}const wj=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),P_=["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(" "),_w=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),a$=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),$3n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),B3n=[{id:"AI/ML",label:Dct},{id:"Biology",label:Hct},{id:"Physics",label:nlt},{id:"Other",label:Qct}],P3n=["welcome","environment","profile"];function F3n({onDone:e,preferredAgent:n,remote:t}){var ft;const r=ln({mutationFn:Le=>P1n(...Le)}),[s,i]=A.useState(0);A.useEffect(()=>{const Le=P3n[s];Le&&ru({name:"onboarding_step_viewed",step:Le})},[s]);const a=lt(ku()),o=lt(_0()),c=lt(YL()),[u,h]=A.useState(null),[_,p]=A.useState(!1),m=A.useRef(null),x=A.useRef(""),k=A.useRef(null),v=A.useRef(!1);A.useEffect(()=>()=>{var Le;return(Le=m.current)==null?void 0:Le.close()},[]);const b=a.data??null,w=(ft=o.data)==null?void 0:ft.gitVersion,[y,C]=A.useState(!1),[N,z]=A.useState(null),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,$]=A.useState(!1),[q,H]=A.useState([]),[Q,V]=A.useState(""),[J,Z]=A.useState(""),[B,L]=A.useState([]),[F,U]=A.useState(""),[K,ne]=A.useState([]),[ce,_e]=A.useState(!1),se=A.useRef(0),[G,oe]=A.useState(!1),[le,fe]=A.useState(!1),me=(b==null?void 0:b.some(Le=>Le.agentReady&&!Le.catalogPending))??!1,Re=(b==null?void 0:b.some(Le=>Le.catalogPending))??!1,Oe=w!=null,We=A.useRef(0),He=(Le,ge=!1)=>{const Te=++We.current;$(!0),oe(!1),fe(!1);const Pe=()=>Te===We.current;Promise.allSettled([Q_(Le,ge),tt.fetchQuery({..._0(),staleTime:Le?0:3e4})]).then(([rt,ut])=>{Pe()&&(rt.status==="rejected"&&oe(!0),ut.status==="rejected"&&fe(!0))}).finally(()=>Pe()&&$(!1))};A.useEffect(()=>He(!1),[]),A.useEffect(()=>{if(b===null)return;const Le=b.filter(ge=>ge.agentReady&&!ge.catalogPending);D(ge=>{var Pe;if(ge&&Le.some(rt=>rt.id===ge))return ge;const Te=n&&Le.find(rt=>rt.id===n.harness);return(Te==null?void 0:Te.id)??((Pe=Le[0])==null?void 0:Pe.id)??null})},[b,n]),A.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),A.useEffect(()=>fe(o.isError),[o.isError,o.dataUpdatedAt]),A.useEffect(()=>{tt.fetchQuery(yyn()).then(Le=>{H(Le.researchAreas),V(Le.otherArea??""),Z(Le.background??""),L(Le.papers)}).catch(()=>{})},[]),A.useEffect(()=>{const Le=F.trim();if(Le.length<3){ne([]),_e(!1);return}const ge=++se.current;_e(!0);const Te=setTimeout(()=>{tt.fetchQuery(sI(Le)).then(Pe=>ge===se.current&&ne(Pe)).catch(()=>ge===se.current&&ne([])).finally(()=>ge===se.current&&_e(!1))},350);return()=>clearTimeout(Te)},[F]);const Se=Le=>{const ge=B.some(Te=>Te.paperId===Le.paperId);L(Te=>Te.some(Pe=>Pe.paperId===Le.paperId)?Te:[...Te,{paperId:Le.paperId,title:kj(Le.title)}]),U(""),ne([]),ge||tt.fetchQuery(j3(Le.paperId)).then(Te=>{var rt;const Pe=(rt=Te.title)==null?void 0:rt.trim();Pe&&L(ut=>ut.map(pt=>pt.paperId===Le.paperId?{...pt,title:Pe}:pt))}).catch(()=>{})},it=Le=>L(ge=>ge.filter(Te=>Te.paperId!==Le)),Je=Le=>{H(ge=>ge.includes(Le)?ge.filter(Te=>Te!==Le):[...ge,Le])},ot=q.length>0&&(!q.includes("Other")||Q.trim().length>0),wt=()=>{if(k.current)return k.current;x.current="",v.current=!0,p(!0);const Le=(async()=>{await new Promise((Pe,rt)=>{const ut=location.protocol==="https:"?"wss:":"ws:",pt=new WebSocket(`${ut}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);pt.binaryType="arraybuffer";const qe=new TextDecoder,Kt=new VI.Terminal;Kt.onData(Tt=>{pt.readyState===WebSocket.OPEN&&pt.send(new TextEncoder().encode(Tt))}),m.current=pt;let sn=!1;pt.onmessage=Tt=>{if(Tt.data instanceof ArrayBuffer){Kt.write(new Uint8Array(Tt.data)),x.current=(x.current+qe.decode(Tt.data,{stream:!0})).slice(-65536);return}if(typeof Tt.data!="string")return;let mt;try{mt=JSON.parse(Tt.data)}catch{return}typeof mt!="object"||mt===null||!("type"in mt)||(mt.type==="complete"?(sn=!0,pt.close(),Pe()):mt.type==="error"&&(pt.close(),rt(new Error("error"in mt&&typeof mt.error=="string"?mt.error:LD()))))},pt.onerror=()=>{pt.close(),rt(new Error(jv()))},pt.onclose=()=>{Kt.dispose(),m.current=null,sn||rt(new Error(jv()))}});const Te=(await Q_(!0,!0)).find(Pe=>Pe.id==="opencode"&&Pe.agentReady);if(!Te)throw new Error(Lft());return D("opencode"),Te})();return k.current=Le,Le.catch(()=>{}),Le};A.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Le=>Le.catalogPending)||!b.every(Le=>!Le.installed&&!Le.installBroken)||wt()},[b,t]),A.useEffect(()=>{s===1&&_&&i(2)},[s,_]);const Pt=()=>{i(_?2:1)},dt=async(Le="complete")=>{var ge;if(!(y||Le==="complete"&&(!ot||!Oe))){C(!0),z(null),j("");try{const Te=_?await wt():b==null?void 0:b.find(ut=>ut.id===M&&ut.agentReady&&!ut.catalogPending);if(!Te)throw new Error($D());if(Le==="setup")return;const Pe=q3n(Te,((ge=Te.models[0])==null?void 0:ge.id)??null),rt=await r.mutateAsync([Pe,{researchAreas:q,otherArea:q.includes("Other")?Q:null,background:J||null,papers:B}]);e(rt.project,rt.selection)}catch(Te){_&&(k.current=null);const Pe=Te instanceof Error?Te.message:String(Te);z(Pe),j([x.current,Pe].filter(Boolean).join(` - -`))}finally{C(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(i$,{harness:u,commands:c.data[u.id],onReady:Le=>{D(Le.id)},onClose:()=>{h(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.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:[f.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[f.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:f.jsx(uw,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:pct()})]}),f.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[f.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),f.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:kut()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:gpt()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:T_t()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Lht()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:u_t()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:i0t()})]})})]})]}),f.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:f.jsxs(De,{variant:"primary",size:"large",onClick:Pt,disabled:I&&b===null,children:[I&&b===null?f.jsx(zt,{}):null,az()," ",f.jsx(Q1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(uw,{}),f.jsx("span",{children:qht()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Dlt()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:jft()}),b!==null&&!me&&!Re&&f.jsx("p",{className:wj,children:wht()}),b!==null&&me&&M===null&&f.jsx("p",{className:wj,children:Hlt()}),(w===null||le)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(Sj,{gitVersion:w,error:le}),le?f.jsx("p",{className:_w,children:Z2()}):f.jsx("p",{className:_w,children:oz()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Le=>{var ge;return f.jsx(G3n,{h:Le,remote:t,selected:M===Le.id,onSelect:()=>D(Le.id),commands:(ge=c.data)==null?void 0:ge[Le.id],onSetup:()=>h(Le)},Le.id)}):G?f.jsx("div",{className:P_,children:Z2()}):f.jsxs(Br,{className:"py-2",children:[f.jsx(zt,{})," ",qut()]})}),c.isError&&f.jsxs("p",{className:P_,children:[CKe()," ",f.jsx(De,{variant:"ghost",onClick:()=>void c.refetch(),children:Vs()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(De,{variant:"ghost",onClick:()=>i(0),children:[f.jsx(A0,{size:12})," ",iz()]}),f.jsxs(De,{variant:"ghost",onClick:()=>He(!0,!0),disabled:I,children:[f.jsx(Pa,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Nv()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(De,{variant:"primary",onClick:()=>i(2),disabled:I||!me||M===null||!Oe,title:I||!me&&Re?Gpt():me?M===null?mut():le?cdt():w===void 0?$pt():w===null?U_t():void 0:pht(),children:[az()," ",f.jsx(Q1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(uw,{}),!_&&f.jsx("span",{children:Xht()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:rpt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:a$,children:[f.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:[f.jsx("legend",{children:Zpt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:lut()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:B3n.map(Le=>f.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:[f.jsx("input",{type:"checkbox",checked:q.includes(Le.id),onChange:()=>Je(Le.id),disabled:y}),f.jsx("span",{children:Le.label()})]},Le.id))}),q.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:Le=>V(Le.target.value),disabled:y,placeholder:upt(),"aria-label":qft()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:wdt()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:J,onChange:Le=>Z(Le.target.value),disabled:y,rows:4,placeholder:Xut()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:pdt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:wct()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:F,onChange:Le=>U(Le.target.value),disabled:y,placeholder:Ddt()}),ce?f.jsx("div",{className:P_,children:Hdt()}):K.length>0?f.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:K.map(Le=>f.jsxs("button",{type:"button",onClick:()=>Se(Le),disabled:y,children:[f.jsx(O0,{children:kj(Le.title)}),f.jsx("span",{className:"id",children:Le.paperId})]},Le.paperId))}):null]}),B.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:B.map(Le=>f.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:[f.jsx(O0,{children:Le.title||Le.paperId}),f.jsx("span",{className:"id",children:Le.paperId}),f.jsx("button",{type:"button","aria-label":BZ({name:Ne(Le.paperId)}),onClick:()=>it(Le.paperId),disabled:y,children:f.jsx(or,{size:12})})]},Le.paperId))})]})}),!ot&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:q.length===0?nut():Lut()}),_&&!Oe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(Sj,{gitVersion:w,error:le}),f.jsx("p",{className:_w,children:le?Z2():oz()}),f.jsx(De,{onClick:()=>He(!0,!0),disabled:I,children:Nv()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(De,{variant:"ghost",onClick:()=>i(_?0:1),disabled:y,children:[f.jsx(A0,{size:12})," ",iz()]}),f.jsx("div",{className:"flex-1"}),f.jsx(De,{variant:"primary",onClick:()=>void dt(),disabled:y||!Oe||!_&&M===null||!ot,children:y?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",cht()]}):f.jsxs(f.Fragment,{children:[g_t()," ",f.jsx(Q1,{size:13})]})})]}),M===null&&!_&&f.jsx("p",{className:$3n,children:f0t()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(uS,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(De,{size:"small",onClick:()=>void dt(ot&&Oe?"complete":"setup"),disabled:y,children:Vs()}),_&&f.jsx(De,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:y,onClick:()=>{p(!1),z(null),i(1)},children:Qlt()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:r_t()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:T||N})]})]})]})})]})}function kj(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function H3n(e){return e.catalogPending?{tone:"warning",label:V_()}:e.agentReady?{tone:"success",label:e.authMethod==="local"||!e.authenticated?Wk():jht()}:e.installed?e.installBroken?{tone:"warning",label:I_t()}:e.authMethod==="local"?{tone:"warning",label:KD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:Spt()}:e.authState==="unsupported"?{tone:"warning",label:Apt()}:e.installed?{tone:"warning",label:VD()}:{tone:"neutral",label:cz()}:{tone:"neutral",label:cz()}}function q3n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Mb(e,n).defaultId}}function U3n({harness:e}){return f.jsx(mh,{harness:e,size:26})}function G3n({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var x;const a=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown")),o=!e.agentReady&&a,c=a&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),u=H3n(e),h=t?{tone:"success",label:Qdt()}:u,_=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),p=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),m=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(U3n,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,c&&f.jsx(Dd,{tone:u.tone,className:"font-normal",children:u.label})]}),o&&!c&&f.jsx(Dd,{tone:h.tone,children:h.label})]})]}),o?f.jsxs(De,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:UKe(),children:[f.jsx(lo,{size:14}),!e.installed||e.installBroken?_Ke():e.authState==="unsupported"?gWe():ID()]}):f.jsx(Dd,{tone:h.tone,children:h.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 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${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[m,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",Y_t()]}):f.jsxs(f.Fragment,{children:[e.account??(e.authMethod==="apiKey"?Kk():null),e.plan?` · ${e.plan}`:""]})}),p&&f.jsx("div",{className:P_,children:p})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 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:[m,e.authState==="unsupported"&&_&&f.jsx("div",{className:P_,children:_}),!o&&e.agentNote&&f.jsx("div",{className:`${P_} [&_code]:whitespace-pre-wrap break-words`,children:ph(e.agentNote)})]})}function Sj({gitVersion:e,error:n}){return f.jsxs("div",{className:a$,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:sft()}),f.jsx(Dd,{tone:e?"success":n||e===null?"danger":"warning",children:e?Wk():n?plt():e===null?GD():V_()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:P_,children:e??zlt()})]})}const V3n="/assets/slurm-logo-aGSXVZcE.svg",K3n="/assets/thinking-machines-BOdslTfm.png";function W3n(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 jD();case"tinker_job":return"Tinker";default:return e||"—"}}function Q3n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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 X3n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.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"}),f.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)"}),f.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)"}),f.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"}),f.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"}),f.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)"}),f.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)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function Y3n({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.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 Z3n({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.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 J3n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.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 e5n({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:K3n,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 t5n({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:V3n,width:e,height:e,alt:"","aria-hidden":"true"})}function Fb({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.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 Lh({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(X3n,{size:n});case"hf_job":return f.jsx(Q3n,{size:n});case"k8s_job":return f.jsx(Y3n,{size:n});case"ssh_job":return f.jsx(uj,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(t5n,{size:n});case"ray_job":return f.jsx(Z3n,{size:n});case"openresearch_job":return f.jsx(J3n,{size:n});case"tinker_job":return f.jsx(e5n,{size:n});case"local_job":return f.jsx(Xwn,{size:n,strokeWidth:1.5});default:return f.jsx(uj,{size:n})}}function jS({backend:e}){const n=nS(e),t=iyn(e);return n?f.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:[f.jsx(Lh,{kind:n}),f.jsx("span",{className:"backend-name",children:W3n(n)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.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 fw(e,n){const[t,r]=A.useState(e);return A.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function l1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function n5n(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 r5n(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 s5n(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function i5n({onCreated:e,onCancel:n,remote:t=!1}){var fr,fn,wn,Yn;const[r,s]=A.useState("blank"),[i,a]=A.useState(""),[o,c]=A.useState(!1),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(!1),[N,z]=A.useState(!1),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,$]=A.useState(!1),q=A.useRef(0),H=A.useRef(0),Q=A.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"?r5n(M==null?void 0:M.repoUrl):null,J=i.trim()?`~/OpenResearch/${l1(i,48)}`:"",Z=`~/OpenResearch/${l1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,B=r==="blank"&&!_?J:r==="paper"&&M&&!_?Z:u,L=fw(B.trim(),200),F=lt({..._0(L),enabled:!!L&&L===B.trim()}),U=L===B.trim()?F.data??null:null,K=L===B.trim()?((fr=F.error)==null?void 0:fr.message)??null:null,ne=!!B.trim()&&(L!==B.trim()||F.isFetching),ce=V??(r==="folder"&&(U!=null&&U.githubOwner)&&U.githubRepo?{owner:U.githubOwner,repo:U.githubRepo}:null),_e=lt(Xyn()),se=((fn=_e.data)==null?void 0:fn.login)??(_e.isPending?void 0:null),G=lt(rS()),oe=A.useRef(!1);A.useEffect(()=>{oe.current||!G.data||(oe.current=!0,z(G.data.githubForNewProjects))},[G.data]);const le=fw(i.trim(),150),fe=lt({...Yyn(le),enabled:le===i.trim()}),me=le===i.trim()?((wn=fe.data)==null?void 0:wn.repo)??l1(i,48):l1(i,48),Re=le!==i.trim()||fe.isFetching,Oe=lt({...Qz((ce==null?void 0:ce.owner)??"",(ce==null?void 0:ce.repo)??""),enabled:!!ce,subscribed:!!ce}),We=!!ce&&Oe.isFetching,He=ce&&((Yn=Oe.data)!=null&&Yn.canPush)?`github.com/${ce.owner}/${ce.repo}`:null,Se=fw(T.trim(),350),it=n5n(Se),Je=r==="paper"&&!M&&Se===T.trim(),ot=lt({...sI(Se),enabled:Je&&!it&&Se.length>=3,subscribed:Je&&!it&&Se.length>=3}),wt=lt({...j3(it??""),enabled:Je&&!!it,subscribed:Je&&!!it}),Pt=Je&&!it?ot.data??[]:[],dt=Je&&ot.isSuccess?Se:"",ft=I||r==="paper"&&!M&&(Se!==T.trim()||(it?wt.isFetching:ot.isFetching));A.useEffect(()=>{var kt;!Je||!it||!wt.data||(D(wt.data),o||a(((kt=wt.data.title)==null?void 0:kt.trim())||wt.data.paperId))},[Je,it,wt.data,o]),A.useEffect(()=>{const kt=it?wt.error:ot.error;Je&&kt&&w(kt.message)},[Je,it,wt.error,ot.error]);const Le=ln({mutationFn:q1n});async function ge(kt){var Ve;const At=++q.current;$(!0),w(null);try{const bt=await tt.fetchQuery(j3(kt));if(At!==q.current)return;D(bt),o||a(((Ve=bt.title)==null?void 0:Ve.trim())||bt.paperId)}catch(bt){At===q.current&&w(bt instanceof Error?bt.message:String(bt))}finally{At===q.current&&$(!1)}}function Te(){q.current+=1,H.current+=1,D(null),j(""),$(!1),x(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function Pe(kt){if(kt===r)return;q.current+=1,H.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:_};const At=Q.current[kt];s(kt),w(null),$(!1),x(!1),a(At.name),c(At.nameTouched),h(At.path),p(At.pathTouched)}async function rt(){if(m)return;const kt=++H.current;x(!0),w(null);try{const At=await H1n();if(kt!==H.current||!At)return;if(p(!0),h(At),tt.invalidateQueries(_0(At)),r==="folder"&&!o){const Ve=At.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Ve&&a(Ve)}}catch(At){kt===H.current&&w(At instanceof Error?At.message:String(At))}finally{kt===H.current&&x(!1)}}async function ut(kt){if(kt.preventDefault(),!!Et){v(!0),w(null);try{const At=await tt.fetchQuery({..._0(B.trim()),staleTime:0});if(At.exists&&At.directory===!1)throw new Error(X2());if(r==="blank"&&At.exists)throw new Error(JN());if(r==="paper"&&At.empty===!1)throw new Error(sz());N&&ce&&await tt.fetchQuery({...Qz(ce.owner,ce.repo),staleTime:0}).catch(()=>null);const Ve=await Le.mutateAsync({name:i.trim(),path:B.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:E(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(Ve.project,Ve.githubPublicationError)}catch(At){w(At instanceof Error?At.message:String(At))}finally{v(!1)}}}const pt=i.trim(),qe=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Kt=r==="folder"&&(U==null?void 0:U.gitState)==="ready"?U.resolvedPath??null:null,sn=pt!==""&&(qe!==null||Kt!==null);A.useEffect(()=>{if(!sn)return;const kt=window.setTimeout(()=>{Q1n({name:pt,paperId:qe??void 0,path:Kt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(kt)},[sn,pt,qe,Kt]);const Tt=(U==null?void 0:U.gitVersion)===null,mt=r==="folder"&&!!B.trim()&&U!==null&&U.exists===!1,Bn=r==="blank"&&(U==null?void 0:U.exists)===!0,Jt=!!B.trim()&&(U==null?void 0:U.exists)===!0&&U.directory===!1,xn=r==="paper"&&!!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,vr=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,Pn=r==="folder"&&((U==null?void 0:U.gitState)==="detached"||(U==null?void 0:U.gitState)==="invalid"),Rn=_&&!B.trim()||Jt||xn||vr,Fn=_&&!B.trim()||Jt||Bn,_r=_&&!B.trim()?rz():Jt?X2():Bn?JN():null,Pr=_&&!B.trim()?rz():Jt?X2():xn?sz():vr?nrt():null,Et=!!(i.trim()&&B.trim())&&!k&&!m&&!ne&&U!==null&&!K&&!Tt&&!mt&&!Bn&&!Jt&&!xn&&!vr&&!Pn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Re&&!We),un=He??`github.com/${se??"you"}/${me}`,zn=se===void 0||Re||We,an=r==="paper"&&!M&&T.trim().length>=3&&dt===T.trim()&&!ft&&Pt.length===0&&!b;return f.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:ut,children:[f.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:[f.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>Pe("blank"),children:hst()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>Pe("folder"),children:tit()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>Pe("paper"),children:pit()})]}),r==="paper"&&!M&&f.jsxs("label",{className:"!font-normal",children:[nat(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:T,onChange:kt=>{w(null),j(kt.target.value)},placeholder:xat()}),!an&&f.jsx("span",{className:"repo-hint",children:ft?Qot():Dot()}),an&&f.jsx("span",{className:"project-path-notice block",children:Dit()}),Pt.length>0&&f.jsx("div",{className:"paper-results",children:Pt.map(kt=>f.jsxs("button",{type:"button",onClick:()=>void ge(kt.paperId),children:[f.jsx(O0,{children:kt.title}),f.jsx("span",{className:"id",children:kt.paperId})]},kt.paperId))})]}),M&&r==="paper"&&f.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[f.jsxs("div",{className:"meta",children:[f.jsx(O0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&f.jsx("div",{className:"id",children:s5n(M.repoUrl)})]}),f.jsx(De,{size:"small",type:"button","aria-label":Dst(),onClick:Te,children:zst()})]}),!M.repoUrl&&f.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:[f.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[f.jsx(uS,{size:16})," ",Hit()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Qit()})]})]}),(r!=="paper"||M)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:nz()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:kt=>{c(!0),a(kt.target.value)},placeholder:tz()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?jrt():Y2()}),f.jsx("input",{className:"text-sm font-normal",value:B,onChange:kt=>{p(!0),h(kt.target.value)},"aria-describedby":Rn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ne&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:ez()}),Rn&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Pr})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?lrt({path:Ne(u)}):YN(),disabled:m,title:u||void 0,onClick:()=>void rt(),children:[f.jsx(Y_,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:u?"text-sm":"placeholder",children:m?wrt():u||YN()}),f.jsx(Ba,{className:"folder-picker-chevron",size:15})]}):r==="folder"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:Y2()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:kt=>{p(!0),h(kt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:Y2()}),f.jsx("input",{className:"text-sm font-normal",value:B,onChange:kt=>{p(!0),h(kt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Fn?"blank-destination-description":void 0,spellCheck:!1}),ne&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:ez()}),Fn&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:_r})]}):null,r!=="blank"&&B&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:nz()}),f.jsx("input",{className:"text-sm font-normal",value:i,onChange:kt=>{c(!0),a(kt.target.value)},placeholder:tz()})]}),Tt&&f.jsx("div",{className:"project-path-notice error",children:wit()}),!Tt&&r==="folder"&&u.trim()&&!ne&&(U==null?void 0:U.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:Dat()}),!Tt&&r==="folder"&&u.trim()&&!ne&&Jt&&f.jsx("div",{className:"project-path-notice error",children:Qat()}),!Tt&&r==="folder"&&!ne&&(U==null?void 0:U.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:Hst()}),!Tt&&r==="folder"&&!ne&&(U==null?void 0:U.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:Hat()}),K&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:K})]}),b&&f.jsx("div",{className:"error",role:"alert",children:b}),(r!=="paper"||M)&&B&&(r!=="blank"||i.trim())&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[f.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":y,"aria-controls":"new-project-advanced-settings",onClick:()=>C(kt=>!kt),children:[N?se===null?Hnt():Qnt():UD(),f.jsx(rc,{className:y?"rotate-180":"",size:16})]}),y&&f.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[f.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[f.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:kt=>z(kt.target.checked),disabled:k}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:zat()})]}),f.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[f.jsx("span",{children:zn?not({repository:Ne(un)}):He?mot({repository:Ne(un)}):lot({repository:Ne(un)})}),f.jsx("span",{children:cit()}),se===null&&f.jsx("span",{children:Hot({command:Ne("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(De,{type:"button",onClick:n,children:xst()}),f.jsx(De,{variant:"primary",className:"ms-auto",disabled:!Et,children:k?Qrt():r==="paper"?M!=null&&M.repoUrl?Lrt():ZN():r==="folder"?nct():ZN()})]})]})}function o$({onClose:e,onCreated:n,remote:t=!1}){const r=A.useRef(null),s=A.useRef(e);return s.current=e,A.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 c=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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const _=h[0],p=h[h.length-1];u.shiftKey&&document.activeElement===_?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),_.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),a==null||a.focus()}},[]),f.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:f.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:[f.jsx("h2",{id:"new-project-dialog-title",children:eL()}),f.jsx(i5n,{onCancel:e,onCreated:n,remote:t})]})})}function a5n({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=A.useRef(null),a=A.useRef(r),o=A.useRef(n);a.current=r,o.current=n,A.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(_()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const x=_();if(x.length===0){m.preventDefault(),u.focus();return}const k=x[0],v=x[x.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return f.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:f.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:[f.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:m2t()}),f.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[f.jsx("p",{className:"m-0",children:Lxt({name:Gi(e.name)})}),f.jsx("p",{className:"m-0",children:c?q2t():X2t()}),t&&f.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[f.jsx(De,{disabled:n,onClick:r,children:n2t()}),f.jsx(De,{variant:"danger",disabled:n,onClick:s,children:n?T2t():k2t()})]})]})})}function Cj(){return f.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 o5n({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=A.useState(!1),[o,c]=A.useState(null),[u,h]=A.useState(null),[_,p]=A.useState(null),m=lt(Qyn()),x=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await Z1n(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return f.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[f.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:[f.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:[f.jsx("h2",{children:kwt()}),f.jsxs(De,{onClick:()=>a(!0),children:[f.jsx(Dh,{size:15})," ",eL()]})]}),f.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:f.jsxs("div",{children:[f.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:[f.jsx("span",{children:mwt()}),f.jsx("span",{children:fz()}),f.jsx("span",{children:dz()}),f.jsx("span",{children:hz()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:lwt()}):[...e].sort((v,b)=>{var C,N;const w=((C=x[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=x[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-w||v.name.localeCompare(b.name)}).map(v=>{const b=x[v.id],w=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,y=w?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:w.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):zv(),C=b?b.activeAgents>0?wxt({count:Xt(b.activeAgents)}):Lwt():"—",N=b?b.totalAgents===1?Qwt():jxt({count:Xt(b.totalAgents)}):"—",z=b?b.runningExperiments>0?n4t({count:Xt(b.runningExperiments)}):b.totalExperiments===0?Yk():pz({count:Xt(b.totalExperiments)}):"—",T=b&&b.runningExperiments>0?pz({count:Xt(b.totalExperiments)}):null;return f.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:[f.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":GY({name:Gi(v.name)}),onClick:()=>n(v.id)}),f.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:[f.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),f.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[f.jsxs("span",{children:[l2t()," ",co(v.createdAt)]}),v.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&f.jsxs("span",{children:[Qxt()," ",Ne(v.paperId)]}),f.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":r3({name:Gi(v.name)}),disabled:o===v.id,onClick:j=>{j.stopPropagation(),h(null),p(v)},children:f.jsx(gf,{size:14})})]})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:fz()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&f.jsx(Cj,{}),C]}),f.jsx("span",{className:"text-xs text-muted",children:N})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:dz()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&f.jsx(Cj,{}),z]}),T&&f.jsx("span",{className:"text-xs text-muted",children:T})]}),f.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[f.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:hz()}),w?f.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:w,target:"_blank",rel:"noreferrer","aria-label":Sv({name:Gi(v.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(Fb,{size:14})}),f.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ne(y)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:y})]})]},v.id)})]})})]}),i&&f.jsx(o$,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),_&&f.jsx(a5n,{project:_,deleting:o===_.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(_)})]})}function c$(){const e=A.useSyncExternalStore(Uyn,Vz,Vz);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":o3()}),!e&&f.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:[f.jsx(uS,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:o3()})]})]})}function c5n({onClose:e,onConfigureSsh:n}){var v,b,w;const t=ln({mutationFn:y=>Zvn(...y)}),r=lt(XL()),s=lt(byn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=A.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((w=s.error)==null?void 0:w.message)??null,[h,_]=A.useState(null),p=A.useRef(null);Em(p,e);async function m(y){const C=window.open("/remote-launch","_blank");if(!C){yn(Akt(),"error");return}_(y);try{const N=await t.mutateAsync([y,{theme:nxn(),locale:E()}]);C.location.replace(N.gatewayUrl),e()}catch(N){C.close(),yn(N instanceof Error?N.message:String(N),"error")}finally{_(null)}}const x=i==null?void 0:i.filter(y=>y.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(y=>[y.host,y]));return oa.createPortal(f.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:f.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:[f.jsx(Bt,{className:"absolute end-3.5 top-3.5","aria-label":l3t(),onClick:e,children:f.jsx(or,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:u3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:m3t()}),f.jsx(Ir,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:y=>c(y.target.value),placeholder:vz(),"aria-label":vz()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(zt,{})," ",vL()]}):(x==null?void 0:x.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:rkt()}):x==null?void 0:x.map(y=>{const C=k.get(y.host);return f.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),h===y.host?f.jsx(zt,{}):C?f.jsx("span",{className:"text-sm text-subtext",children:gkt()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(qI,{size:15}),zL()]})})]})}),document.body)}function Pv({size:e=16,className:n}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[f.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"}),f.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"})]})}const l5n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",u5n="/assets/ollama-logo-Bt9O-2K_.png",_5n="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",l$={id:"lmstudio",label:"LM Studio",icon:l5n,url:"http://127.0.0.1:1234/v1"},Z1=[l$,{id:"omlx",label:"oMLX",icon:_5n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:u5n,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function u$({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,J;const s=lt({...zyn(),enabled:!t}),i=lt(ku()),a=(V=i.data)==null?void 0:V.find(Z=>Z.id==="opencode"),[o,c]=A.useState(t),u=()=>{c(!1),r==null||r()},[h,_]=A.useState("lmstudio"),p=Z1.find(Z=>Z.id===h)??l$,[m,x]=A.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:w,contextWindow:y,error:C}=k,N=p.id==="ollama"?"":k.apiKey,z=Z=>{x(B=>({...B,[p.id]:{...B[p.id]??k,...Z}}))},T=ln({mutationFn:oyn}),j=ln({mutationFn:async Z=>{var F;const B=await cyn(Z);if(!((F=(await Q_(!0)).find(U=>U.id==="opencode"))!=null&&F.models.some(U=>U.id===B.model)))throw new Error(_Ze());return B}}),M=ln({mutationFn:uyn}),D=Number(y),I=T.isPending||j.isPending,$=(Z={})=>z({models:[],model:null,error:null,...Z}),q=async()=>{$();try{const Z=await T.mutateAsync({baseUrl:v.trim(),apiKey:N});z({models:Z.models,model:Z.models[0]??null})}catch(Z){z({error:Z instanceof Error?Z.message:String(Z)})}},H=async()=>{if(w){z({error:null});try{const Z=await j.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:w,contextWindow:D});u(),n==null||n(Z.model)}catch(Z){z({error:Z instanceof Error?Z.message:String(Z)})}}},Q=async Z=>{try{await M.mutateAsync(Z)}catch(B){yn(B instanceof Error?B.message:String(B),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":KN(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:KN()}),f.jsxs(De,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(Dh,{size:14}),BD()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(Z=>f.jsx(f5n,{connection:Z,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(B=>B.id))??[],checking:i.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:i.isError||!i.data,disabled:I||M.isPending,onRemove:()=>void Q(Z.id)},Z.id))})]}),o&&f.jsx(d5n,{busy:I,onClose:u,footer:f.jsxs(De,{variant:"primary",disabled:I||!e||b.length>0&&(!w||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?H():q()),children:[I&&f.jsx(zt,{}),b.length>0?bJe():ZYe()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:iJe()}),f.jsx(dh,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:ZZe()})]}),f.jsx(Yo,{choices:Z1,value:h,title:VN(),header:VN(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:Z=>f.jsxs(f.Fragment,{children:[Z.id==="openai-compatible"?Gk():Z.label,Z.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})]}),renderIcon:Z=>{var L;const B=(L=Z1.find(F=>F.id===Z.id))==null?void 0:L.icon;return B?f.jsx("img",{src:B,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${Z.id==="ollama"?" dark:invert":""}`}):f.jsx($I,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:GYe()}),f.jsx(Ir,{value:v,disabled:I,onChange:Z=>{$({baseUrl:Z.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:cL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?$Je():fJe()}),f.jsx(Ir,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:Z=>$({apiKey:Z.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(Yo,{choices:b.map(Z=>({id:Z,label:Z})),value:w,searchPlaceholder:qD(),title:u0(),header:u0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:Z=>{z({model:Z})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:CZe()}),f.jsx(Ir,{type:"number",min:4096,step:1024,value:y,disabled:I,onChange:Z=>{z({contextWindow:Z.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:RZe()})]}),C&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function f5n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=ln({mutationFn:async()=>{try{await lyn(e.id)}finally{await Q_(!0)}}}),c=Z1.find(x=>x.label===e.name||x.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(x=>t.includes(`${e.id}/${x}`)),_=o.isPending||r,p=s,m=h;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx($I,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?Gk():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Ut,{variant:_||p?"default":m?"success":"warning",children:_?ta():p?yL():m?vZe():ro()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(De,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[f.jsx(Pa,{size:14}),Nv()]}),f.jsx(Bt,{"aria-label":GZe({name:e.name}),disabled:i||o.isPending,onClick:a,children:f.jsx(gf,{size:14})})]})]})]}),o.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function d5n({busy:e,onClose:n,footer:t,children:r}){const s=A.useRef(null),i=()=>{e||n()};return Em(s,i,"input"),oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:BD()})}),f.jsx(Bt,{className:"absolute end-3.5 top-3.5","aria-label":K_(),onClick:i,disabled:e,children:f.jsx(or,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(De,{onClick:i,disabled:e,children:K_()}),t]})]})}),document.body)}const _$=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Ej=["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(" "),su={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function h5n(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:Rv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Mb(n,t).defaultId}}function _o(e){const[n,t]=A.useState(!1),r=A.useRef(null);return A.useEffect(()=>{if(!n)return;const s=a=>{var o,c;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.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 p5n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,lockHarness:u=!1,openRequest:h=0,className:_}){var le,fe,me,Re,Oe,We,He;const{data:p=m5n}=lt(ku()),m=bm(),[x,k]=A.useState(!1),v=A.useRef(null),b=A.useRef(null),{open:w,setOpen:y,ref:C}=_o(v),[N,z]=A.useState(""),[T,j]=A.useState("root"),M=()=>{y(!1),j("root"),z("")},D=A.useRef(h);A.useEffect(()=>{h!==D.current&&(D.current=h,j("models"),z(""),y(!0))},[h,y]),A.useEffect(()=>{var Se;w&&(T==="reasoning"||T==="speed"||T==="permissions")&&((Se=b.current)==null||Se.focus())},[w,T]);const I=A.useMemo(()=>{const Se=N.trim().toLowerCase();return(u&&e?p.filter(Je=>Je.id===e.harness):p).map(Je=>{let ot=Je.models;return Se?ot=ot.filter(wt=>`${wt.id} ${K1(wt)}`.toLowerCase().includes(Se)):(Je.id==="opencode"||Je.id==="cursor"||Je.id==="antigravity")&&(ot=ot.slice(0,5)),{harness:Je,models:ot,hidden:Se?0:Je.models.length-ot.length}})},[p,N,u,e]),$=(Se,it)=>{var ot;const Je=(e==null?void 0:e.harness)===Se.id;n({harness:Se.id,model:it,serviceTier:Rv(Se,it,Je?e==null?void 0:e.serviceTier:null),permissionMode:Je?e.permissionMode:((ot=Se.options)==null?void 0:ot.defaultPermissionMode)??null,reasoningLevel:KL(Se,it,Je?e.reasoningLevel:null)}),M()},q=(e==null?void 0:e.model)!=null?(le=p.find(Se=>Se.id===e.harness))==null?void 0:le.models.find(Se=>Se.id===e.model):void 0,H=e?e.model?q?K1(q):b3(e.model):WN():u0(),Q=(e==null?void 0:e.reasoningLevel)??o??((fe=a[0])==null?void 0:fe.id),V=(me=a.find(Se=>Se.id===Q))==null?void 0:me.label,J=(e==null?void 0:e.permissionMode)??s??((Re=r[0])==null?void 0:Re.id),Z=(Oe=r.find(Se=>Se.id===J))==null?void 0:Oe.label,B=(e==null?void 0:e.harness)==="opencode"?wnt():stt(),L=p.find(Se=>Se.id===(e==null?void 0:e.harness)),F=VL(L,e==null?void 0:e.model),U=Rv(L,e==null?void 0:e.model,e==null?void 0:e.serviceTier),K=(We=F.find(Se=>Se.id===U))==null?void 0:We.label,ne=Se=>{c==null||c(Se),M()},ce=Se=>{i==null||i(Se),M()},_e=Se=>{e&&n({...e,serviceTier:Se}),M()},se=(Se,it,Je)=>f.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:()=>j(Je),children:[f.jsx("span",{className:"flex-1",children:Se}),it&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:it}),f.jsx(Ba,{size:14,className:"shrink-0 text-muted"})]}),G=Se=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Bt,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":JD(),onClick:()=>{j("root"),z("")},children:f.jsx(TI,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Se}),T==="models"&&f.jsx(Bt,{type:"button",size:"small","aria-label":d3(),onClick:()=>{M(),t()},children:f.jsx(vS,{size:15,"aria-hidden":"true"})})]}),oe=(Se,it,Je,ot)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Se.map(wt=>f.jsxs(Xn,{onClick:()=>ot(wt.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[wt.label,wt.id===Je&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",HD()]})]}),wt.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:wt.description})]}),wt.id===it&&f.jsx(Xi,{size:13})]},wt.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:C,children:[f.jsxs("button",{ref:v,type:"button",className:fs("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",_),title:YQ({label:`${H}${V?` · ${V}`:""}${K?` · ${K}`:""}`}),"aria-haspopup":"menu","aria-expanded":w,onClick:()=>{w?M():(j("root"),y(!0))},children:[U==="priority"?f.jsx(X4n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(mh,{harness:e.harness,size:14}):null,U==="priority"&&f.jsxs("span",{className:"sr-only",children:[_tt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[H,V&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:V})]}),f.jsx(rc,{size:14,className:"shrink-0 text-muted"})]}),w&&f.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:[T==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[se(u0(),H,"models"),a.length>0&&se(B,V,"reasoning"),F.length>0&&se(XN(),K,"speed"),r.length>0&&se(QN(),Z,"permissions")]}),T==="models"&&f.jsxs(f.Fragment,{children:[G(u0()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:qD(),value:N,onChange:Se=>z(Se.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[I.map(({harness:Se,models:it,hidden:Je})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:_$,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(mh,{harness:Se.id,size:14}),Se.name]}),!Se.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Se.catalogPending?V_():f.jsxs(f.Fragment,{children:[f.jsx(lj,{size:10})," ",ro()]})})]}),Se.agentReady?f.jsxs(f.Fragment,{children:[Se.models.length===0&&f.jsxs(Xn,{onClick:()=>$(Se,null),children:[f.jsxs("span",{children:[WN(),f.jsx("span",{className:"model-id",children:FD()})]}),(e==null?void 0:e.harness)===Se.id&&(e==null?void 0:e.model)===null&&f.jsx(Xi,{size:13})]}),it.map(ot=>f.jsxs(Xn,{title:ot.id,onClick:()=>$(Se,ot.id),children:[f.jsx("span",{children:K1(ot)}),(e==null?void 0:e.harness)===Se.id&&(e==null?void 0:e.model)===ot.id&&f.jsx(Xi,{size:13})]},ot.id)),N.trim().length>0&&!Se.models.some(ot=>ot.id===N.trim())&&f.jsx(Xn,{onClick:()=>$(Se,N.trim()),children:f.jsx("span",{children:pnt({id:Ne(N.trim())})})})]}):f.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:Se.catalogPending?V_():Se.agentNote?ph(Se.agentNote):Itt()}),Se.id==="opencode"&&f.jsx(Xn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ot;M(),(ot=v.current)==null||ot.focus(),k(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[Eet(),f.jsx(Dh,{size:14,"aria-hidden":"true"})]})}),Se.agentReady&&Je>0&&f.jsx("div",{className:Ej,children:Ttt({count:Xt(Je)})})]},Se.id)),p.length===0&&f.jsx("div",{className:Ej,children:Yet()})]}),u&&e&&p.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(lj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Xtt()]})]}),T==="reasoning"&&f.jsxs(f.Fragment,{children:[G(B),oe(a,Q,o,ne)]}),T==="permissions"&&f.jsxs(f.Fragment,{children:[G(QN()),oe(r,J,s,ce)]}),T==="speed"&&f.jsxs(f.Fragment,{children:[G(XN()),oe(F,U??void 0,"default",_e)]})]}),x&&f.jsx(u$,{dialogOnly:!0,installed:((He=p.find(Se=>Se.id==="opencode"))==null?void 0:He.installed)??!1,onClose:()=>k(!1),onConnected:Se=>{var Je;const it=(Je=m.getQueryData(ku().queryKey))==null?void 0:Je.find(ot=>ot.id==="opencode");it&&(!u||(e==null?void 0:e.harness)==="opencode")&&$(it,Se)}})]})}function Yo({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:c,numbered:u=!1,searchPlaceholder:h,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:x,className:k}){var Q,V;const v=A.useRef(null),{open:b,setOpen:w,ref:y}=_o(v),C=A.useRef(null),[N,z]=A.useState("");if(A.useLayoutEffect(()=>{var L;const J=C.current,Z=y.current;if(!b||!m||!J||!Z)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const B=()=>{const F=Z.getBoundingClientRect(),U=window.innerHeight-F.bottom-12,K=F.top-12,ne=Math.min(380,J.scrollHeight),ce=i?U>=ne||U>=K:KK;J.style.width=`${F.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ce?U:K))}px`,J.style.left=`${F.left}px`,J.style.top=`${ce?F.bottom+4:F.top-J.getBoundingClientRect().height-4}px`};return B(),window.addEventListener("resize",B),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,!0)}},[b,m,i,N,e.length,y]),e.length===0)return null;const T=n??t??((Q=e[0])==null?void 0:Q.id)??null,j=e.find(J=>J.id===T),M=e.find(J=>J.id===t),D=o==="bare"&&(M==null?void 0:M.id)===Av?M:void 0,$=(D?e.filter(J=>J.id!==D.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(N.toLowerCase())),q=(j==null?void 0:j.label)??((V=e[0])==null?void 0:V.label)??"",H=J=>{var Z;x(J),w(!1),(Z=v.current)==null||Z.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:fs(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"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{z(""),w(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(_==null?void 0:_(j)),f.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??q:q})]}),f.jsx(rc,{size:12})]}),b&&f.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,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(J=>J.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&f.jsx("div",{className:_$,children:r}),h&&f.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:J=>z(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&f.jsxs(f.Fragment,{children:[f.jsxs(Xn,{type:"button",onClick:()=>H(D.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,f.jsx("span",{className:"option-default text-muted font-normal",children:FD()})]})]}),T===D.id&&f.jsx(Xi,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),$.map((J,Z)=>f.jsxs(Xn,{type:"button",onClick:()=>H(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!D&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",HD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),T===J.id?f.jsx(Xi,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:Z+1})]},J.id))]})]})]})}const m5n=[];function P3({runtime:e,corner:n=!1}){const[t,r]=A.useState(!1),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[c,u]=A.useState(null),h=_o();async function _(){if(c){o(!0);try{await qL(c),u(null)}catch(p){u(null),yn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:h.ref,children:[h.open&&f.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:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:H4t({host:Ne(e.session.host),user:Ne(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(Xn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await FL(),h.setOpen(!1)}catch(p){yn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?D4t():_3()}),f.jsx(lS,{content:Skt(),className:"me-2 shrink-0 text-subtext",children:f.jsx(hS,{size:15})})]}),f.jsx(Xn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await HL()),h.setOpen(!1)}catch(p){yn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:nL()})]}),n?f.jsxs(De,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[f.jsx(Pv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:J2({host:Ne(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Bt,{size:"small","aria-label":J2({host:Ne(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:f.jsx(Pv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.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:J2({host:Ne(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]})]})]}),c&&f.jsx(EI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Fv="code-source-text",f$="code-source-wrap",d$="file-view-gutter text-right text-muted select-none";function h$(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const g5n={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},v5n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function F3(e){const n=e.trim().toLowerCase();return g5n[n]??n}function TS(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=v5n[n];if(t)return F3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:F3(n.slice(r+1))}sc.displayName="clike";sc.aliases=[];function sc(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:/[{}[\];(),.:]/}}zm.displayName="c";zm.aliases=[];function zm(e){e.register(sc),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}Hb.displayName="cpp";Hb.aliases=[];function Hb(e){e.register(zm),(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)}AS.displayName="arduino";AS.aliases=["ino"];function AS(e){e.register(Hb),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}RS.displayName="bash";RS.aliases=["sh","shell"];function RS(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(U,K){return"(?:"+F[+K]+")"})}function r(L,F,U){return RegExp(t(L,F),"")}function s(L,F){for(var U=0;U>/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),c=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),h=a(i.type+" "+i.typeDeclaration+" "+i.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},z=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,T=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),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,[k]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,m]),inside:N}],keyword:c,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,k]),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,_]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),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,c.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:c,"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=T+"|"+z,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),$=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,q=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[$,q]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[$]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),Z=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,H]);function B(L,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,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:B(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[Z]),lookbehind:!0,greedy:!0,inside:B(Z,J)}],char:{pattern:RegExp(z),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}jm.displayName="markup";jm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function jm(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}Ih.displayName="css";Ih.aliases=[];function Ih(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)}OS.displayName="diff";OS.aliases=[];function OS(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)}DS.displayName="go";DS.aliases=[];function DS(e){e.register(sc),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"]}LS.displayName="ini";LS.aliases=[];function LS(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:/=/}}IS.displayName="java";IS.aliases=[];function IS(e){e.register(sc),(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)}$S.displayName="regex";$S.aliases=[];function $S(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),c={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":c}}],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}BS.displayName="json";BS.aliases=["webmanifest"];function BS(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}PS.displayName="kotlin";PS.aliases=["kt","kts"];function PS(e){e.register(sc),(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)}FS.displayName="less";FS.aliases=[];function FS(e){e.register(Ih),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"}})}HS.displayName="lua";HS.aliases=[];function HS(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:/[\[\](){},;]|\.+|:+/}}qS.displayName="makefile";qS.aliases=[];function qS(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:/[:;(){}]/}}US.displayName="yaml";US.aliases=["yml"];function US(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(c,u){u=(u||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}GS.displayName="markdown";GS.aliases=["md"];function GS(e){e.register(jm),(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(c){o!==c&&(n.languages.markdown[o].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var h=0,_=u.length;h<_;h++){var p=u[h];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],x=p.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var k=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase();var v="language-"+k;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}c(o.tokens)}),n.hooks.add("wrap",function(o){if(o.type==="code-block"){for(var c="",u=0,h=o.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}KS.displayName="perl";KS.aliases=[];function KS(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)}Ub.displayName="markup-templating";Ub.aliases=[];function Ub(e){e.register(jm),(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(c){if(typeof a=="function"&&!a(c))return c;for(var u=o.length,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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(c){for(var u=0;u=a.length);u++){var h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var _=a[i],p=r.tokenStack[_],m=typeof h=="string"?h:h.content,x=t(s,_),k=m.indexOf(x);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),w=m.substring(k+x.length),y=[];v&&y.push.apply(y,o([v])),y.push(b),w&&y.push.apply(y,o([w])),typeof h=="string"?c.splice.apply(c,[u,1].concat(y)):h.content=y}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}WS.displayName="php";WS.aliases=[];function WS(e){e.register(Ub),(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},c=[{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:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}QS.displayName="python";QS.aliases=["py"];function QS(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}XS.displayName="r";XS.aliases=[];function XS(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:/[(){}\[\],;]/}}YS.displayName="ruby";YS.aliases=["rb"];function YS(e){e.register(sc),(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)}ZS.displayName="rust";ZS.aliases=[];function ZS(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)}JS.displayName="sass";JS.aliases=[];function JS(e){e.register(Ih),(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)}e6.displayName="scss";e6.aliases=[];function e6(e){e.register(Ih),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}t6.displayName="sql";t6.aliases=[];function t6(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:/[;[\]()`,.]/}}n6.displayName="swift";n6.aliases=[];function n6(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})}r6.displayName="typescript";r6.aliases=["ts"];function r6(e){e.register(qb),(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)}Gb.displayName="basic";Gb.aliases=[];function Gb(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:/[,;:()]/}}s6.displayName="vbnet";s6.aliases=[];function s6(e){e.register(Gb),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 Tm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Tm.prototype.normal={};Tm.prototype.property={};Tm.prototype.space=void 0;function p$(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Tm(t,r,n)}function D0(e){return e.toLowerCase()}class Ai{constructor(n,t){this.attribute=t,this.property=n}}Ai.prototype.attribute="";Ai.prototype.booleanish=!1;Ai.prototype.boolean=!1;Ai.prototype.commaOrSpaceSeparated=!1;Ai.prototype.commaSeparated=!1;Ai.prototype.defined=!1;Ai.prototype.mustUseProperty=!1;Ai.prototype.number=!1;Ai.prototype.overloadedBoolean=!1;Ai.prototype.property="";Ai.prototype.spaceSeparated=!1;Ai.prototype.space=void 0;let b5n=0;const Qt=bf(),ts=bf(),H3=bf(),Xe=bf(),ar=bf(),F_=bf(),qi=bf();function bf(){return 2**++b5n}const q3=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qt,booleanish:ts,commaOrSpaceSeparated:qi,commaSeparated:F_,number:Xe,overloadedBoolean:H3,spaceSeparated:ar},Symbol.toStringTag,{value:"Module"})),dw=Object.keys(q3);class i6 extends Ai{constructor(n,t,r,s){let i=-1;if(super(n,t),Nj(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&S5n.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(zj,E5n);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!zj.test(i)){let a=i.replace(k5n,C5n);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=i6}return new s(r,n)}function C5n(e){return"-"+e.toLowerCase()}function E5n(e){return e.charAt(1).toUpperCase()}const k$=p$([m$,y5n,b$,y$,x$],"html"),Vb=p$([m$,x5n,b$,y$,x$],"svg");function jj(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 N5n(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tj=/[#.]/g;function z5n(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function I5n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function $5n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function Oj(e){return $5n(e)||E$(e)}const Dj=document.createElement("i");function L0(e){const n="&"+e+";";Dj.innerHTML=n;const t=Dj.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const B5n=["","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 P5n(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let h=(c?c.line:0)||1,_=(c?c.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),_++;continue}const w=i+1;let y=w,C=w,N;if(b===35){C=++y;const q=e.charCodeAt(C);q===88||q===120?(N="hexadecimal",C=++y):N="decimal"}else N="named";let z="",T="",j="";const M=N==="named"?Oj:N==="decimal"?E$:I5n;for(C--;++C<=e.length;){const q=e.charCodeAt(C);if(!M(q))break;j+=String.fromCharCode(q),N==="named"&&L5n.includes(j)&&(z=j,T=L0(j))}let D=e.charCodeAt(C)===59;if(D){C++;const q=N==="named"?L0(j):!1;q&&(z=j,T=q)}let I=1+C-w,$="";if(!(!D&&t.nonTerminated===!1))if(!j)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!T)k(5,1);else if(z!==j&&(C=y+z.length,I=1+C-y,D=!1),!D){const q=z?1:3;if(t.attribute){const H=e.charCodeAt(C);H===61?(k(q,I),T=""):Oj(H)?T="":k(q,I)}else k(q,I)}$=T}else{D||k(2,I);let q=Number.parseInt(j,N==="hexadecimal"?16:10);if(F5n(q))k(7,I),$="�";else if(q in Mj)k(6,I),$=Mj[q];else{let H="";H5n(q)&&k(6,I),q>65535&&(q-=65536,H+=String.fromCharCode(q>>>10|55296),q=56320|q&1023),$=H+String.fromCharCode(q)}}if($){v(),p=x(),i=C-1,_+=C-w+1,s.push($);const q=x();q.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,$,{start:p,end:q},e.slice(w-1,C)),p=q}else j=e.slice(w-1,C),o+=j,_+=j.length,i=C-1}else m===10&&(h++,a++,_=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),_++);return s.join("");function x(){return{line:h,column:_,offset:i+((c?c.offset:0)||0)}}function k(b,w){let y;t.warning&&(y=x(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,B5n[b],y,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:x()}),o="")}}function F5n(e){return e>=55296&&e<=57343||e>1114111}function H5n(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 q5n=0,u1={},ys={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++q5n}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(ys.util.type(n)){case"Object":if(s=ys.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=ys.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:u1,plaintext:u1,text:u1,txt:u1,extend:function(e,n){var t=ys.util.clone(ys.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||ys.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 c=r[e];return r[e]=i,ys.languages.DFS(ys.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=ys.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=ys.util.type(o);c==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):c==="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(ys.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=ys.tokenize(r.code,r.grammar),ys.hooks.run("after-tokenize",r),f0.stringify(ys.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 U5n;return J1(s,s.head,e),N$(e,s,n,s.head,0),V5n(s)},hooks:{all:{},add:function(e,n){var t=ys.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=ys.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:f0};function f0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function Lj(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 N$(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 c=0;c=i.reach);b+=v.value.length,v=v.next){var w=v.value;if(n.length>e.length)return;if(!(w instanceof f0)){var y=1,C;if(p){if(C=Lj(k,b,e,_),!C||C.index>=e.length)break;var j=C.index,N=C.index+C[0].length,z=b;for(z+=v.value.length;j>=z;)v=v.next,z+=v.value.length;if(z-=v.value.length,b=z,v.value instanceof f0)continue;for(var T=v;T!==n.tail&&(zi.reach&&(i.reach=$);var q=v.prev;D&&(q=J1(n,q,D),b+=D.length),G5n(n,q,y);var H=new f0(a,h?ys.tokenize(M,h):M,m,M);if(v=J1(n,q,H),I&&J1(n,v,I),y>1){var Q={cause:a+","+c,reach:$};N$(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function U5n(){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 J1(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 G5n(e,n,t){for(var r=n.next,s=0;st)return null;try{return Ot.highlight(e,n).children}catch{return null}}function A$(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(A$)},n)}function ekn(e,n,t=3e5){var r;return((r=T$(e,n,t))==null?void 0:r.map(A$))??e}function R$(e,n,t=3e5){const r=T$(e,n,t);if(!r)return e.split(` -`);const s=[];let i=[];const a=[];let o=0;const c=h=>{let _=h;for(let p=a.length-1;p>=0;p--)_=f.jsx("span",{className:a[p],children:_},o++);i.push(_)},u=h=>{var _;if(h.type==="text"){(h.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}h.type==="element"&&(a.push((((_=h.properties)==null?void 0:_.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function M$(e){return Array.isArray(e)?e.length===0:e===""}function O$({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:h}){const _=A.useMemo(()=>R$(e,TS(i)),[e,i]),{ruleCh:p,codeCh:m}=h$(_.length),x=A.useRef(null),k=A.useRef(null),v=()=>{const C=x.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=A.useRef(u);A.useLayoutEffect(()=>{const C=x.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.current.left,v())},[i]),A.useLayoutEffect(v,[e]),A.useLayoutEffect(()=>{var M;const C=x.current;if(!C||!a||o===void 0)return;const N=e.split(` -`),z=Math.min(Math.max(Math.trunc(a),1),N.length);let T=0;for(let D=0;D{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:z,selectionEnd:T}=N,j=e.slice(0,z)+" "+e.slice(T);n(j),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=z+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Fv} ${f$} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Fv}`,children:[f.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"}),f.jsx("div",{ref:k,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((C,N)=>f.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${d$} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),M$(C)?f.jsx("br",{}):C]},N))}),f.jsx("textarea",{ref:x,className:`file-view-editarea ${y} 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=>{v(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function D$({onClose:e,onSaved:n}){const t=gyn(),r=lt(t),[s,i]=A.useState(()=>r.data??null),[a,o]=A.useState(()=>{var y;return((y=r.data)==null?void 0:y.content)??""}),c=!s&&r.error?r.error.message:null,u=ln({mutationFn:({content:y,previous:C})=>Wvn(y,C)}),[h,_]=A.useState(!1),p=A.useRef(null),m=A.useRef(e),x=s!==null&&a!==s.content,k=A.useRef(x),v=A.useRef(h);k.current=x,v.current=h,m.current=e,A.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm($on())||m.current()};Em(p,b,"textarea");async function w(){if(!(!s||!x||h)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!An(t.queryKey))return;Wr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),yn(Zon(),"success")}catch(y){yn(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.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:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:icn()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Bt,{className:"absolute end-3.5 top-3.5","aria-label":Aon(),onClick:b,disabled:h,children:f.jsx(or,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(zt,{})," ",Gon()]}):f.jsx(O$,{value:a,onChange:o,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(De,{onClick:b,disabled:h,children:K_()}),f.jsx(De,{variant:"primary",onClick:()=>void w(),disabled:!x||h,children:h?ia():nc()})]})]})}),document.body)}function L$({runtime:e,corner:n=!1}){const[t,r]=A.useState(null);return e.kind==="ssh"?f.jsx(P3,{runtime:e,corner:n}):f.jsxs(f.Fragment,{children:[n?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(De,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:u3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[f.jsx(Pv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:zv()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Bt,{size:"small","aria-label":u3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:f.jsx(Pv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:zv()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.version)]})]})]})}),t==="hosts"&&f.jsx(c5n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&f.jsx(D$,{onClose:()=>r("hosts")})]})}function o6(e=!0){var r;const n=Mv(),t=lt({...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 tkn=6e4,nkn=500;function I$(e){const[n,t]=A.useState(!1),[r,s]=A.useState(null),i=A.useRef(!1);A.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 c=Mv(),u=()=>i.current||!An(c.queryKey);t(!0),s(null),(async()=>{try{if(await Avn(),u())return;const h=Date.now()+tkn;for(;Date.now()setTimeout(p,nkn)),u())return;const _=await tt.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(o0n())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function $$({status:e}){const[n,t]=A.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=I$(e);return!r||n===r?null:f.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:[f.jsx(Pa,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:i?RL({error:i}):Dpn({version:Ne(r)})}),(e==null?void 0:e.canRestart)&&f.jsx(De,{type:"button",size:"small",disabled:s,onClick:a,children:s?ML():AL()}),f.jsx(Bt,{type:"button",size:"small",className:"ms-auto","aria-label":Hpn(),disabled:s,onClick:()=>t(r),children:f.jsx(or,{size:13})})]})}function c6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(zt,{})})}function rkn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:ro()}),f.jsx(Eb,{to:"/projects",children:l0()})]})}function l6({error:e,reset:n}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(De,{onClick:n,children:Vs()}),f.jsx(Eb,{to:"/projects",children:l0()})]})}function B$({projectId:e}){const{queryClient:n}=Lk({from:"__root__"}),t=Cb(),[r,s]=A.useState(null),[i,a]=A.useState(0);return A.useEffect(()=>{let o=!0;return s(null),(e?T3n(e,n):j3n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(OV(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?f.jsx(l6,{error:r,reset:()=>a(o=>o+1)}):f.jsx(c6,{})}function skn(){return f.jsx(B$,{})}function ikn({projectId:e}){return f.jsx(B$,{projectId:e})}function akn(){const e=t$(),n=Cb(),t=_h(),r=lt(t),s=lt(Sm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=o6(e.kind==="local");A.useEffect(()=>{document.title="OpenResearch",a&&Bb.queue({...kS()??a.workspace??{railOpen:!0,panelWidth:s$(),experimentsView:"table"},lastLocation:"/projects"})},[a]);const _=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(c$,{}),f.jsx($$,{status:h})]}),c&&(!i||!a)?f.jsx(l6,{error:c,reset:u}):!i||!a?f.jsx(c6,{}):o?f.jsx(F3n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{z3n(),_(p.id)}}):f.jsx(o5n,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(p,m)=>{m?(yn(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):_(p.id)},onDeleted:p=>Wr(t.queryKey,m=>m==null?void 0:m.filter(x=>x.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&f.jsx(L$,{runtime:e,corner:!0})]})}const okn=tc()({component:skn}),ckn=tc()({component:C0}),lkn=tc()({}),ukn=tc()({component:akn}),_kn=e=>({queryKey:Ct("getRunDiff",e),queryFn:({signal:n})=>nvn(e,n),staleTime:3e4}),P$=e=>({queryKey:Ct("getExperimentDiff",e),queryFn:({signal:n})=>rvn(e,n),staleTime:3e4}),Hv=(e,n,t={})=>({queryKey:Ct("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>svn(e,n,t,r),staleTime:t.ref?uh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),F$=e=>({queryKey:Ct("getAbsoluteFile",e),queryFn:({signal:n})=>ivn(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),H$=(e,n={})=>({queryKey:Ct("getCodeTree",e,{...n}),queryFn:({signal:t})=>kvn(e,n,t),staleTime:n.ref&&uh(n.ref)?1/0:3e4}),qv=e=>({queryKey:Ct("getSessionWorktree",e),queryFn:({signal:n})=>Svn(e,n),staleTime:3e4}),fkn=e=>({queryKey:Ct("getArtifacts",e),queryFn:({signal:n})=>_bn(e,n),staleTime:3e4}),u6=(e,n)=>({queryKey:Ct("getArtifactFileText",e,n),queryFn:({signal:t})=>pbn(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),q$=(e,n)=>({queryKey:Ct("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>gbn(e,n,t),staleTime:2e3}),dkn=()=>({queryKey:Ct("getLatexEngine"),queryFn:({signal:e})=>lvn(e),staleTime:3e5}),hkn=()=>({queryKey:Ct("getOverleafSettings"),queryFn:({signal:e})=>_vn(e),staleTime:3e5}),pkn=(e,n,t={})=>({queryKey:Ct("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>gvn(e,n,t,r),staleTime:3e5}),mkn=(e,n,t={})=>({queryKey:Ct("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>xvn(e,n,t,r),staleTime:3e4}),U$=(e,n,t,r,s)=>({queryKey:Ct("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!uh(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},c=t==="abs",u=t==="artifacts",h=async()=>{const m=await o(q$(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&x?await o(u6(e,n)):null,v=m===null||x&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await o(Hv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(c?o(F$(n)).then(m=>({source:"absolute",file:m})):u?h().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await _();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):o(Hv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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 gkn(e,n,t,r,s){if(uh(s))return;const i=U$(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[F$(n).queryKey]:[Hv(e,n,{sessionId:r,ref:s}).queryKey,Hv(e,`artifacts/${n}`,{sessionId:r}).queryKey,u6(e,n).queryKey,q$(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 vkn(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 Ij={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 bkn(e){return Ij[e]??Ij.idle}const ykn={done:jL,failed:Eln,running:Pln,starting:Kln,cancelling:aln,cancelled:Jcn,editing:bln,idle:Mln};function _6(e){const n=ykn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function al({status:e,label:n,className:t}){const r=bkn(e);return f.jsx(Dd,{tone:r.tone,live:r.live,className:t,children:n??_6(e)})}const J_={local:jD,tinker:eRe,hf:JTe,modal:bAe,k8s:aAe,ssh:KAe,slurm:PAe,ray:MAe,openresearch:EAe};function $j(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 Dn(e){for(var n=1;n=0||(h[c]=a[c]);return h})(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 V$(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,c,u=[],h=!0,_=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){_=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,n)||Kb(e,n)||W$()}function G$(e){return V$(e)||K$(e)||Kb(e)||W$()}function Yi(e){return(function(n){if(Array.isArray(n))return K3(n)})(e)||K$(e)||Kb(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 V$(e){if(Array.isArray(e))return e}function K$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kb(e,n){if(e){if(typeof e=="string")return K3(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)?K3(e,n):void 0}}function K3(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(c){throw c},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 c=t.next();return a=c.done,c},e:function(c){o=!0,i=c},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var _1=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 Wi=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?b.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(y+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var z=b.slice(y+1).split(" "),T=z[0].split("..");a.oldRevision=T[0],a.newRevision=T[1],z[1]&&(a.oldMode=a.newMode=z[1]);break;case"copy":case"rename":var j=b.slice(y+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),w=C;break;case"---":var M=b.slice(y+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),w="add"):D==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var $=v.slice(0,1),q={content:v.slice(1)};switch($){case"+":q.type="insert",q.isInsert=!0,q.lineNumber=u,u++;break;case"-":q.type="delete",q.isDelete=!0,q.lineNumber=c,c++;break;case" ":q.type="normal",q.isNormal=!0,q.oldLineNumber=c,q.newLineNumber=u,c++,u++;break;case"\\":var H=o.changes[o.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}q.type&&o.changes.push(q)}k++}return _}};e.exports=s})()}));function Ou(e){return e.type==="insert"}function Zi(e){return e.type==="delete"}function ul(e){return e.type==="normal"}function Skn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=En(i,3),u=c[0],h=c[1],_=c[2];return h?Ou(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Zi(a)&&Zi(h)?_:o]):(u.push(a),[u,a,Zi(a)?o:-1])}),[[],null,-1]);return En(s,1)[0]})(e.changes):e.changes;return Dn(Dn({},e),{},{isPlain:!1,changes:t})}function W3(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),c=a.split(" ").slice(1,-3).join(" "),u=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(u),r.slice(i+1)].join(` -`)})(e.trimStart());return kkn.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return Skn(o,i)}));return Dn(Dn({},s),{},{hunks:a})})(r,n)}))}function Ckn(e){return e[0]}function Ekn(e){return e[e.length-1]}function Q3(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function I0(e){return e==="old"?function(n){return Ou(n)?-1:ul(n)?n.oldLineNumber:n.lineNumber}:function(n){return Zi(n)?-1:ul(n)?n.newLineNumber:n.lineNumber}}function X$(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},Okn=function(e,n){var t=this.__data__,r=Wb(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function yd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var _=-1,p=!0,m=2&t?new gSn:void 0;for(i.set(e,n),i.set(n,e);++_-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 MSn=function(e){return gh(e)&&h6(e.length)&&!!gr[Bh(e)]},OSn=function(e){return function(n){return e(n)}},Vj=Am((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&J$.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})),Kj=Vj&&Vj.isTypedArray,p6=Kj?OSn(Kj):MSn,DSn=Object.prototype.hasOwnProperty,LSn=function(e,n){var t=na(e),r=!t&&Zb(e),s=!t&&!r&&Uv(e),i=!t&&!r&&!s&&p6(e),a=t||r||s||i,o=a?zSn(e.length,String):[],c=o.length;for(var u in e)!DSn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||iB(u,c))||o.push(u);return o},ISn=Object.prototype,aB=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||ISn)},$Sn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),BSn=Object.prototype.hasOwnProperty,oB=function(e){if(!aB(e))return $Sn(e);var n=[];for(var t in Object(e))BSn.call(e,t)&&t!="constructor"&&n.push(t);return n},Jb=function(e){return e!=null&&h6(e.length)&&!tB(e)},m6=function(e){return Jb(e)?LSn(e):oB(e)},Wj=function(e){return kSn(e,m6,NSn)},PSn=Object.prototype.hasOwnProperty,FSn=function(e,n,t,r,s,i){var a=1&t,o=Wj(e),c=o.length;if(c!=Wj(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:PSn.call(n,h)))return!1}var _=i.get(e),p=i.get(n);if(_&&p)return _==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 j6n(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=Su(e,N6n),a=s?function(o,c){return s(o,Jj,c)}:Jj;return f.jsx("td",Dn(Dn({},i),{},{"data-change-key":n,children:r?z6n(r)?" ":r.map(a):t||" "}))}var pB=A.memo(j6n);function mB(e,n){return function(){var t=n==="old"?sy(e):iy(e);return t===-1?void 0:t}}function gB(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Gv(e,n){return n?function(t){e(),n(t)}:e}function eT(e,n,t,r){return A.useMemo((function(){var s=hB(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=Gv(t,s.onMouseEnter),s.onMouseLeave=Gv(r,s.onMouseLeave),s}),[e,t,r,n])}function tT(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:mB(n,r),wrapInAnchor:gB(s,i)};return f.jsx("td",Dn(Dn({className:e},a),{},{"data-change-key":t,children:c(u)}))}function T6n(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,C=xu(s),N=(n=En(A.useState(!1),2),t=n[0],r=n[1],[t,A.useCallback((function(){return r(!0)}),[]),A.useCallback((function(){return r(!1)}),[])]),z=En(N,3),T=z[0],j=z[1],M=z[2],D=A.useMemo((function(){return{change:s}}),[s]),I=eT(_,D,j,M),$=eT(p,D,j,M),q=k(s),H=c({changes:[s],defaultGenerate:function(){return o}}),Q=Wi("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":i}),V=Wi("diff-code","diff-code-".concat(w),h,{"diff-code-selected":i});return f.jsxs("tr",{id:q,className:Wi("diff-line",H),children:[!m&&tT(Q,s,C,"old",x,q,I,T,b),!m&&tT(Q,s,C,"new",x,q,I,T,b),f.jsx(pB,Dn({className:V,changeKey:C,text:y,tokens:a,renderToken:v},$))]})}var A6n=A.memo(T6n);function R6n(e){var n=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var M6n=["hideGutter","selectedChanges","tokens","lineClassName"],O6n=["hunk","widgets","className"];function D6n(e){var n=e.hunk,t=e.widgets,r=e.className,s=Su(e,O6n),i=(function(a,o){return a.reduce((function(c,u){var h=xu(u);c.push(["change",h,u]);var _=o[h];return _&&c.push(["widget",h,_]),c}),[])})(n.changes,t);return f.jsx("tbody",{className:Wi("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=En(o,3),h=u[0],_=u[1],p=u[2],m=c.hideGutter,x=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=Su(c,M6n);if(h==="change"){var w=Zi(p)?"old":"new",y=Zi(p)?sy(p):iy(p),C=k?k[w][y-1]:null;return f.jsx(A6n,Dn({className:v,change:p,hideGutter:m,selected:x.includes(_),tokens:C},b),"change".concat(_))}return h==="widget"?f.jsx(R6n,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var vB=0;function d1(e,n,t,r){var s=A.useCallback((function(){return n(e)}),[e,n]),i=A.useCallback((function(){return n("")}),[n]);return A.useMemo((function(){var a=hB(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=Gv(s,a.onMouseEnter),a.onMouseLeave=Gv(i,a.onMouseLeave),a}),[t,r,s,e,i])}function mw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,u=e.anchorID,h=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,k=e.renderGutter;if(!n){var v=Wi("diff-gutter","diff-gutter-omit",i),b=Wi("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=n.type,y=n.content,C=xu(n),N=t===vB?"old":"new",z=Dn({id:u||void 0,className:Wi("diff-gutter","diff-gutter-".concat(w),V3({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:mB(n,N),wrapInAnchor:gB(h,_)})},o),T=Wi("diff-code","diff-code-".concat(w),V3({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&f.jsx("td",Dn(Dn({},z),{},{"data-change-key":C}),"gutter"),f.jsx(pB,Dn({className:T,changeKey:C,text:y,tokens:s,renderToken:x},c),"code")]}function L6n(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,c=e.monotonous,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=En(A.useState(""),2),C=y[0],N=y[1],z=d1("old",N,t,_),T=d1("new",N,r,_),j=d1("old",N,t,p),M=d1("new",N,r,p),D=t&&x(t),I=r&&x(r),$=k({changes:[t,r],defaultGenerate:function(){return n}}),q={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},H=Dn(Dn({},q),{},{change:t,side:vB,selected:s,tokens:a,gutterEvents:z,codeEvents:j,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=Dn(Dn({},q),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:T,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return f.jsx("tr",{className:Wi("diff-line",$),children:mw(t?H:Q)});var V=(function(J,Z){return J&&!Z?"diff-line-old-only":!J&&Z?"diff-line-new-only":J===Z?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:Wi("diff-line",V,$),children:[mw(H),mw(Q)]})}var I6n=A.memo(L6n);function $6n(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var B6n=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],P6n=["hunk","widgets","className"];function h1(e,n){return(e?xu(e):"00")+(n?xu(n):"00")}function F6n(e){var n=e.hunk,t=e.widgets,r=e.className,s=Su(e,P6n),i=(function(a,o){for(var c=function(b){if(!b)return null;var w=xu(b);return o[w]||null},u=[],h=0;h=(i==null?void 0:i.value.length))return[e];var o=function(_,p){var m=i.value.slice(_,p);return[].concat(Yi(s),[Dn(Dn({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(Ed(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(_,p){return[p].concat(Yi(Ed(_)))})(u,r):Ed(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=Su(e,oCn);t.push(s);var i,a=f6(r);try{for(a.s();!(i=a.n()).done;)wB(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(Ed([].concat(Yi(t.slice(1)),[e])));return n}function cCn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=x6(c);return u.value.includes(` -`)?u.value.split(` -`).map((function(h){return sCn(c,Dn(Dn({},u),{},{value:h}))})):[c]})(t),i=G$(s),a=i[0],o=i.slice(1);return[].concat(Yi(n.slice(0,-1)),[[].concat(Yi(r),[a])],Yi(o.map((function(c){return[c]}))))}),[[]])}function iT(e){return cCn(wB(e))}var lCn=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?ey(e,n,void 0,t):!!r},uCn=function(e,n){return ey(e,n)},_Cn=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function fCn(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=_Cn(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&lCn(t,r,(function(i,a,o){return o==="chlidren"||uCn(i,a)}))))?e.children[e.children.length-1]=(function(i,a){return"value"in i&&"value"in a?Dn(Dn({},i),{},{value:"".concat(i.value).concat(a.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function aT(e){var n,t={type:"root",children:[]},r=f6(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,c){return fCn(a,c===i.length-1?Dn({},o):Dn(Dn({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var dCn=Object.prototype.hasOwnProperty,hCn=yB((function(e,n,t){dCn.call(e,t)?e[t].push(n):b6(e,t,[n])})),pCn=Object.prototype.hasOwnProperty,mCn=function(e){if(e==null)return!0;if(Jb(e)&&(na(e)||typeof e=="string"||typeof e.splice=="function"||Uv(e)||p6(e)||Zb(e)))return!e.length;var n=e5(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(aB(e))return!oB(e).length;for(var t in e)if(pCn.call(e,t))return!1;return!0},gCn=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var c=En(a,2),u=c[0],h=c[1],_=h+x6(o).value.length;if(h>s||_r.length?t:r,c=t.length>r.length?r:t,u=o.indexOf(c);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,c),new n.Diff(1,o.substring(u+c.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var h=this.diff_halfMatch_(t,r);if(h){var _=h[0],p=h[1],m=h[2],x=h[3],k=h[4],v=this.diff_main(_,m,s,i),b=this.diff_main(p,x,s,i);return v.concat([new n.Diff(0,k)],b)}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 c=0,u=0,h=0,_="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;for(var m=this.diff_main(_,p,!1,s),x=m.length-1;x>=0;x--)o.splice(c,0,m[x]);c+=m.length}h=0,u=0,_="",p=""}c++}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),c=o,u=2*o,h=new Array(u),_=new Array(u),p=0;ps);y++){for(var C=-y+k;C<=y-v;C+=2){for(var N=c+C,z=(I=C==-y||C!=y&&h[N-1]i)v+=2;else if(z>a)k+=2;else if(x&&(M=c+m-C)>=0&&M=(j=i-_[M]))return this.diff_bisectSplit_(t,r,I,z,s)}for(var T=-y+b;T<=y-w;T+=2){for(var j,M=c+T,D=(j=T==-y||T!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-T;ji)w+=2;else if(D>a)b+=2;else if(!x&&(N=c+m-T)>=0&&N=(j=i-j))return this.diff_bisectSplit_(t,r,I,z,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),c=r.substring(0,i),u=t.substring(s),h=r.substring(i),_=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return _.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",_=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=k.length?[w,y,C,N,j]:null}var c,u,h,_,p,m=o(s,i,Math.ceil(s.length/4)),x=o(s,i,Math.ceil(s.length/2));return m||x?(c=x?m&&m[4].length>x[4].length?m:x:m,t.length>r.length?(u=c[0],h=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],h=c[3]),[u,h,_,p,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,c=0,u=0,h=0,_=0;o0?s[i-1]:-1,c=0,u=0,h=0,_=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(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++):(k>=p.length/2||k>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,k))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-k),t[o+1][0]=-1,t[o+1][1]=p.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,v){if(!k||!v)return 6;var b=k.charAt(k.length-1),w=v.charAt(0),y=b.match(n.nonAlphaNumericRegex_),C=w.match(n.nonAlphaNumericRegex_),N=y&&b.match(n.whitespaceRegex_),z=C&&w.match(n.whitespaceRegex_),T=N&&b.match(n.linebreakRegex_),j=z&&w.match(n.linebreakRegex_),M=T&&k.match(n.blanklineEndRegex_),D=j&&v.match(n.blanklineStartRegex_);return M||D?5:T||j?4:y&&!N&&z?3:N||z?2:y||C?1:0}for(var s=1;s=m&&(m=x,h=i,_=a,p=o)}t[s-1][1]!=h&&(h?t[s-1][1]=h:(t.splice(s-1,1),s--),t[s][1]=_,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,c=!1,u=!1,h=!1,_=!1;o0?s[i-1]:-1,h=_=!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="",c="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(c,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(c,o))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.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++),c.length&&(t.splice(s,0,new n.Diff(1,c)),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="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,c=a;return t.length!=s&&t[s][0]===-1?c:c+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,c=0;c");switch(u){case 1:r[c]=''+h+"";break;case-1:r[c]=''+h+"";break;case 0:r[c]=""+h+""}}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(z,T){var j=z/r.length,M=Math.abs(s-T);return a.Match_Distance?j+M/a.Match_Distance:M?1:j}var c=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(c=Math.min(o(0,u),c),(u=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(o(0,u),c)));var h,_,p=1<=v;y--){var C=i[t.charAt(y-1)];if(w[y]=k===0?(w[y+1]<<1|1)&C:(w[y+1]<<1|1)&C|(m[y+1]|m[y])<<1|1|m[y+1],w[y]&p){var N=o(k,y-1);if(N<=c){if(c=N,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>c)break;m=w}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=[],c=new n.patch_obj,u=0,h=0,_=0,p=i,m=i,x=0;x=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),o.push(c),c=new n.patch_obj,u=0,p=m,h=_)}k!==1&&(h+=v.length),k!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),o.push(c)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(c=this.match_main(r,_.substring(0,this.Match_MaxBits),h))!=-1&&((p=this.match_main(r,_.substring(_.length-this.Match_MaxBits),h+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(r,_,h),c==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=c-h,_==(u=p==-1?r.substring(c,c+_.length):r.substring(c,p+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[o].diffs)+r.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var x,k=0,v=0;vo[0][1].length){var c=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}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&&(c=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,h=!1,u.diffs.push(new n.Diff(_,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,o+=p.length):h=!1,u.diffs.push(new n.Diff(_,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.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))),h||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"?kCn:SCn,r=y6(e.map((function(o){return o.changes})),kB).map(t).reduce((function(o,c){var u=En(o,2),h=u[0],_=u[1],p=En(c,2),m=p[0],x=p[1];return[h.concat(m),_.concat(x)]}),[[],[]]),s=En(r,2),i=s[0],a=s[1];return vCn(cT(i),cT(a))}var ECn=["enhancers"],fT=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=En(rCn(e,Su(t,ECn)),2),a=i[0],o=i[1],c=[iT(a),iT(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=En(u,2),_=h[0],p=h[1],m=[_.map(aT),p.map(aT)],x=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:x.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const n5=["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.diff-unified]:table-fixed","[&_.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_.diff-line_>_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(" "),NCn=2e3,zCn={highlight(e,n){return Ot.highlight(e,n).children}};function jCn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function oy(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 TCn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function r5(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 ACn(e){const n=[CCn(e.hunks,{type:"line"})],t=TS(TCn(e));return t&&Ot.registered(t)?fT(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:zCn}):fT(e.hunks,{enhancers:n,highlight:!1})}function CB(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:W3(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:W3(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const RCn=({change:e,side:n})=>n==="old"?null:jCn(e);function EB({bytesRead:e,byteLimit:n}){return f.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:[f.jsx("h4",{children:nGe()}),f.jsx("p",{children:rVe({limit:Ne(el(n)),read:Ne(el(e))})})]})}function NB({file:e,defaultExpanded:n}){const[t,r]=A.useState(n),{additions:s,deletions:i}=A.useMemo(()=>oy(e),[e]),a=t&&s+i<=NCn,o=A.useMemo(()=>{if(a)try{return ACn(e)}catch{return}},[e,a]);return f.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:[f.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(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(rc,{size:14}):f.jsx(Ba,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:r5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:TGe()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(K6n,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:RCn,tokens:o,viewType:"unified"})}))]})}function MCn({files:e,className:n}){return f.jsx("div",{className:n?`${n5} ${n}`:n5,children:e.map((t,r)=>f.jsx(NB,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function OCn(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 zB({diff:e,partial:n=!1}){var p;const t=A.useMemo(()=>CB(e,n),[e,n]),r=t.files,s=A.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:oy(m)})),[r]),[i,a]=A.useState(null),[o,c]=A.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===h)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?kGe():XGe()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:mGe()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.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:[f.jsx("strong",{className:"font-medium",children:n?s.length===1?qGe():lGe({count:Xt(s.length)}):s.length===1?DD():OD({count:Xt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?LUe():uVe()})]}),u?f.jsx(MCn,{files:r}):f.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:[f.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":QUe(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,onClick:()=>a(m.key),children:[f.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:OCn(m.file)}),f.jsx("code",{title:r5(m.file),children:r5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${n5} diff-explorer-preview min-w-0`,children:_&&f.jsx(NB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}function DCn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:x}){var C,N;const k=vkn(n,t,c),v=lt({...QL(a),enabled:e}),b=((C=v.data)==null?void 0:C.configuredDefaultBackend)??((N=v.data)==null?void 0:N.defaultBackend),w=b?J_[b]():v.isPending?"…":v.isError?ro():f3(),y=[{id:"files",label:s3(),Icon:Y_,onClick:_},{id:"terminal",label:Tv(),Icon:lo,onClick:p},{id:"artifacts",label:pD(),Icon:pS,onClick:m},{id:"experiments",label:mD(),Icon:hh,onClick:x}];return f.jsx("div",{className:"workspace-tools absolute end-3.5 top-7 z-30",style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":ew(),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:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:ew()}),y.filter(z=>z.id!=="files"&&z.id!=="terminal").map(({id:z,label:T,Icon:j,onClick:M})=>f.jsx(Xn,{className:"min-h-7 py-1","data-onboarding":z==="artifacts"?"nav-artifacts":void 0,onClick:M,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(j,{size:15}),T]})},z)),f.jsx(Xn,{className:"py-1",onClick:o,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(_S,{size:15,className:"shrink-0"}),qmn()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[b&&f.jsx(Lh,{kind:`${b}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:w})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:wgn()}),f.jsx(Xn,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Y_,{size:15}),s3()]})}),f.jsx(Xn,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(lo,{size:15}),Tv()]})}),c&&f.jsx(LCn,{sessionId:c,busy:u,onChanges:h},c),k.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Dd,{tone:"success",live:!0})}),f.jsx("span",{children:Lmn()})]}),k.map(z=>f.jsx(Xn,{className:"min-h-7 py-1",onClick:()=>r(z.experiment.id,z.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${z.experiment.title||z.experiment.slug} · ${_6(Qi(z.run))}`,children:z.experiment.title||z.experiment.slug})},z.run.id))]})]})]}):f.jsx("nav",{"aria-label":ew(),className:"flex items-center justify-end gap-3",children:y.map(({id:z,label:T,Icon:j,onClick:M})=>f.jsx(Bt,{active:i===z,className:"text-text [&.active]:text-text","data-tip":T,"data-tip-align":z==="experiments"?"end":void 0,"aria-label":T,"aria-pressed":i===z,onClick:M,children:f.jsx(j,{size:15})},z))})})}function LCn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=lt({...qv(e),refetchInterval:n?5e3:!1}),s=A.useRef(n),{refetch:i}=r;A.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=A.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const h=CB(a.diff.diff,!1);return h.failed?null:h.files.map(oy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(Xn,{className:"min-h-7 py-1",onClick:t,title:a.branch??Xk(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(Nm,{size:15,className:"shrink-0"}),f.jsx("span",{children:ED()})]}),o?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",Xt(o.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",Xt(o.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?DD():OD({count:Xt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function ICn({projectId:e,sessionId:n,active:t}){const r=A.useRef(null),s=A.useRef(null),[i,a]=A.useState(null),[o,c]=A.useState(0);return A.useEffect(()=>{const u=r.current;if(!u)return;const h=Ib(u,!1,!0,"app"),{terminal:_,dispose:p}=h;s.current=h,a(null);const m=location.protocol==="https:"?"wss:":"ws:",x=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&x.searchParams.set("sessionId",n);const k=new WebSocket(x);k.binaryType="arraybuffer";let v=!1;const b=C=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r -${C}`),a(C))},w=_.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),y=_.onResize(({cols:C,rows:N})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:N}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){_.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let N;try{N=JSON.parse(C.data)}catch{return}vf(N)&&(N.type==="exit"?b(cgn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(Dz()),k.onerror=()=>b(Dz()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,w.dispose(),y.dispose(),k.close(),s.current=null,p()}},[e,n,o]),A.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,_;(h=s.current)==null||h.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":Tv(),children:[f.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(De,{autoFocus:!0,onClick:()=>c(u=>u+1),children:pgn()})})]})}function w6(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function s5(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),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const h=u.startsWith("/"),_=h?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(h||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:i}}function $Cn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function k6(e){return/^[a-z]:[\\/]/i.test(e)}function jB(e){const n=k6(e);if(!n&&w6(e))return null;const t=s5("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function BCn(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 c=+i;if(Number.isInteger(c)&&c>=0&&cr[h]!==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 dT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const PCn=(e,n)=>Math.abs(e-n)<1.01,FCn=(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 Hp;const gw=()=>{if(Hp!==void 0)return Hp;if(typeof navigator>"u")return Hp=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Hp=!0;const e=navigator.maxTouchPoints;return Hp=navigator.platform==="MacIntel"&&e!==void 0&&e>0},hT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},HCn=e=>e,TB=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:c}=a;n({width:Math.round(o),height:Math.round(c)})};if(s(hT(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(hT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Vv={passive:!0},UCn=typeof window>"u"?!0:"onscrollend"in window,GCn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&UCn;let a=0;const o=i?null:FCn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(r),o==null||o(),n(a,_)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,Vv),i&&r.addEventListener("scrollend",h,Vv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},VCn=(e,n)=>GCn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),KCn=(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"]},WCn=(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})},QCn=WCn;class XCn{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,c=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,h]of this.elementsCache)if(h===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,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:HCn,rangeExtractor:TB,onChange:()=>{},measureElement:KCn,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,c=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(),k=p>0?((r=x[0])==null?void 0:r.key)??a.getItemKey(0):null,v=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)!==k||i.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;y&&(o=[y.key,this.getScrollOffset()-y.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(c=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,_=0;if(o&&this.scrollOffset!==null){const[p,m]=o,x=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{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,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,!(!gw()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Vv),i.addEventListener("touchend",o,Vv),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,c]=s;i!==null&&!o&&(gw()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):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=_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,a,o,c,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:c,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:c,gap:u},h)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&N.set(w.subarray(0,p*2)),w=N,this._flatMeasurements=w}let y;if(p===0)y=r+s;else{const N=p-1;y=w[N*2]+w[N*2+1]+u}for(let N=p;N1){C=y;const D=x[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],$=x[0];for(let q=1;qthis.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=ZCn(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,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,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,o=p.start,a=p.size}const h=this.itemSizeCache.get(c)??a,_=r-h;if(_!==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,v=!this.itemSizeCache.has(c)?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=AB(0,r.length-1,i?o=>s[o*2]:o=>dT(r[o]).start,t);return dT(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,c=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:c,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(gw()&&(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&&PCn(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,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const AB=(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 YCn(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 ZCn(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=YCn(s,i,t);let h=u;const _=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;c_=0&&h.some(_=>_>=t);){const _=e[o];h[_.lane]=_.start,o--}o=Math.max(0,o-o%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:o,endIndex:c}}const vw=typeof document<"u"?A.useLayoutEffect:A.useEffect;function JCn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=A.useReducer(h=>h+1,0)[1],i=A.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=h=>{const _=i.current;if(!_.enabled||!_.container)return;const p=h.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=h.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},o=h=>{const _=i.current;if(!_.enabled||!_.container)return;a(h);const p=!!h.options.horizontal,m=_.mode==="transform",x=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const w=b.start-k,y=h.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[x]=`${w}px`)}},c={...r,onChange:(h,_)=>{var p;const m=i.current;let x=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;x=!v||v.isScrolling!==h.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),x&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:h.isScrolling}:null)}x&&(e&&_?oa.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,_)}},[u]=A.useState(()=>{const h=new XCn(c);return Object.assign(h,{containerRef:_=>{const p=i.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const x=h.options.horizontal?"width":"height";_.style[x]=`${m}px`}}})});return u.setOptions(c),vw(()=>u._didMount(),[]),vw(()=>(a(u),u._willUpdate())),vw(()=>{o(u)}),u}function e7n(e){return JCn({observeElementRect:qCn,observeElementOffset:VCn,scrollToFn:QCn,...e})}function t7n(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 n7n(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 r7n(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 h=u.parentId??null,_=a.get(h);_?_.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=n7n(u,i,a),_=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:_,prevId:_>0?h[_-1].id:void 0,nextId:_=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function vh(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 Rm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function RB(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Rm(r)||!vh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function MB(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=RB(n.parts);return t?{messageId:n.id,toolId:t}:null}function i7n(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"||Rm(r)))return r.type==="text"&&!!r.text}return!1}function a7n(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(c=>c.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}function OB(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>vh(r))||!e.slice(0,t).some(r=>vh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function DB(e){return e.flatMap(n=>{var r;const t=n.type==="text"?(r=n.text)==null?void 0:r.trim():void 0;return t?[t]:[]}).join(` - -`)}function LB(e){return DB(OB(e.parts,!1).answer)}function o7n(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=LB(e[n]);if(t)return t}return""}function c7n(e,n,t){const r=n.flatMap(s=>{const i=DB(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} - -${i}`]:[]});return r.length===0?null:[`# ${e}`,...r].join(` - -`)+` -`}function l7n(e){return`${e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").slice(0,80).replace(/^-+|-+$/g,"")||"chat"}.md`}function IB(e){var n,t;return e.type==="tool"&&e.tool==="error"&&/^(?:ActionRequiredError:\s*)?Named models unavailable\b/i.test(((t=(n=e.state)==null?void 0:n.error)==null?void 0:t.trim())??"")}function i5(e){var t,r,s;if(IB(e)||((r=(t=e.state)==null?void 0:t.input)==null?void 0:r.errorKind)==="claude_usage_limit")return!0;const n=e.type==="text"?e.text:e.tool==="error"?(s=e.state)==null?void 0:s.error:null;return e.type==="tool"&&e.tool==="error"&&n&&/usageLimitExceeded|rateLimitExceeded|insufficient_quota|(?:usage|rate|session) limit|(?:exceeded|exhausted) (?:your |the |current )*quota|insufficient (?:credits|balance)|(?:credit|quota)[ _-](?:exhausted|exceeded)/i.test(n)?!0:!!(n&&(/^(?:claude: )?you(?:'ve| have) reached your .+ limit\./i.test(n.trim())&&n.includes("claude.ai/settings/usage")||/^(?:claude: )?you(?:'ve| have) hit your session limit · resets /i.test(n.trim())))}const Lo=e=>new Intl.NumberFormat(E()).format(e);function u7n(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?M8t():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?b8t({attempt:Lo(e.attempt),maximum:Lo(e.maximum),seconds:Lo(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?f8t({attempt:Lo(e.attempt),maximum:Lo(e.maximum)}):typeof e.attempt=="number"&&t!=null?E8t({attempt:Lo(e.attempt),seconds:Lo(t)}):typeof e.attempt=="number"?i8t({attempt:Lo(e.attempt)}):t!=null?P8t({seconds:Lo(t)}):rL()}function _7n(e,n){if(typeof e!="number")return K8t();const t=Math.max(0,Math.ceil((e-n)/1e3));return e9t({seconds:Lo(t)})}function $B(e){return e==="retry"||e==="continue"?e:null}function f7n(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}const bw={draft:"",attachments:[],annotations:[]};function d7n(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function h7n(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function pT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function p7n(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 S6(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 m7n(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=S6(e);if(t.length===1)return t[0]}return e}function g7n(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 bh(e){return g7n(typeof e=="string"?S6(e):e)}function v7n(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 b7n(e,n){const t=bh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function y7n(e){var c;const n=bh(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 - - - - -`,w7n='',k7n=` - - -`,BB={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},S7n={alphaxiv:x7n,openalex:k7n,biorxiv:w7n};function PB({source:e,size:n=16,decorative:t=!1,className:r=""}){return f.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":BB[e]},dangerouslySetInnerHTML:{__html:S7n[e]}})}function C7n(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 E7n(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=C7n(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 N7n=["alphaxiv","openalex","biorxiv"];function z7n(){const e=xyn(),{data:n}=lt(e),t=ln({mutationFn:ybn,onSuccess:i=>Wr(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?f.jsx("div",{className:"flex flex-col",children:N7n.map(i=>{const a=n[i];return f.jsxs(Xn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(PB,{source:i,size:16,decorative:!0}),BB[i]]}),f.jsx(i2n,{checked:a,"aria-hidden":"true"})]},i)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:RYe()})}function yw(e,n){if(!e)throw new Error("Assertion Error")}function __(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function j7n(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 T7n(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function A7n(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 R7n(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function M7n(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const li=Du(/[A-Za-z]/),Gs=Du(/[\dA-Za-z]/),O7n=Du(/[#-'*+\--9=?A-Z^-~]/);function Kv(e){return e!==null&&(e<32||e===127)}const a5=Du(/\d/),D7n=Du(/[\dA-Fa-f]/),L7n=Du(/[!-/:-@[-`{-~]/);function Nt(e){return e!==null&&e<-2}function cr(e){return e!==null&&(e<0||e===32)}function gn(e){return e===-2||e===-1||e===32}const cy=Du(new RegExp("\\p{P}|\\p{S}","u")),ef=Du(/\s/);function Du(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ph(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 I7n(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=Ph(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 c={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,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function $7n(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 B7n(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function FB(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 P7n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return FB(e,n);const s={src:Ph(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 F7n(e,n){const t={src:Ph(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 H7n(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 q7n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return FB(e,n);const s={href:Ph(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 U7n(e,n){const t={href:Ph(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 G7n(e,n,t){const r=e.all(n),s=t?V7n(t):HB(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let _;h&&h.type==="element"&&h.tagName==="p"?_=h:(_={type:"element",tagName:"p",properties:{},children:[]},r.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.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 K7n(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 Y7n(e){const n=C6(e),t=qB(e);if(n&&t)return{start:n,end:t}}function Z7n(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=C6(n.children[1]),c=qB(n.children[n.children.length-1]);o&&c&&(a.position={start:o,end:c}),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 J7n(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 c=-1;const u=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(vT(n.slice(s),s>0,!1)),i.join("")}function vT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===mT||i===gT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===mT||i===gT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function n8n(e,n){const t={type:"text",value:t8n(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function r8n(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const s8n={blockquote:j7n,break:T7n,code:A7n,delete:R7n,emphasis:M7n,footnoteReference:I7n,heading:$7n,html:B7n,imageReference:P7n,image:F7n,inlineCode:H7n,linkReference:q7n,link:U7n,listItem:G7n,list:K7n,paragraph:W7n,root:Q7n,strong:X7n,table:Z7n,tableCell:e8n,tableRow:J7n,text:n8n,thematicBreak:r8n,toml:m1,yaml:m1,definition:m1,footnoteDefinition:m1};function m1(){}const GB=-1,ly=0,d0=1,Wv=2,E6=3,N6=4,z6=5,j6=6,VB=7,KB=8,i8n=typeof self=="object"?self:globalThis,bT=(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 i8n[e](n)},a8n=(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 ly:case GB:return t(a,s);case d0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case Wv:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case E6:return t(new Date(a),s);case N6:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case z6:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case j6:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case VB:{const{name:o,message:c}=a;return t(bT(o,c),s)}case KB: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(bT(i,a),s)};return r},yT=e=>a8n(new Map,e)(0),m_="",{toString:o8n}={},{keys:c8n}=Object,qp=e=>{const n=typeof e;if(n!=="object"||!e)return[ly,n];const t=o8n.call(e).slice(8,-1);switch(t){case"Array":return[d0,m_];case"Object":return[Wv,m_];case"Date":return[E6,m_];case"RegExp":return[N6,m_];case"Map":return[z6,m_];case"Set":return[j6,m_];case"DataView":return[d0,t]}return t.includes("Array")?[d0,t]:t.includes("Error")?[VB,t]:[Wv,t]},g1=([e,n])=>e===ly&&(n==="function"||n==="symbol"),l8n=(e,n,t,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return t.set(o,c),c},i=a=>{if(t.has(a))return t.get(a);let[o,c]=qp(a);switch(o){case ly:{let h=a;switch(c){case"bigint":o=KB,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([GB],a)}return s([o,h],a)}case d0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],_=s([o,h],a);for(const p of a)h.push(i(p));return _}case Wv:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const h=[],_=s([o,h],a);for(const p of c8n(a))(e||!g1(qp(a[p])))&&h.push([i(p),i(a[p])]);return _}case E6:return s([o,isNaN(a.getTime())?m_:a.toISOString()],a);case N6:{const{source:h,flags:_}=a;return s([o,{source:h,flags:_}],a)}case z6:{const h=[],_=s([o,h],a);for(const[p,m]of a)(e||!(g1(qp(p))||g1(qp(m))))&&h.push([i(p),i(m)]);return _}case j6:{const h=[],_=s([o,h],a);for(const p of a)(e||!g1(qp(p)))&&h.push(i(p));return _}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},xT=(e,{json:n,lossy:t}={})=>{const r=[];return l8n(!(n||t),!!n,new Map,r)(e),r},Qv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?yT(xT(e,n)):structuredClone(e):(e,n)=>yT(xT(e,n));function u8n(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 _8n(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function f8n(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||u8n,r=e.options.footnoteBackLabel||_8n,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&x.push({type:"text",value:" "});let w=typeof t=="string"?t:t(c,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else h.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Qv(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 Mm=(function(e){if(e==null)return m8n;if(typeof e=="function")return uy(e);if(typeof e=="object")return Array.isArray(e)?d8n(e):h8n(e);if(typeof e=="string")return p8n(e);throw new Error("Expected function, string, or object as test")});function d8n(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=WB,x,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=b8n(t(c,h)),m[0]===o5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==QB)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function wT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function kT(e,n){const t=x8n(e,n),r=t.one(e,void 0),s=f8n(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function Xv(e,n){return e&&"run"in e?async function(t,r){const s=kT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return kT(t,{file:r,...e||n})}}function ST(e){if(e)throw e}var xw,CT;function E8n(){if(CT)return xw;CT=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 h=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return xw=function c(){var u,h,_,p,m,x,k=arguments[0],v=1,b=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const h=u;if(o&&t)throw h;return s(h)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}function h0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ET(e.position):"start"in e||"end"in e?ET(e):"line"in e||"column"in e?u5(e):""}function u5(e){return NT(e&&e.line)+":"+NT(e&&e.column)}function ET(e){return u5(e&&e.start)+"-"+u5(e&&e.end)}function NT(e){return e&&typeof e=="number"?e:1}class Ws 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 c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.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=h0(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}}Ws.prototype.file="";Ws.prototype.name="";Ws.prototype.reason="";Ws.prototype.message="";Ws.prototype.stack="";Ws.prototype.column=void 0;Ws.prototype.line=void 0;Ws.prototype.ancestors=void 0;Ws.prototype.cause=void 0;Ws.prototype.fatal=void 0;Ws.prototype.place=void 0;Ws.prototype.ruleId=void 0;Ws.prototype.source=void 0;const Io={basename:T8n,dirname:A8n,extname:R8n,join:M8n,sep:"/"};function T8n(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Om(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 A8n(e){if(Om(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 R8n(e){Om(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 M8n(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function D8n(e,n){let t="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),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 Om(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const L8n={cwd:I8n};function I8n(){return"/"}function _5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $8n(e){if(typeof e=="string")e=new URL(e);else if(!_5(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 B8n(e)}function B8n(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]=h;const k=r[p][1];l5(k)&&l5(m)&&(m=ww(!0,k,m)),r[p]=[u,m,...x]}}}}const _y=new R6().freeze();function Ew(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zw(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 jT(e){if(!l5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function TT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function v1(e){return q8n(e)?e:new XB(e)}function q8n(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function U8n(e){return typeof e=="string"||G8n(e)}function G8n(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var AT=Object.prototype.hasOwnProperty;function RT(e,n,t){for(t of e.keys())if(p0(t,n))return t}function p0(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--&&p0(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=RT(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=RT(n,s),!s)||!p0(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(AT.call(e,t)&&++r&&!AT.call(n,t)||!(t in n)||!p0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const V8n=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K8n=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,W8n={};function MT(e,n){return(W8n.jsx?K8n:V8n).test(e)}const Q8n=/[ \t\n\f\r]/g;function X8n(e){return typeof e=="object"?e.type==="text"?OT(e.value):!1:OT(e)}function OT(e){return e.replace(Q8n,"")===""}var fd={},jw,DT;function Y8n(){if(DT)return jw;DT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=` -`,u="/",h="*",_="",p="comment",m="declaration";function x(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function C(H){var Q=H.match(n);Q&&(w+=Q.length);var V=H.lastIndexOf(c);y=~V?H.length-V:y+H.length}function N(){var H={line:w,column:y};return function(Q){return Q.position=new z(H),M(),Q}}function z(H){this.start=H,this.end={line:w,column:y},this.source=b.source}z.prototype.content=v;function T(H){var Q=new Error(b.source+":"+w+":"+y+": "+H);if(Q.reason=H,Q.filename=b.source,Q.line=w,Q.column=y,Q.source=v,!b.silent)throw Q}function j(H){var Q=H.exec(v);if(Q){var V=Q[0];return C(V),v=v.slice(V.length),Q}}function M(){j(t)}function D(H){var Q;for(H=H||[];Q=I();)Q!==!1&&H.push(Q);return H}function I(){var H=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(h!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return T("End of comment missing");var V=v.slice(2,Q-2);return y+=2,C(V),v=v.slice(Q),y+=2,H({type:p,comment:V})}}function $(){var H=N(),Q=j(r);if(Q){if(I(),!j(s))return T("property missing ':'");var V=j(i),J=H({type:m,property:k(Q[0].replace(e,_)),value:V?k(V[0].replace(e,_)):_});return j(a),J}}function q(){var H=[];D(H);for(var Q;Q=$();)Q!==!1&&(H.push(Q),D(H));return H}return M(),q()}function k(v){return v?v.replace(o,_):_}return jw=x,jw}var LT;function Z8n(){if(LT)return fd;LT=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(Y8n());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(c=>{if(c.type!=="declaration")return;const{property:u,value:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return fd}var Up={},IT;function J8n(){if(IT)return Up;IT=1,Object.defineProperty(Up,"__esModule",{value:!0}),Up.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Up.camelCase=c,Up}var Gp,$T;function e9n(){if($T)return Gp;$T=1;var e=Gp&&Gp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(Z8n()),t=J8n();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(a[(0,t.camelCase)(o,i)]=c)}),a}return r.default=r,Gp=r,Gp}var t9n=e9n();const n9n=gm(t9n),M6={}.hasOwnProperty,r9n=new Map,s9n=/[A-Z]/g,i9n=new Set(["table","tbody","thead","tfoot","tr"]),a9n=new Set(["td","th"]),YB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ZB(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=h9n(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=d9n(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"?Vb:k$,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=JB(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function JB(e,n,t){if(n.type==="element")return o9n(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return c9n(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return u9n(e,n,t);if(n.type==="mdxjsEsm")return l9n(e,n);if(n.type==="root")return _9n(e,n,t);if(n.type==="text")return f9n(e,n)}function o9n(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Vb,e.schema=s),e.ancestors.push(n);const i=tP(e,n.tagName,!1),a=p9n(e,n);let o=D6(e,n);return i9n.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!X8n(c):!0})),eP(e,a,i,n),O6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function c9n(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)}F0(e,n.position)}function l9n(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);F0(e,n.position)}function u9n(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Vb,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:tP(e,n.name,!0),a=m9n(e,n),o=D6(e,n);return eP(e,a,i,n),O6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function _9n(e,n,t){const r={};return O6(r,D6(e,n)),e.create(n,e.Fragment,r,t)}function f9n(e,n){return n.value}function eP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function O6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function d9n(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 h9n(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=C6(r);return n(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function p9n(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&M6.call(n.properties,s)){const i=g9n(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&a9n.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 m9n(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 F0(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 F0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function D6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:r9n;for(;++ry.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-h&&(z=s.length-(e.children.length-y)),z>=0&&(N=((b=s[z])==null?void 0:b.key)??N);N&&c.has(N)&&((w=s[z])==null?void 0:w.key)!==N;)N=`${N}+`;N&&c.add(N);const T=nP(C,s[z]??null,t,N);i.push(T),T.react!==void 0&&a.push(T.react)}const _=n!==null&&C9n(e,n.node);if(n&&n.key===r&&_&&s.length===i.length&&i.every((y,C)=>y===s[C]))return n;const p=e.type==="element"&&w9n.has(e.tagName)?a.filter(y=>typeof y!="string"||!k9n.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let x=_?n==null?void 0:n.shell:null;if(!x){const y=ZB({...e,children:[]},t);x={props:y.props,type:y.type}}return{children:i,key:r,node:e,react:f.jsx(x.type,{...x.props,children:m},r),shell:x}}function C9n(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return p0(s,o)}function Ld(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?(Ji(e,e.length,0,n),e):n}const PT={}.hasOwnProperty;function sP(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 ao(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 a;function a(c){return gn(c)?(e.enter(t),o(c)):n(c)}function o(c){return gn(c)&&i++a))return;const T=n.events.length;let j=T,M,D;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){D=n.events[j][1].end;break}M=!0}for(b(r),z=T;zy;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=y}function w(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function O9n(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 yh(e){if(e===null||cr(e)||ef(e))return 1;if(cy(e))return 2}function fy(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[r][1].end},p={...e[t][1].start};HT(_,-c),HT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>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=Ma(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ma(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ma(u,fy(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ma(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ma(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Ji(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&gn(z)?dn(e,w,"linePrefix",i+1)(z):w(z)}function w(z){return z===null||Nt(z)?e.check(qT,k,C)(z):(e.enter("codeFlowValue"),y(z))}function y(z){return z===null||Nt(z)?(e.exit("codeFlowValue"),w(z)):(e.consume(z),y)}function C(z){return e.exit("codeFenced"),n(z)}function N(z,T,j){let M=0;return D;function D(Q){return z.enter("lineEnding"),z.consume(Q),z.exit("lineEnding"),I}function I(Q){return z.enter("codeFencedFence"),gn(Q)?dn(z,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):$(Q)}function $(Q){return Q===o?(z.enter("codeFencedFenceSequence"),q(Q)):j(Q)}function q(Q){return Q===o?(M++,z.consume(Q),q):M>=a?(z.exit("codeFencedFenceSequence"),gn(Q)?dn(z,H,"whitespace")(Q):H(Q)):j(Q)}function H(Q){return Q===null||Nt(Q)?(z.exit("codeFencedFence"),T(Q)):j(Q)}}}function V9n(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 Tw={name:"codeIndented",tokenize:W9n},K9n={partial:!0,tokenize:Q9n};function W9n(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 h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Nt(u)?e.attempt(K9n,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Nt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function Q9n(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Nt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):dn(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):Nt(a)?s(a):t(a)}}const X9n={name:"codeText",previous:Z9n,resolve:Y9n,tokenize:J9n};function Y9n(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&&Vp(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),Vp(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Vp(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 uP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return _;function _(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||Kv(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Nt(b)?t(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||cr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||m===null||m===91||m===93&&!c||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):Nt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Nt(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!gn(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,_):_(m)}}function fP(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,c):t(p)}function c(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),c(a)):p===null?t(p):Nt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),dn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Nt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:h)}function _(p){return p===a||p===92?(e.consume(p),h):h(p)}}function m0(e,n){let t;return r;function r(s){return Nt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):gn(s)?dn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const oEn={name:"definition",tokenize:lEn},cEn={partial:!0,tokenize:uEn};function lEn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return _P.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=ao(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return cr(m)?m0(e,u)(m):u(m)}function u(m){return uP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(cEn,_,_)(m)}function _(m){return gn(m)?dn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Nt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function uEn(e,n,t){return r;function r(o){return cr(o)?m0(e,s)(o):t(o)}function s(o){return fP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return gn(o)?dn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Nt(o)?n(o):t(o)}}const _En={name:"hardBreakEscape",tokenize:fEn};function fEn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Nt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const dEn={name:"headingAtx",resolve:hEn,tokenize:pEn};function hEn(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"},Ji(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function pEn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||cr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Nt(h)?(e.exit("atxHeading"),n(h)):gn(h)?dn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||cr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const mEn=["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"],GT=["pre","script","style","textarea"],gEn={concrete:!0,name:"htmlFlow",resolveTo:yEn,tokenize:xEn},vEn={partial:!0,tokenize:kEn},bEn={partial:!0,tokenize:wEn};function yEn(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 xEn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(K){return h(K)}function h(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),_}function _(K){return K===33?(e.consume(K),p):K===47?(e.consume(K),i=!0,k):K===63?(e.consume(K),s=3,r.interrupt?n:L):li(K)?(e.consume(K),a=String.fromCharCode(K),v):t(K)}function p(K){return K===45?(e.consume(K),s=2,m):K===91?(e.consume(K),s=5,o=0,x):li(K)?(e.consume(K),s=4,r.interrupt?n:L):t(K)}function m(K){return K===45?(e.consume(K),r.interrupt?n:L):t(K)}function x(K){const ne="CDATA[";return K===ne.charCodeAt(o++)?(e.consume(K),o===ne.length?r.interrupt?n:$:x):t(K)}function k(K){return li(K)?(e.consume(K),a=String.fromCharCode(K),v):t(K)}function v(K){if(K===null||K===47||K===62||cr(K)){const ne=K===47,ce=a.toLowerCase();return!ne&&!i&>.includes(ce)?(s=1,r.interrupt?n(K):$(K)):mEn.includes(a.toLowerCase())?(s=6,ne?(e.consume(K),b):r.interrupt?n(K):$(K)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(K):i?w(K):y(K))}return K===45||Gs(K)?(e.consume(K),a+=String.fromCharCode(K),v):t(K)}function b(K){return K===62?(e.consume(K),r.interrupt?n:$):t(K)}function w(K){return gn(K)?(e.consume(K),w):D(K)}function y(K){return K===47?(e.consume(K),D):K===58||K===95||li(K)?(e.consume(K),C):gn(K)?(e.consume(K),y):D(K)}function C(K){return K===45||K===46||K===58||K===95||Gs(K)?(e.consume(K),C):N(K)}function N(K){return K===61?(e.consume(K),z):gn(K)?(e.consume(K),N):y(K)}function z(K){return K===null||K===60||K===61||K===62||K===96?t(K):K===34||K===39?(e.consume(K),c=K,T):gn(K)?(e.consume(K),z):j(K)}function T(K){return K===c?(e.consume(K),c=null,M):K===null||Nt(K)?t(K):(e.consume(K),T)}function j(K){return K===null||K===34||K===39||K===47||K===60||K===61||K===62||K===96||cr(K)?N(K):(e.consume(K),j)}function M(K){return K===47||K===62||gn(K)?y(K):t(K)}function D(K){return K===62?(e.consume(K),I):t(K)}function I(K){return K===null||Nt(K)?$(K):gn(K)?(e.consume(K),I):t(K)}function $(K){return K===45&&s===2?(e.consume(K),V):K===60&&s===1?(e.consume(K),J):K===62&&s===4?(e.consume(K),F):K===63&&s===3?(e.consume(K),L):K===93&&s===5?(e.consume(K),B):Nt(K)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(vEn,U,q)(K)):K===null||Nt(K)?(e.exit("htmlFlowData"),q(K)):(e.consume(K),$)}function q(K){return e.check(bEn,H,U)(K)}function H(K){return e.enter("lineEnding"),e.consume(K),e.exit("lineEnding"),Q}function Q(K){return K===null||Nt(K)?q(K):(e.enter("htmlFlowData"),$(K))}function V(K){return K===45?(e.consume(K),L):$(K)}function J(K){return K===47?(e.consume(K),a="",Z):$(K)}function Z(K){if(K===62){const ne=a.toLowerCase();return GT.includes(ne)?(e.consume(K),F):$(K)}return li(K)&&a.length<8?(e.consume(K),a+=String.fromCharCode(K),Z):$(K)}function B(K){return K===93?(e.consume(K),L):$(K)}function L(K){return K===62?(e.consume(K),F):K===45&&s===2?(e.consume(K),L):$(K)}function F(K){return K===null||Nt(K)?(e.exit("htmlFlowData"),U(K)):(e.consume(K),F)}function U(K){return e.exit("htmlFlow"),n(K)}}function wEn(e,n,t){const r=this;return s;function s(a){return Nt(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 kEn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Dm,n,t)}}const SEn={name:"htmlText",tokenize:CEn};function CEn(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),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),y):li(L)?(e.consume(L),j):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,x):li(L)?(e.consume(L),w):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Nt(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?V(L):L===45?p(L):_(L)}function x(L){const F="CDATA[";return L===F.charCodeAt(i++)?(e.consume(L),i===F.length?k:x):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Nt(L)?(a=k,J(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?V(L):L===93?(e.consume(L),b):k(L)}function w(L){return L===null||L===62?V(L):Nt(L)?(a=w,J(L)):(e.consume(L),w)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):Nt(L)?(a=y,J(L)):(e.consume(L),y)}function C(L){return L===62?V(L):y(L)}function N(L){return li(L)?(e.consume(L),z):t(L)}function z(L){return L===45||Gs(L)?(e.consume(L),z):T(L)}function T(L){return Nt(L)?(a=T,J(L)):gn(L)?(e.consume(L),T):V(L)}function j(L){return L===45||Gs(L)?(e.consume(L),j):L===47||L===62||cr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),V):L===58||L===95||li(L)?(e.consume(L),D):Nt(L)?(a=M,J(L)):gn(L)?(e.consume(L),M):V(L)}function D(L){return L===45||L===46||L===58||L===95||Gs(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),$):Nt(L)?(a=I,J(L)):gn(L)?(e.consume(L),I):M(L)}function $(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,q):Nt(L)?(a=$,J(L)):gn(L)?(e.consume(L),$):(e.consume(L),H)}function q(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Nt(L)?(a=q,J(L)):(e.consume(L),q)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||cr(L)?M(L):(e.consume(L),H)}function Q(L){return L===47||L===62||cr(L)?M(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),Z}function Z(L){return gn(L)?dn(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),a(L)}}const I6={name:"labelEnd",resolveAll:jEn,resolveTo:TEn,tokenize:AEn},EEn={tokenize:REn},NEn={tokenize:MEn},zEn={tokenize:OEn};function jEn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Nt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),gn(u)?dn(e,o,"whitespace")(u):o(u))}}const Ei={continuation:{tokenize:UEn},exit:VEn,name:"list",tokenize:qEn},FEn={partial:!0,tokenize:KEn},HEn={partial:!0,tokenize:GEn};function qEn(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:a5(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(nv,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return a5(m)&&++a<10?(e.consume(m),c):(!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(Dm,r.interrupt?t:h,e.attempt(FEn,p,_))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function _(m){return gn(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 UEn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Dm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,dn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!gn(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(HEn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,dn(e,e.attempt(Ei,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function GEn(e,n,t){const r=this;return dn(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 VEn(e){e.exit(this.containerState.type)}function KEn(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 a=r.events[r.events.length-1];return!gn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const VT={name:"setextUnderline",resolveTo:WEn,tokenize:QEn};function WEn(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 QEn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,_;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){_=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(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"),gn(u)?dn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Nt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const XEn={tokenize:YEn};function YEn(e){const n=this,t=e.attempt(Dm,r,e.attempt(this.parser.constructs.flowInitial,s,dn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(nEn,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 ZEn={resolveAll:hP()},JEn=dP("string"),eNn=dP("text");function dP(e){return{resolveAll:hP(e==="text"?tNn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const _=s[h];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function hP(e){return n;function n(t,r){let s=-1,i;for(;++s<=t.length;)i===void 0?t[s]&&t[s][1].type==="data"&&(i=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(t,r):t}}function tNn(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],s=n.sliceStream(r);let i=s.length,a=-1,o=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const u={type:t===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const nNn={42:Ei,43:Ei,45:Ei,48:Ei,49:Ei,50:Ei,51:Ei,52:Ei,53:Ei,54:Ei,55:Ei,56:Ei,57:Ei,62:aP},rNn={91:oEn},sNn={[-2]:Tw,[-1]:Tw,32:Tw},iNn={35:dEn,42:nv,45:[VT,nv],60:gEn,61:VT,95:nv,96:UT,126:UT},aNn={38:cP,92:oP},oNn={[-5]:Aw,[-4]:Aw,[-3]:Aw,33:DEn,38:cP,42:f5,60:[I9n,SEn],91:IEn,92:[_En,oP],93:I6,95:f5,96:X9n},cNn={null:[f5,ZEn]},lNn={null:[42,95]},uNn={null:[]},_Nn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:lNn,contentInitial:rNn,disable:uNn,document:nNn,flow:iNn,flowInitial:sNn,insideSpan:cNn,string:aNn,text:oNn},Symbol.toStringTag,{value:"Module"}));function fNn(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},i=[];let a=[],o=[];const c={attempt:T(N),check:T(z),consume:w,enter:y,exit:C,interrupt:T(z,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let h=n.tokenize.call(u,c);return n.resolveAll&&i.push(n),u;function _(I){return a=Ma(a,I),v(),a[a.length-1]!==null?[]:(j(n,0),u.events=fy(i,u.events,u),u.events)}function p(I,$){return hNn(m(I),$)}function m(I){return dNn(a,I)}function x(){const{_bufferIndex:I,_index:$,line:q,column:H,offset:Q}=r;return{_bufferIndex:I,_index:$,line:q,column:H,offset:Q}}function k(I){s[I.line]=I.column,D()}function v(){let I;for(;r._index-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 hNn(e,n){let t=-1;const r=[];let s;for(;++t0){const pt=Pe.tokenStack[Pe.tokenStack.length-1];(pt[1]||WT).call(Pe,void 0,pt[0])}for(Te.position={start:Xl(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:Xl(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut0&&(Ue(this,hu,ue(this,hu)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=QT(t)),ue(this,hu)+LNn(t,r)}}hu=new WeakMap;const CNn=new Set(["*","**","_","__"]);function QT(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(DNn(n)){XT(n,t,r);continue}const i=TNn(n,e,t);if(i>t){t=i-1;continue}const a=ANn(n,e,t);if(a>t){t=a-1;continue}oo(e,t)||XT(n,t,r)}return n}function ENn(e,n,t){const r=n[t];return r==="`"?NNn(e,n,t):r==="$"?zNn(e,n,t):r==="~"?jNn(e,n,t):t}function NNn(e,n,t){const r=$6(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&Yv(n,t)&&!oo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!oo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||oo(n,t)?t+r:r>=3&&Yv(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function zNn(e,n,t){const r=$6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!oo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||oo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function jNn(e,n,t){const r=$6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Yv(n,t)&&!oo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Yv(n,t)||oo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function TNn(e,n,t){if(n[t]!=="<"||oo(n,t))return t;const r=n[t+1];if(r!==void 0&&!bP(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function ANn(e,n,t){const r=RNn(n,t);if(!r)return t;if(oo(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):(MNn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function RNn(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 MNn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!JT(s)||!JT(r)}function XT(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 ONn(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 DNn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function LNn(e,n){n.pendingHtml!==null&&(e=e.slice(0,BNn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Do(INn(e,t));const r=$Nn(n);if(r)return Do(Nd(e,r));const s=HNn(n);return s?s.kind==="delim"?Do(d5(e,s.start,s.token.length)?gP(e,s.token):e.slice(0,s.start)):d5(e,s.start,s.token.length)?s.kind==="fence"?Do(e):s.kind==="code"?Do(Nd(e,s.token)):s.token==="$$"?Do(Nd(e,(e.endsWith(` -`)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?Do(e):Do(Nd(e,"$")):Do(s.kind==="fence"?e:e.slice(0,s.start)):Do(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function INn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return d5(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 $Nn(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(!CNn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function BNn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!PNn(e,s,r))break;t=s,r=s}return t}function PNn(e,n,t){if(e[t-1]!==">"||oo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!bP(r))return!1;for(let s=n+1;s"||i===` -`)return!1}return!0}function Do(e){var v;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=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(YT(a)<2&&!qNn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:gP(a," |"),u=YT(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const _=i===-1?"":s.slice(i+1),p=ZT(o,Array.from({length:h},()=>"-"));if(_.length===0)return r+c+` -`+p;const m=_.indexOf(` -`),x=m===-1?_:_.slice(0,m),k=m===-1?"":_.slice(m);if(UNn(x,o,h))return e;if(x.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(x.slice(o.length))){const b=vP(x,o).map(w=>{const y=w.trim();if(y.length===0)return"-";let C=0;for(let N=0;N1&&y.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function HNn(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 YT(e){let n=0;for(let t=0;t0}function ZT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function vP(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function UNn(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=vP(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function $6(e,n){let t=n+1;for(;tn+t}function Yv(e,n){return n===0||e[n-1]===` -`}function oo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function JT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function bP(e){return!!e&&/[A-Za-z]/.test(e)}const yP=_y().use(dy);var fm,sh,ih,D_,ah,dm,hm,pm,L_,mm,I_;class GNn{constructor(){ct(this,fm,yP);ct(this,sh,null);ct(this,ih,{});ct(this,D_,null);ct(this,ah,"");ct(this,dm,[]);ct(this,hm,[]);ct(this,pm,[]);ct(this,L_,0);ct(this,mm,[]);ct(this,I_,[])}reconfigure(n,t,r){ue(this,sh)!==null&&ue(this,fm)===n&&xP(ue(this,ih),r)&&!!ue(this,D_)===t||(Ue(this,fm,n),n.attachers.some(s=>s[0]===Xv)||(n=n(),n.use(Xv),n.freeze()),Ue(this,sh,n),Ue(this,ih,r),Ue(this,ah,""),Ue(this,dm,[]),Ue(this,hm,[]),Ue(this,pm,[]),Ue(this,L_,0),Ue(this,mm,[]),Ue(this,D_,t?new SNn:null))}update(n){ue(this,D_)&&(n=ue(this,D_).update(n));let t=ue(this,ah);if(n===t)return ue(this,I_);const r=ue(this,dm),s=VNn(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=__(ue(this,sh)),c=ue(this,hm),u=c.slice(i).some(z=>z.some(h5));let h=o.parse(n.slice(a)),_=h.children.map(z=>__(__(z.position).start.offset)+a);Ue(this,ah,n),yw(r.length===c.length),r.splice(i,r.length-i,..._);{const z=Rw(h,_,a);yw(z.length===_.length),c.splice(i,c.length-i,...z)}if(u||h5(h)){i=0,a=0,h=o.parse(n),_=h.children.map(T=>__(__(T.position).start.offset)+a),r.splice(0,r.length,..._);const z=Rw(h,_,a);yw(z.length===_.length),c.splice(0,c.length,...z)}const p=Rw(o.runSync(h),_,a),m=ue(this,pm),x=ue(this,mm),k=ue(this,I_),v=x.length;let b=null,w=0;for(;wv&&(m.length=x.length=r.length);for(let z=r.length=C?M=v-(r.length-T):T=v){m[T]=String(ue(this,L_)),Ue(this,L_,ue(this,L_)+1),x[T]=null,b&&(b[T]=void 0);continue}m[T]=m[M]??String(Rp(this,L_)._++),x[T]=x[M]??null,b&&(b[T]=k[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||JNn.test(e.slice(0,n))?e:""}const Ow={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function izn(e,n){return kP(e,{})||{type:"root",children:[]}}function kP(e,n){const t=azn(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function azn(e,n){switch(e.nodeType){case 1:return uzn(e,n);case 3:return czn(e);case 8:return lzn(e);case 9:return rA(e,n);case 10:return ozn();case 11:return rA(e,n);default:return}}function rA(e,n){return{type:"root",children:SP(e,n)}}function ozn(){return{type:"doctype"}}function czn(e){return{type:"text",value:e.nodeValue||""}}function lzn(e){return{type:"comment",value:e.nodeValue||""}}function uzn(e,n){const t=e.namespaceURI,r=t===Ow.svg?D5n:C$,s=t===Ow.html?e.tagName.toLowerCase():e.tagName,i=t===Ow.html&&s==="template"?e.content:e,a=e.getAttributeNames(),o={};let c=-1;for(;++cu&&(u=h):h&&(u!==void 0&&u>-1&&c.push(` -`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function EP(e,n,t){return e.type==="element"?yzn(e,n,t):e.type==="text"?t.whitespace==="normal"?NP(e,t):xzn(e):[]}function yzn(e,n,t){const r=zP(e,t),s=e.children||[];let i=-1,a=[];if(vzn(e))return a;let o,c;for(p5(e)||cA(e)&&sA(n,e,cA)?c=` -`:gzn(e)?(o=2,c=2):CP(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(Ezn,"-$1").toLowerCase(),zzn={"&":"&",">":">","<":"<",'"':""","'":"'"},jzn=/[&><"']/g,Ks=e=>String(e).replace(jzn,n=>zzn[n]),rv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?rv(e.body[0]):e:e.type==="font"?rv(e.body):e,Tzn=new Set(["mathord","textord","atom"]),hl=e=>Tzn.has(rv(e).type),Azn=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"},m5={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 Rzn(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 Mzn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Rzn(n)}function Ozn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Mzn(r)}class P6{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(m5)){var r=m5[t];r&&Ozn(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 Ye("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=Azn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Yl{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 qo[Dzn[this.id]]}sub(){return qo[Lzn[this.id]]}fracNum(){return qo[Izn[this.id]]}fracDen(){return qo[$zn[this.id]]}cramp(){return qo[Bzn[this.id]]}text(){return qo[Pzn[this.id]]}isTight(){return this.size>=2}}var F6=0,Zv=1,Id=2,ol=3,H0=4,Oa=5,xh=6,ui=7,qo=[new Yl(F6,0,!1),new Yl(Zv,0,!0),new Yl(Id,1,!1),new Yl(ol,1,!0),new Yl(H0,2,!1),new Yl(Oa,2,!0),new Yl(xh,3,!1),new Yl(ui,3,!0)],Dzn=[H0,Oa,H0,Oa,xh,ui,xh,ui],Lzn=[Oa,Oa,Oa,Oa,ui,ui,ui,ui],Izn=[Id,ol,H0,Oa,xh,ui,xh,ui],$zn=[ol,ol,Oa,Oa,ui,ui,ui,ui],Bzn=[Zv,Zv,ol,ol,Oa,Oa,ui,ui],Pzn=[F6,Zv,Id,ol,Id,ol,Id,ol],Yt={DISPLAY:qo[F6],TEXT:qo[Id],SCRIPT:qo[H0],SCRIPTSCRIPT:qo[xh]},g5=[{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 Fzn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var sv=[];g5.forEach(e=>e.blocks.forEach(n=>sv.push(...n)));function jP(e){for(var n=0;n=sv[n]&&e<=sv[n+1])return!0;return!1}var _s=e=>e+" "+e,dd=80,Hzn=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"},qzn=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"},Uzn=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"},Gzn=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"},Vzn=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"},Kzn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Wzn=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"},Qzn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Hzn(t,dd);break;case"sqrtSize1":s=qzn(t,dd);break;case"sqrtSize2":s=Uzn(t,dd);break;case"sqrtSize3":s=Gzn(t,dd);break;case"sqrtSize4":s=Vzn(t,dd);break;case"sqrtTall":s=Wzn(t,dd,r)}return s},Xzn=function(n,t){switch(n){case"⎜":return _s("M291 0 H417 V"+t+" H291z");case"∣":return _s("M145 0 H188 V"+t+" H145z");case"∥":return _s("M145 0 H188 V"+t+" H145z")+_s("M367 0 H410 V"+t+" H367z");case"⎟":return _s("M457 0 H583 V"+t+" H457z");case"⎢":return _s("M319 0 H403 V"+t+" H319z");case"⎥":return _s("M263 0 H347 V"+t+" H263z");case"⎪":return _s("M384 0 H504 V"+t+" H384z");case"⏐":return _s("M312 0 H355 V"+t+" H312z");case"‖":return _s("M257 0 H300 V"+t+" H257z")+_s("M478 0 H521 V"+t+" H478z");default:return""}},lA={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:_s("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:_s("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:_s("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:_s("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:_s("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:_s("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:_s("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:_s("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`},Yzn=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 Zzn(e){return"toText"in e}class Fh{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(Zzn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var v5={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},Jzn={ex:!0,em:!0,mu:!0},TP=function(n){return typeof n!="string"&&(n=n.unit),n in v5||n in Jzn||n==="ex"},jr=function(n,t){var r;if(n.unit in v5)r=v5[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 Ye("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},nt=function(n){return+n.toFixed(4)+"em"},Cu=function(n){return n.filter(t=>t).join(" ")},H6=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=Nzn(r)+":"+s+";")}return t},AP=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)}},RP=function(n){var t=document.createElement(n);t.className=Cu(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]/,MP=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Ks(Cu(this.classes))+'"');var r=H6(this.style);r&&(t+=' style="'+Ks(r)+'"');for(var s of Object.keys(this.attributes)){if(ejn.test(s))throw new Ye("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Ks(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class Hh{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,AP.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return RP.call(this,"span")}toMarkup(){return MP.call(this,"span")}}class hy{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,AP.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 RP.call(this,"a")}toMarkup(){return MP.call(this,"a")}}class tjn{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=''+Ks(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=nt(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Cu(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:"+nt(this.italic)+";"),r+=H6(this.style),r&&(n=!0,t+=' style="'+Ks(r)+'"');var s=Ks(this.text);return n?(t+=">",t+=s,t+="",t):s}}class _l{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 b5{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 ijn=e=>e instanceof Hh||e instanceof hy||e instanceof Fh,Go={"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]}},b1={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]},uA={Å:"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 ajn(e,n){Go[e]=n}function q6(e,n,t){if(!Go[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Go[n][r];if(!s&&e[0]in uA&&(r=uA[e[0]].charCodeAt(0),s=Go[n][r]),!s&&t==="text"&&jP(r)&&(s=Go[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Dw={};function ojn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!Dw[n]){var t=Dw[n]={cssEmPerMu:b1.quad[n]/18};for(var r in b1)b1.hasOwnProperty(r)&&(t[r]=b1[r][n])}return Dw[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",Ge="text",ee="main",de="ams",Sr="accent-token",ht="bin",di="close",qh="inner",Ht="mathord",ss="op-token",ca="open",Lm="punct",he="rel",pl="spacing",ye="textord";P(W,ee,he,"≡","\\equiv",!0);P(W,ee,he,"≺","\\prec",!0);P(W,ee,he,"≻","\\succ",!0);P(W,ee,he,"∼","\\sim",!0);P(W,ee,he,"⊥","\\perp");P(W,ee,he,"⪯","\\preceq",!0);P(W,ee,he,"⪰","\\succeq",!0);P(W,ee,he,"≃","\\simeq",!0);P(W,ee,he,"∣","\\mid",!0);P(W,ee,he,"≪","\\ll",!0);P(W,ee,he,"≫","\\gg",!0);P(W,ee,he,"≍","\\asymp",!0);P(W,ee,he,"∥","\\parallel");P(W,ee,he,"⋈","\\bowtie",!0);P(W,ee,he,"⌣","\\smile",!0);P(W,ee,he,"⊑","\\sqsubseteq",!0);P(W,ee,he,"⊒","\\sqsupseteq",!0);P(W,ee,he,"≐","\\doteq",!0);P(W,ee,he,"⌢","\\frown",!0);P(W,ee,he,"∋","\\ni",!0);P(W,ee,he,"∝","\\propto",!0);P(W,ee,he,"⊢","\\vdash",!0);P(W,ee,he,"⊣","\\dashv",!0);P(W,ee,he,"∋","\\owns");P(W,ee,Lm,".","\\ldotp");P(W,ee,Lm,"⋅","\\cdotp");P(W,ee,Lm,"⋅","·");P(Ge,ee,ye,"⋅","·");P(W,ee,ye,"#","\\#");P(Ge,ee,ye,"#","\\#");P(W,ee,ye,"&","\\&");P(Ge,ee,ye,"&","\\&");P(W,ee,ye,"ℵ","\\aleph",!0);P(W,ee,ye,"∀","\\forall",!0);P(W,ee,ye,"ℏ","\\hbar",!0);P(W,ee,ye,"∃","\\exists",!0);P(W,ee,ye,"∇","\\nabla",!0);P(W,ee,ye,"♭","\\flat",!0);P(W,ee,ye,"ℓ","\\ell",!0);P(W,ee,ye,"♮","\\natural",!0);P(W,ee,ye,"♣","\\clubsuit",!0);P(W,ee,ye,"℘","\\wp",!0);P(W,ee,ye,"♯","\\sharp",!0);P(W,ee,ye,"♢","\\diamondsuit",!0);P(W,ee,ye,"ℜ","\\Re",!0);P(W,ee,ye,"♡","\\heartsuit",!0);P(W,ee,ye,"ℑ","\\Im",!0);P(W,ee,ye,"♠","\\spadesuit",!0);P(W,ee,ye,"§","\\S",!0);P(Ge,ee,ye,"§","\\S");P(W,ee,ye,"¶","\\P",!0);P(Ge,ee,ye,"¶","\\P");P(W,ee,ye,"†","\\dag");P(Ge,ee,ye,"†","\\dag");P(Ge,ee,ye,"†","\\textdagger");P(W,ee,ye,"‡","\\ddag");P(Ge,ee,ye,"‡","\\ddag");P(Ge,ee,ye,"‡","\\textdaggerdbl");P(W,ee,di,"⎱","\\rmoustache",!0);P(W,ee,ca,"⎰","\\lmoustache",!0);P(W,ee,di,"⟯","\\rgroup",!0);P(W,ee,ca,"⟮","\\lgroup",!0);P(W,ee,ht,"∓","\\mp",!0);P(W,ee,ht,"⊖","\\ominus",!0);P(W,ee,ht,"⊎","\\uplus",!0);P(W,ee,ht,"⊓","\\sqcap",!0);P(W,ee,ht,"∗","\\ast");P(W,ee,ht,"⊔","\\sqcup",!0);P(W,ee,ht,"◯","\\bigcirc",!0);P(W,ee,ht,"∙","\\bullet",!0);P(W,ee,ht,"‡","\\ddagger");P(W,ee,ht,"≀","\\wr",!0);P(W,ee,ht,"⨿","\\amalg");P(W,ee,ht,"&","\\And");P(W,ee,he,"⟵","\\longleftarrow",!0);P(W,ee,he,"⇐","\\Leftarrow",!0);P(W,ee,he,"⟸","\\Longleftarrow",!0);P(W,ee,he,"⟶","\\longrightarrow",!0);P(W,ee,he,"⇒","\\Rightarrow",!0);P(W,ee,he,"⟹","\\Longrightarrow",!0);P(W,ee,he,"↔","\\leftrightarrow",!0);P(W,ee,he,"⟷","\\longleftrightarrow",!0);P(W,ee,he,"⇔","\\Leftrightarrow",!0);P(W,ee,he,"⟺","\\Longleftrightarrow",!0);P(W,ee,he,"↦","\\mapsto",!0);P(W,ee,he,"⟼","\\longmapsto",!0);P(W,ee,he,"↗","\\nearrow",!0);P(W,ee,he,"↩","\\hookleftarrow",!0);P(W,ee,he,"↪","\\hookrightarrow",!0);P(W,ee,he,"↘","\\searrow",!0);P(W,ee,he,"↼","\\leftharpoonup",!0);P(W,ee,he,"⇀","\\rightharpoonup",!0);P(W,ee,he,"↙","\\swarrow",!0);P(W,ee,he,"↽","\\leftharpoondown",!0);P(W,ee,he,"⇁","\\rightharpoondown",!0);P(W,ee,he,"↖","\\nwarrow",!0);P(W,ee,he,"⇌","\\rightleftharpoons",!0);P(W,de,he,"≮","\\nless",!0);P(W,de,he,"","\\@nleqslant");P(W,de,he,"","\\@nleqq");P(W,de,he,"⪇","\\lneq",!0);P(W,de,he,"≨","\\lneqq",!0);P(W,de,he,"","\\@lvertneqq");P(W,de,he,"⋦","\\lnsim",!0);P(W,de,he,"⪉","\\lnapprox",!0);P(W,de,he,"⊀","\\nprec",!0);P(W,de,he,"⋠","\\npreceq",!0);P(W,de,he,"⋨","\\precnsim",!0);P(W,de,he,"⪹","\\precnapprox",!0);P(W,de,he,"≁","\\nsim",!0);P(W,de,he,"","\\@nshortmid");P(W,de,he,"∤","\\nmid",!0);P(W,de,he,"⊬","\\nvdash",!0);P(W,de,he,"⊭","\\nvDash",!0);P(W,de,he,"⋪","\\ntriangleleft");P(W,de,he,"⋬","\\ntrianglelefteq",!0);P(W,de,he,"⊊","\\subsetneq",!0);P(W,de,he,"","\\@varsubsetneq");P(W,de,he,"⫋","\\subsetneqq",!0);P(W,de,he,"","\\@varsubsetneqq");P(W,de,he,"≯","\\ngtr",!0);P(W,de,he,"","\\@ngeqslant");P(W,de,he,"","\\@ngeqq");P(W,de,he,"⪈","\\gneq",!0);P(W,de,he,"≩","\\gneqq",!0);P(W,de,he,"","\\@gvertneqq");P(W,de,he,"⋧","\\gnsim",!0);P(W,de,he,"⪊","\\gnapprox",!0);P(W,de,he,"⊁","\\nsucc",!0);P(W,de,he,"⋡","\\nsucceq",!0);P(W,de,he,"⋩","\\succnsim",!0);P(W,de,he,"⪺","\\succnapprox",!0);P(W,de,he,"≆","\\ncong",!0);P(W,de,he,"","\\@nshortparallel");P(W,de,he,"∦","\\nparallel",!0);P(W,de,he,"⊯","\\nVDash",!0);P(W,de,he,"⋫","\\ntriangleright");P(W,de,he,"⋭","\\ntrianglerighteq",!0);P(W,de,he,"","\\@nsupseteqq");P(W,de,he,"⊋","\\supsetneq",!0);P(W,de,he,"","\\@varsupsetneq");P(W,de,he,"⫌","\\supsetneqq",!0);P(W,de,he,"","\\@varsupsetneqq");P(W,de,he,"⊮","\\nVdash",!0);P(W,de,he,"⪵","\\precneqq",!0);P(W,de,he,"⪶","\\succneqq",!0);P(W,de,he,"","\\@nsubseteqq");P(W,de,ht,"⊴","\\unlhd");P(W,de,ht,"⊵","\\unrhd");P(W,de,he,"↚","\\nleftarrow",!0);P(W,de,he,"↛","\\nrightarrow",!0);P(W,de,he,"⇍","\\nLeftarrow",!0);P(W,de,he,"⇏","\\nRightarrow",!0);P(W,de,he,"↮","\\nleftrightarrow",!0);P(W,de,he,"⇎","\\nLeftrightarrow",!0);P(W,de,he,"△","\\vartriangle");P(W,de,ye,"ℏ","\\hslash");P(W,de,ye,"▽","\\triangledown");P(W,de,ye,"◊","\\lozenge");P(W,de,ye,"Ⓢ","\\circledS");P(W,de,ye,"®","\\circledR");P(Ge,de,ye,"®","\\circledR");P(W,de,ye,"∡","\\measuredangle",!0);P(W,de,ye,"∄","\\nexists");P(W,de,ye,"℧","\\mho");P(W,de,ye,"Ⅎ","\\Finv",!0);P(W,de,ye,"⅁","\\Game",!0);P(W,de,ye,"‵","\\backprime");P(W,de,ye,"▲","\\blacktriangle");P(W,de,ye,"▼","\\blacktriangledown");P(W,de,ye,"■","\\blacksquare");P(W,de,ye,"⧫","\\blacklozenge");P(W,de,ye,"★","\\bigstar");P(W,de,ye,"∢","\\sphericalangle",!0);P(W,de,ye,"∁","\\complement",!0);P(W,de,ye,"ð","\\eth",!0);P(Ge,ee,ye,"ð","ð");P(W,de,ye,"╱","\\diagup");P(W,de,ye,"╲","\\diagdown");P(W,de,ye,"□","\\square");P(W,de,ye,"□","\\Box");P(W,de,ye,"◊","\\Diamond");P(W,de,ye,"¥","\\yen",!0);P(Ge,de,ye,"¥","\\yen",!0);P(W,de,ye,"✓","\\checkmark",!0);P(Ge,de,ye,"✓","\\checkmark");P(W,de,ye,"ℶ","\\beth",!0);P(W,de,ye,"ℸ","\\daleth",!0);P(W,de,ye,"ℷ","\\gimel",!0);P(W,de,ye,"ϝ","\\digamma",!0);P(W,de,ye,"ϰ","\\varkappa");P(W,de,ca,"┌","\\@ulcorner",!0);P(W,de,di,"┐","\\@urcorner",!0);P(W,de,ca,"└","\\@llcorner",!0);P(W,de,di,"┘","\\@lrcorner",!0);P(W,de,he,"≦","\\leqq",!0);P(W,de,he,"⩽","\\leqslant",!0);P(W,de,he,"⪕","\\eqslantless",!0);P(W,de,he,"≲","\\lesssim",!0);P(W,de,he,"⪅","\\lessapprox",!0);P(W,de,he,"≊","\\approxeq",!0);P(W,de,ht,"⋖","\\lessdot");P(W,de,he,"⋘","\\lll",!0);P(W,de,he,"≶","\\lessgtr",!0);P(W,de,he,"⋚","\\lesseqgtr",!0);P(W,de,he,"⪋","\\lesseqqgtr",!0);P(W,de,he,"≑","\\doteqdot");P(W,de,he,"≓","\\risingdotseq",!0);P(W,de,he,"≒","\\fallingdotseq",!0);P(W,de,he,"∽","\\backsim",!0);P(W,de,he,"⋍","\\backsimeq",!0);P(W,de,he,"⫅","\\subseteqq",!0);P(W,de,he,"⋐","\\Subset",!0);P(W,de,he,"⊏","\\sqsubset",!0);P(W,de,he,"≼","\\preccurlyeq",!0);P(W,de,he,"⋞","\\curlyeqprec",!0);P(W,de,he,"≾","\\precsim",!0);P(W,de,he,"⪷","\\precapprox",!0);P(W,de,he,"⊲","\\vartriangleleft");P(W,de,he,"⊴","\\trianglelefteq");P(W,de,he,"⊨","\\vDash",!0);P(W,de,he,"⊪","\\Vvdash",!0);P(W,de,he,"⌣","\\smallsmile");P(W,de,he,"⌢","\\smallfrown");P(W,de,he,"≏","\\bumpeq",!0);P(W,de,he,"≎","\\Bumpeq",!0);P(W,de,he,"≧","\\geqq",!0);P(W,de,he,"⩾","\\geqslant",!0);P(W,de,he,"⪖","\\eqslantgtr",!0);P(W,de,he,"≳","\\gtrsim",!0);P(W,de,he,"⪆","\\gtrapprox",!0);P(W,de,ht,"⋗","\\gtrdot");P(W,de,he,"⋙","\\ggg",!0);P(W,de,he,"≷","\\gtrless",!0);P(W,de,he,"⋛","\\gtreqless",!0);P(W,de,he,"⪌","\\gtreqqless",!0);P(W,de,he,"≖","\\eqcirc",!0);P(W,de,he,"≗","\\circeq",!0);P(W,de,he,"≜","\\triangleq",!0);P(W,de,he,"∼","\\thicksim");P(W,de,he,"≈","\\thickapprox");P(W,de,he,"⫆","\\supseteqq",!0);P(W,de,he,"⋑","\\Supset",!0);P(W,de,he,"⊐","\\sqsupset",!0);P(W,de,he,"≽","\\succcurlyeq",!0);P(W,de,he,"⋟","\\curlyeqsucc",!0);P(W,de,he,"≿","\\succsim",!0);P(W,de,he,"⪸","\\succapprox",!0);P(W,de,he,"⊳","\\vartriangleright");P(W,de,he,"⊵","\\trianglerighteq");P(W,de,he,"⊩","\\Vdash",!0);P(W,de,he,"∣","\\shortmid");P(W,de,he,"∥","\\shortparallel");P(W,de,he,"≬","\\between",!0);P(W,de,he,"⋔","\\pitchfork",!0);P(W,de,he,"∝","\\varpropto");P(W,de,he,"◀","\\blacktriangleleft");P(W,de,he,"∴","\\therefore",!0);P(W,de,he,"∍","\\backepsilon");P(W,de,he,"▶","\\blacktriangleright");P(W,de,he,"∵","\\because",!0);P(W,de,he,"⋘","\\llless");P(W,de,he,"⋙","\\gggtr");P(W,de,ht,"⊲","\\lhd");P(W,de,ht,"⊳","\\rhd");P(W,de,he,"≂","\\eqsim",!0);P(W,ee,he,"⋈","\\Join");P(W,de,he,"≑","\\Doteq",!0);P(W,de,ht,"∔","\\dotplus",!0);P(W,de,ht,"∖","\\smallsetminus");P(W,de,ht,"⋒","\\Cap",!0);P(W,de,ht,"⋓","\\Cup",!0);P(W,de,ht,"⩞","\\doublebarwedge",!0);P(W,de,ht,"⊟","\\boxminus",!0);P(W,de,ht,"⊞","\\boxplus",!0);P(W,de,ht,"⋇","\\divideontimes",!0);P(W,de,ht,"⋉","\\ltimes",!0);P(W,de,ht,"⋊","\\rtimes",!0);P(W,de,ht,"⋋","\\leftthreetimes",!0);P(W,de,ht,"⋌","\\rightthreetimes",!0);P(W,de,ht,"⋏","\\curlywedge",!0);P(W,de,ht,"⋎","\\curlyvee",!0);P(W,de,ht,"⊝","\\circleddash",!0);P(W,de,ht,"⊛","\\circledast",!0);P(W,de,ht,"⋅","\\centerdot");P(W,de,ht,"⊺","\\intercal",!0);P(W,de,ht,"⋒","\\doublecap");P(W,de,ht,"⋓","\\doublecup");P(W,de,ht,"⊠","\\boxtimes",!0);P(W,de,he,"⇢","\\dashrightarrow",!0);P(W,de,he,"⇠","\\dashleftarrow",!0);P(W,de,he,"⇇","\\leftleftarrows",!0);P(W,de,he,"⇆","\\leftrightarrows",!0);P(W,de,he,"⇚","\\Lleftarrow",!0);P(W,de,he,"↞","\\twoheadleftarrow",!0);P(W,de,he,"↢","\\leftarrowtail",!0);P(W,de,he,"↫","\\looparrowleft",!0);P(W,de,he,"⇋","\\leftrightharpoons",!0);P(W,de,he,"↶","\\curvearrowleft",!0);P(W,de,he,"↺","\\circlearrowleft",!0);P(W,de,he,"↰","\\Lsh",!0);P(W,de,he,"⇈","\\upuparrows",!0);P(W,de,he,"↿","\\upharpoonleft",!0);P(W,de,he,"⇃","\\downharpoonleft",!0);P(W,ee,he,"⊶","\\origof",!0);P(W,ee,he,"⊷","\\imageof",!0);P(W,de,he,"⊸","\\multimap",!0);P(W,de,he,"↭","\\leftrightsquigarrow",!0);P(W,de,he,"⇉","\\rightrightarrows",!0);P(W,de,he,"⇄","\\rightleftarrows",!0);P(W,de,he,"↠","\\twoheadrightarrow",!0);P(W,de,he,"↣","\\rightarrowtail",!0);P(W,de,he,"↬","\\looparrowright",!0);P(W,de,he,"↷","\\curvearrowright",!0);P(W,de,he,"↻","\\circlearrowright",!0);P(W,de,he,"↱","\\Rsh",!0);P(W,de,he,"⇊","\\downdownarrows",!0);P(W,de,he,"↾","\\upharpoonright",!0);P(W,de,he,"⇂","\\downharpoonright",!0);P(W,de,he,"⇝","\\rightsquigarrow",!0);P(W,de,he,"⇝","\\leadsto");P(W,de,he,"⇛","\\Rrightarrow",!0);P(W,de,he,"↾","\\restriction");P(W,ee,ye,"‘","`");P(W,ee,ye,"$","\\$");P(Ge,ee,ye,"$","\\$");P(Ge,ee,ye,"$","\\textdollar");P(W,ee,ye,"%","\\%");P(Ge,ee,ye,"%","\\%");P(W,ee,ye,"_","\\_");P(Ge,ee,ye,"_","\\_");P(Ge,ee,ye,"_","\\textunderscore");P(W,ee,ye,"∠","\\angle",!0);P(W,ee,ye,"∞","\\infty",!0);P(W,ee,ye,"′","\\prime");P(W,ee,ye,"△","\\triangle");P(W,ee,ye,"Γ","\\Gamma",!0);P(W,ee,ye,"Δ","\\Delta",!0);P(W,ee,ye,"Θ","\\Theta",!0);P(W,ee,ye,"Λ","\\Lambda",!0);P(W,ee,ye,"Ξ","\\Xi",!0);P(W,ee,ye,"Π","\\Pi",!0);P(W,ee,ye,"Σ","\\Sigma",!0);P(W,ee,ye,"Υ","\\Upsilon",!0);P(W,ee,ye,"Φ","\\Phi",!0);P(W,ee,ye,"Ψ","\\Psi",!0);P(W,ee,ye,"Ω","\\Omega",!0);P(W,ee,ye,"A","Α");P(W,ee,ye,"B","Β");P(W,ee,ye,"E","Ε");P(W,ee,ye,"Z","Ζ");P(W,ee,ye,"H","Η");P(W,ee,ye,"I","Ι");P(W,ee,ye,"K","Κ");P(W,ee,ye,"M","Μ");P(W,ee,ye,"N","Ν");P(W,ee,ye,"O","Ο");P(W,ee,ye,"P","Ρ");P(W,ee,ye,"T","Τ");P(W,ee,ye,"X","Χ");P(W,ee,ye,"¬","\\neg",!0);P(W,ee,ye,"¬","\\lnot");P(W,ee,ye,"⊤","\\top");P(W,ee,ye,"⊥","\\bot");P(W,ee,ye,"∅","\\emptyset");P(W,de,ye,"∅","\\varnothing");P(W,ee,Ht,"α","\\alpha",!0);P(W,ee,Ht,"β","\\beta",!0);P(W,ee,Ht,"γ","\\gamma",!0);P(W,ee,Ht,"δ","\\delta",!0);P(W,ee,Ht,"ϵ","\\epsilon",!0);P(W,ee,Ht,"ζ","\\zeta",!0);P(W,ee,Ht,"η","\\eta",!0);P(W,ee,Ht,"θ","\\theta",!0);P(W,ee,Ht,"ι","\\iota",!0);P(W,ee,Ht,"κ","\\kappa",!0);P(W,ee,Ht,"λ","\\lambda",!0);P(W,ee,Ht,"μ","\\mu",!0);P(W,ee,Ht,"ν","\\nu",!0);P(W,ee,Ht,"ξ","\\xi",!0);P(W,ee,Ht,"ο","\\omicron",!0);P(W,ee,Ht,"π","\\pi",!0);P(W,ee,Ht,"ρ","\\rho",!0);P(W,ee,Ht,"σ","\\sigma",!0);P(W,ee,Ht,"τ","\\tau",!0);P(W,ee,Ht,"υ","\\upsilon",!0);P(W,ee,Ht,"ϕ","\\phi",!0);P(W,ee,Ht,"χ","\\chi",!0);P(W,ee,Ht,"ψ","\\psi",!0);P(W,ee,Ht,"ω","\\omega",!0);P(W,ee,Ht,"ε","\\varepsilon",!0);P(W,ee,Ht,"ϑ","\\vartheta",!0);P(W,ee,Ht,"ϖ","\\varpi",!0);P(W,ee,Ht,"ϱ","\\varrho",!0);P(W,ee,Ht,"ς","\\varsigma",!0);P(W,ee,Ht,"φ","\\varphi",!0);P(W,ee,ht,"∗","*",!0);P(W,ee,ht,"+","+");P(W,ee,ht,"−","-",!0);P(W,ee,ht,"⋅","\\cdot",!0);P(W,ee,ht,"∘","\\circ",!0);P(W,ee,ht,"÷","\\div",!0);P(W,ee,ht,"±","\\pm",!0);P(W,ee,ht,"×","\\times",!0);P(W,ee,ht,"∩","\\cap",!0);P(W,ee,ht,"∪","\\cup",!0);P(W,ee,ht,"∖","\\setminus",!0);P(W,ee,ht,"∧","\\land");P(W,ee,ht,"∨","\\lor");P(W,ee,ht,"∧","\\wedge",!0);P(W,ee,ht,"∨","\\vee",!0);P(W,ee,ye,"√","\\surd");P(W,ee,ca,"⟨","\\langle",!0);P(W,ee,ca,"∣","\\lvert");P(W,ee,ca,"∥","\\lVert");P(W,ee,di,"?","?");P(W,ee,di,"!","!");P(W,ee,di,"⟩","\\rangle",!0);P(W,ee,di,"∣","\\rvert");P(W,ee,di,"∥","\\rVert");P(W,ee,he,"=","=");P(W,ee,he,":",":");P(W,ee,he,"≈","\\approx",!0);P(W,ee,he,"≅","\\cong",!0);P(W,ee,he,"≥","\\ge");P(W,ee,he,"≥","\\geq",!0);P(W,ee,he,"←","\\gets");P(W,ee,he,">","\\gt",!0);P(W,ee,he,"∈","\\in",!0);P(W,ee,he,"","\\@not");P(W,ee,he,"⊂","\\subset",!0);P(W,ee,he,"⊃","\\supset",!0);P(W,ee,he,"⊆","\\subseteq",!0);P(W,ee,he,"⊇","\\supseteq",!0);P(W,de,he,"⊈","\\nsubseteq",!0);P(W,de,he,"⊉","\\nsupseteq",!0);P(W,ee,he,"⊨","\\models");P(W,ee,he,"←","\\leftarrow",!0);P(W,ee,he,"≤","\\le");P(W,ee,he,"≤","\\leq",!0);P(W,ee,he,"<","\\lt",!0);P(W,ee,he,"→","\\rightarrow",!0);P(W,ee,he,"→","\\to");P(W,de,he,"≱","\\ngeq",!0);P(W,de,he,"≰","\\nleq",!0);P(W,ee,pl," ","\\ ");P(W,ee,pl," ","\\space");P(W,ee,pl," ","\\nobreakspace");P(Ge,ee,pl," ","\\ ");P(Ge,ee,pl," "," ");P(Ge,ee,pl," ","\\space");P(Ge,ee,pl," ","\\nobreakspace");P(W,ee,pl,"","\\nobreak");P(W,ee,pl,"","\\allowbreak");P(W,ee,Lm,",",",");P(W,ee,Lm,";",";");P(W,de,ht,"⊼","\\barwedge",!0);P(W,de,ht,"⊻","\\veebar",!0);P(W,ee,ht,"⊙","\\odot",!0);P(W,ee,ht,"⊕","\\oplus",!0);P(W,ee,ht,"⊗","\\otimes",!0);P(W,ee,ye,"∂","\\partial",!0);P(W,ee,ht,"⊘","\\oslash",!0);P(W,de,ht,"⊚","\\circledcirc",!0);P(W,de,ht,"⊡","\\boxdot",!0);P(W,ee,ht,"△","\\bigtriangleup");P(W,ee,ht,"▽","\\bigtriangledown");P(W,ee,ht,"†","\\dagger");P(W,ee,ht,"⋄","\\diamond");P(W,ee,ht,"⋆","\\star");P(W,ee,ht,"◃","\\triangleleft");P(W,ee,ht,"▹","\\triangleright");P(W,ee,ca,"{","\\{");P(Ge,ee,ye,"{","\\{");P(Ge,ee,ye,"{","\\textbraceleft");P(W,ee,di,"}","\\}");P(Ge,ee,ye,"}","\\}");P(Ge,ee,ye,"}","\\textbraceright");P(W,ee,ca,"{","\\lbrace");P(W,ee,di,"}","\\rbrace");P(W,ee,ca,"[","\\lbrack",!0);P(Ge,ee,ye,"[","\\lbrack",!0);P(W,ee,di,"]","\\rbrack",!0);P(Ge,ee,ye,"]","\\rbrack",!0);P(W,ee,ca,"(","\\lparen",!0);P(W,ee,di,")","\\rparen",!0);P(Ge,ee,ye,"<","\\textless",!0);P(Ge,ee,ye,">","\\textgreater",!0);P(W,ee,ca,"⌊","\\lfloor",!0);P(W,ee,di,"⌋","\\rfloor",!0);P(W,ee,ca,"⌈","\\lceil",!0);P(W,ee,di,"⌉","\\rceil",!0);P(W,ee,ye,"\\","\\backslash");P(W,ee,ye,"∣","|");P(W,ee,ye,"∣","\\vert");P(Ge,ee,ye,"|","\\textbar",!0);P(W,ee,ye,"∥","\\|");P(W,ee,ye,"∥","\\Vert");P(Ge,ee,ye,"∥","\\textbardbl");P(Ge,ee,ye,"~","\\textasciitilde");P(Ge,ee,ye,"\\","\\textbackslash");P(Ge,ee,ye,"^","\\textasciicircum");P(W,ee,he,"↑","\\uparrow",!0);P(W,ee,he,"⇑","\\Uparrow",!0);P(W,ee,he,"↓","\\downarrow",!0);P(W,ee,he,"⇓","\\Downarrow",!0);P(W,ee,he,"↕","\\updownarrow",!0);P(W,ee,he,"⇕","\\Updownarrow",!0);P(W,ee,ss,"∐","\\coprod");P(W,ee,ss,"⋁","\\bigvee");P(W,ee,ss,"⋀","\\bigwedge");P(W,ee,ss,"⨄","\\biguplus");P(W,ee,ss,"⋂","\\bigcap");P(W,ee,ss,"⋃","\\bigcup");P(W,ee,ss,"∫","\\int");P(W,ee,ss,"∫","\\intop");P(W,ee,ss,"∬","\\iint");P(W,ee,ss,"∭","\\iiint");P(W,ee,ss,"∏","\\prod");P(W,ee,ss,"∑","\\sum");P(W,ee,ss,"⨂","\\bigotimes");P(W,ee,ss,"⨁","\\bigoplus");P(W,ee,ss,"⨀","\\bigodot");P(W,ee,ss,"∮","\\oint");P(W,ee,ss,"∯","\\oiint");P(W,ee,ss,"∰","\\oiiint");P(W,ee,ss,"⨆","\\bigsqcup");P(W,ee,ss,"∫","\\smallint");P(Ge,ee,qh,"…","\\textellipsis");P(W,ee,qh,"…","\\mathellipsis");P(Ge,ee,qh,"…","\\ldots",!0);P(W,ee,qh,"…","\\ldots",!0);P(W,ee,qh,"⋯","\\@cdots",!0);P(W,ee,qh,"⋱","\\ddots",!0);P(W,ee,ye,"⋮","\\varvdots");P(Ge,ee,ye,"⋮","\\varvdots");P(W,ee,Sr,"ˊ","\\acute");P(W,ee,Sr,"ˋ","\\grave");P(W,ee,Sr,"¨","\\ddot");P(W,ee,Sr,"~","\\tilde");P(W,ee,Sr,"ˉ","\\bar");P(W,ee,Sr,"˘","\\breve");P(W,ee,Sr,"ˇ","\\check");P(W,ee,Sr,"^","\\hat");P(W,ee,Sr,"⃗","\\vec");P(W,ee,Sr,"˙","\\dot");P(W,ee,Sr,"˚","\\mathring");P(W,ee,Ht,"","\\@imath");P(W,ee,Ht,"","\\@jmath");P(W,ee,ye,"ı","ı");P(W,ee,ye,"ȷ","ȷ");P(Ge,ee,ye,"ı","\\i",!0);P(Ge,ee,ye,"ȷ","\\j",!0);P(Ge,ee,ye,"ß","\\ss",!0);P(Ge,ee,ye,"æ","\\ae",!0);P(Ge,ee,ye,"œ","\\oe",!0);P(Ge,ee,ye,"ø","\\o",!0);P(Ge,ee,ye,"Æ","\\AE",!0);P(Ge,ee,ye,"Œ","\\OE",!0);P(Ge,ee,ye,"Ø","\\O",!0);P(Ge,ee,Sr,"ˊ","\\'");P(Ge,ee,Sr,"ˋ","\\`");P(Ge,ee,Sr,"ˆ","\\^");P(Ge,ee,Sr,"˜","\\~");P(Ge,ee,Sr,"ˉ","\\=");P(Ge,ee,Sr,"˘","\\u");P(Ge,ee,Sr,"˙","\\.");P(Ge,ee,Sr,"¸","\\c");P(Ge,ee,Sr,"˚","\\r");P(Ge,ee,Sr,"ˇ","\\v");P(Ge,ee,Sr,"¨",'\\"');P(Ge,ee,Sr,"˝","\\H");P(Ge,ee,Sr,"◯","\\textcircled");var OP={"--":!0,"---":!0,"``":!0,"''":!0};P(Ge,ee,ye,"–","--",!0);P(Ge,ee,ye,"–","\\textendash");P(Ge,ee,ye,"—","---",!0);P(Ge,ee,ye,"—","\\textemdash");P(Ge,ee,ye,"‘","`",!0);P(Ge,ee,ye,"‘","\\textquoteleft");P(Ge,ee,ye,"’","'",!0);P(Ge,ee,ye,"’","\\textquoteright");P(Ge,ee,ye,"“","``",!0);P(Ge,ee,ye,"“","\\textquotedblleft");P(Ge,ee,ye,"”","''",!0);P(Ge,ee,ye,"”","\\textquotedblright");P(W,ee,ye,"°","\\degree",!0);P(Ge,ee,ye,"°","\\degree");P(Ge,ee,ye,"°","\\textdegree",!0);P(W,ee,ye,"£","\\pounds");P(W,ee,ye,"£","\\mathsterling",!0);P(Ge,ee,ye,"£","\\pounds");P(Ge,ee,ye,"£","\\textsterling",!0);P(W,de,ye,"✠","\\maltese");P(Ge,de,ye,"✠","\\maltese");var _A='0123456789/@."';for(var Lw=0;Lw<_A.length;Lw++){var fA=_A.charAt(Lw);P(W,ee,ye,fA,fA)}var dA='0123456789!@*()-=+";:?/.,';for(var Iw=0;Iw{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 xA[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return ljn[i]}else{if(r===120485||r===120486)return xA[0];if(120486{if(Cu(e.classes)!==Cu(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},DP=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},Ke=function(n,t,r,s){var i=new Hh(n,t,r,s);return G6(i),i},Nu=(e,n,t,r)=>new Hh(e,n,t,r),wh=function(n,t,r){var s=Ke([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=nt(s.height),s.maxFontSize=1,s},djn=function(n,t,r,s){var i=new hy(n,t,r,s);return G6(i),i},ml=function(n){var t=new Fh(n);return G6(t),t},kh=function(n,t){return n instanceof Fh?Ke([],[n],t):n},hjn=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=Ke(["mspace"],[],n),r=jr(e,n);return t.style.marginRight=nt(r),t},w1=(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},C5={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"}},IP={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},$P=function(n,t){var[r,s,i]=IP[n],a=new Eu(r),o=new _l([a],{width:nt(s),height:nt(i),style:"width:"+nt(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Nu(["overlay"],[o],t);return c.height=i,c.style.height=nt(i),c.style.width=nt(s),c},Nr={number:3,unit:"mu"},d_={number:4,unit:"mu"},Pc={number:5,unit:"mu"},pjn={mord:{mop:Nr,mbin:d_,mrel:Pc,minner:Nr},mop:{mord:Nr,mop:Nr,mrel:Pc,minner:Nr},mbin:{mord:d_,mop:d_,mopen:d_,minner:d_},mrel:{mord:Pc,mop:Pc,mopen:Pc,minner:Pc},mopen:{},mclose:{mop:Nr,mbin:d_,mrel:Pc,minner:Nr},mpunct:{mord:Nr,mop:Nr,mrel:Pc,mopen:Nr,mclose:Nr,mpunct:Nr,minner:Nr},minner:{mord:Nr,mop:Nr,mbin:d_,mrel:Pc,mopen:Nr,mpunct:Nr,minner:Nr}},mjn={mord:{mop:Nr},mop:{mord:Nr,mop:Nr},mbin:{},mrel:{},mopen:{},mclose:{mop:Nr},mpunct:{},minner:{mop:Nr}},BP={},eb={},tb={};function _t(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},c=0;c{var v=k.classes[0],b=x.classes[0];v==="mbin"&&vjn.has(b)?k.classes[0]="mord":b==="mbin"&&gjn.has(v)&&(x.classes[0]="mord")},{node:_},p,m),E5(i,(x,k)=>{var v,b,w=z5(k),y=z5(x),C=w&&y?x.hasClass("mtight")?(v=mjn[w])==null?void 0:v[y]:(b=pjn[w])==null?void 0:b[y]:null;if(C)return LP(C,u)},{node:_},p,m),i},E5=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(_+1,0,p),a++})(a)}s&&n.pop()},PP=function(n){return n instanceof Fh||n instanceof hy||n instanceof Hh&&n.hasClass("enclosing")?n:null},N5=function(n,t){var r=PP(n);if(r){var s=r.children;if(s.length){if(t==="right")return N5(s[s.length-1],"right");if(t==="left")return N5(s[0],"left")}}return n},z5=function(n,t){if(!n)return null;t&&(n=N5(n,t));var r=n.classes[0];return yjn[r]||null},q0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Ke(t.concat(r))},$n=function(n,t,r){if(!n)return Ke();if(eb[n.type]){var s=eb[n.type](n,t);if(r&&t.size!==r.size){s=Ke(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Ye("Got group of unknown type: '"+n.type+"'")};function k1(e,n){var t=Ke(["base"],e,n),r=Ke(["strut"]);return r.style.height=nt(t.height+t.depth),t.depth&&(r.style.verticalAlign=nt(-t.depth)),t.children.unshift(r),t}function j5(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=ds(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(k1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(k1(a,n));var u;t?(u=k1(ds(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=Ke(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=nt(h.height+h.depth),h.depth&&(_.style.verticalAlign=nt(-h.depth))}return h}function FP(e){return new Fh(e)}class Ze{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=Cu(this.classes));for(var r=0;r0&&(n+=' class ="'+Ks(Cu(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 Ks(this.toText())}toText(){return this.text}}class HP{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",nt(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var xjn=new Set(["\\imath","\\jmath"]),wjn=new Set(["mrow","mtable"]),$a=function(n,t,r){return wr[t][n]&&wr[t][n].replace&&n.charCodeAt(0)!==55349&&!(OP.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)},V6=function(n){return n.length===1?n[0]:new Ze("mrow",n)},kjn={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"},K6=(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=kjn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(xjn.has(i))return null;if(wr[r][i]){var a=wr[r][i].replace;a&&(i=a)}var o=C5[t].fontName;return q6(i,o,r)?C5[t].variant:null};function Pw(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 la=function(n,t,r){if(n.length===1){var s=lr(n[0],t);return r&&s instanceof Ze&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Pw(a))){var u=c.children[0];u instanceof Ze&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof rs&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof rs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),i.pop())}}}i.push(c),a=c}return i},zu=function(n,t,r){return V6(la(n,t,r))},lr=function(n,t){if(!n)return new Ze("mrow");if(tb[n.type])return tb[n.type](n,t);throw new Ye("Got group of unknown type: '"+n.type+"'")};function wA(e,n,t,r,s){var i=la(e,t),a;i.length===1&&i[0]instanceof Ze&&wjn.has(i[0].type)?a=i[0]:a=new Ze("mrow",i);var o=new Ze("annotation",[new rs(n)]);o.setAttribute("encoding","application/x-tex");var c=new Ze("semantics",[a,o]),u=new Ze("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return Ke([h],[u])}var Sjn=[[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]],kA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],SA=function(n,t){return t.size<2?n:Sjn[n-1][t.size-1]};class Kc{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||Kc.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=kA[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 Kc(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:SA(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:kA[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=SA(Kc.BASESIZE,n);return this.size===t&&this.textSize===Kc.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!==Kc.BASESIZE?["sizing","reset-size"+this.size,"size"+Kc.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=ojn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Kc.BASESIZE=6;var qP=function(n){return new Kc({style:n.displayMode?Yt.DISPLAY:Yt.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},UP=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Ke(r,[n])}return n},Cjn=function(n,t,r){var s=qP(r),i;if(r.output==="mathml")return wA(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=j5(n,s);i=Ke(["katex"],[a])}else{var o=wA(n,t,s,r.displayMode,!1),c=j5(n,s);i=Ke(["katex"],[o,c])}return UP(i,r)},Ejn=function(n,t,r){var s=qP(r),i=j5(n,s),a=Ke(["katex"],[i]);return UP(a,r)},Njn={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":"="},gy=function(n){var t=new Ze("mo",[new rs(Njn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},zjn={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]},jjn=new Set(["widehat","widecheck","widetilde","utilde"]),vy=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(jjn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,_,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,_=c+"4"):(h=312,o=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][m],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var x=new Eu(_),k=new _l([x],{width:"100%",height:nt(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Nu([],[k],t),minWidth:0,height:p}}else{var v=[],b=zjn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[w,y,C]=b,N=C/1e3,z=w.length,T,j;if(z===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');T=["hide-tail"],j=[b[3]]}else if(z===2)T=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(z===3)T=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+z+" children.");for(var M=0;M0&&(s.style.minWidth=nt(i)),s},Tjn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Ke(["stretchy",t],[],i),t==="fbox"){var c=i.color&&i.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new b5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new b5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new _l(u,{width:"100%",height:nt(o)});a=Nu([],[h],i)}return a.height=o,a.style.height=nt(o),a},Ajn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Rjn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Mjn(e){return e in Ajn}function rn(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 by(e){var n=yy(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 yy(e){return e&&(e.type==="atom"||Rjn.hasOwnProperty(e.type))?e:null}var GP=e=>{if(e instanceof ra)return e;if(ijn(e)&&e.children.length===1)return GP(e.children[0])},W6=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=rn(e.base,"accent"),t=r.base,e.base=t,s=sjn($n(e,n)),e.base=r):(r=rn(e,"accent"),t=r.base);var i=$n(t,n.havingCrampedStyle()),a=r.isShifty&&hl(t),o=0;if(a){var c,u;o=(c=(u=GP(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",_=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=vy(r,n),p=Ln({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+nt(2*o)+")",marginLeft:nt(2*o)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=$P("vec",n),x=IP.vec[1]):(m=my({mode:r.mode,text:r.label},n,"textord"),m=rjn(m),m.italic=0,x=m.width,h&&(_+=m.depth)),p=Ke(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),_=i.height);var v=o;k||(v-=x/2),p.style.left=nt(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=Ln({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=Ke(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},VP=(e,n)=>{var t=e.isStretchy?gy(e.label):new Ze("mo",[$a(e.label,e.mode)]),r=new Ze("mover",[lr(e.base,n),t]);return r.setAttribute("accent","true"),r},Ojn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));_t({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=nb(n[0]),r=!Ojn.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:W6,mathmlBuilder:VP});_t({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:W6,mathmlBuilder:VP});_t({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=$n(e.base,n),r=vy(e,n),s=e.label==="\\utilde"?.12:0,i=Ln({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Ke(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=gy(e.label),r=new Ze("munder",[lr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var S1=e=>{var n=new Ze("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};_t({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=kh($n(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=kh($n(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=vy(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var h;if(a){var _=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=Ln({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else h=Ln({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Ke(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=gy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=S1(lr(e.body,n));if(e.below){var i=S1(lr(e.below,n));r=new Ze("munderover",[t,i,s])}else r=new Ze("mover",[t,s])}else if(e.below){var a=S1(lr(e.below,n));r=new Ze("munder",[t,a])}else r=S1(),r=new Ze("mover",[t,r]);return r}});function KP(e,n){var t=ds(e.body,n,!0);return Ke([e.mclass],t,n)}function WP(e,n){var t,r=la(e.body,n);return e.mclass==="minner"?t=new Ze("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ze("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ze("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}_t({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:hl(s)}},htmlBuilder:KP,mathmlBuilder:WP});var xy=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"};_t({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:xy(n[0]),body:ns(n[1]),isCharacterBox:hl(n[1])}}});_t({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=xy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ns(s)},c={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:[c],isCharacterBox:hl(c)}},htmlBuilder:KP,mathmlBuilder:WP});_t({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:xy(n[0]),body:ns(n[0])}},htmlBuilder(e,n){var t=ds(e.body,n,!0),r=Ke([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=la(e.body,n),r=new Ze("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Djn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},CA=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),EA=e=>e.type==="textord"&&e.text==="@",Ljn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function Ijn(e,n,t){var r=Djn[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]],[]),c={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[c],[])}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 $jn(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 Ye("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var x=Ijn(u,h,e),k={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(k),o=CA()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=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:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}_t({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=kh($n(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=nt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ze("mrow",[lr(e.label,n)]);return t=new Ze("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ze("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});_t({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=kh($n(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ze("mrow",[lr(e.fragment,n)])}});_t({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=rn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Ye("\\@char with invalid code point "+i);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var QP=(e,n)=>{var t=ds(e.body,n.withColor(e.color),!1);return ml(t)},XP=(e,n)=>{var t=la(e.body,n.withColor(e.color)),r=new Ze("mstyle",t);return r.setAttribute("mathcolor",e.color),r};_t({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=rn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ns(s)}},htmlBuilder:QP,mathmlBuilder:XP});_t({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=rn(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:QP,mathmlBuilder:XP});_t({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&&rn(s,"size").value}},htmlBuilder(e,n){var t=Ke(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=nt(jr(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ze("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",nt(jr(e.size,n)))),t}});var T5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},YP=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ye("Expected a control sequence",e);return n},Bjn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},ZP=(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)};_t({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(T5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=T5[r.text]),rn(n.parseFunction(),"internal");throw new Ye("Invalid token after macro prefix",r)}});_t({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 Ye("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 Ye('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Ye('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Ye("Expected a macro definition");o[i].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:i,delimiters:o},t===T5[t]),{type:"internal",mode:n.mode}}});_t({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=YP(n.gullet.popToken());n.gullet.consumeSpaces();var s=Bjn(n);return ZP(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});_t({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=YP(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return ZP(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var r0=function(n,t,r){var s=wr.math[n]&&wr.math[n].replace,i=q6(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},Q6=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Ke(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},JP=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=nt(i),n.height-=i,n.depth+=i},Pjn=function(n,t,r,s,i,a){var o=ci(n,"Main-Regular",i,s),c=Q6(o,t,s,a);return JP(c,s,t),c},Fjn=function(n,t,r,s){return ci(n,"Size"+t+"-Regular",r,s)},eF=function(n,t,r,s,i,a){var o=Fjn(n,t,i,s),c=Q6(Ke(["delimsizing","size"+t],[o],s),Yt.TEXT,s,a);return r&&JP(c,s,Yt.TEXT),c},Fw=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Ke(["delimsizinginner",s],[Ke([],[ci(n,t,r)])]);return{type:"elem",elem:i}},Hw=function(n,t,r){var s=Go["Size4-Regular"][n.charCodeAt(0)]?Go["Size4-Regular"][n.charCodeAt(0)][4]:Go["Size1-Regular"][n.charCodeAt(0)][4],i=new Eu("inner",Xzn(n,Math.round(1e3*t))),a=new _l([i],{width:nt(s),height:nt(t),style:"width:"+nt(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Nu([],[a],r);return o.height=t,o.style.height=nt(t),o.style.width=nt(s),{type:"elem",elem:o}},A5=.008,C1={type:"kern",size:-1*A5},Hjn=new Set(["|","\\lvert","\\rvert","\\vert"]),qjn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),tF=function(n,t,r,s,i,a){var o,c,u,h,_="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):Hjn.has(n)?(u="∣",_="vert",p=333):qjn.has(n)?(u="∥",_="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",_="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",_="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",_="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",_="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",_="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",_="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",_="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",_="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var x=r0(o,m,i),k=x.height+x.depth,v=r0(u,m,i),b=v.height+v.depth,w=r0(h,m,i),y=w.height+w.depth,C=0,N=1;if(c!==null){var z=r0(c,m,i);C=z.height+z.depth,N=2}var T=k+y+C,j=Math.max(0,Math.ceil((t-T)/(N*b))),M=T+j*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,$=[];if(_.length>0){var q=M-k-y,H=Math.round(M*1e3),Q=Yzn(_,Math.round(q*1e3)),V=new Eu(_,Q),J=nt(p/1e3),Z=nt(H/1e3),B=new _l([V],{width:J,height:Z,viewBox:"0 0 "+p+" "+H}),L=Nu([],[B],s);L.height=H/1e3,L.style.width=J,L.style.height=Z,$.push({type:"elem",elem:L})}else{if($.push(Fw(h,m,i)),$.push(C1),c===null){var F=M-k-y+2*A5;$.push(Hw(u,F,s))}else{var U=(M-k-y-C)/2+2*A5;$.push(Hw(u,U,s)),$.push(C1),$.push(Fw(c,m,i)),$.push(C1),$.push(Hw(u,U,s))}$.push(C1),$.push(Fw(o,m,i))}var K=s.havingBaseStyle(Yt.TEXT),ne=Ln({positionType:"bottom",positionData:I,children:$});return Q6(Ke(["delimsizing","mult"],[ne],K),Yt.TEXT,s,a)},qw=80,Uw=.08,Gw=function(n,t,r,s,i){var a=Qzn(n,s,r),o=new Eu(n,a),c=new _l([o],{width:"400em",height:nt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Nu(["hide-tail"],[c],i)},Ujn=function(n,t){var r=t.havingBaseSizing(),s=aF("\\surd",n*r.sizeMultiplier,iF,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,_;return s.type==="small"?(h=1e3+1e3*a+qw,n<1?i=1:n<1.4&&(i=.7),c=(1+a+Uw)/i,u=(1+a)/i,o=Gw("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",_=.833/i):s.type==="large"?(h=(1e3+qw)*g0[s.size],u=(g0[s.size]+a)/i,c=(g0[s.size]+a+Uw)/i,o=Gw("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",_=1/i):(c=n+a+Uw,u=n+a,h=Math.floor(1e3*n+a)+qw,o=Gw("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",_=1.056),o.height=u,o.style.height=nt(c),{span:o,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},nF=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Gjn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),rF=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),g0=[0,1.2,1.8,2.4,3],sF=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),nF.has(n)||rF.has(n))return eF(n,t,!1,r,s,i);if(Gjn.has(n))return tF(n,g0[t],!1,r,s,i);throw new Ye("Illegal delimiter: '"+n+"'")},Vjn=[{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}],Kjn=[{type:"small",style:Yt.SCRIPTSCRIPT},{type:"small",style:Yt.SCRIPT},{type:"small",style:Yt.TEXT},{type:"stack"}],iF=[{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"}],Wjn=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.")},aF=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]},R5=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;rF.has(n)?o=Vjn:nF.has(n)?o=iF:o=Kjn;var c=aF(n,t,o,s);return c.type==="small"?Pjn(n,c.style,r,s,i,a):c.type==="large"?eF(n,c.size,r,s,i,a):tF(n,t,r,s,i,a)},Vw=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),_=Math.max(h/500*c,2*h-u);return R5(n,_,!0,s,i,a)},NA={"\\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}},Qjn=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 zA(e){return"isMiddle"in e}function wy(e,n){var t=yy(e);if(t&&Qjn.has(t.text))return t;throw t?new Ye("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ye("Invalid delimiter type '"+e.type+"'",e)}_t({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=wy(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:NA[e.funcName].size,mclass:NA[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Ke([e.mclass]):sF(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push($a(e.delim,e.mode));var t=new Ze("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=nt(g0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function jA(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}_t({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 Ye("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:wy(n[0],e).text,color:t}}});_t({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=wy(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=rn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{jA(e);for(var t=ds(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{jA(e);var t=la(e.body,n);if(e.left!=="."){var r=new Ze("mo",[$a(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ze("mo",[$a(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return V6(t)}});_t({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=wy(n[0],e);if(!e.parser.leftrightDepth)throw new Ye("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=q0(n,[]):(t=sF(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?$a("|","text"):$a(e.delim,e.mode),r=new Ze("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var ky=(e,n)=>{var t=kh($n(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=hl(e.body);if(r==="sout")i=Ke(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=jr({number:.6,unit:"pt"},n),u=jr({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=nt(_/2+c);var p=Math.floor(1e3*_*s),m=Kzn(p),x=new _l([new Eu("phase",m)],{width:"400em",height:nt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Nu(["hide-tail"],[x],n),i.style.height=nt(_),a=t.depth+c+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=Tjn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=nt(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=nt(b),i.style.borderRightWidth=nt(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Ln({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];w=Ln({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:y}]})}return/cancel/.test(r)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(r)&&!o?Ke(["mord","cancel-lap"],[w],n):Ke(["mord"],[w],n)},Sy=(e,n)=>{var t,r=new Ze(e.label.includes("colorbox")?"mpadded":"menclose",[lr(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: "+nt(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};_t({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=rn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:ky,mathmlBuilder:Sy});_t({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=rn(n[0],"color-token").color,a=rn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:ky,mathmlBuilder:Sy});_t({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]}}});_t({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:ky,mathmlBuilder:Sy});_t({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:ky,mathmlBuilder:Sy});_t({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 oF={};function ic(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},c=0;c{var n=e.parser.settings;if(!n.displayMode)throw new Ye("{"+e.envName+"} can be used only in display mode.")},Xjn=new Set(["gather","gather*"]);function X6(e){if(!e.includes("ed"))return!e.includes("*")}function Lu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,maxNumCols:_,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 Ye("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],k=[x],v=[],b=[],w=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new ea("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(TA(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:N};t&&(z={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[z]}),x.push(z);var T=e.fetch().text;if(T==="&"){if(_&&x.length===_){if(u||o)throw new Ye("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(T==="\\end"){C(),x.length===1&&z.type==="styling"&&z.body.length===1&&z.body[0].type==="ordgroup"&&z.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Pe[rt]})}for(C(a[0]),r=0;r0&&(I+=w,TPe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var le,fe;oe=(le=(fe=K)==null?void 0:fe.pregap)!=null?le:p,oe!==0&&(Q=Ke(["arraycolsep"],[]),Q.style.width=nt(oe),H.push(Q))}var me=[];for(r=0;r0){for(var wt=wh("hline",t,h),Pt=wh("hdashline",t,h),dt=[{type:"elem",elem:ot,shift:0}];u.length>0;){var ft=u.pop(),Le=ft.pos-$;ft.isDashed?dt.push({type:"elem",elem:Pt,shift:Le}):dt.push({type:"elem",elem:wt,shift:Le})}ot=Ln({positionType:"individualShift",children:dt})}if(J.length===0)return Ke(["mord"],[ot],t);var ge=Ln({positionType:"individualShift",children:J}),Te=Ke(["tag"],[ge],t);return ml([ot,Te])},Yjn={c:"center ",l:"left ",r:"right "},oc=function(n,t){for(var r=[],s=new Ze("mtd",[],["mtr-glue"]),i=new Ze("mtd",[],["mml-eqn-num"]),a=0;a0){var x=n.cols,k="",v=!1,b=0,w=x.length;x[0].type==="separator"&&(p+="top ",b=1),x[x.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var D=1;D0&&m&&(v=1),r[x]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};ic({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=yy(n[0]),r=t?[n[0]]:rn(n[0],"ordgroup").body,s=r.map(function(a){var o=by(a),c=o.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new Ye("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Lu(e.parser,i,Y6(e.envName))},htmlBuilder:ac,mathmlBuilder:oc});ic({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 Ye("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=Lu(e.parser,r,Y6(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:ac,mathmlBuilder:oc});ic({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Lu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=yy(n[0]),r=t?[n[0]]:rn(n[0],"ordgroup").body,s=r.map(function(o){var c=by(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Ye("Unknown column alignment: "+u,o)});if(s.length>1)throw new Ye("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=Lu(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ye("{subarray} can contain only one column");return a},htmlBuilder:ac,mathmlBuilder:oc});ic({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=Lu(e.parser,n,Y6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:lF,htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Xjn.has(e.envName)&&Cy(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:X6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Lu(e.parser,n,"display")},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:lF,htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Cy(e);var n={autoTag:X6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Lu(e.parser,n,"display")},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Cy(e),$jn(e.parser)},htmlBuilder:ac,mathmlBuilder:oc});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");_t({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ye(e.funcName+" valid only within array environment")}});var AA=oF;_t({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 Ye("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return $n(e.body,r)},_F=(e,n)=>{var t=e.font,r=n.withFont(t);return lr(e.body,r)},RA={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};_t({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=nb(n[0]),i=r;return i in RA&&(i=RA[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:uF,mathmlBuilder:_F});_t({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:xy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:hl(r)}}});_t({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:uF,mathmlBuilder:_F});var Zjn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=$n(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?x=3*p:x=7*p,k=n.fontMetrics().denom1):(_>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),k=n.fontMetrics().denom2);var v;if(h){var w=n.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new Ze("mfrac",[lr(e.numer,n),lr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=jr(e.barSize,n);t.setAttribute("linethickness",nt(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Ze("mo",[new rs(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Ze("mo",[new rs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return V6(s)}return t},fF=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};_t({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,c=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="(",c=")";break;case"\\\\bracefrac":a=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),fF({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:Zjn,mathmlBuilder:Jjn});_t({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 MA=["display","text","script","scriptscript"],OA=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};_t({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=nb(n[0]),a=i.type==="atom"&&i.family==="open"?OA(i.text):null,o=nb(n[1]),c=o.type==="atom"&&o.family==="close"?OA(o.text):null,u=rn(n[2],"size"),h,_=null;u.isBlank?h=!0:(_=u.value,h=_.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=rn(m.body[0],"textord");p=MA[Number(x.text)]}}else m=rn(m,"textord"),p=MA[Number(m.text)];return fF({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:_,leftDelim:a,rightDelim:c},p)}});_t({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:rn(n[0],"size").value,token:s}}});_t({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=rn(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 dF=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?$n(e.sup,n.havingStyle(t.sup()),n):$n(e.sub,n.havingStyle(t.sub()),n),s=rn(e.base,"horizBrace")):s=rn(e,"horizBrace");var i=$n(s.base,n.havingBaseStyle(Yt.DISPLAY)),a=vy(s,n),o;if(s.isOver?o=Ln({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Ln({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 c=Ke(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=Ln({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Ln({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Ke(["minner",s.isOver?"mover":"munder"],[o],n)},eTn=(e,n)=>{var t=gy(e.label);return new Ze(e.isOver?"mover":"munder",[lr(e.base,n),t])};_t({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:dF,mathmlBuilder:eTn});_t({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=rn(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=ds(e.body,n,!1);return djn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=zu(e.body,n);return t instanceof Ze||(t=new Ze("mrow",[t])),t.setAttribute("href",e.href),t}});_t({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=rn(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=rn(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,c={};switch(r){case"\\htmlClass":c.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),h=0;h{var t=ds(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Ke(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)=>zu(e.body,n)});_t({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=ds(e.html,n,!1);return ml(t)},mathmlBuilder:(e,n)=>zu(e.mathml,n)});var Kw=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 Ye("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!TP(r))throw new Ye("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};_t({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 c=rn(t[0],"raw").string,u=c.split(","),h=0;h{var t=jr(e.height,n),r=0;e.totalheight.number>0&&(r=jr(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=jr(e.width,n));var i={height:nt(t+r)};s>0&&(i.width=nt(s)),r>0&&(i.verticalAlign=nt(-r));var a=new tjn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Ze("mglyph",[]);t.setAttribute("alt",e.alt);var r=jr(e.height,n),s=0;if(e.totalheight.number>0&&(s=jr(e.totalheight,n)-r,t.setAttribute("valign",nt(-s))),t.setAttribute("height",nt(r+s)),e.width.number>0){var i=jr(e.width,n);t.setAttribute("width",nt(i))}return t.setAttribute("src",e.src),t}});_t({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=rn(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 LP(e.dimension,n)},mathmlBuilder(e,n){var t=jr(e.dimension,n);return new HP(t)}});_t({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=Ke([],[$n(e.body,n)]),t=Ke(["inner"],[t],n)):t=Ke(["inner"],[$n(e.body,n)]);var r=Ke(["fix"],[]),s=Ke([e.alignment],[t,r],n),i=Ke(["strut"]);return i.style.height=nt(s.height+s.depth),s.depth&&(i.style.verticalAlign=nt(-s.depth)),s.children.unshift(i),s=Ke(["thinbox"],[s],n),Ke(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ze("mpadded",[lr(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}});_t({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}}});_t({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ye("Mismatched "+e.funcName)}});var DA=(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}};_t({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=DA(e,n),r=ds(t,n,!1);return ml(r)},mathmlBuilder:(e,n)=>{var t=DA(e,n);return zu(t,n)}});var hF=(e,n,t,r,s,i,a)=>{e=Ke([],[e]);var o=t&&hl(t),c,u;if(n){var h=$n(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var _=$n(t,r.havingStyle(s.sub()),r);c={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=Ln({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:nt(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:nt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var x=e.height-a;p=Ln({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:nt(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=Ln({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:nt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=Ke(["mspace"],[],r);b.style.marginRight=nt(i),v.unshift(b)}return Ke(["mop","op-limits"],v,r)},pF=new Set(["\\smallint"]),Uh=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=rn(e.base,"op"),s=!0):i=rn(e,"op");var a=n.style,o=!1;a.size===Yt.DISPLAY.size&&i.symbol&&!pF.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=o?"Size2-Regular":"Size1-Regular",_="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(_=i.name.slice(1),i.name=_==="oiint"?"\\iint":"\\iiint"),c=ci(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,_.length>0){var p=$P(_+"Size"+(o?"2":"1"),n);c=Ln({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(i.body){var m=ds(i.body,n,!0);m.length===1&&m[0]instanceof ra?(c=m[0],c.classes[0]="mop"):c=Ke(["mop"],m,n)}else{for(var x=[],k=1;k{var t;if(e.symbol)t=new Ze("mo",[$a(e.name,e.mode)]),pF.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ze("mo",la(e.body,n));else{t=new Ze("mi",[new rs(e.name.slice(1))]);var r=new Ze("mo",[$a("⁡","text")]);e.parentIsSupSub?t=new Ze("mrow",[t,r]):t=FP([t,r])}return t},tTn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};_t({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=tTn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Uh,mathmlBuilder:Im});_t({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:Uh,mathmlBuilder:Im});var nTn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};_t({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:Uh,mathmlBuilder:Im});_t({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:Uh,mathmlBuilder:Im});_t({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=nTn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Uh,mathmlBuilder:Im});var mF=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=rn(e.base,"operatorname"),s=!0):i=rn(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=ds(o,n.withFont("mathrm"),!0),u=0;u{for(var t=la(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new rs(o)]}var c=new Ze("mi",t);c.setAttribute("mathvariant","normal");var u=new Ze("mo",[$a("⁡","text")]);return e.parentIsSupSub?new Ze("mrow",[c,u]):FP([c,u])};_t({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:mF,mathmlBuilder:rTn});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?ml(ds(e.body,n,!1)):Ke(["mord"],ds(e.body,n,!0),n)},mathmlBuilder(e,n){return zu(e.body,n,!0)}});_t({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=$n(e.body,n.havingCrampedStyle()),r=wh("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Ln({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Ke(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Ze("mo",[new rs("‾")]);t.setAttribute("stretchy","true");var r=new Ze("mover",[lr(e.body,n),t]);return r.setAttribute("accent","true"),r}});_t({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=ds(e.body,n.withPhantom(),!1);return ml(t)},mathmlBuilder:(e,n)=>{var t=la(e.body,n);return new Ze("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");_t({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=Ke(["inner"],[$n(e.body,n.withPhantom())]),r=Ke(["fix"],[]);return Ke(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=la(ns(e.body),n),r=new Ze("mphantom",t),s=new Ze("mpadded",[r]);return s.setAttribute("width","0px"),s}});_t({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=rn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=$n(e.body,n),r=jr(e.dy,n);return Ln({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ze("mpadded",[lr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});_t({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});_t({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=rn(n[0],"size"),a=rn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&rn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Ke(["mord","rule"],[],n),r=jr(e.width,n),s=jr(e.height,n),i=e.shift?jr(e.shift,n):0;return t.style.borderRightWidth=nt(r),t.style.borderTopWidth=nt(s),t.style.bottom=nt(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=jr(e.width,n),r=jr(e.height,n),s=e.shift?jr(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Ze("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",nt(t)),a.setAttribute("height",nt(r));var o=new Ze("mpadded",[a]);return s>=0?o.setAttribute("height",nt(s)):(o.setAttribute("height",nt(s)),o.setAttribute("depth",nt(-s))),o.setAttribute("voffset",nt(s)),o}});function gF(e,n,t){for(var r=ds(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return gF(e.body,t,n)};_t({type:"sizing",names:LA,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:LA.indexOf(r)+1,body:i}},htmlBuilder:sTn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=la(e.body,t),s=new Ze("mstyle",r);return s.setAttribute("mathsize",nt(t.sizeMultiplier)),s}});_t({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]&&rn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Ke([],[$n(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 Ke(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ze("mpadded",[lr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});_t({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=$n(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=kh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=nt(h);var m=Ln({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(Yt.SCRIPTSCRIPT),k=$n(e.index,x,n),v=.6*(m.height-m.depth),b=Ln({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),w=Ke(["root"],[b]);return Ke(["mord","sqrt"],[w,m],n)}else return Ke(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ze("mroot",[lr(t,n),lr(r,n)]):new Ze("msqrt",[lr(t,n)])}});var M5={display:Yt.DISPLAY,text:Yt.TEXT,script:Yt.SCRIPT,scriptscript:Yt.SCRIPTSCRIPT};function iTn(e){return e in M5}_t({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(!iTn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=M5[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),gF(e.body,r,n)},mathmlBuilder(e,n){var t=M5[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=la(e.body,r),i=new Ze("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 aTn=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?Uh:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===Yt.DISPLAY.size||r.limits);return i?mF:null}else{if(r.type==="accent")return hl(r.base)?W6:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?dF:null}else return null}else return null};kf({type:"supsub",htmlBuilder(e,n){var t=aTn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=$n(r,n),o,c,u=n.fontMetrics(),h=0,_=0,p=r&&hl(r);if(s){var m=n.havingStyle(n.style.sup());o=$n(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());c=$n(i,x,n),p||(_=a.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var k;n.style===Yt.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=nt(.5/u.ptPerEm/v),w=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof ra||y){var C;w=nt(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var z=u.defaultRuleThickness,T=4*z;if(h-o.depth-(c.height-_)0&&(h+=j,_-=j)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-h,marginRight:b}];N=Ln({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var D=[{type:"elem",elem:c,marginLeft:w,marginRight:b}];N=Ln({positionType:"shift",positionData:_,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=Ln({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=z5(a,"right")||"mord";return Ke([I],[a,Ke(["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=[lr(e.base,n)];e.sub&&i.push(lr(e.sub,n)),e.sup&&i.push(lr(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===Yt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===Yt.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===Yt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===Yt.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===Yt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===Yt.DISPLAY)?a="mover":a="msup"}return new Ze(a,i)}});kf({type:"atom",htmlBuilder(e,n){return U6(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ze("mo",[$a(e.text,e.mode)]);if(e.family==="bin"){var r=K6(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 vF={mi:"italic",mn:"normal",mtext:"normal"};kf({type:"mathord",htmlBuilder(e,n){return my(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ze("mi",[$a(e.text,e.mode,n)]),r=K6(e,n)||"italic";return r!==vF[t.type]&&t.setAttribute("mathvariant",r),t}});kf({type:"textord",htmlBuilder(e,n){return my(e,n,"textord")},mathmlBuilder(e,n){var t=$a(e.text,e.mode,n),r=K6(e,n)||"normal",s;return e.mode==="text"?s=new Ze("mtext",[t]):/[0-9]/.test(e.text)?s=new Ze("mn",[t]):e.text==="\\prime"?s=new Ze("mo",[t]):s=new Ze("mi",[t]),r!==vF[s.type]&&s.setAttribute("mathvariant",r),s}});var Ww={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Qw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kf({type:"spacing",htmlBuilder(e,n){if(Qw.hasOwnProperty(e.text)){var t=Qw[e.text].className||"";if(e.mode==="text"){var r=my(e,n,"textord");return r.classes.push(t),r}else return Ke(["mspace",t],[U6(e.text,e.mode,n)],n)}else{if(Ww.hasOwnProperty(e.text))return Ke(["mspace",Ww[e.text]],[],n);throw new Ye('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Qw.hasOwnProperty(e.text))t=new Ze("mtext",[new rs(" ")]);else{if(Ww.hasOwnProperty(e.text))return new Ze("mspace");throw new Ye('Unknown type of space "'+e.text+'"')}return t}});var IA=()=>{var e=new Ze("mtd",[]);return e.setAttribute("width","50%"),e};kf({type:"tag",mathmlBuilder(e,n){var t=new Ze("mtable",[new Ze("mtr",[IA(),new Ze("mtd",[zu(e.body,n)]),IA(),new Ze("mtd",[zu(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var $A={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},BA={"\\textbf":"textbf","\\textmd":"textmd"},oTn={"\\textit":"textit","\\textup":"textup"},PA=(e,n)=>{var t=e.font;if(t){if($A[t])return n.withTextFontFamily($A[t]);if(BA[t])return n.withTextFontWeight(BA[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(oTn[t])};_t({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=PA(e,n),r=ds(e.body,t,!0);return Ke(["mord","text"],r,t)},mathmlBuilder(e,n){var t=PA(e,n);return zu(e.body,t)}});_t({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=$n(e.body,n),r=wh("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Ln({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Ke(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Ze("mo",[new rs("‾")]);t.setAttribute("stretchy","true");var r=new Ze("munder",[lr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});_t({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=$n(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return Ln({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ze("mpadded",[lr(e.body,n)],["vcenter"]);return new Ze("mrow",[t])}});_t({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ye("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=FA(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),gu=BP,bF=`[ \r - ]`,cTn="\\\\[a-zA-Z@]+",lTn="\\\\[^\uD800-\uDFFF]",uTn="("+cTn+")"+bF+"*",_Tn=`\\\\( -|[ \r ]+ -?)[ \r ]*`,O5="[̀-ͯ]",fTn=new RegExp(O5+"+$"),dTn="("+bF+"+)|"+(_Tn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(O5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(O5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+uTn)+("|"+lTn+")");class HA{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(dTn,"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 ea("EOF",new zi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ye("Unexpected character: '"+n[t]+"'",new ea(n[t],new zi(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 ea(s,new zi(this,t,this.tokenRegex.lastIndex))}}class hTn{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 Ye("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 pTn=cF;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 qA={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 Ye("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=qA[n.text],r==null||r>=t)throw new Ye("Invalid base-"+t+" digit "+n.text);for(var s;(s=qA[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ye("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Ye("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Ye("\\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 c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Ye("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ie("\\newcommand",e=>Z6(e,!1,!0,!1));ie("\\renewcommand",e=>Z6(e,!0,!1,!1));ie("\\providecommand",e=>Z6(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),gu[t],wr.math[t],wr.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 UA={",":"\\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"},mTn=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in UA?n=UA[t]:(t.slice(0,4)==="\\not"||t in wr.math&&mTn.has(wr.math[t].group))&&(n="\\dotsb"),n});var J6={")":!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 J6?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in J6&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in J6?"\\@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 Ye("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 yF=nt(Go["Main-Regular"][84][1]-.7*Go["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+yF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+yF+"}{\\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 xF=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 c=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=_;if(!_&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var u=n.consumeArg().tokens,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ie("\\bra@ket",xF(!1));ie("\\bra@set",xF(!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 wF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gTn{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 hTn(pTn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new HA(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 ea("EOF",r.loc)),this.pushTokens(s),new ea("",zi.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 Ye("Extra }",i)}else if(i.text==="EOF")throw new Ye("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 Ye("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ye("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 Ye("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 c=i[o];if(c.text==="#"){if(o===0)throw new Ye("Incomplete placeholder at end of macro body",c);if(c=i[--o],c.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(c.text))i.splice(o,2,...a[+c.text-1]);else throw new Ye("Not a valid argument number",c)}}}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 ea(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 HA(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||gu.hasOwnProperty(n)||wr.math.hasOwnProperty(n)||wr.text.hasOwnProperty(n)||wF.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:gu.hasOwnProperty(n)&&!gu[n].primitive}}var GA=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,E1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Xw={"́":{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"}},VA={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ey{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 gTn(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 Ye("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 ea("}")),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(Ey.endOfExpression.has(s.text)||t&&s.text===t||n&&gu[s.text]&&gu[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&&(jP(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:zi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:z}:void 0),z===!1?p.lastIndex=C+1:(x!==C&&w.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(z)?w.push(...z):z&&w.push(z),x=C+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=WA(e,"(");let i=WA(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 EF(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ef(t)||cy(t))&&(!n||t!==47)}NF.peek=XTn;function HTn(){this.buffer()}function qTn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function UTn(){this.buffer()}function GTn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VTn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ao(this.sliceSerialize(e)).toLowerCase(),t.label=n}function KTn(e){this.exit(e)}function WTn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ao(this.sliceSerialize(e)).toLowerCase(),t.label=n}function QTn(e){this.exit(e)}function XTn(){return"["}function NF(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 YTn(){return{enter:{gfmFootnoteCallString:HTn,gfmFootnoteCall:qTn,gfmFootnoteDefinitionLabelString:UTn,gfmFootnoteDefinition:GTn},exit:{gfmFootnoteCallString:VTn,gfmFootnoteCall:KTn,gfmFootnoteDefinitionLabelString:WTn,gfmFootnoteDefinition:QTn}}}function ZTn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:NF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?zF:JTn))),u(),c}}function JTn(e,n,t){return n===0?e:zF(e,n,t)}function zF(e,n,t){return(t?"":" ")+e}const eAn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jF.peek=iAn;function tAn(){return{canContainEols:["delete"],enter:{strikethrough:rAn},exit:{strikethrough:sAn}}}function nAn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eAn}],handlers:{delete:jF}}}function rAn(e){this.enter({type:"delete",children:[]},e)}function sAn(e){this.exit(e)}function jF(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 iAn(){return"~"}function aAn(e){return e.length}function oAn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||aAn,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=y)}k.push(w)}a[h]=k,o[h]=v}let _=-1;if(typeof r=="object"&&"length"in r)for(;++_c[_]&&(c[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),o.splice(1,0,m),h=-1;const x=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),uAn);return s(),a}function uAn(e,n,t){return">"+(t?"":" ")+e}function _An(e,n){return XA(e,n.inConstruct,!0)&&!XA(e,n.notInConstruct,!1)}function XA(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 fAn(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 dAn(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 hAn(e,n,t,r){const s=dAn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(fAn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(i,pAn);return _(),p}const o=t.createTracker(r),c=s.repeat(Math.max(TF(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const _=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` -`,encode:["`"],...o.current()})),_()}return h+=o.move(` -`),i&&(h+=o.move(i+` -`)),h+=o.move(c),u(),h}function pAn(e,n,t){return(t?"":" ")+e}function nC(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 mAn(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":` -`,...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function gAn(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 U0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function rb(e,n,t){const r=yh(e),s=yh(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}}AF.peek=vAn;function AF(e,n,t,r){const s=gAn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),h=rb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=U0(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=rb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+U0(_));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function vAn(e,n,t){return t.options.emphasis||"*"}function bAn(e,n){let t=!1;return A6(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,o5}),!!((!e.depth||e.depth<3)&&L6(e)&&(n.options.setext||t))}function yAn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(bAn(e,t)){const h=t.enter("headingSetext"),_=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` -`,after:` -`});return _(),h(),p+` -`+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` -`))+1))}const a="#".repeat(s),o=t.enter("headingAtx"),c=t.enter("phrasing");i.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` -`,...i.current()});return/^[\t ]/.test(u)&&(u=U0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}RF.peek=xAn;function RF(e){return e.value||""}function xAn(){return"<"}MF.peek=wAn;function MF(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function wAn(){return"!"}OF.peek=kAn;function OF(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const u=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function kAn(){return"!"}DF.peek=SAn;function DF(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))}IF.peek=CAn;function IF(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(LF(e,t)){const h=t.stack;t.stack=[],o=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),o(),t.stack=h,_}o=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=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),c()),u+=a.move(")"),o(),u}function CAn(e,n,t){return LF(e,t)?"<":"["}$F.peek=EAn;function $F(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function EAn(){return"["}function rC(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 NAn(e){const n=rC(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 zAn(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 BF(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 jAn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?zAn(t):rC(t);const o=e.ordered?a==="."?")":".":NAn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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&&(c=!0),BF(t)===a&&h){let _=-1;for(;++_-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 c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),h);return c(),u;function h(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?i:i+" ".repeat(a-i.length))+_}}function RAn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const MAn=Mm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OAn(e,n,t,r){return(e.children.some(function(a){return MAn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function DAn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}PF.peek=LAn;function PF(e,n,t,r){const s=DAn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),h=rb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=U0(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=rb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+U0(_));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function LAn(e,n,t){return t.options.strong||"*"}function IAn(e,n,t,r){return t.safe(e.value,r)}function $An(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 BAn(e,n,t){const r=(BF(t)+(t.options.ruleSpaces?" ":"")).repeat($An(t));return t.options.ruleSpaces?r.slice(0,-1):r}const FF={blockquote:lAn,break:YA,code:hAn,definition:mAn,emphasis:AF,hardBreak:YA,heading:yAn,html:RF,image:MF,imageReference:OF,inlineCode:DF,link:IF,linkReference:$F,list:jAn,listItem:AAn,paragraph:RAn,root:OAn,strong:PF,text:IAn,thematicBreak:BAn};function PAn(){return{enter:{table:FAn,tableData:ZA,tableHeader:ZA,tableRow:qAn},exit:{codeText:UAn,table:HAn,tableData:e4,tableHeader:e4,tableRow:e4}}}function FAn(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 HAn(e){this.exit(e),this.data.inTable=void 0}function qAn(e){this.enter({type:"tableRow",children:[]},e)}function e4(e){this.exit(e)}function ZA(e){this.enter({type:"tableCell",children:[]},e)}function UAn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,GAn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function GAn(e,n){return n==="|"?n:e}function VAn(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:c,tableRow:o}};function a(m,x,k,v){return u(h(m,k,v),m.align)}function o(m,x,k,v){const b=_(m,k,v),w=u([b]);return w.slice(0,w.indexOf(` -`))}function c(m,x,k,v){const b=k.enter("tableCell"),w=k.enter("phrasing"),y=k.containerPhrasing(m,{...v,before:i,after:i});return w(),b(),y}function u(m,x){return oAn(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function h(m,x,k){const v=m.children;let b=-1;const w=[],y=x.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const uRn={tokenize:vRn,partial:!0};function _Rn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pRn,continuation:{tokenize:mRn},exit:gRn}},text:{91:{name:"gfmFootnoteCall",tokenize:hRn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fRn,resolveTo:dRn}}}}function fRn(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return t(c);const u=ao(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function dRn(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 hRn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(i>999||_===93&&!a||_===null||_===91||cr(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(ao(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(_)}return cr(_)||(a=!0),i++,e.consume(_),_===92?h:u}function h(_){return _===91||_===92||_===93?(e.consume(_),i++,u):u(_)}}function pRn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(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",h):t(x)}function h(x){if(a>999||x===93&&!o||x===null||x===91||cr(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=ao(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return cr(x)||(o=!0),a++,e.consume(x),x===92?_:h}function _(x){return x===91||x===92||x===93?(e.consume(x),a++,h):h(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 mRn(e,n,t){return e.check(Dm,n,e.attempt(uRn,n,t))}function gRn(e){e.exit("gfmFootnoteDefinition")}function vRn(e,n,t){const r=this;return dn(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 bRn(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 c=-1;for(;++c1?c(x):(a.consume(x),_++,m);if(_<2&&!t)return c(x);const v=a.exit("strikethroughSequenceTemporary"),b=yh(x);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(x)}}}class yRn{constructor(){this.map=[]}add(n,t,r){xRn(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 xRn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const H=r.events[I][1].type;if(H==="lineEnding"||H==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,q=$==="tableHead"||$==="tableRow"?z:c;return q===z&&r.parser.lazy[r.now().line]?t(D):q(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Nt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):gn(D)?dn(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),_(D)))}function _(D){return D===null||D===124||cr(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?p:_)}function p(D){return D===92||D===124?(e.consume(D),_):_(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(D):(e.enter("tableDelimiterRow"),a=!1,gn(D)?dn(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):x(D))}function x(D){return D===45||D===58?v(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):N(D)}function k(D){return gn(D)?dn(e,v,"whitespace")(D):v(D)}function v(D){return D===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),b):D===45?(i+=1,b(D)):D===null||Nt(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),w(D)):N(D)}function w(D){return D===45?(e.consume(D),w):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(D))}function y(D){return gn(D)?dn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?x(D):D===null||Nt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function z(D){return e.enter("tableRow"),T(D)}function T(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),T):D===null||Nt(D)?(e.exit("tableRow"),n(D)):gn(D)?dn(e,T,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||cr(D)?(e.exit("data"),T(D)):(e.consume(D),D===92?M:j)}function M(D){return D===92||D===124?(e.consume(D),j):j(D)}}function CRn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,h,_;const p=new yRn;for(;++tt[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",_,n]])}return s!==void 0&&(i.end=Object.assign({},Sd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function eR(e,n,t,r,s){const i=[],a=Sd(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 Sd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const ERn={name:"tasklistCheck",tokenize:zRn};function NRn(){return{text:{91:ERn}}}function zRn(e,n,t){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return cr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return Nt(c)?n(c):gn(c)?e.check({tokenize:jRn},n,t)(c):t(c)}}function jRn(e,n,t){return dn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function TRn(e){return sP([tRn(),_Rn(),bRn(e),kRn(),NRn()])}const ARn={};function XF(e){const n=this,t=e||ARn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(TRn(t)),i.push(YAn()),a.push(ZAn(t))}function RRn(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(c){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]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const _=h.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.data.hChildren.push({type:"text",value:u})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function MRn(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,c){const u=i.value||"",h=o.createTracker(c),_="$".repeat(Math.max(TF(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(_);if(i.meta){const x=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` -`,before:m,encode:["$"],...h.current()})),x()}return m+=h.move(` -`),u&&(m+=h.move(u+` -`)),m+=h.move(_),p(),m}function r(i,a,o){let c=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const h="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function L5(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 c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!c)break;r+=c[0].length,t+=c[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 URn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||G0(e,n)||Sh(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=L5(i);return a.indentation<=3&&r+a.offset===n}function GRn(e,n){const t=e[n],r=Sh(e,n,t),s=e.lastIndexOf(` -`,n-1)+1,i=e.indexOf(` -`,n),a=L5(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&&_.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function VRn(e,n,t){const r=Sh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function WRn(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 XRn(e,{predictMath:n=!1}={}){const t=WRn(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}`)),XRn(t,n)}function JF(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 JRn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function $r(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=JRn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const eH=A.createContext(void 0);function tH({projectId:e,sessionId:n,children:t}){const r=A.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=jB(s);return a?(a.source==="absolute"?IL(a.path):a.source==="artifact"&&!i?W_(e,a.path):g3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return f.jsx(eH,{value:r,children:t})}function eMn({src:e,alt:n,name:t,onClose:r}){const s=A.useRef(null),i=A.useRef(null),[a,o]=A.useState(1),[c,u]=A.useState({width:0,height:0}),[h,_]=A.useState({width:0,height:0});A.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const x=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return x&&k.observe(x),()=>{k.disconnect(),m==null||m.close()}},[]);const p=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return oa.createPortal(f.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||kD(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[f.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:f.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:f.jsx("img",{src:e,alt:n,onLoad:m=>_({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),f.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[f.jsx(Cm,{shape:"circle",href:e,download:t||!0,"aria-label":Ev(),title:Ev(),className:"bg-background shadow-popover",children:f.jsx(fS,{size:16})}),f.jsx(Bt,{shape:"circle",onClick:r,"aria-label":p3(),title:p3(),className:"bg-background shadow-popover",children:f.jsx(or,{size:16})})]}),f.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&f.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),f.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[f.jsx(Bt,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":UN(),title:UN(),children:f.jsx(l4n,{size:16})}),f.jsxs(De,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:GN(),"aria-label":GN(),children:[Math.round(a*100),"%"]}),f.jsx(Bt,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":qN(),title:qN(),children:f.jsx(Dh,{size:16})})]})]})]}),document.body)}function tMn({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=A.useState(!1),[o,c]=A.useState(!1),u=i&&n?n:e;return f.jsxs(f.Fragment,{children:[f.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&f.jsx(eMn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const nMn=1e5;function rMn({code:e,lang:n}){const[t,r]=A.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return f.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[f.jsx(Bt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:Vk(),"aria-label":YJe(),onClick:s,children:t?f.jsx(Xi,{size:13}):f.jsx(Oh,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:ekn(e,n,nMn)})})]})}function sMn(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 sR(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(),c=sMn(a[2]??"");if(!c[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:n4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:n4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(snH(e)}function aMn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");t.properties[s]=s==="src"&&t.tagName==="img"&&k6(i)?i:wP(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function aR({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 f.jsxs("button",{className:"file-chip",title:r?$Y({path:Ne(e)}):e,...$r(o=>r==null?void 0:r(e,i,t,void 0,o)),disabled:!r,children:[f.jsx(OI,{size:12}),f.jsx("span",{className:"file-chip-label",children:a}),f.jsx(FI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function oMn({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?_Z({id:Ne(e)}):fJ({id:Ne(e)}),...$r(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(gS,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||TL()}),f.jsx(FI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const rH={singleDollarTextMath:!0},cMn=_y().use(dy).use(XF).use(YF,rH).use(qRn).use(iMn).use(Xv).use(aMn).use(CF);function lMn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const sH={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 f.jsx("code",{className:s,...r,children:t});const c=i?F3(i[1]):null;return f.jsx(rMn,{code:a,lang:c})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})};function uMn({children:e}){return f.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const Jo=A.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){hf();const o=A.useContext(eH),c=i??o,u=A.useMemo(()=>({"file-mention":h=>f.jsx(aR,{path:h.path,lines:h.lines,exp:h.exp,onOpenFile:t}),"run-mention":h=>f.jsx(oMn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:_,children:p,"data-figure-src":m,...x})=>{const k=typeof m=="string"?jB(m):null;if(k&&t){const v=k.source==="artifact"?`artifacts/${k.path}`:k.path,b=s?s(v):v;if(b)return f.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...$r(w=>t(b,void 0,void 0,void 0,w)),children:p})}if(_&&lMn(_)&&t){let v;try{v=decodeURI(_)}catch{return f.jsx("span",{children:p})}const b=s?s(v):v;return b?f.jsx(aR,{path:b,onOpenFile:t}):f.jsx("span",{children:p})}return f.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",...x,children:p})},figure:({children:h})=>f.jsx(uMn,{children:h}),figcaption:({children:h})=>f.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,..._})=>f.jsx("th",{dir:"auto",..._}),td:({node:h,..._})=>f.jsx("td",{dir:"auto",..._}),img:({node:h,src:_,alt:p,className:m,...x})=>{var v;if(!_||typeof _!="string")return null;const k=c?c(_):_;return k?A.createElement(tMn,{...x,key:k,downloadName:(v=_.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(_,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...sH}),[t,r,s,i,o,c]);return f.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:f.jsx(WNn,{content:JF(n,{predictMath:a}),processor:cMn,components:u,predict:a})})}),oR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function _Mn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=A.useState(!1),u=A.useRef(null),[h,_]=A.useState(!1),[p,m]=A.useState(""),x=A.useRef(null);A.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),A.useEffect(()=>{var v;h&&((v=x.current)==null||v.focus())},[h]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),_(!1)};return f.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:[f.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[f.jsx(gS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),f.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?xyt({agent:Ne(n)}):hyt({agent:Ne(n)})}),f.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",...$r(t),children:Fyt()})]}),h?f.jsxs(f.Fragment,{children:[f.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:pxt(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),_(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:oR,children:[f.jsx(De,{size:"small",onClick:()=>{m(""),_(!1)},children:JD()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(De,{size:"small",variant:"primary",onClick:k,children:[txt(),f.jsx(MI,{size:13})]})]})]}):f.jsxs("div",{className:oR,children:[f.jsx(De,{size:"small",onClick:i,children:Wyt()}),f.jsx(De,{size:"small",onClick:()=>_(!0),children:cxt()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[f.jsx(De,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:Kbt()}),f.jsx(De,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":Oyt(),onClick:()=>c(v=>!v),children:f.jsx(rc,{size:13})}),o&&f.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:f.jsx(Xn,{onClick:()=>{c(!1),r("bypassPermissions")},children:eyt()})})]}):f.jsx(De,{size:"small",variant:"primary",onClick:()=>r(),children:oyt()})]})]})}function cR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=A.useState(""),[o,c]=A.useState(!1),[u,h]=A.useState(null);async function _(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(m instanceof Error?m.message:String(m))}finally{c(!1)}}}return f.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:_,children:[f.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),f.jsx(De,{type:"submit",disabled:o||!i.trim(),children:o?ia():nc()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??gVe()}),u&&f.jsx("div",{className:"error",children:u})]})}function iH({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return f.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[f.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:f.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)&&f.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[f.jsx("span",{children:t??`${i}%`}),r]})]})}function fMn({settings:e}){const[n,t]=A.useState(!1);return f.jsxs("label",{className:"inline-flex max-w-full flex-wrap items-center gap-2 text-sm text-subtext",children:[Ccn(),f.jsx("span",{className:"inline-block w-max max-w-full",children:f.jsx(Yo,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:pL()},...e.defaultHost&&!e.hosts.some(r=>r.host===e.defaultHost)?[{id:e.defaultHost,label:e.defaultHost}]:[],...e.hosts.map(r=>({id:r.host,label:r.host}))],onSelect:r=>{t(!0),Gvn(r||null).catch(s=>{yn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function dMn({host:e,connecting:n,reference:t,onChange:r}){const s=A.useId(),i=ln({mutationFn:Uvn,scope:{id:`ssh-settings-${e.host}`}});function a(o){r(o),i.reset(),!(o!==null&&!o.trim())&&i.mutate({host:e.host,container:(o==null?void 0:o.trim())??null})}return f.jsxs("details",{className:"pb-3",children:[f.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-subtext focus-visible:outline-2 focus-visible:outline-text",children:UD()}),f.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[f.jsxs("label",{className:"text-sm text-subtext",children:[Vcn(),f.jsx(Yo,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:Rcn()},{id:"container",label:Bcn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&f.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[vcn(),f.jsx(Ir,{id:`${s}-container`,value:t,disabled:n,required:!0,onChange:o=>a(o.target.value)})]}),i.error&&f.jsx("p",{className:"m-0 text-sm text-accent-red",role:"status",children:i.error.message})]})]})}const ec=["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(" "),tf=["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(" "),hMn=["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(" "),Ny="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",Da=["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(" "),iC=["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(" "),nl=["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(" "),I5=["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(" "),v0=["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(" "),pMn=new Set(["gh auth login","hf auth login","claude auth status"]);function aH(e){return pMn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function zy(){const[e,n]=A.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function aC({note:e,className:n,disabled:t,resolve:r=aH,onRun:s}){return e?f.jsx("p",{className:n,children:ph(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function jy({run:e,onComplete:n,onClose:t}){return e?f.jsx(u3n,{path:e.path,label:e.command,onComplete:n,onError:r=>yn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function r4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:V_()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:VD()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="local"?Wk():mQt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:bPt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:KD()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:h3()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:TYt()}:{cls:"warn",variant:"warning",label:mL()}:{cls:"warn",variant:"warning",label:UUt()}}function mMn({h:e}){return e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod?f.jsx(f.Fragment,{children:ejt()}):e.authMethod?e.authMethod==="local"?f.jsx(f.Fragment,{children:zv()}):f.jsx(f.Fragment,{children:e.authMethod==="oauth"?oOt():Kk()}):f.jsx(f.Fragment,{children:"—"})}function gMn(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function vMn({remote:e}){const n=ku(),{data:t=null}=lt(n),[r,s]=A.useState(null),[i,a]=A.useState(!1),o=zy(),[c,u]=A.useState(null),h=lt(YL()),_=(x,k=!1)=>{a(!0),Q_(x,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((x,k)=>Number(k.agentReady)-Number(x.agentReady)),m=p.find(x=>x.id===r)??p[0];return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:d3()}),!e&&c&&h.data&&f.jsx(i$,{harness:c,commands:h.data[c.id],onClose:()=>u(null)}),f.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:f.jsx(Yo,{variant:"field",dropDown:!0,title:d3(),choices:p.map(x=>({id:x.id,label:x.name})),value:(m==null?void 0:m.id)??null,onSelect:x=>{const k=p.find(v=>v.id===x);k&&s(k.id)},renderIcon:x=>{const k=p.find(v=>v.id===x.id);return k&&f.jsx(mh,{harness:k.id})},renderLabel:x=>{const k=p.find(b=>b.id===x.id),v=k&&r4(k);return f.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[x.label,v&&f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),f.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?f.jsxs("div",{className:ec,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Ut,{variant:r4(m).variant,children:r4(m).label}),f.jsx("div",{className:"spacer flex-1"}),!e&&!m.catalogPending&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported"&&f.jsxs(De,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[f.jsx(mf,{size:14})," ",ID()]}),f.jsxs(De,{size:"small",onClick:()=>_(!0,!0),disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),f.jsxs("div",{className:fs(tf,"[&_.v]:text-sm"),children:[f.jsx("span",{className:"k",children:PDt()}),f.jsx("span",{className:"v",children:m.binPath??OMt()}),f.jsx("span",{className:"k",children:wL()}),f.jsx("span",{className:"v",children:m.version??"—"}),f.jsx("span",{className:"k",children:oDt()}),f.jsx("span",{className:"v",children:f.jsx(mMn,{h:m})}),m.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:m.id==="opencode"?LZt():Zk()}),f.jsx("span",{className:"v",children:m.account})]}),m.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:nVt()}),f.jsx("span",{className:"v",children:m.org})]}),m.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:rKt()}),f.jsx("span",{className:"v",children:m.plan})]}),f.jsx("span",{className:"k",children:WOt()}),f.jsx("span",{className:"v",children:m.catalogPending?V_():m.models.length>0?NRt({count:Xt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(x=>Ne(K1(x))))}):Yk()})]}),f.jsx(aC,{note:m.agentNote,className:fs(Da,"text-sm"),disabled:e,resolve:x=>{var k;return gMn(m,(k=h.data)==null?void 0:k[m.id],x)??aH(x)},onRun:(x,k)=>o.start(x,k,m.id)}),o.run&&f.jsx("div",{hidden:o.run.owner!==m.id,children:f.jsx(jy,{run:o.run,onComplete:()=>_(!0,!0),onClose:o.clear})}),m.id==="opencode"&&f.jsx(u$,{installed:m.installed})]}):null:f.jsxs(Br,{children:[f.jsx(zt,{})," ",O$t()]})]})}function bMn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Ut,{variant:"success",children:fIt()}):f.jsx(Ut,{variant:"error",children:Uqt()}):f.jsx(Ut,{variant:"error",children:VLt()}):f.jsx(Ut,{variant:"error",children:aFt()})}function yMn({onEditState:e}){var T;const n=ln({mutationFn:Dvn}),t=Pz(),r=lt(t),s=r.data??null,i=j=>{Wr(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((T=r.error)==null?void 0:T.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(null),b=j=>{i(j),c(j.context??""),h(j.namespace)},w=A.useRef(null);A.useEffect(()=>{const j=w.current;w.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const y=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!y;A.useEffect(()=>{e==null||e({dirty:C,saving:_})},[C,_,e]);async function N(){if(!(m||_||!y)){x(!0);try{await tt.fetchQuery({...Pz(),staleTime:0})}catch(j){yn(j instanceof Error?j.message:String(j),"error")}finally{x(!1)}}}async function z(j){if(j.preventDefault(),!(_||m)){p(!0),v(null);try{b(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0",children:m||_?f.jsx(Ut,{children:ta()}):C?f.jsx(Ut,{children:MD()}):f.jsx(bMn,{s})})]}),y&&!m&&!_&&s.preflight.error&&f.jsx("p",{className:`${Ny} break-words`,children:s.preflight.error}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:z,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[bIt(),f.jsx(Yo,{choices:[{id:"",label:s.currentContext?_At({context:Ne(s.currentContext)}):sAt()},...o&&!s.contexts.includes(o)?[{id:o,label:FMt({context:Ne(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:_||m,onSelect:c})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[QHt(),f.jsx(Ir,{type:"text",value:u,disabled:_||m,onChange:j=>h(j.target.value),placeholder:o$t(),autoComplete:"off",spellCheck:!1})]}),k&&f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",onClick:()=>void N(),disabled:_||m||!y,children:[f.jsx(Pa,{size:13})," ",m?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:_||m||y,children:_?ia():nc()})]})]})]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",dLt()]})})}function xMn(){var y;const e=ln({mutationFn:C=>Ivn(...C)}),n=Fz(),t=lt(n),r=t.data??null,s=C=>{Wr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=A.useState(null),o=i??((y=t.error)==null?void 0:y.message)??null,[c,u]=A.useState(""),[h,_]=A.useState(""),[p,m]=A.useState(!1),x=t.isPending||p,[k,v]=A.useState(!1);async function b(){if(!(x||k)){m(!0),a(null);try{await tt.fetchQuery({...Fz(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function w(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||x||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),_("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return f.jsxs(f.Fragment,{children:[!r&&x?f.jsxs(Br,{children:[f.jsx(zt,{})," ",yLt()]}):r&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Ut,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?eS():jb()})})]}),(r==null?void 0:r.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:BAt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:w,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?VAt():dRt(),f.jsx(Ir,{type:"password",value:c,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?JAt():yRt(),f.jsx(Ir,{type:"password",value:h,onChange:C=>_(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:aRt()}),o&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:x||k,onClick:()=>void b(),children:[f.jsx(Pa,{size:13})," ",km()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||x||k||(r==null?void 0:r.processEnv),children:k?ia():nc()})]})]})]})}const oH="rounded-sm border-border-strong bg-surface text-subtext",cH="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",wMn=5e3;function lH(e){const n=Ia(),t=e.map(a=>Hz(a)),r=KV({queries:t.map(a=>({...a,refetchInterval:wMn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{An(n)&&Wr(Hz(a).queryKey,{running:!0})}]}function kMn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Ut,{className:cH,children:iL()})});if(e===void 0)return f.jsx(Ut,{className:oH,children:hL()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?f.jsx(Ut,{className:"rounded-sm",variant:"error",children:Jk()}):e.toolsFound?i?f.jsx(Ut,{className:"rounded-sm",variant:"warning",children:aL()}):f.jsx(Ut,{className:"rounded-sm",variant:"success",children:wm()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:s.length===1?ORt({tool:Ne(s[0])}):FRt()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!i&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:co(e.testedAt)})]})}function SMn({remote:e=!1}){var I;const n=XL(),t=lt(n),r=((I=t.data)==null?void 0:I.hosts)??(t.isError?[]:null),[s,i]=A.useState(!1),[a,o]=A.useState({}),[c,u]=A.useState({}),h=A.useRef(0),[_,p]=A.useState(!1),[m,x]=A.useState({}),[k,v]=A.useState(null),[b,w]=A.useState(!1),[y,C]=A.useState(0),N=e?[]:(r==null?void 0:r.filter($=>{const q=a[$.host]??$.lastTest;return(q==null?void 0:q.reachable)&&q.toolsFound}).map($=>$.host))??[],[z,T]=lH(N);function j($){h.current+=1,p(!1),w(!1),C(q=>q+1),v($),x(q=>({...q,[$]:!0}))}function M(){h.current+=1,p(!1),w(!1),v(null)}function D($,q){x(H=>({...H,[$]:!q}))}return f.jsxs(f.Fragment,{children:[t.error&&f.jsx("p",{className:"text-sm text-accent-red",children:t.error.message}),f.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[!e&&t.data&&f.jsx(fMn,{settings:t.data}),f.jsxs(De,{variant:"ghost",className:"ms-auto",onClick:()=>i(!0),children:[f.jsx(vS,{size:14})," ",zL()]})]}),r===null?f.jsxs(Br,{children:[f.jsx(zt,{})," ",vL()]}):r.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:Iqt()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map($=>{var ne,ce,_e;const q=c[$.host]===void 0?$.container??null:c[$.host],H=a[$.host],Q=q!==null&&((ne=H==null?void 0:H.container)==null?void 0:ne.reference)===q.trim()?H:void 0,V=q!==null?Q:H!=null&&H.container?$.lastTest:H??$.lastTest,J=(ce=Q==null?void 0:Q.container)==null?void 0:ce.error,Z=((_e=Q==null?void 0:Q.container)==null?void 0:_e.ready)===!1,B=(V==null?void 0:V.error)||J,L=k===$.host,F=m[$.host]??!1,U=!e&&(L||!!B),K=`${$.user?`${$.user}@`:""}${$.hostname??$.host}${$.port?`:${$.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:$.host,children:$.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:K,children:K})]})}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsxs("div",{className:"flex items-center gap-2 text-start",children:[f.jsx(kMn,{test:V,connecting:L&&!b,masterRunning:z[$.host],containerFailed:Z}),U&&f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":F,"aria-label":F?sX({name:Ne($.host)}):UX({name:Ne($.host)}),onClick:se=>{se.stopPropagation(),D($.host,F)},children:f.jsx(rc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${F?" rotate-180":""}`})})]}),f.jsx(De,{size:"small",type:"button",className:"justify-self-end",onClick:se=>{se.stopPropagation(),L&&!b?M():j($.host)},disabled:!L&&(k!==null&&!b||q!==null&&!q.trim()),children:L?b?Vs():K_():(V==null?void 0:V.reachable)===!1||Z?Vs():V?kL():Qk()})]})]}),!e&&f.jsx(dMn,{host:$,connecting:L&&!b,reference:q,onChange:se=>{L&&M(),u(G=>({...G,[$.host]:se})),o(G=>{const oe={...G};return delete oe[$.host],oe})}}),U&&(F||L)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3${F?"":" hidden"}`,children:[!L&&B&&f.jsx(_3n,{host:$.host,transcript:B}),L&&!_&&f.jsx(wS,{host:$.host,backend:"ssh",active:F,onComplete:se=>{if(se.backend!=="ssh")return;T($.host);const G=h.current;if(q===null){o(oe=>({...oe,[$.host]:{...se.result,container:null}})),w(!1),v(null);return}p(!0),Vvn($.host,q.trim()).then(oe=>{h.current===G&&o(le=>({...le,[$.host]:{...oe,container:oe.container??{reference:q.trim(),ready:!1,error:oe.error??null}}}))}).catch(oe=>{h.current===G&&o(le=>({...le,[$.host]:{...se.result,container:{reference:q.trim(),ready:!1,error:oe instanceof Error?oe.message:String(oe)}}}))}).finally(()=>{h.current===G&&(p(!1),w(!1),v(null))})},onError:se=>{w(!0),o(G=>({...G,[$.host]:{container:q===null?null:{reference:q.trim(),ready:!1,error:se},reachable:!1,toolsFound:!1,missingTools:[],error:se,testedAt:Date.now()}}))}},y)]})]},$.host)})}),s&&f.jsx(D$,{onClose:()=>i(!1)})]})}function CMn({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Ut,{className:cH,children:iL()}):e===null?f.jsx(Ut,{className:oH,children:hL()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Ut,{className:"rounded-sm",variant:"warning",children:aL()}):f.jsx(Ut,{className:"rounded-sm",variant:"success",children:wm()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:xHt()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:vUt()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:Jk()})}function EMn({remote:e=!1}){var B;const n=ln({mutationFn:rbn}),t=_yn(),r=lt(t),s=r.data??null,i=L=>{Wr(t.queryKey,F=>(typeof L=="function"?L(F??null):L)??void 0)},a=s?null:((B=r.error)==null?void 0:B.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(""),[m,x]=A.useState(""),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(null),[N,z]=A.useState(!1),[T,j]=A.useState(!1),[M,D]=A.useState(0),I=!e&&o&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[o]:[],[$,q]=lH(I);function H(){j(!1),D(L=>L+1),z(!0)}const Q=L=>{i(L),c(L.host??""),h(L.partition??""),p(L.account??""),x(L.timeLimit??"")},V=A.useRef(null);A.useEffect(()=>{const L=V.current;V.current=s,s&&(!L||o===(L.host??"")&&u.trim()===(L.partition??"")&&_.trim()===(L.account??"")&&m.trim()===(L.timeLimit??""))&&(c(s.host??""),h(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,o,u,_,m]);const J=s!==null&&o===(s.host??"")&&u.trim()===(s.partition??"")&&_.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function Z(L){if(L.preventDefault(),!k){v(!0),w(null);try{Q(await n.mutateAsync({host:o,partition:u.trim(),account:_.trim(),timeLimit:m.trim()}))}catch(F){w(F instanceof Error?F.message:String(F))}finally{v(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[!N&&(y==null?void 0:y.error)&&f.jsx("p",{className:Ny,children:y.error}),f.jsxs("form",{className:iC,onSubmit:Z,children:[f.jsx("div",{className:"max-w-xl",children:f.jsxs("label",{children:[oHt(),f.jsx(Yo,{choices:[{id:"",label:pL()},...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:k||N,onSelect:L=>{c(L),C(null),z(!1),j(!1)}})]})}),f.jsxs("div",{className:"actions",children:[!e&&f.jsx(De,{type:"button",onClick:()=>{N&&!T?(j(!1),z(!1)):H()},disabled:!o,title:o?void 0:jZt(),children:N?T?Vs():K_():y?kL():Qk()}),f.jsx("span",{role:"status",children:f.jsx(CMn,{test:y,connecting:N&&!T,masterRunning:$[o]})})]}),f.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[qVt(),f.jsx(Ir,{type:"text",list:"slurm-partitions",value:u,onChange:L=>h(L.target.value),placeholder:Ez(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map(L=>f.jsx("option",{value:L},L))})]}),f.jsxs("label",{children:[Zk(),f.jsx(Ir,{type:"text",value:_,onChange:L=>p(L.target.value),placeholder:Ez(),autoComplete:"off",spellCheck:!1})]})]}),f.jsxs("label",{className:"mt-3 block max-w-xl",children:[_Yt(),f.jsx(Ir,{type:"text",value:m,onChange:L=>x(L.target.value),placeholder:BLt(),autoComplete:"off",spellCheck:!1})]})]}),b&&f.jsx("div",{className:"error",children:b}),f.jsx("div",{className:"actions",children:f.jsx(De,{variant:"primary",type:"submit",disabled:k||J||N,children:k?ia():nc()})})]}),!e&&N&&f.jsx(wS,{host:o,backend:"slurm",onComplete:L=>{L.backend==="slurm"&&(C(L.result),q(o),j(!1),z(!1))},onError:L=>{j(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:L})}},M)]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",MFt()]})})}function NMn(){var C;const e=ln({mutationFn:ibn}),n=fyn(),t=lt(n),r=t.data??null,s=N=>{Wr(n.queryKey,z=>(typeof N=="function"?N(z??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=A.useState(""),[c,u]=A.useState(!1),[h,_]=A.useState(null),[p,m]=A.useState(null),x=p!==null&&p!=="testing"?p:null,k=N=>{s(N),o(N.address??"")},v=A.useRef(null);A.useEffect(()=>{const N=v.current;v.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const b=r!==null&&a===(r.address??"");async function w(N){if(N.preventDefault(),!c){u(!0),_(null);try{k(await e.mutateAsync({address:a}))}catch(z){_(z instanceof Error?z.message:String(z))}finally{u(!1)}}}async function y(){m("testing");try{m(await abn(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[(x==null?void 0:x.error)&&f.jsx("p",{className:Ny,children:x.error}),f.jsxs("form",{className:iC,onSubmit:w,children:[f.jsxs("label",{children:[JPt(),f.jsx(Ir,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[W$t(),": ",Ne(r.resolvedAddress)," · ",bL(),": ",r.source]}),h&&f.jsx("div",{className:"error",children:h}),f.jsxs("div",{className:"actions",children:[f.jsx(De,{variant:"primary",type:"submit",disabled:c||b,children:c?ia():nc()}),f.jsx(De,{type:"button",onClick:()=>void y(),disabled:p==="testing",children:kXt()}),f.jsx(zMn,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[gKt(),": ",x.rayVersion]})]})]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",EFt()]})})}function zMn({test:e}){return e===null?null:e==="testing"?f.jsx(Ut,{children:TXt()}):e.reachable?f.jsx(Ut,{variant:"success",children:SKt()}):f.jsx(Ut,{variant:"error",children:Jk()})}function jMn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:el(e.memBytes),r=e.gpus.length===0?null:Djt({count:e.gpus.length});return[n,e.cpuCount>0?ozt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function TMn({remote:e}){var p;const n=lt(hyn()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=A.useState(0),[o,c]=A.useState(!0),[u,h]=A.useState(!1),_=()=>n.refetch();return f.jsxs(f.Fragment,{children:[r&&!t?f.jsx("div",{className:"error",children:r}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:hMn,children:[f.jsx("span",{className:"k",children:Mh()}),f.jsx("span",{className:"v",children:!t&&s||u?f.jsxs(Ut,{className:"gap-1.5",role:"status",children:[f.jsx(zt,{}),u?xOt():ta()]}):r?f.jsx(Ut,{variant:"warning",children:h3()}):t?t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Ut,{variant:"success",children:wm()}):t.sshKeyStatus==="unknown"?f.jsx(Ut,{variant:"warning",children:h3()}):f.jsx(Ut,{variant:"warning",children:jb()}):f.jsx(Ut,{variant:"warning",children:mL()}):null}),f.jsx("span",{className:"k",children:lVt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:jQt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Ut,{variant:"success",children:kGt()}):t.sshKeyStatus==="no_local_match"?f.jsx(Ut,{variant:"warning",children:sGt()}):t.sshKeyStatus==="none_registered"?f.jsx(Ut,{variant:"error",children:CUt()}):f.jsx(Ut,{children:yL()}):"—"})]}),e&&t&&!t.loggedIn&&f.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:CAt({command:Ne("orx login")})}),!e&&i>0&&f.jsx(l3n,{login:o,onComplete:()=>{h(!1),a(0),_()},onError:m=>{h(!1),yn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?f.jsxs("p",{dir:"auto",className:Da,children:[OOt()," ",f.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:Da,children:[_Ut()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),IXt()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?f.jsx("p",{dir:"auto",className:Da,children:QZt({register:Ne(`orx ssh-key add ${t.sshKeyPath}`),load:Ne("ssh-add")})}):f.jsxs("p",{dir:"auto",className:Da,children:[sUt()," ",f.jsx("code",{children:"ssh-add"}),QGt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&f.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)})]}),f.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[f.jsxs(De,{onClick:()=>void _(),disabled:s||u,children:[f.jsx(Pa,{size:13})," ",s?ta():xm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&f.jsxs(De,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?f.jsx(zt,{}):f.jsx(mf,{size:13})," ",t.loggedIn?Ien():SL()]})]})]})}const AMn={local:sTe,ssh:BTe,tinker:VTe,hf:Uje,modal:_Te,k8s:Yje,slurm:RTe,ray:CTe,openresearch:vTe},Ty={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"},lR=["hf","modal","slurm","ray","openresearch"],s4=["hf","modal","openresearch"],uH={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"]},$5=["tinker","hf","modal","ray","k8s"],RMn={tinker:zRe,hf:oRe,modal:hRe,openresearch:xRe},uR="__custom__";function Kp(e,n){return!!(n&&!(uH[e]??[]).includes(n))}function MMn({settings:e,projectId:n,onSaved:t}){const r=ln({mutationFn:cbn}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=A.useState(s),[c,u]=A.useState(i),[h,_]=A.useState(Kp(s,i)),[p,m]=A.useState(!1),[x,k]=A.useState(null),v=e.targets.find($=>$.id===a),b=e.targets.filter($=>$.configured||$.id===s),w=lR.includes(a),y=s4.includes(a),C=uH[a]??[],N=a===s&&(!w||c.trim()===i),z=J_[a](),T=RMn[a],j=p?Unn():y&&!c.trim()?DEt({destination:z}):a==="ssh"?tMt():WRt({destination:z});A.useEffect(()=>{o(s),u(i),_(Kp(s,i))},[s,i]);async function M($,q){const H=lR.includes($);if(!(p||s4.includes($)&&!q.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:$,flavor:H&&q.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),_(Kp(s,i))}finally{m(!1)}}}function D($){const q=e.targets.find(Q=>Q.id===$);if(!q)return;o(q.id);const H=q.id===s?i:"";u(H),_(Kp(q.id,H)),s4.includes(q.id)||M(q.id,H)}function I($){if($===uR){_(!0);return}_(!1),u($),(!y||$)&&M(a,$)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:y$t()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:$=>{$.preventDefault(),N||M(a,c)},children:[f.jsx(Yo,{choices:b.map($=>({id:$.id,label:J_[$.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:$=>{const q=e.targets.find(H=>H.id===$.id);return q?f.jsx(Lh,{kind:Ty[q.id],size:16}):null},onSelect:D}),w&&f.jsx("div",{children:h?f.jsxs("div",{className:"relative",children:[f.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:c,onChange:$=>u($.target.value),onBlur:()=>{if(y&&!c.trim()){a===s&&(u(i),_(Kp(s,i)));return}N||M(a,c)},placeholder:PIt(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),f.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":Cz(),title:Cz(),onMouseDown:$=>$.preventDefault(),onClick:()=>_(!1),children:f.jsx(rc,{size:12})})]}):f.jsx(Yo,{choices:[{id:"",label:y?zEt():pMt()},...c&&!C.includes(c)?[{id:c,label:zzt({value:Ne(c)})}]:[],...C.map($=>({id:$,label:$})),{id:uR,label:KIt()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),x&&f.jsx("div",{className:"error mt-2.5",children:x}),v&&!v.configured&&f.jsx("p",{className:Da,children:YXt()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),T&&f.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:T()})]})}function OMn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?hEt():e.id==="openresearch"?SL():e.id==="ray"?Qk():Ten();return f.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&&f.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":J_[e.id](),"aria-describedby":i,"aria-haspopup":$5.includes(e.id)?"dialog":void 0}),f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(Lh,{kind:Ty[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:J_[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:AMn[e.id]()}),f.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?f.jsxs(f.Fragment,{children:[e.id==="tinker"?YTt():mnn()," ",f.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:Kzt()})]}):t??e.summary}),f.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[f.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?_L():e.configured?!r||$5.includes(e.id)?eS():urn():a}),r&&f.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:f.jsx(Q1,{size:16})})]})]})}function DMn({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(A0,{size:16})," ",lL()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:f.jsx(Lh,{kind:Ty[e.id],size:36})}),f.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:J_[e.id]()})]}),n&&f.jsx(Ut,{className:"flex-none border-primary bg-primary-subtle text-primary",children:_L()})]}),f.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"&&f.jsx(SMn,{remote:r}),e.id==="slurm"&&f.jsx(EMn,{remote:r}),e.id==="openresearch"&&f.jsx(TMn,{remote:r})]})]})}function LMn({target:e,remote:n,onClose:t}){const r=A.useRef(null),[s,i]=A.useState({dirty:!1,saving:!1});A.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm(UTt())||t()};return f.jsxs("dialog",{ref:r,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(),a())},onCancel:o=>{o.preventDefault(),a()},children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(Lh,{kind:Ty[e.id],size:32}),f.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:J_[e.id]()})]}),f.jsx(Bt,{title:z0(),"aria-label":z0(),onClick:a,disabled:s.saving,children:f.jsx(or,{size:14})})]}),e.id==="tinker"&&f.jsx($Mn,{target:e}),e.id==="hf"&&f.jsx(PMn,{remote:n}),e.id==="modal"&&f.jsx(xMn,{}),e.id==="ray"&&f.jsx(NMn,{}),e.id==="k8s"&&f.jsx(yMn,{onEditState:i})]})}function IMn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=QL(e==null?void 0:e.id),i=lt(s),a=i.data??null,o=I=>{Wr(s.queryKey,$=>(typeof I=="function"?I($??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=A.useState(null),[_,p]=A.useState(null),m=dyn(),x=lt(m),k=x.data??null,v=((D=x.error)==null?void 0:D.message)??null;A.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},w=a?a.targets:null,y=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=w?[...w].sort((I,$)=>+($.id===y)-+(I.id===y)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],z=(C==null?void 0:C.filter(I=>!I.configured))??[],T=I=>f.jsx(OMn,{target:I,isDefault:y===I.id,summary:I.id==="local"?k?jMn(k):v??N$t():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),j=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return j&&!$5.includes(j.id)?f.jsx(DMn,{target:j,isDefault:y===j.id,onBack:()=>h(null),remote:r}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:uL()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:iIt()}),f.jsx(rOn,{projectId:e==null?void 0:e.id,onViewHistory:n}),c?f.jsx("div",{className:"error",children:c}):a?f.jsxs(f.Fragment,{children:[_&&f.jsx("div",{className:"error",children:_}),f.jsx(MMn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:eS()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(T)})]}),z.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:zHt()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:z.map(T)})]}),j&&f.jsx(LMn,{target:j,remote:r,onClose:()=>h(null)})]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",aLt()]})]})}function $Mn({target:e}){var w;const n=ln({mutationFn:zvn}),[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(null),c=Bz(),u=lt(c),h=u.data??null,_=a??((w=u.error)==null?void 0:w.message)??null,p=y=>{Wr(c.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},[m,x]=A.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){x(!0),o(null);try{await tt.fetchQuery({...Bz(),staleTime:0})}catch(y){o(y instanceof Error?y.message:String(y))}finally{x(!1)}}}async function b(y){if(y.preventDefault(),!(!t.trim()||s||k)){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 f.jsxs(f.Fragment,{children:[!h&&k?f.jsxs(Br,{children:[f.jsx(zt,{})," ",ta()]}):h&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Ut,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?wm():h.validationStatus==="invalid"?lnn():h.validationStatus==="billingRequired"?Qtn():jb()})})]}),(h==null?void 0:h.validationStatus)==="billingRequired"&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:f.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:Htn()})}),(h==null?void 0:h.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:nnn()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?qJt():Kk(),f.jsx(Ir,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:y=>r(y.target.value),autoComplete:"new-password"})]}),_&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:_}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:s||k,onClick:()=>void v(),children:[f.jsx(Pa,{size:13})," ",k?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?EL():nc()})]})]})]})}function BMn({settings:e}){return e.validationStatus==="missing"?f.jsx(Ut,{variant:"warning",children:jb()}):e.validationStatus==="invalid"?f.jsx(Ut,{variant:"error",children:VPt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?f.jsx(Ut,{variant:"success",children:wm()}):e.jobsWrite===!1?f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Ut,{variant:"warning",children:Yqt()}),f.jsx(lS,{content:nTt(),className:"text-subtext",children:f.jsx(hS,{size:15})})]}):null}function PMn({remote:e}){var w;const n=ln({mutationFn:Evn}),t=$z(),r=lt(t),s=r.data??null,i=y=>{Wr(t.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},a=s?null:((w=r.error)==null?void 0:w.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(!1),[_,p]=A.useState(!1),[m,x]=A.useState(null),k=zy();async function v(){if(!(u||_||!s&&!a)){p(!0),x(null);try{await tt.fetchQuery({...$z(),staleTime:0})}catch(y){x(y instanceof Error?y.message:String(y))}finally{p(!1)}}}async function b(y){if(y.preventDefault(),!(!o.trim()||u||_||!s&&!a)){h(!0),x(null);try{const C=await n.mutateAsync(o.trim());i(C),x(null),c("")}catch(C){x(C instanceof Error?C.message:String(C))}finally{h(!1)}}}return f.jsxs(f.Fragment,{children:[a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Zk()}),f.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0 text-text",children:f.jsx(BMn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&f.jsx("p",{className:Ny,children:s.validationError}),s.source==="env"&&f.jsx("p",{className:Da,children:JBt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&f.jsx(aC,{note:Qjt({login:"`hf auth login`",url:Ne("huggingface.co/settings/tokens")}),className:Da,disabled:e,onRun:k.start}),f.jsx(jy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",PFt()]}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?XJt():cMt(),f.jsx(Ir,{type:"password",value:o,onChange:y=>c(y.target.value),placeholder:(s==null?void 0:s.maskedToken)??VBt(),autoComplete:"off"})]}),m&&f.jsx("div",{className:"error",children:m}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:u||_||!s&&!a,onClick:()=>void v(),children:[f.jsx(Pa,{size:13})," ",_?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!o.trim()||u||_||!s&&!a,children:u?EL():nc()})]})]})]})}const _H=/^hf_[A-Za-z0-9]{10,}$/;function fH(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:Da,children:[sYt()," ",f.jsx("code",{children:"HF_TOKEN"}),qWt()]})})})}const _R=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function B5(e,n){const t=n instanceof Error?n.message:String(n);yn(t.includes(e)?t:`${e}: ${t}`,"error")}function FMn({name:e,entry:n,onVars:t}){const r=ln({mutationFn:_=>PL(..._)}),s=ln({mutationFn:Bvn}),[i,a]=A.useState(""),[o,c]=A.useState(!1);async function u(){if(!(!i.trim()||o)){c(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(_){B5(e,_)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(_){B5(e,_)}finally{c(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{className:"font-mono text-sm",children:e}),f.jsx("td",{className:"text-base text-subtext",children:n?f.jsxs(f.Fragment,{children:[n.maskedValue,n.inProcessEnv&&f.jsx(Ut,{children:LVt()})]}):f.jsx(Ir,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&a("")},placeholder:xL(),"aria-label":PJ({name:Ne(e)}),autoComplete:"new-password",disabled:o})}),f.jsx("td",{children:n?f.jsx(Bt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:r3({name:Ne(e)}),"aria-label":r3({name:Ne(e)}),onClick:()=>void h(),disabled:o,children:f.jsx(gf,{size:13})}):i.trim()&&f.jsx(De,{size:"small",onClick:()=>void u(),disabled:o,children:o?ia():nc()})})]}),!n&&e!=="HF_TOKEN"&&_H.test(i.trim())&&f.jsx(fH,{})]})}function HMn({onVars:e,onDone:n}){const t=ln({mutationFn:_=>PL(..._)}),[r,s]=A.useState(""),[i,a]=A.useState(""),[o,c]=A.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){c(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(_){B5(r.trim(),_)}finally{c(!1)}}}const h=_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(Ir,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:_=>s(_.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":mqt(),autoComplete:"off",spellCheck:!1,disabled:o})}),f.jsx("td",{children:f.jsx(Ir,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:h,placeholder:xL(),"aria-label":kqt(),autoComplete:"new-password",disabled:o})}),f.jsxs("td",{children:[f.jsx(De,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?ia():nc()}),f.jsx(Bt,{title:K_(),"aria-label":JDt(),onClick:n,disabled:o,children:f.jsx(or,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&_H.test(i.trim())&&f.jsx(fH,{})]})}function qMn(){var u;const e=pyn(),n=lt(e),t=n.data??null,r=h=>{Wr(e.queryKey,_=>(typeof h=="function"?h(_??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=A.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!_R.includes(h)),c=[..._R,...o];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[f.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:nZt()}),f.jsxs(De,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[f.jsx(Dh,{size:12})," ",FOt()]})]}),f.jsx("div",{className:ec,children:s?f.jsx("div",{className:"error",children:s}):t===null?f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]}):f.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:f.jsxs("tbody",{children:[c.map(h=>f.jsx(FMn,{name:h,entry:t.find(_=>_.key===h),onVars:r},h)),i&&f.jsx(HMn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const Wp=[{value:"system",label:Dtn,icon:_4n},{value:"light",label:ztn,icon:I4n},{value:"dark",label:ptn,icon:d4n}],UMn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function GMn(){const e=hf(),[n,t]=cI(),r=s=>{var h;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(_=>_===document.activeElement),u=((o===-1?Wp.findIndex(_=>_.value===n):o)+i+Wp.length)%Wp.length;t(Wp[u].value),(h=a[u])==null||h.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:O9t()}),f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:`${nl} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Oz()}),f.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":Oz(),onKeyDown:r,children:Wp.map(({value:s,label:i,icon:a})=>f.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:[f.jsx(a,{size:14}),i()]},s))})]}),f.jsxs("div",{className:nl,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:vAt()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(Yo,{choices:UMn,value:e,variant:"field",dropDown:!0,onSelect:s=>{lD(s)&&iI(s)}})})]})]})]})}const VMn={installer:F0n,"app-bundle":y0n,portable:tmn,cargo:N0n,homebrew:O0n,nix:W0n,unknown:cmn},i4={cargo:pmn,homebrew:wmn,nix:jmn};function KMn(){var _;const e=ln({mutationFn:p=>Rvn(...p)}),{status:n,error:t,apply:r}=o6(),[s,i]=A.useState(null),[a,o]=A.useState(null),c=I$(n),u=s!==null||c.restarting;if(!n)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Az()}),t?f.jsx("div",{className:ec,children:f.jsx("div",{className:"error",children:t})}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]})]});const h=async(p,m)=>{i(p),o(null);try{await m()}catch(x){o(x instanceof Error?x.message:String(x))}finally{i(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Az()}),f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:`${tf} pb-3.5`,children:[f.jsx("div",{className:"k",children:wL()}),f.jsx("div",{className:"v",children:n.current}),f.jsx("div",{className:"k",children:dFt()}),f.jsx("div",{className:"v",children:n.latest??"—"}),f.jsx("div",{className:"k",children:dL()}),f.jsx("div",{className:"v",children:VMn[n.channel]()})]}),n.restartRequired&&f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:wWt()}),f.jsx("p",{children:c.error?RL({error:c.error}):uen({installed:Ne(n.installedVersion??"—"),current:Ne(n.current??n.installedVersion??"—")})})]}),n.canRestart&&f.jsx(De,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?ML():AL()})]}),n.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:zz()}),f.jsxs("p",{children:[lqt(),n.envDisabled&&Inn()]})]}),f.jsx(cS,{type:"button",checked:n.autoUpdate,"aria-label":zz(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?Tnn({version:Ne(n.latest??"—")}):eEt()}),f.jsx("p",{children:n.updateAvailable?ITt():xEt()})]}),f.jsx(De,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>Tvn().then(r)),children:s==="apply"?Hk():n.updateAvailable?knn():oEt()})]})]}):f.jsx("div",{className:nl,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:mVt()}),f.jsx("p",{children:((_=i4[n.channel])==null?void 0:_.call(i4))??nJt()})]})}),n.channel==="app-bundle"&&f.jsx(QMn,{busy:s,disabled:u,run:h}),a&&f.jsx("div",{className:"error",children:a})]})]})}function WMn(){var _;const e=ln({mutationFn:Nbn}),n=kyn(),t=lt(n),r=t.data??null,s=p=>{Wr(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=A.useState(!1),[o,c]=A.useState(null),u=o??((_=t.error)==null?void 0:_.message)??null,h=()=>{!r||i||(a(!0),c(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>c(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:qYt()}),r?f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[Sz(),r.locked&&r.reason&&f.jsx(lS,{content:`${MIt()} ${r.reason}.`,className:"text-subtext",children:f.jsx(hS,{size:15})})]}),f.jsx("p",{children:Tqt()})]}),f.jsx(cS,{type:"button",checked:r.enabled,"aria-label":Sz(),disabled:i||r.locked,onClick:h})]}),u&&f.jsx("div",{className:"error",children:u})]}):u?f.jsx("div",{className:"error",children:u}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]})]})}function QMn({busy:e,disabled:n,run:t}){const r=ln({mutationFn:Mvn}),[s,i]=A.useState(null),[a,o]=A.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:kTt({command:Ne("orx")})}),s?f.jsxs("p",{children:[s.alreadyCurrent?QEt({link:Ne(s.link)}):nNt({link:Ne(s.link)}),!s.onPath&&N9t({directory:Ne(s.dir)})]}):f.jsx("p",{children:mTt({command:Ne("orx")})})]}),f.jsx(De,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?Hk():a?LJt():s?lJt():lTt()})]})}function XMn({remote:e}){var x;const n=ln({mutationFn:k=>GL(...k)}),t=rS(),r=lt(t),s=r.data??null,i=k=>{Wr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=A.useState(!1),[c,u]=A.useState(null),h=c??((x=r.error)==null?void 0:x.message)??null,_=async()=>{await r.refetch({cancelRefetch:!1})},p=zy(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:bBt()}),s?f.jsxs("div",{className:`${ec} 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:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx("h3",{children:EBt()}),f.jsx(Ut,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?sL():oL()})]}),f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Nz()}),f.jsx("p",{children:pZt()})]}),f.jsx(cS,{type:"button",checked:s.githubForNewProjects,"aria-label":Nz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(dH,{ghInstalled:s.ghInstalled,remote:e,onCheck:_,onRun:p.start})}),f.jsx(jy,{run:p.run,onComplete:()=>void _(),onClose:p.clear}),h&&f.jsx("div",{className:"error",children:h})]}):h?f.jsx("div",{className:"error",children:h}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]})]})}function dH({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=A.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return f.jsxs(f.Fragment,{children:[f.jsx(aC,{note:e?gen():TTt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(dh,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[EPt()," ",f.jsx(X_,{size:12})]}),f.jsx(De,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ta():xm()})]})]})}function YMn(){var m,x,k;const e=ln({mutationFn:fvn}),n=ln({mutationFn:dvn}),t=hkn(),r=lt(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,a=v=>Wr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=A.useState(!1),[h,_]=A.useState(null),p=h??((k=r.error)==null?void 0:k.message);return f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:gL()}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:MBt()}),f.jsx("span",{className:"v",children:f.jsx(Ut,{variant:s?"success":"default",children:s===null?p?ro():ta():s?Mz():f3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:wZt()}),s?f.jsx("div",{className:v0,children:f.jsx(De,{disabled:c,onClick:()=>{u(!0),_(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?Rz():kJt()})}):f.jsx(cR,{save:$L,onSaved:v=>o(v.hasToken),placeholder:jVt(),createHref:"https://www.overleaf.com/user/settings"}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:XWt()}),f.jsx("span",{className:"v",children:f.jsx(Ut,{variant:i?"success":"default",children:i===null?p?ro():ta():i?Mz():f3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:rQt()}),i?f.jsx("div",{className:v0,children:f.jsx(De,{disabled:c,onClick:()=>{u(!0),_(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?Rz():mJt()})}):f.jsx(cR,{save:v=>BL(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:c3(),createHref:"https://www.overleaf.com/project",createLabel:ygt()}),p&&f.jsx("div",{className:"error",children:p})]})}function ZMn({project:e,onProjectUpdate:n,remote:t}){var M;const r=ln({mutationFn:D=>GL(...D)}),s={...wyn((e==null?void 0:e.id)??""),enabled:!!e},i=lt(s),a=zy(),o=i.data??null,c=D=>{Wr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=A.useState(!1),[_,p]=A.useState(null),m=_??((M=i.error)==null?void 0:M.message)??null,[x,k]=A.useState(!1),[v,b]=A.useState(!1),[w,y]=A.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},z=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?hjt():I.includes("(fetch first)")||I.includes("non-fast-forward")?xjt():I.includes("403")||I.toLowerCase().includes("permission denied")?zjt():I},T=()=>{e&&(h(!0),p(null),Sbn(e.id).then(D=>{c(D.git),n(D.project),tt.fetchQuery(rS()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(z(D))).finally(()=>h(!1)))},j=D=>{b(!0),y(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>y(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:pWt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:ren({project:(e==null?void 0:e.name)??xzt()})}),e?m&&!o?f.jsx("div",{className:"error",children:m}):o?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:eHt()}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:XVt()}),f.jsx("span",{className:"v",children:o.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:o.gitVersion??GD()}),f.jsx("span",{className:"k",children:qQt()}),f.jsx("span",{className:"v",children:o.initialized?ojt({branch:Ne(o.currentBranch??Xk()),state:o.clean?HEt():Hjt()}):WMt()}),f.jsx("span",{className:"k",children:MDt()}),f.jsx("span",{className:"v",children:o.baselineBranch}),f.jsx("span",{className:"k",children:cWt()}),f.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):Yk()})]}),!o.initialized&&f.jsx("div",{className:v0,children:f.jsx(De,{variant:"primary",onClick:()=>void kbn(e.id).then(c).catch(D=>p(String(D))),children:aPt()})})]}),f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:cL()}),f.jsx("span",{className:"v",children:f.jsx(Ut,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?sL():oL()})}),f.jsx("span",{className:"k",children:uKt()}),f.jsx("span",{className:"v",children:C?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&f.jsx(Ut,{children:mXt()})]}):f.jsx(Ut,{children:KFt()})}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:lXt()}),f.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(dH,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),f.jsx(jy,{run:a.run,onComplete:()=>void N(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?Ynn():hzt()}),f.jsxs("div",{className:v0,children:[C&&o.github.url&&f.jsxs(dh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[Tz()," ",f.jsx(X_,{size:12})]}),f.jsx(De,{variant:"primary",disabled:u,onClick:T,children:u?d7t():a7t()})]})]}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:F$t()}),f.jsxs("div",{className:v0,children:[o.github.url&&f.jsxs(dh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[Tz()," ",f.jsx(X_,{size:12})]}),f.jsx(De,{disabled:u,onClick:()=>{h(!0),Cbn(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?y7t():JCt()})]})]})]}),f.jsx(YMn,{}),m&&f.jsx("div",{className:"error",children:z(m)})]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]}):f.jsx("div",{className:ec,children:f.jsx("p",{className:Da,children:TGt()})}),x&&f.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:()=>j(!1),children:f.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:D=>D.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:hHt()}),f.jsx("p",{children:UXt()}),w&&f.jsx("div",{className:"error",children:w}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(De,{disabled:v,onClick:()=>j(!1),children:YUt()}),f.jsx(De,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?ia():RAt()})]})]})})]})}const JMn={env:l_n,config:m_n,xdg:k_n,default:n_n},a4={preparing:Hun,copying:eun,verifying:T_n,finalizing:oun},eOn=e=>{var n;return((n=a4[e])==null?void 0:n.call(a4))??e};function tOn(){var y;const e=myn(),n=lt(e),t=n.data??null,r=t?null:((y=n.error)==null?void 0:y.message)??null,[s,i]=A.useState(""),[a,o]=A.useState(!1),[c,u]=A.useState(null),[h,_]=A.useState({kind:"idle"}),[p,m]=A.useState(null);A.useEffect(()=>{t&&i(C=>C||t.current)},[t]),A.useEffect(()=>rI(C=>{C.type==="progress"?_(N=>{const z=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||z}}):C.type==="done"?(_({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&_({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await Fvn(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function w(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(xun({path:Ne(k)})))){_({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await Hvn(k)}catch(N){_({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:nXt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:ntn()}),r?f.jsx("div",{className:ec,children:f.jsx("div",{className:"error",children:r})}):t?f.jsxs("div",{className:ec,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:e$t()})}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:EIt()}),f.jsx("span",{className:"v",children:t.current}),f.jsx("span",{className:"k",children:bL()}),f.jsx("span",{className:"v",children:JMn[t.source]()})]}),!x&&f.jsxs("form",{className:iC,onSubmit:w,children:[f.jsxs("label",{children:[nqt(),f.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&f.jsxs("p",{className:Da,children:[qKt()," ",el(c.treeBytes??0),c.freeBytes!=null&&` — ${hun({size:Ne(el(c.freeBytes))})}`,c.sameFilesystem?Qun():"","."]}),c&&c.ok===!1&&c.error&&f.jsx("div",{className:"error",children:c.error}),p&&f.jsx("div",{className:"error",children:p}),h.kind==="moving"&&f.jsx(iH,{value:h.copied,max:h.total,label:eOn(h.phase),caption:h.total>0?f.jsxs("span",{className:"text-sm",children:[el(h.copied)," / ",el(h.total)]}):void 0}),h.kind==="done"&&f.jsxs("p",{className:Da,children:[HHt(),h.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",hOt({path:Ne(h.oldPathLeft)})]})]}),h.kind==="error"&&f.jsxs("div",{className:"error",children:[DHt()," ",h.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(De,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ta():F9t()}),f.jsx(De,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?Dun():zun()})]})]})]}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]})]})}const P5=e=>e==="running"||e==="starting";function nOn(e){return P5(e.status)?T0(Date.now()-e.createdAt):e.endedAt?T0(e.endedAt-e.createdAt):"—"}function hH({instances:e,emptyLabel:n}){return e.length===0?f.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}):f.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:f.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:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:EDt()}),f.jsx("th",{children:Mh()}),f.jsx("th",{children:LQt()}),f.jsx("th",{children:LWt()})]})}),f.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 f.jsxs("tr",{children:[f.jsx("td",{children:f.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[f.jsx(jS,{backend:t.backend}),r&&f.jsx(Cm,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:jz(),"aria-label":jz(),onClick:i=>i.stopPropagation(),children:f.jsx(X_,{size:12})})]})}),f.jsx("td",{children:f.jsx(al,{status:Qi(t)})}),f.jsx("td",{children:co(t.createdAt)}),f.jsx("td",{children:nOn(t)})]},t.id)})})]})})}function rOn({projectId:e,onViewHistory:n}){var _;const t=lt({...mu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(_=t.error)==null?void 0:_.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},c=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>P5(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!P5(p.status)).sort(c);return f.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:[f.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:[f.jsx("div",{children:f.jsxs("h2",{children:[jWt(),u&&u.length>0&&f.jsx("span",{className:"count-badge",children:u.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(De,{size:"small",onClick:o,disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]}),f.jsx(De,{size:"small",onClick:n,children:h!=null&&h.length?vYe({count:Xt(h.length)}):_Ye()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!u||!h?f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]}):f.jsx(hH,{instances:u,emptyLabel:e?UXe():sYe()})]})}function sOn({projectId:e,onBack:n}){var c;const t=lt({...mu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(c=t.error)==null?void 0:c.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const u=setInterval(()=>a(h=>h+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(A0,{size:14})," ",lL()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:BPt()}),f.jsxs(De,{size:"small",onClick:o,disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),s&&f.jsx("div",{className:"error",children:s}),r?f.jsx(hH,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?IXe():YXe()}):f.jsxs(Br,{children:[f.jsx(zt,{})," ",Au()]})]})}const pH=["projects","harnesses","storage"],iOn=[{id:"compute",label:uL,icon:f.jsx(_S,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:fL,icon:f.jsx(mf,{size:15}),activeTabs:["environment"]},{id:"settings",label:tS,icon:f.jsx(vS,{size:15}),activeTabs:["settings",...pH]}];function aOn(e){return pH.includes(e)}function oOn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||aOn(e),a=A.useRef(null);return A.useLayoutEffect(()=>{const o=a.current,c=o==null?void 0:o.parentElement;if(!o||!c)return;const u=()=>o.scrollIntoView({block:"start"}),h=new ResizeObserver(u);h.observe(c),u();const _=()=>h.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,_,{passive:!0});return()=>{_();for(const m of p)window.removeEventListener(m,_)}},[e,n==null?void 0:n.id]),f.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&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:tS()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:hd,children:f.jsx(GMn,{})}),f.jsx("section",{ref:e==="projects"?a:void 0,className:hd,children:f.jsx(XMn,{remote:s})}),f.jsx("section",{ref:e==="harnesses"?a:void 0,className:hd,children:f.jsx(vMn,{remote:s})}),!s&&f.jsx("section",{ref:e==="storage"?a:void 0,className:hd,children:f.jsx(tOn,{})}),f.jsx("section",{className:hd,children:f.jsx(WMn,{})}),!s&&f.jsx("section",{className:hd,children:f.jsx(KMn,{})})]})]}),e==="compute"&&f.jsx(IMn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&f.jsx(sOn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:fL()}),f.jsx(qMn,{})]}),e==="git"&&f.jsx(ZMn,{project:n,onProjectUpdate:t,remote:s})]})}function sb(e){return e.charAt(0).toUpperCase()+e.slice(1).replaceAll("-"," ")}function F5(e){return`${e.plugin?`${sb(e.plugin)}: `:""}${sb(e.name)}`}const mH=["plan","goal","new","resume","model","compact","copy","export"],cOn={plan:()=>Pbt(),goal:()=>SVe(),new:()=>jnt(),resume:()=>N7t(),model:()=>vet(),compact:()=>Ije(),copy:()=>lMe(),export:()=>r$e()};function lOn(e){return{name:e,get description(){return cOn[e]()},source:"command"}}function Ay(e){return mH.some(n=>n===e)}const ib={clear:"new",summarize:"compact"};function H5(e){const n=e.toLowerCase();return Ay(n)?n:Object.hasOwn(ib,n)?ib[n]:null}function gH(e){return Object.keys(ib).filter(n=>ib[n]===e)}function uOn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Ay(e.name)&&gH(e.name).some(t=>t.startsWith(n))}function o4(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(;r=r?h:s}${a.slice(h.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 fR(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 vH(e){return mH.filter(n=>n!=="plan"||e)}function dOn(e,n){const t=e.filter(r=>!H5(r.name));for(const r of vH(n))t.push(lOn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||F5(r).localeCompare(F5(s),void 0,{sensitivity:"base"}))}function c4(e){return e==="plan"||e==="goal"}function hOn(e,n){for(const t of vH(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...gH(t)].join("|");if(t==="plan"){const s=new RegExp(`(^|\\s)\\/(?:${r})(?=\\s|$)`,"gi");if(s.test(e))return{name:t,prompt:e.replace(s,"").trim()}}else if(t==="goal"){const s=new RegExp(`^\\/(?:${r})(?=\\s|$)`,"i");if(s.test(e.trim()))return{name:t,prompt:e.trim().replace(s,"").trim()}}else if(new RegExp(`^\\/(?:${r})$`,"i").test(e.trim()))return{name:t,prompt:""}}return null}function l4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const pOn=["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"];let mOn=null;function q5(e,n){const t=mOn??(mOn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(sb(e)).width-t.measureText(`/${e}`).width;return Math.max(2,Math.ceil((s+6)/t.measureText(" ").width))}const gOn={plan:t4n,goal:LI,new:O4n,resume:II,model:_S,compact:Awn,copy:Oh,export:fS};function bH({name:e,className:n}){const t=Ay(e)?gOn[e]:K4n;return f.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function yH({name:e}){return f.jsxs(f.Fragment,{children:[f.jsx(bH,{name:e,className:"me-1 inline-block align-middle"}),sb(e)]})}function xH(e,n,t,r,s,i=!1){let a=0;return _On(e,n).map((o,c,u)=>{var m,x;const h=a+o.text.length;a=h;const _=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,_,h,c);let p=o.text;return i||((m=u[c-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(x=u[c+1])!=null&&x.command&&(p=p.replace(/[ \t]+$/," "))),o.command?f.jsx("span",{className:t,onMouseDown:void 0,children:f.jsx(yH,{name:_})},c):i?f.jsx("span",{"aria-hidden":"true",children:o.text},c):f.jsx(A.Fragment,{children:p},c)})}function vOn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=A.useRef(null),o=A.useRef(null),c=A.useRef(null),u=A.useId(),[h,_]=A.useState(!1),p=lt({...Cyn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,x=p.isFetching,[k,v]=A.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},w=()=>{const N=a.current;if(!N)return;const z=N.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(z.left-4,window.innerWidth-T-16));v(z.top>300?{bottom:window.innerHeight-z.top+12,left:j,width:T}:{left:j,top:z.bottom+12,width:T})},y=()=>{b(),w(),_(!0)},C=()=>{b(),c.current=window.setTimeout(()=>_(!1),120)};return A.useEffect(()=>()=>b(),[]),A.useEffect(()=>{if(!h)return;const N=()=>w();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),f.jsxs(A.Fragment,{children:[f.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":CZ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onKeyDown:N=>{var z,T;if(N.key==="Escape"){_(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),y();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(T=o.current)==null||T.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var z,T;N.preventDefault(),(z=i.current)==null||z.focus(),(T=i.current)==null||T.setSelectionRange(t,t),b()},children:[f.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"}),f.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),f.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:f.jsx("span",{className:"bg-background text-skill-blue",children:f.jsx(yH,{name:n})})})]}),h&&oa.createPortal(f.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":MJ({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[f.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:[f.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),f.jsx(Ut,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:grn()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?f.jsx("span",{className:"text-muted",children:Srn()}):f.jsx(Jo,{text:m??r.description})})]}),document.body)]})}function bOn({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:xH(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function yOn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=A.useRef(null);return A.useLayoutEffect(()=>{const o=i.current,c=a.current;if(!o||!c)return;const u=()=>{const _=getComputedStyle(o);for(const p of pOn)c.style.setProperty(p,_.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.disconnect()},[e,i]),A.useLayoutEffect(()=>{const o=i.current;if(!o)return;const c=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return c(),o.addEventListener("scroll",c),()=>o.removeEventListener("scroll",c)},[i,e]),f.jsxs("div",{ref:a,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:[xH(e,t,"",void 0,(o,c,u,h)=>{var x;const _=e.slice(u),p=((x=/^[ \t]+/.exec(_))==null?void 0:x[0].length)??0;if(u===n||_&&!_.startsWith(` -`)&&pk.name===c);return m&&m.source!=="command"?f.jsx(vOn,{label:o,name:c,end:u,skill:m,projectId:s,textareaRef:i},`${h}:${u}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function xOn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=A.useRef(null);return A.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>f.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[f.jsx(bH,{name:i.name,className:"shrink-0"}),f.jsx("span",{className:"skill-name shrink-0",children:F5(i)}),f.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:Arn()})]},i.name))})}function wOn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const U5=6.5,dR=2*Math.PI*U5;function kOn({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(SOn,{usage:e})}function SOn({usage:e}){const{open:n,setOpen:t,ref:r}=_o(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":wOn(a),c=a===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(a/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.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:HRe(),onClick:()=>t(u=>!u),children:a===null?e1(s):f.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:U5,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:U5,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${dR*Math.max(a,2)/100} ${dR}`,transform:"rotate(-90 8 8)"})]})}),n&&f.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:[f.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[f.jsx("span",{children:DRe()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?QRe({value:Ne(e1(s))}):nMe({used:Ne(e1(s)),total:Ne(e1(i)),percent:Ne(c)})})]}),a!==null&&f.jsx(iH,{value:s,max:i,fillColor:o})]})]})}function COn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),f.jsxs("div",{role:"group","aria-label":yz(),children:[f.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:yz()}),r.slice(n)]},"from-terminal")]}function EOn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=A.useRef(null),i=A.useRef(null),{data:a,isPending:o,error:c}=lt(jyn()),{data:u=[]}=lt(_h()),{data:h=[]}=lt(ZL()),[_,p]=A.useState(""),[m,x]=A.useState(0);Em(s,n);const k=A.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=A.useMemo(()=>{const N=_.trim().toLowerCase(),z=M=>!N||M.toLowerCase().includes(N),T=(a??[]).filter(M=>M.id!==e).filter(M=>z(`${M.title??""} ${k.get(M.projectId)??""} ${su[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),j=h.filter(M=>z(`${M.title??""} ${M.cwd??""} ${su[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...T,...j]},[a,h,_,e,k]),b=A.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),w=Math.min(m,Math.max(0,v.length-1));A.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[w,v]);const y=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-start justify-center bg-modal-backdrop p-5 pt-[var(--modal-top)]",onClick:N=>{N.target===N.currentTarget&&n()},children:f.jsxs("div",{ref:s,className:"flex max-h-[calc(100vh_-_var(--modal-top)_-_1.25rem)] w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-label":wz(),tabIndex:-1,children:[f.jsx("div",{className:"border-b border-border p-3",children:f.jsx(Ir,{"data-initial-focus":!0,value:_,placeholder:xz(),"aria-label":xz(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[w]?`resume-option-${v[w].key}`:void 0,onChange:N=>{p(N.target.value),x(0)},onKeyDown:N=>{if(!N.nativeEvent.isComposing)if(N.key==="ArrowDown"||N.key==="ArrowUp"){if(N.preventDefault(),v.length===0)return;const z=N.key==="ArrowDown"?1:-1;x((w+z+v.length)%v.length)}else N.key==="Enter"&&v[w]&&(N.preventDefault(),C(v[w]))}})}),f.jsx("div",{id:"resume-options",className:"min-h-0 flex-1 overflow-y-auto p-1.5",role:v.length>0?"listbox":void 0,"aria-label":v.length>0?wz():void 0,children:o?f.jsxs(Br,{className:"px-2.5 py-2",role:"status",children:[f.jsx(zt,{})," ",Uk()]}):c&&!a?f.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:qk({error:Ne(c instanceof Error?c.message:String(c))})}):v.length===0?f.jsx("div",{className:"px-2.5 py-2 text-sm text-muted",role:"status",children:O7t()}):COn(v,b,(N,z)=>{var D;const T=N.kind==="native"?N.chat:null,j=N.kind==="session"?N.session:null;return f.jsxs(Xn,{id:`resume-option-${N.key}`,ref:z===w?i:void 0,type:"button",role:"option","aria-selected":z===w,active:z===w,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>x(z),onClick:()=>C(N),children:[f.jsx(mh,{harness:(T==null?void 0:T.harness)??(j==null?void 0:j.harness)??"claude-code"}),f.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(T==null?void 0:T.title)??(j==null?void 0:j.title))==null?void 0:D.trim())||vd()}),f.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(T==null?void 0:T.cwd)??void 0,children:T?y(T.cwd):k.get((j==null?void 0:j.projectId)??"")??""}),f.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:co((T==null?void 0:T.updatedAt)??(j==null?void 0:j.updatedAt)??0)})]},N.key)})})]})}),document.body)}const ab="!";function hR(e){return e.startsWith(ab)?e.slice(ab.length).trim():null}function NOn(e){return e.startsWith(ab)?e.slice(ab.length):e}function zOn(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 jOn(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 TOn(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 G5(e,n){return n?` - -\\[ -${e} -\\] - -`:`\\(${e}\\)`}function AOn(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 ROn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,c)=>a[c]??"").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 MOn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function OOn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function DOn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const wH="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",oC="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",ju=256,kH=1024,SH=2e4,u4=8,z1="chat-annotations";function w_(e){return e instanceof Element?e:e.parentElement}function pR(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function _4(e,n){return pR(e).compareBoundaryPoints(Range.START_TO_START,pR(n))<0}function mR(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const LOn=new Set(["A","B","CODE","EM","I","STRONG"]);function IOn(e,n){var s,i;const t=w_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=w_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(LOn.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=w_(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 $On(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 BOn(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,c=document.createRange();c.selectNode(o);const u={container:c.startContainer,offset:c.startOffset},h={container:c.endContainer,offset:c.endOffset};if(_4(s,u)&&t.append(mR(s,u)),t.append(o.cloneNode(!0)),s=h,!_4(s,r))break}return i.length===0?t.append(e.cloneContents()):_4(s,r)&&t.append(mR(s,r)),IOn(e,t),$On(t),t}function POn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>V0(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` - -${ROn(n,!!e.querySelector("tr:first-child th"))} - -`:""}function CH(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"),c=o===null?s:Number(o),u=Number.isFinite(c)?c:s;s=u+1;const h=Array.from(a.childNodes).map(_=>_ instanceof HTMLElement&&_.matches("UL, OL")?` -${CH(_).trim()} -`:V0(_)).join("").trim();i.push(AOn(n?`${u}.`:"-",h))}return` - -${i.join(` -`)} - -`}function V0(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return zOn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(V0).join("");if(e.matches(".katex-display")){const c=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return c?G5(c,!0):""}if(e.matches(".katex")){const c=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return c?G5(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return POn(e);if(e.matches("UL, OL"))return CH(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return jOn(e.textContent??"");if(e.tagName==="PRE")return TOn(e.textContent??"");const n=Array.from(e.childNodes).map(V0).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const c=e.getAttribute("href");return c?`[${n}](${c})`: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(c=>`> ${c}`).join(` -`)} - -`;const t=MOn(e.tagName,n);return t?` - -${t} - -`:e.matches("P, DIV, UL, OL, TABLE")?` - -${n.trim()} - -`:n}function FOn(e,n){return V0(e).replace(/\r\n?/g,` -`).replace(/[ \t]+\n/g,` -`).replace(/\n{3,}/g,` - -`).trim()||n}function gR(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function HOn(e,n){var s,i,a,o;if(!OOn(e))return;const t=gR(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const h=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=c.querySelector(".katex-html"))==null?void 0:i.textContent,c.textContent].filter(x=>!!x).map(gR).find(x=>DOn(x,t));if(!h)continue;const _=(o=(a=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!_)continue;const p=!!c.closest(".katex-display"),m={markdown:G5(_,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.deltaj.width>0&&j.height>0),x=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topx.top),v=k.length>0?k:[x],b=Math.min(...v.map(j=>j.left)),w=Math.max(...v.map(j=>j.right)),y=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),N=34,z=74,T=y>=N+u4?y-N-u4:C+u4;return{text:FOn(p,_),range:t.cloneRange(),x:Math.min(window.innerWidth-z,Math.max(z,b+(w-b)/2)),top:T}}function UOn(e,n){const[t,r]=A.useState(null),s=A.useRef(!1),i=A.useCallback(()=>{const c=e.current;r(c?qOn(c):null)},[e]);A.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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))},_=p=>{!p.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",h,!0),window.addEventListener("pointerup",_,!0),window.addEventListener("pointercancel",_,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!0),window.removeEventListener("pointerup",_,!0),window.removeEventListener("pointercancel",_,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[i]),A.useEffect(()=>{if(!t)return;const c=u=>{const h=u.target;h instanceof Element&&h.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",i)}},[t,i]);const a=A.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=A.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function GOn(e){A.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(z1);return}const t=new Highlight(...n);return CSS.highlights.set(z1,t),()=>{CSS.highlights.get(z1)===t&&CSS.highlights.delete(z1)}},[e])}function VOn({annotation:e}){const n=A.useRef(null),[t,r]=A.useState();return A.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?HOn(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Jo,{text:t??e.text})})}function KOn({annotations:e,onRemove:n}){return e.map((t,r)=>f.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:[f.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm text-muted mb-1",children:kke()}),f.jsx(VOn,{annotation:t})]}),n&&f.jsx(Bt,{type:"button",size:"small","data-annotation-remove":!0,title:E5e(),"aria-label":RZ({number:Xt(r+1)}),onClick:()=>n(t.id),children:f.jsx(or,{size:13})})]},t.id))}function cC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=A.useRef(null),i=A.useRef(null),a=A.useId(),o=_o(s),c=n==="sent",u=A.useRef(null),h=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},_=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const x=c||!o.open;o.setOpen(x),x&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var v,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.focus()})};return A.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),f.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:c?h:void 0,onMouseLeave:c?_:void 0,children:[f.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[f.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 ${c?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[f.jsx(BI,{size:c?13:14,className:"text-muted"}),e.length===1?sve():ipe({count:Xt(e.length)})]}),t&&f.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:oN(),"aria-label":oN(),onClick:t,children:f.jsx(or,{size:13})})]}),o.open&&f.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 ${c?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":mke(),children:f.jsx(KOn,{annotations:e,onRemove:r?m:void 0})})]})}function WOn(e){return f.jsx(cC,{...e,variant:"composer"})}const QOn=["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(" "),vR=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),XOn=["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(" "),YOn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),V5="prompt-actions flex flex-wrap gap-2",bR=[],ZOn=[],Qp={};function g_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function f4(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 JOn(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 qs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function d4(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 h4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=ju));s++);return r}function eDn(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 $d(...e){const n=new Set,t=new RegExp(`^${H_}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=ju||r++>=kH)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Ry(e){return e.replace(/^Exit code \d+\s*/i,"").split(` -`).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function tDn(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 nDn(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=m7n(r),EH(r)}function EH(e){return sDn(e).replace(/[\t\r ]+/g," ").trim()}function rDn(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&&zH(s)?{ref:r,path:s}:null}function oDn(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 yR(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 cDn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const c=yR(s,o);if(!c)return null;s=c}return s?yR(s,e):e}const $o="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",lDn=new RegExp(`\\bchat_(${$o})\\b`,"gi"),H_=`(?:${$o}|[0-9a-f]{8})`;function Bd(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 h=1,_=null,p=!1;for(let m=u;m{let h=!1;for(let _=u;_b7n(t.raw,n))}function ja(e,n){return My(e,n).length>0}function uDn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,SH).matchAll(lDn))if(n.add(t[0].toLowerCase()),n.size>=ju)break;return[...n]}function K5(e,n){if(!e)return[];const t=new Set,r=e.slice(0,SH),s=n==="runs"?[new RegExp(`/runs/(${$o})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${$o})`,"gi"),new RegExp(`^\\s*RUN\\s+(${$o})\\b`,"gim"),new RegExp(`={3,}\\s*(${$o})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${$o})`,"gi"),new RegExp(`^\\s*id:\\s*(${$o})`,"gim"),new RegExp(`={3,}\\s*(${$o})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=ju)return[...t];const i=new RegExp(`^\\s*(${$o})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=ju)break;return[...t]}function TH(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 AH(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 RH(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 c=o+a[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function _Dn(e,n,t=[],r=[]){const s=My(e,"logs"),i=new Set;if(s.length===0){if(!ja(e,"logs"))return[];const o=t.length>0?[]:K5(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=ju)break;return $d([...i])}let a=!1;for(const{invocation:o,offset:c}of TH(e,s)){const u=bh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let _=null;for(let v=0;v0?[]:K5(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=ju)break}return $d([...i])}function pd(e,n,t=[],r=[]){const s=My(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of TH(e,s)){const u=bh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let _=!1;h&&new RegExp(`^${H_}$`,"i").test(h)&&(i.add(h),_=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],x=AH(e,m,c,H_);if(x.length>0){for(const v of x)i.add(v);_=!0}const k=RH(e,m,c,H_);for(const v of k)i.add(v);k.length>0&&(_=!0)}_||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:K5(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=ju)break}return $d([...i])}const xR=new WeakMap;function nf(e){const n=E(),t=xR.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=fDn(e);return xR.set(e,{locale:n,activity:r}),r}function fDn(e){var b,w,y,C,N,z;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=qs(i,"command","cmd"),o=eDn(i,"commandArgv"),c=((w=e.state)==null?void 0:w.output)||((y=e.state)==null?void 0:y.error),u=$d(h4(i,"targetIds")),h=$d(h4(i,"runTargetIds")),_=$d(h4(i,"experimentTargetIds")),p=qs(i,"filePath","file_path","notebookPath","notebook_path","path"),m=qs(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),k=x.at(-1)??n.toLowerCase();if(k==="run"&&x.includes("web")){const T=d4(i,"search_query","q"),j=d4(i,"image_query","q"),M=d4(i,"find","pattern");return T?{kind:"web",label:qE({query:T})}:j?{kind:"web",label:Bie({query:j})}:M?{kind:"web",label:vae({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:I4e()}:Array.isArray(i.weather)?{kind:"web",label:sxe()}:Array.isArray(i.finance)?{kind:"web",label:Uye()}:Array.isArray(i.sports)?{kind:"web",label:Yye()}:Array.isArray(i.time)?{kind:"web",label:Iye()}:{kind:"web",label:iN()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["compacted","contextcompaction"],["imported","importedchat"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:A3e()};const T=nDn(a??(o==null?void 0:o.join(" "))??""),j=Bd(T);let M=j.map(G=>G.raw);if(o!=null&&o.length){const G=v7n(o);M=G===null?[o]:Bd(EH(G)).map(oe=>oe.raw)}let D=null;for(const G of M)if(D=y7n(G),D)break;const I=M.some(G=>{const oe=bh(G);return oe!==null&&oe[0]!=="discover"&&oe[0]!=="paper"});if(D&&!I){const G=D.kind==="discover"?{keyword:aie(),embedding:die(),openalex:iae(),biorxiv:yie()}[D.strategy]:null,oe=D.kind==="discover"?D.query?qte({activity:G??HE(),query:D.query}):G??HE():D.id?Ip({target:Ne(D.id)}):bre();return{kind:D.kind==="paper"?"read":"search",label:oe,litCall:D}}if(ja(T,"agent\\s+spawn"))return{kind:"agent",label:qxe(),spawnedSessionIds:uDn(c),litCall:D??void 0};const $=j.map(G=>jH(G.raw)),q=ja(T,"exp\\s+status"),H=ja(T,"exp\\s+desc"),Q=My(T,"exp\\s+desc").some(G=>(bh(G.raw)??[]).some(le=>le==="--set"||le.startsWith("--set=")||le==="--stdin")),V=Q?doe():fre(),J=Q?hee():Ese();if(ja(T,"logs")){const G=_Dn(T,c,h,u);return{kind:"project",label:G.length===1?fse():bse(),runIds:G,litCall:D??void 0}}if(ja(T,"exp\\s+run"))return{kind:"project",label:tSe(),litCall:D??void 0};if(ja(T,"exp\\s+wait"))return{kind:"project",label:rCe(),litCall:D??void 0};if(ja(T,"exp\\s+cancel"))return{kind:"project",label:rye(),litCall:D??void 0};const Z=ja(T,"project\\s+view");if(Z&&q&&H)return{kind:"project",label:J,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(Z&&H)return{kind:"project",label:V,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(Z&&q)return{kind:"project",label:aN(),experimentIds:pd(T,c,_,u),litCall:D??void 0};if(Z)return{kind:"project",label:i5e(),litCall:D??void 0};if(q&&H)return{kind:"project",label:J,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(q)return{kind:"project",label:aN(),experimentIds:pd(T,c,_,u),litCall:D??void 0};if(H)return{kind:"project",label:V,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(ja(T,"runs?"))return{kind:"project",label:Xwe(),litCall:D??void 0};if(ja(T,"projects"))return{kind:"project",label:r4e(),litCall:D??void 0};if(ja(T,"compute"))return{kind:"project",label:gye(),litCall:D??void 0};const B=$.map(aDn).find(G=>G!=null);if(B){const G=f4(B.path);return{kind:G?"skill":"read",label:G?V2({name:Ne(G)}):Ip({target:Ne(g_(B.path))}),filePath:B.path,fileRef:B.ref,labelTarget:G?`${G} skill`:g_(B.path)}}const L=$.findIndex(G=>G!=null&&["sed","cat","head","tail"].includes(G.name)),F=L>=0?$[L]:null,U=F?iDn(F):null,K=U?cDn(U,j,L,qs(i,"cwd","workdir")):null;if(U&&K){const G=f4(K);return{kind:G?"skill":"read",label:G?V2({name:Ne(G)}):Ip({target:Ne(g_(U))}),filePath:K,labelTarget:G?`${G} skill`:g_(U)}}if($.some(G=>(G==null?void 0:G.name)==="find"||(G==null?void 0:G.name)==="ls"||(G==null?void 0:G.name)==="rg"&&G.args.includes("--files")))return{kind:"search",label:mN()};const ne=$.findIndex(G=>(G==null?void 0:G.name)==="rg"||(G==null?void 0:G.name)==="grep");if(ne>=0){const G=oDn(j[ne].raw);return{kind:"search",label:G?W2({pattern:Ne(G)}):K2(),searchPattern:G??void 0}}const ce=$.find(G=>(G==null?void 0:G.name)==="git"),_e=ce==null?void 0:ce.args[0];if(_e==="grep"){const G=ce==null?void 0:ce.args.slice(1).find(oe=>!oe.startsWith("-"));return{kind:"search",label:G?W2({pattern:Ne(G)}):K2(),searchPattern:G}}if(_e==="status")return{kind:"command",label:Tye()};if(_e==="diff")return{kind:"command",label:rke()};if(_e==="log")return{kind:"command",label:Z3e()};const se=G=>$.some(oe=>!oe||!["cargo","pnpm","npm","yarn"].includes(oe.name)?!1:oe.args[0]===G||oe.args[0]==="run"&&oe.args[1]===G);return se("test")?{kind:"command",label:$3e()}:$.some(G=>(G==null?void 0:G.name)==="tsc")||se("typecheck")?{kind:"command",label:_xe()}:se("lint")?{kind:"command",label:uye()}:se("build")?{kind:"command",label:qbe()}:{kind:"command",label:Gne({command:Ne(T)})}}case"skill":{const T=qs(i,"skill","name"),j=T?JOn(n,T):null;return{kind:"skill",label:T?Sne({name:Ne(T)}):gne(),filePath:j??void 0,labelTarget:j&&T?`${T} skill`:void 0}}case"read":{const T=p?g_(p):null,j=p?f4(p):null;return j?{kind:"skill",label:V2({name:Ne(j)}),filePath:p??void 0,labelTarget:`${j} skill`}:T?{kind:"read",label:Ip({target:Ne(T)}),filePath:p??void 0,labelTarget:T}:{kind:"read",label:G3e()}}case"edit":case"write":case"notebookedit":{const T=tDn(i),j=p??(T==null?void 0:T.path)??null,M=j?g_(j):null,D=M?(T==null?void 0:T.type)==="add"?Wee({target:Ne(M)}):(T==null?void 0:T.type)==="delete"?pte({target:Ne(M)}):jte({target:Ne(M)}):null;return M?{kind:"edit",label:D??fN(),filePath:j??void 0,labelTarget:M}:{kind:"edit",label:fN()}}case"grep":{const T=qs(i,"pattern");return{kind:"search",label:T?W2({pattern:Ne(T)}):K2(),searchPattern:T??void 0}}case"glob":{const T=qs(i,"pattern");return{kind:"search",label:T?rne({pattern:Ne(T)}):mN()}}case"websearch":{const T=qs(i,"query"),j=qs(i,"url"),M=qs(i,"pattern");return T?{kind:"web",label:qE({query:T})}:M&&j?{kind:"web",label:Zie({pattern:M})}:j?{kind:"web",label:$ne({target:Ne(j)})}:{kind:"web",label:m??iN()}}case"webfetch":{const T=qs(i,"url");return{kind:"web",label:T?Ip({target:Ne(T)}):m??$re()}}case"task":return{kind:"agent",label:m??Zne()};case"subagent":return{kind:"agent",label:dDn(i)};case"error":return{kind:"command",label:I6e()};case"importedchat":return{kind:"project",label:Xte()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Fee():((N=e.state)==null?void 0:N.status)==="running"?FE():zee(),progressLabel:FE()};default:{const T=m??p??a??((z=e.state)==null?void 0:z.title)??"";return{kind:"command",label:T?`${n}: ${T}`:n}}}}function dDn(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 Bae();case"sendInput":return Rae();case"resumeAgent":return Zre();case"wait":return yoe();case"closeAgent":return xee()}switch(typeof e.kind=="string"?e.kind:""){case"started":return aoe();case"interacted":return KJ();case"interrupted":return Jae()}return Vae()}function ob({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(mf,{...t});if(e.litCall)r=f.jsx(PB,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(zI,{...t});break;case"read":case"project":r=f.jsx(jI,{...t});break;case"search":r=f.jsx(HI,{...t});break;case"edit":r=f.jsx(mS,{...t});break;case"web":r=f.jsx(Vwn,{...t});break;case"agent":r=f.jsx(yS,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function p4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=A.useState(!1),a=A.useRef(null),o=A.useRef(!1);return A.useEffect(()=>{var c,u;!s||!o.current||(o.current=!1,(u=(c=a.current)==null?void 0:c.querySelector("button"))==null||u.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((c,u)=>f.jsxs("span",{children:[u>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?$r(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.stopPropagation(),t==null||t(c.id)}},children:c.label}):f.jsx("span",{children:c.label})]},c.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?YX({target:r}):EJ({count:Xt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?ND():Oze({count:Xt(e.length)})})]})}function W5({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:E7n(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(X2n,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...$r(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((x,k)=>({id:x,label:YE({number:Xt(p.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:T4e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(x)},children:YE({number:Xt(k+1)})})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onSelect:r,targetType:Vhe()})]})]})}if((u=e.runIds)!=null&&u.length){const _=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||Vc()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:ZY({run:Ne(x)}),...$r(v=>t(x,v),{stopPropagation:!0}),children:(s==null?void 0:s(x))||Vc()}):f.jsx("span",{children:(s==null?void 0:s(x))||Vc()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onOpen:t,targetType:u8e()})]})]})}if((h=e.experimentIds)!=null&&h.length){const _=a?e.experimentIds.filter(x=>!!a(x)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(a==null?void 0:a(x))||Vc()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",i?f.jsx("button",{className:"tool-target",title:AY({name:(a==null?void 0:a(x))||Ne(x)}),...$r(v=>i(x,v),{stopPropagation:!0}),children:(a==null?void 0:a(x))||Vc()}):f.jsx("span",{children:(a==null?void 0:a(x))||Vc()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onOpen:i,targetType:zme()})]})]})}return e.label}function lC(e){const n=e.progressLabel??{skill:Ane(),read:Gre(),search:Cae(),edit:Lte(),project:Mse(),web:oee(),agent:cte(),command:hD()}[e.kind];return{...e,label:n}}function MH(e,n){const t=nf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:une(),read:ire(),search:Jse(),edit:wte(),project:ise(),web:eee(),agent:tte(),command:Pse()}[t.kind]}function hDn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const pDn=250;function mDn(e,n){const[t,r]=A.useState(e),s=A.useRef(Date.now()),i=A.useRef(e);return A.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=pDn-(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 gDn=160;function OH(e){const[n,t]=A.useState(!1);return A.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),gDn);return()=>window.clearTimeout(r)},[e]),e&&n}function vDn(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:wD()}}function bDn(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 yDn(e){const n=[];let t=null;for(const r of e){const s=nf(r),i=bDn(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 DH({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var x,k;const i=(x=e.state)==null?void 0:x.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,c]=A.useState(Date.now());if(A.useEffect(()=>{if(typeof a!="number"||(c(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=u7n(i??{},o);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(zt,{}),f.jsx("span",{children:v})]})}const u=$B(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,_=IB(e)?Xge():s?j8e():jN(),p=s?Pwn:bS,m=Ry(((k=e.state)==null?void 0:k.error)||jN());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(Ba,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&h&&(u==="retry"||u==="continue")&&f.jsx(De,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?r9e():u==="retry"?Vs():F0e()})]})}function wR({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",_=Ry((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!_,[m,x]=A.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx(DH,{part:e,busy:!1,recovering:!1,usageLimited:i5(e)});const v=f.jsxs(f.Fragment,{children:[h&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),h?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(RI,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(ob,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${wH} ${h?"text-accent-red":"text-subtext"}`,children:[f.jsx(W5,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:_Y({count:Xt(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,f.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":k,"aria-label":m?sY({activity:n.label}):bJ({activity:n.label}),onClick:()=>x(b=>!b),children:f.jsx(Ba,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:oC,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function xDn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,D,I;const[c,u]=A.useState(!1),[h,_]=A.useState(!1),p=()=>{_(!0),u($=>!$)},m=yDn(e),x=m.map(({activity:$})=>$),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,w=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(b&&lC(b))??null:null,y=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(w!=null&&w.progressLabel)&&(hDn((D=v.state)==null?void 0:D.input)||(w==null?void 0:w.kind)==="command"&&!qs(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=mDn(w,y),N=OH(C!=null),z=C??vDn(x),T=C?C.label:wD();return e.length===1?C?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(ob,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:T,children:f.jsx(W5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(wR,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.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:[f.jsx(ob,{activity:z,className:N?"tool-running-shimmer-icon":"text-muted"}),C?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:T,children:f.jsx(W5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":c,children:T}),f.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":c,"aria-label":c?y0e():xme(),children:f.jsx(Ba,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:h&&m.map(({part:$,count:q,activity:H})=>f.jsx(wR,{part:$,repeatCount:q,activity:H,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},$.id))})})})]})}function wDn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;const s=e.prompt,[i,a]=A.useState([]),o=!n,c=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:Y4e(),icon:Xi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:v3e(),icon:mS,iconClass:"text-accent-amber"}:s.approved===!1?{label:s3e(),icon:or,iconClass:"text-accent-red"}:{label:_3e(),icon:Ob,iconClass:"text-muted"},x=m.icon;return f.jsxs("details",{className:XOn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?SD():EN()}),f.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(Ba,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${vR} ms-6`,children:[f.jsx(Jo,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(cC,{annotations:p,variant:"sent"}),f.jsxs("details",{className:QOn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||n7e()}),f.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 ${_?"chosen":""}`,children:_||X7e()})]}),f.jsxs("div",{className:vR,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.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 f.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.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:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?qCe():EN()}),f.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 ${_?"clamped":""}`,children:f.jsx(Jo,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...$r(p=>r(s.plan??"",e.id,p)),children:X6e()}),!o&&!_&&f.jsxs("div",{className:V5,children:[f.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:Sve()}),f.jsx(De,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:Ave()}),f.jsx(De,{size:"small",onClick:()=>c({approve:!1}),children:f5e()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=qs(_,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",x=qs(_,"description")||"",k=m||x||MH(s.tool,_),v=`permission-heading-${e.id}`;return f.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":v,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(bS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:ibe()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&f.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&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(De,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:x2e()}),f.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:Zve()})]})]})]})}const u=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.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&&f.jsx("div",{className:YOn,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=i.includes(_.label);return f.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(_.label):c({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:V5,children:f.jsx(De,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:T6e()})})]})}function kDn(e,n){return e.role==="user"?!0:e.parts.some(t=>vh(t,n))}function SDn(e){const n=e.text??"",t=n.startsWith("data:")?n:Ybn(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}}async function uC(e){try{if(!navigator.clipboard)throw new Error(TD());await navigator.clipboard.writeText(e),yn(j0(),"success")}catch(n){yn(n instanceof Error?n.message:String(n),"error")}}function CDn(e,n){const t=URL.createObjectURL(new Blob([n],{type:"text/markdown;charset=utf-8"})),r=document.createElement("a");r.href=t,r.download=e,document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(t),1e3)}function EDn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,_=new Date(n),p=()=>uC(e);return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&f.jsxs(f.Fragment,{children:[f.jsx(Bt,{size:"small",title:vN(),"aria-label":vN(),disabled:o||!s,onClick:()=>s&&a(s),children:f.jsx(TI,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(Bt,{size:"small",title:gN(),"aria-label":gN(),disabled:o||!i,onClick:()=>i&&a(i),children:f.jsx(Ba,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(E(),{hour:"numeric",minute:"2-digit"})}),f.jsx(Bt,{size:"small","aria-label":Vk(),disabled:!e,onClick:p,children:f.jsx(Oh,{size:13})})]}),f.jsx(Bt,{size:"small",title:_N(),"aria-label":_N(),disabled:u,onClick:c,children:f.jsx(mS,{size:13})})]})}const NDn=A.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:w,forkIndex:y=0,forkPrevId:C,forkNextId:N,forkDisabled:z,branchDisabled:T,onFork:j,onSelectFork:M}){var J,Z;hf();const[D,I]=A.useState(null),$=jDn(n);if($)return f.jsx(TDn,{part:$});if(n.role==="user"){const B=n.parts.filter(ce=>ce.type==="text").map(ce=>ce.text??"").join(` -`),L=ce=>!!(v!=null&&v.some(_e=>_e.name===ce)),F=n.parts.filter(ce=>ce.type==="image"&&ce.text).map(SDn),U=F.filter(ce=>!ce.isPdf),K=F.filter(ce=>ce.isPdf),ne=n.parts.filter(ce=>ce.type==="annotation"&&ce.text).map(ce=>({id:ce.id,text:ce.text??""}));if(D!==null){const ce=()=>{const _e=D.trim();!_e||z||(I(null),j(n.id,_e))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.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":P2e(),value:D,autoFocus:!0,onChange:_e=>I(_e.target.value),onKeyDown:_e=>{_e.key==="Escape"?(_e.preventDefault(),I(null)):_e.key==="Enter"&&!_e.shiftKey&&!_e.nativeEvent.isComposing&&(_e.preventDefault(),ce())}}),f.jsxs("div",{className:`${V5} justify-end`,children:[f.jsx(De,{size:"small",onClick:()=>I(null),children:Xbe()}),f.jsx(De,{size:"small",variant:"primary",onClick:ce,disabled:z||!D.trim(),children:i3()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[ne.length>0&&f.jsx(cC,{annotations:ne,variant:"sent"}),f.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]:align-baseline",children:[f.jsx(bOn,{text:B,isCommand:L}),U.length>0&&f.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:U.map((ce,_e)=>f.jsx("a",{href:ce.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:ce.src,alt:Mpe()})},_e))}),K.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:K.map((ce,_e)=>f.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:ce.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Ob,{size:15}),f.jsx("span",{children:ce.name})]},_e))})]}),w!==void 0&&f.jsx(EDn,{text:B,createdAt:n.createdAt,count:w,index:y,prevId:C,nextId:N,onSelect:M,pagerDisabled:T,onEdit:()=>I(B),editDisabled:z})]})}const q=n.parts.find(B=>B.type==="tool"&&i5(B)),H=n.parts.find(Rm)??q,Q=n.parts.filter(B=>B!==H&&!(q&&i5(B))),V=b&&!n.completedAt?"":LB(n);return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(zDn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:b}}),H&&f.jsx(DH,{part:H,usageLimited:!!q,busy:m,recovering:x===((Z=(J=H.state)==null?void 0:J.input)==null?void 0:Z.turnId),onRecover:k}),V&&f.jsx("div",{className:"flex opacity-0 transition-opacity duration-80 ease-standard group-hover/turn:opacity-100 group-focus-within/turn:opacity-100",children:f.jsx(Bt,{size:"small",title:JE(),"aria-label":JE(),onClick:()=>void uC(V),children:f.jsx(Oh,{size:13})})})]})});function zDn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=OB(n,r),[a,o]=A.useState(!1),[,c]=A.useState(0);if(A.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>c(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:iv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,_=h===null?null:h<6e4||h>=36e5?T0(h):IEe({minutes:Xt(Math.floor(h/6e4)),seconds:Xt(Math.floor(h/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[f.jsx("span",{children:_===null?TEe():UEe({duration:_})}),f.jsx(Ba,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:iv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:iv(i,t)})]})}function jDn(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===JL?n:null}function TDn({part:e}){var c;const n=e.state,t=qs((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((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),o=r?hD():s&&i!==null?o0e({code:Xt(i)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[bD()," "]}),f.jsx(mf,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${oC} mt-2`,children:a.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function iv(e,n){var w,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&vh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(f.jsx(xDn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(vh(C,t)){if(C.type==="tool"&&(RDn(C.tool)||(((w=C.children)==null?void 0:w.length)??0)>0)){b(),k.push(f.jsx(ODn,{part:C,pendingTail:m&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(f.jsx(Jo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":SCe(),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&&k.push(f.jsx(wDn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:_},C.id))}return b(),k}function ADn(e){return nf(e).label}function RDn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function LH(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 cb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&cb(t.children,n);if(r)return r}return null}function MDn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var x,k,v,b;const o=e.children??[],c=((x=e.state)==null?void 0:x.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Ry(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",_=iv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?RB(o):null}),m=o.some(w=>w.type==="text"&&!!w.text)?"":LH(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),h&&f.jsx("div",{className:oC,children:h.slice(0,2e4)}),_.length===0&&!m&&!h?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?Hk():m1e()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(Jo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function ODn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,_,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Ry(((h=e.state)==null?void 0:h.error)||((_=e.state)==null?void 0:_.output)||""),i=n&&!r?lC(nf(e)):nf(e),a=OH(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!LH(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(RI,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(ob,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${wH} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?f.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:c}):f.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:_ve(),...$r(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Ba,{size:12})})]})}function DDn(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 c of s){const u=`${i}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(u,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function _C(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=qs(o,"reason","description")||MH(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 LDn(e){const[n,t]=A.useState({text:"",sequence:0}),r=A.useRef(null);return A.useEffect(()=>{var x,k,v,b,w;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:a}=DDn(e),o=_C(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(y=>({text:o?UE({label:Gi(o.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([y,C])=>{var N;return((N=c.get(y))==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(y=>({text:UE({label:Gi(o.label)}),sequence:y.sequence+1}));return}const _=(k=h.find(([,y])=>Rm(y.part)))==null?void 0:k[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const y=$B((b=(v=_.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${zce()}${y?` ${y==="retry"?Koe():Poe()}`:""}`,sequence:C.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(y=>({text:Moe(),sequence:y.sequence+1}));return}const p=h.filter(([,y])=>y.status==="error");if(p.length>0){const y=p.slice(0,2).map(([,C])=>nf(C.part).label).join(", ");t(C=>({text:p.length===1?hce({labels:y}):xce({count:Xt(p.length),labels:y}),sequence:C.sequence+1}));return}const m=h.filter(([,y])=>y.status==="running");if(m.length>0){const y=(w=m.at(-1))==null?void 0:w[1].part;t(C=>({text:y?lC(nf(y)).label:ece(),sequence:C.sequence+1}));return}h.some(([,y])=>y.status==="completed")&&t(y=>({text:oce(),sequence:y.sequence+1}))},[e]),n}const IDn=A.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,recoveringTurnId:C,onRecover:N,skills:z}){var B,L,F;hf();const T=((B=_C(n))==null?void 0:B.id)??null,j=A.useMemo(()=>n.filter(U=>kDn(U,T)),[n,T]),M=A.useMemo(()=>{const U=j.filter(K=>K.role==="user"&&!K.id.startsWith(B_));return r7n(a,n,U,K=>K.startsWith(B_))},[n,j,a]),D=A.useRef(new Set),[I,$]=A.useState(!1),q=A.useCallback(U=>j[U].id,[j]),H=A.useCallback(U=>{if(I)return j.map((ne,ce)=>ce);const K=new Set(TB(U));return j.forEach((ne,ce)=>{D.current.has(ne.id)&&K.add(ce)}),[...K].sort((ne,ce)=>ne-ce)},[j,I]),Q=e7n({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:q,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,j.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:H});A.useLayoutEffect(()=>{const U=()=>Q.scrollToEnd();return r.current=U,i(),()=>{r.current=null}},[Q,r,i]),A.useEffect(()=>{const U=()=>{var ce;const K=window.getSelection();if(!K||K.isCollapsed||!K.rangeCount)return;const ne=K.getRangeAt(0);for(const _e of((ce=t.current)==null?void 0:ce.querySelectorAll("[data-message-id]"))??[])ne.intersectsNode(_e)&&_e.dataset.messageId&&D.current.add(_e.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const V=j.at(-1),J=LDn(n),Z=h?MB(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:J.text},J.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":I,onClick:()=>$(U=>!U),children:q8e()}),f.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(U=>{var se,G,oe,le,fe,me;const K=j[U.index],ne=K.parts.find(Rm),ce=(G=(se=ne==null?void 0:ne.state)==null?void 0:se.input)==null?void 0:G.turnId,_e=ne?h||C!==null:!1;return f.jsx("div",{"data-index":U.index,"data-message-id":K.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:Re=>{!(Re.target instanceof Element)||!Re.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(K.id),onFocusCapture:()=>D.current.add(K.id),children:f.jsx(NDn,{message:K,forkCount:(oe=M.get(K.id))==null?void 0:oe.count,forkIndex:(le=M.get(K.id))==null?void 0:le.index,forkPrevId:(fe=M.get(K.id))==null?void 0:fe.prevId,forkNextId:(me=M.get(K.id))==null?void 0:me.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:T,pendingTailToolId:(Z==null?void 0:Z.messageId)===K.id?Z.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,busy:_e,recoveringTurnId:ce===C?C:null,onRecover:N,skills:z,predictTextTail:h&&K===V&&K.role==="assistant"})},K.id)})})]})}),$Dn=(e,n)=>e==="all"?!0:e==="archived"?n:!n,IH=[{id:"active",label:$ve,railLabel:CD},{id:"archived",label:rN,railLabel:rN},{id:"all",label:Gve,railLabel:vD}];function BDn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=_o();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(Bt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:pN(),"aria-label":pN(),onClick:()=>r(i=>!i),children:f.jsx(qI,{size:13})}),t&&f.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:IH.map(i=>f.jsxs(Xn,{onClick:()=>{n(i.id),r(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(Xi,{size:13})]},i.id))})]})}const PDn=14,FDn=500,HDn=1200;function $H({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.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*PDn,FDn)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function qDn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:_,ref:p}=_o(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[x,k]=A.useState(!1),[v,b]=A.useState(""),w=A.useRef(null);function y(){var z;b(((z=e.title)==null?void 0:z.trim())||""),k(!0)}function C(){var T;const z=v.trim();k(!1),z&&z!==(((T=e.title)==null?void 0:T.trim())||"")&&o(z)}return A.useEffect(()=>{var z,T;x&&((z=w.current)==null||z.focus(),(T=w.current)==null||T.select())},[x]),f.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":""} ${h?"menu-open":""} ${x?"editing":""}`,title:`${su[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?X8e():""}`,onClick:()=>{x||(h?_(!1):a())},onKeyDown:z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),h?_(!1):a())},children:[e.parentSessionId&&!x&&f.jsx(yS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?f.jsx("input",{ref:w,className:"session-title-input","aria-label":Hke(),value:v,onChange:z=>b(z.target.value),onClick:z=>z.stopPropagation(),onBlur:C,onKeyDown:z=>{z.stopPropagation(),z.key==="Enter"?(z.preventDefault(),C()):z.key==="Escape"&&(z.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx($H,{title:m,animate:i!==void 0},i??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsx("button",{className:"session-menu-btn",title:kN(),"aria-label":kN(),onClick:z=>{z.stopPropagation(),_(T=>!T)},children:f.jsx(dS,{size:14})}),h&&f.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:[f.jsx(Xn,{onClick:z=>{z.stopPropagation(),_(!1),y()},children:f.jsx("span",{children:xD()})}),f.jsx(Xn,{onClick:z=>{z.stopPropagation(),_(!1),c(!e.archived)},children:f.jsx("span",{children:e.archived?uEe():fpe()})}),f.jsx(Xn,{danger:!0,onClick:z=>{z.stopPropagation(),_(!1),u()},children:f.jsx("span",{children:yD()})})]})]})}const kR=[jI,HI,mf,hh],UDn=()=>[{title:pSe(),prompt:cSe()},{title:jSe(),prompt:wSe()},{title:qSe(),prompt:LSe()},{title:r6e(),prompt:XSe()}],m4=[{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"}],SR="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function GDn({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:_,onOpenPlan:p,onOpenSubagent:m,runtime:x,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:w,onActiveSessionChange:y,preferredAgent:C,onPreferredAgentChange:N,children:z}){var Vu,zo,Ku,ga,yc,Lf,vs;const T=ln({mutationFn:te=>Kbn(...te)}),j=ln({mutationFn:te=>Gbn(...te)}),M=ln({mutationFn:te=>Vbn(...te)}),D=ln({mutationFn:te=>Bbn(...te)}),I=ln({mutationFn:te=>Fbn(...te)}),$=ln({mutationFn:te=>qbn(...te)}),q=ln({mutationFn:te=>Ubn(...te)}),H=ln({mutationFn:Hbn}),Q=A.useMemo(()=>La(e),[e]),{data:V=ZOn}=lt(Q),J=A.useCallback(te=>{Wr(Q.queryKey,be=>{if(!be)return;const ze=typeof te=="function"?te(be):te,X=new Map(be.map(ae=>[ae.id,ae]));for(const ae of ze)X.get(ae.id)!==ae&&Za(tt,Q.queryKey,ae.id),X.delete(ae.id);for(const ae of X.keys())Za(tt,Q.queryKey,ae);return ze})},[Q]),Z=w,B=A.useRef(y);B.current=y;const L=A.useRef({projectId:e});L.current.projectId!==e&&(L.current={projectId:e});const[F,U]=A.useState(new Set),[K,ne]=A.useState("active"),[ce,_e]=A.useState(""),[se,G]=A.useState(!1),[oe,le]=A.useState(!1),[fe,me]=A.useState([]),Re=A.useRef(0),Oe=A.useRef({projectId:e,activeId:Z,mainView:i});(Oe.current.projectId!==e||Oe.current.activeId!==Z||Oe.current.mainView!==i)&&(Oe.current={projectId:e,activeId:Z,mainView:i});const[We,He]=A.useState([]),[Se,it]=A.useState(null),Je=Z??"new",ot=A.useRef(new Map),wt=A.useRef(bw);wt.current={draft:ce,attachments:We,annotations:fe};const Pt=e===$p&&V.length>0&&V.every(te=>R1n[te.id]===te.activeLeafId)?Lz:null,dt=A.useRef(null);Pt!==null&&dt.current===null&&Z!==null&&(dt.current=Je);const ft=Je===dt.current?Pt:null;A.useLayoutEffect(()=>{const te=ot.current.get(Je)??bw;return wt.current=te,_e(te.draft),He(te.attachments),me(te.annotations),()=>{const be=d7n(wt.current,ft);be?ot.current.set(Je,be):ot.current.delete(Je)}},[Je,ft]);const[Le,ge]=A.useState(null),Te=A.useRef(Promise.resolve()),Pe=A.useRef(0),rt=A.useRef(0),[ut,pt]=A.useState(null),qe=A.useRef(null),Kt=A.useRef(!1),sn=A.useRef(null),[Tt,mt,Bn]=Oyn(e,i==="chat"?Z:null),{data:Jt=KDn}=lt(ku()),[xn,vr]=A.useState(C);A.useEffect(()=>vr(C),[C]);const[Pn,Rn]=A.useState({}),[Fn,_r]=A.useState(Qp),[Pr,Et]=A.useState(null),un=A.useRef(!1),zn=A.useRef(null),[an,fr]=A.useState(null),fn=A.useRef(!1),wn=A.useRef(null),[Yn,kt]=A.useState(new Map),At=A.useRef(new Map),Ve=A.useRef(null),bt=A.useRef(null),Mn=A.useRef(null),tn=A.useRef(!0),[on,Zn]=A.useState(!0),cn=A.useRef(null),[ps,hi]=A.useState(!1),Rs=_o(),Qs=A.useCallback(te=>{var be;Re.current+=1,me(ze=>[...ze,{id:`annotation-${Re.current}`,...te}]),(be=cn.current)==null||be.focus()},[]),ms=UOn(bt,Qs);GOn(fe),A.useEffect(()=>{hi(!1),ms.dismiss()},[Z,e,ms.dismiss]);const[ua,Ms]=A.useState(0),[_a,Fr]=A.useState(!1),[nr,ho]=A.useState(0),[po,qn]=A.useState(0),Hr=A.useRef(!1);function mo(te){if(!Gn)return;if(!gi&&te.source==="command"&&Ay(te.name)&&te.name!=="goal"){Pu(te.name,ce,Gn);return}const be=te.source==="command"?1:q5(te.name,cn.current),ze=fOn(ce,Gn,te.name,be);_e(ze.text),window.requestAnimationFrame(()=>{var X,ae;(X=cn.current)==null||X.focus(),(ae=cn.current)==null||ae.setSelectionRange(ze.cursor,ze.cursor),qn(ze.cursor)})}function go(te){if(Ds)return!1;const be=te.selectionStart;if(Hr.current||be!==te.selectionEnd)return!1;const ze=ce.slice(0,be).replace(/[ \t]+$/,"").length,X=o4(ce,ze);if(!X||X.end!==ze||!yl(X.query)||be>ze&&be-ze!==q5(X.query,te))return!1;const ae=fR(ce,{...X,end:be});return _e(ae.text),qn(ae.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(ae.cursor,ae.cursor)),!0}function Xs(te){it(null);let X=We.reduce((ae,xe)=>ae+xe.size,0);for(const ae of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(ae.type))continue;if(ae.size>31457280){it(Ppe({name:Ne(ae.name)}));continue}if(X+ae.size>41943040){it(Kpe());continue}X+=ae.size;const xe=Z,Ae=new FileReader;Ae.onload=()=>{const ke={dataUrl:Ae.result,mediaType:ae.type,name:ae.name,size:ae.size};if(Oe.current.activeId===xe){He(Qe=>[...Qe,ke]);return}const Fe=ot.current.get(xe??"new")??bw;ot.current.set(xe??"new",{...Fe,attachments:[...Fe.attachments,ke]})},Ae.readAsDataURL(ae)}}function vo(te){const be=Array.from(te.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);be.length>0&&(te.preventDefault(),Xs(be))}const Gt=V.find(te=>te.id===Z),Fa=xn??h5n(Jt),Un=Gt?{harness:Gt.harness,model:Pn.model??Gt.model,serviceTier:Pn.serviceTier!==void 0?Pn.serviceTier:Gt.serviceTier,permissionMode:Pn.permissionMode??Gt.permissionMode,reasoningLevel:Pn.reasoningLevel??Gt.reasoningLevel}:Fa?{...Fa,...Pn}:null,{data:qr=VDn}=lt(Syn(Un==null?void 0:Un.harness)),st=Un?Jt.find(te=>te.id===Un.harness):void 0,Wt=st==null?void 0:st.options,xs=A.useMemo(()=>dOn(qr,Wt==null?void 0:Wt.planActivation),[qr,Wt==null?void 0:Wt.planActivation]),Ys=hR(ce),pi=Ys!==null,Gn=o4(ce,po),dr=(Gn==null?void 0:Gn.query)??null,Os=dr===null?[]:xs.filter(te=>uOn(te,dr)),Ds=!pi&&dr!==null&&(Gn==null?void 0:Gn.end)===po&&Os.length>0,Tr=Ds&&!_a?Os:[],mi=Tr.length>0,hr=Math.min(ua,Math.max(0,Tr.length-1));A.useEffect(()=>Ms(0),[dr]);const ws=Un&&st&&!st.catalogPending&&st.models.length>0&&!st.models.some(te=>te.id===Un.model)?st.models[0].id:(Un==null?void 0:Un.model)??null,It=Un&&{...Un,model:ws,serviceTier:Rv(st,ws,Un.serviceTier),reasoningLevel:KL(st,ws,Un.reasoningLevel)},ks=Mb(st,It==null?void 0:It.model),Ha=te=>{if(!It)return;const be={...It,...te},ze={};te.model!==void 0&&te.model!==It.model&&(ze.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==It.serviceTier&&(ze.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==It.permissionMode&&(ze.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==It.reasoningLevel&&(ze.reasoningLevel=te.reasoningLevel),_r(X=>({...X,...ze})),vr(be),N(be).catch(()=>{}),Gt?Rn(X=>({...X,...te})):te.harness&&te.harness!==It.harness&&Rn({})},Ss=A.useCallback(te=>{const be=Te.current.catch(()=>{}).then(()=>{if(!An(Q.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return Te.current=be.then(()=>{},()=>{}),be},[Q]),qa=te=>{if(te==="plan"&&(st==null?void 0:st.id)==="claude-code"?(_r(X=>({...X,permissionMode:te})),Rn(X=>({...X,permissionMode:te}))):(Rn(X=>{const ae={...X};return delete ae.permissionMode,ae}),Ha({permissionMode:te})),!Gt)return;const be=Gt.id,ze=++Pe.current;ge(null),Ss(()=>T.mutateAsync([be,te])).then(X=>{J(ae=>ae.map(xe=>xe.id===X.id?X:xe)),Pe.current===ze&&Rn(ae=>{const xe={...ae};return delete xe.permissionMode,xe})}).catch(()=>{Pe.current===ze&&(Rn(X=>{const ae={...X};return delete ae.permissionMode,ae}),ge(kEe()))})},Iu=te=>Ha({reasoningLevel:te}),$u=((Vu=Gt==null?void 0:Gt.goal)==null?void 0:Vu.trim())||"",bo=(It==null?void 0:It.harness)==="claude-code"?It.permissionMode==="plan":(Wt==null?void 0:Wt.planActivation)==="command"?ut??(Gt==null?void 0:Gt.planMode)??!1:!1;A.useEffect(()=>{ut===null||(Gt==null?void 0:Gt.planMode)!==ut||(qe.current=null,pt(null))},[Gt==null?void 0:Gt.planMode,ut]);async function Ar(te){if(_r(X=>({...X,planMode:te})),qe.current=te,pt(te),!Gt)return;const be=Gt.id,ze=++rt.current;ge(null);try{const X=await Ss(()=>j.mutateAsync([be,te]));J(ae=>ae.map(xe=>xe.id===X.id?X:xe)),rt.current===ze&&(qe.current=null,pt(null),ge(null))}catch(X){throw rt.current===ze&&(qe.current=null,pt(null)),X}}async function Bu(){if((It==null?void 0:It.harness)==="claude-code"){qa("auto");return}if(Gt)try{await Ar(!1)}catch{ge(hme())}}async function yo(){const te=!bo;try{if((It==null?void 0:It.harness)==="claude-code")qa(te?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ar(te);else throw new Error(Yg())}catch{ge(zN())}}function fa(te,be=""){var ze;switch(te){case"plan":return yo(),!1;case"new":return Qr(),!1;case"resume":return hi(!0),!0;case"model":return ho(X=>X+1),!0;case"compact":return bl(),!1;case"goal":return Ga(be),!1;case"copy":{const X=ur.at(-1),ae=rr&&(X==null?void 0:X.role)==="assistant"&&!X.completedAt,xe=o7n(ae?ur.slice(0,-1):ur);return xe?uC(xe):yn(U1e(),"info"),!1}case"export":{const X=((ze=Gt==null?void 0:Gt.title)==null?void 0:ze.trim())||vd(),ae=Gt?c7n(X,ur,{user:Dme(),assistant:su[Gt.harness]}):null;return ae?CDn(l7n(X),ae):yn(Y1e(),"info"),!1}}}async function Ua(te){ge(null);const be=L.current;try{const ze=await D.mutateAsync([e,te]);if(tt.invalidateQueries({queryKey:ZL().queryKey}),L.current!==be)return;J(X=>[ze,...X.filter(ae=>ae.id!==ze.id)]),ne("all"),y(ze.id,{projectId:ze.projectId})}catch(ze){if(L.current!==be)return;ge(jge({error:Ne(ze instanceof Error?ze.message:String(ze))}))}}async function Ga(te){var Ae;const be=te.trim();if(!be){const ke=(Ae=Gt==null?void 0:Gt.goal)==null?void 0:Ae.trim();yn(ke?Qme({goal:Gi(ke)}):cge(),"info");return}const ze=Oe.current,X=()=>Oe.current.activeId===ze.activeId;ge(null);let ae=Z;if(!ae){if(!(st!=null&&st.agentReady)||!It){ge(Yg());return}try{ae=(await ma(It,l4(Wt==null?void 0:Wt.planActivation,void 0,qe.current))).id}catch(ke){ge(eN({error:Ne(ke instanceof Error?ke.message:String(ke))}));return}}const xe=/^(clear|none|off)$/i.test(be);try{const ke=await Ss(()=>M.mutateAsync([ae,xe?null:be]));J(Fe=>Fe.map(Qe=>Qe.id===ke.id?ke:Qe)),yn(xe?Hme():pge(),"success")}catch(ke){if(!X())return;ge(eN({error:Ne(ke instanceof Error?ke.message:String(ke))}))}}async function bl(){const te=Z;if(!te){yn(I1e(),"info");return}if(rr){ge(N0e());return}ge(null),K==="archived"&&ne("active");const be=Oe.current;try{const{message:ze}=await Zbn(te);mt({type:"upsertMessage",sessionId:te,message:ze})}catch(ze){if(Oe.current.activeId!==be.activeId)return;ge(O0e({error:Ne(ze instanceof Error?ze.message:String(ze))}))}}function Pu(te,be,ze){const X=fR(be,ze);_e(X.text),Fr(!0),!fa(te)&&window.requestAnimationFrame(()=>{var ae,xe;(ae=cn.current)==null||ae.focus(),(xe=cn.current)==null||xe.setSelectionRange(X.cursor,X.cursor),qn(X.cursor)})}const Ls=A.useCallback(async(te=!1)=>{const be=L.current;if(be.projectId!==e||!An(Q.queryKey))return null;const ze=(tt.getQueryData(Q.queryKey)??[]).map(X=>X.id);try{const X=await tt.fetchQuery({...Q,...te?{staleTime:0}:{}});if(L.current!==be||!An(Q.queryKey))return null;const ae=X.filter(Ae=>!ll.has(Ae.id)),xe=new Set(ae.map(Ae=>Ae.id));for(const Ae of ze)xe.has(Ae)||Hu(Ae);return At.current=new Map(ae.map(Ae=>[Ae.id,Ae.title])),ae}catch{return null}},[e]),as=A.useCallback(async te=>{L.current.projectId!==e||!An(Q.queryKey)||await Promise.all([tt.fetchQuery({...il(te),staleTime:0}),Ls(!0)]).catch(()=>{})},[e,Ls]);A.useEffect(()=>{const te=n$();U(e===$p?new Set([Tb,Ab].filter(ze=>!te.has(ze))):new Set),G(!1),le(!1),kt(new Map),At.current=new Map,Ls();const be=L.current;return()=>{L.current===be&&(L.current={projectId:e})}},[e,Ls]),A.useEffect(()=>{_r(Qp),wn.current=null},[Z]),A.useEffect(()=>Ov(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||ll.has(te.session.id))return;const be=At.current.has(te.session.id),ze=At.current.get(te.session.id)!==te.session.title;At.current.set(te.session.id,te.session.title),be&&ze&&te.session.titleSource==="generated"&&(kt(X=>{const ae=new Map(X);return ae.set(te.session.id,(X.get(te.session.id)??0)+1),ae}),window.setTimeout(()=>{kt(X=>{if(!X.has(te.session.id))return X;const ae=new Map(X);return ae.delete(te.session.id),ae})},HDn));break}case"sessionDeleted":Hu(te.sessionId);break}}),[e]),A.useEffect(()=>Ov(te=>{te.type==="reconnected"&&Ls(!0)}),[Ls]);const uc=Z?Tt.messagesBySession[Z]??bR:bR,da=Z?Tt.activeLeafBySession[Z]??null:null;zn.current=da;const ur=A.useMemo(()=>t7n(uc,da),[uc,da]),_c=A.useRef({projectId:e,ids:Tt.busySessions});A.useEffect(()=>{const te=_c.current;_c.current={projectId:e,ids:Tt.busySessions},te.projectId===e&&U(be=>a7n(be,te.ids,Tt.busySessions,V,i==="chat"?Z:null))},[e,Tt.busySessions,V,Z,i]);const rr=Z?Tt.busySessions.has(Z):!1,Sf=!rr&&!!(st!=null&&st.agentReady),xo=rr&&MB(ur)!=null,wo=rr&&i7n(ur),Ri=Z?Tt.queuedBySession[Z]??[]:[],Ft=Ri.some(te=>te.dispatchState==="retrying"),Is=Ri.findIndex(te=>te.dispatchState==="blocked"),Zs=Ri.reduce((te,be)=>be.dispatchState!=="retrying"||typeof be.nextRetryAt!="number"?te:te===null?be.nextRetryAt:Math.min(te,be.nextRetryAt),null),[ha,Cf]=A.useState(()=>Date.now());A.useEffect(()=>{if(!Ft||Zs===null||(Cf(Date.now()),Zs<=Date.now()))return;const te=window.setInterval(()=>{const be=Date.now();Cf(be),be>=Zs&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[Ft,Zs]),A.useEffect(()=>{const te=Ri.reduce((be,ze)=>ze.planMode??be,void 0);te!==void 0?(Kt.current=!0,qe.current=te,pt(te)):Kt.current&&(Kt.current=!1,qe.current=null,pt(null))},[Ri]);const fc=!!Z&&!(Z in Tt.messagesBySession)&&Bn.isPending,dc=A.useMemo(()=>{const te=new Set;for(const be of Tt.busySessions)(Tt.messagesBySession[be]??[]).some(ze=>ze.parts.some(X=>X.type==="prompt"&&X.prompt&&!X.prompt.resolved&&X.prompt.nativeId))&&te.add(be);return te},[Tt.busySessions,Tt.messagesBySession]),Mi=Z?dc.has(Z):!1,sr=Gt,hc=sr?Yn.get(sr.id):void 0,Cs=A.useMemo(()=>{var te;for(let be=ur.length-1;be>=0;be--)for(const ze of ur[be].parts)if(ze.type==="prompt"&&((te=ze.prompt)==null?void 0:te.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[ur]),gi=A.useMemo(()=>Z?s7n(ur,sr==null?void 0:sr.harness,Tt.busySessions.has(Z)):null,[ur,sr==null?void 0:sr.harness,Z,Tt.busySessions]),$s=pi&&!gi,yl=te=>{if(gi||pi)return!1;const be=H5(te),ze=xs.find(X=>X.name===(be??te));return!ze||ze.source!=="command"?!!ze:be&&c4(be)?be==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},Oi=A.useMemo(()=>xs.filter(te=>te.source!=="command"),[xs]),[Di,Ef]=A.useState(null),ko=Di&&Di.sessionId===Z?Di:null;A.useEffect(()=>{if(!Di)return;const te=Tt.busySessions.has(Di.sessionId),be=Di.sessionId===Z&&Cs&&Cs.promptId!==Di.promptId;(!te||be)&&Ef(null)},[Di,Cs,Tt.busySessions,Z]);const Vh=A.useMemo(()=>_C(ur),[ur]),pc=rr&&!!(st!=null&&st.supportsSteering)&&!!(st!=null&&st.agentReady)&&!Cs&&!gi&&!Vh&&We.length===0&&fe.length===0,mc=A.useMemo(()=>p&&Z?(te,be,ze)=>p(te,Z,be,ze):void 0,[p,Z]),Nf=A.useMemo(()=>m&&Z?(te,be,ze)=>m(Z,te,be,ze):void 0,[m,Z]),zf=A.useMemo(()=>o&&((te,be,ze,X,ae)=>o(te,Z??void 0,be,ze,X,ae)),[o,Z]);A.useEffect(()=>{Pe.current+=1,rt.current+=1;const te=(Z?Tt.queuedBySession[Z]??[]:[]).reduce((be,ze)=>ze.planMode??be,void 0);Kt.current=te!==void 0,qe.current=te??null,pt(te??null),Rn({}),ge(null)},[Z]);const xl=i==="chat"&&(ur.length>0||rr),Js=(It==null?void 0:It.harness)??null,wl=(It==null?void 0:It.model)??null,So=Bn.data?null:Bn.error,jf=i==="chat"&&!xl&&!fc&&!So,gc=lt({...Zyn(e,Js??"claude-code",wl,E()),enabled:jf&&Js!==null,subscribed:jf&&Js!==null}),ei=(zo=gc.data)!=null&&zo.blank?UDn():((Ku=gc.data)==null?void 0:Ku.prompts)??null,Kh=Js!==null&&gc.isPending,Tf=e===$p?"demo":"project",Wh=te=>{_e(te),Fr(!1),window.requestAnimationFrame(()=>{const be=cn.current;be&&(be.focus(),be.setSelectionRange(te.length,te.length),qn(te.length))})};A.useEffect(()=>{ft&&(_e(te=>te||ft),Fr(!1),qn(ft.length))},[ft]),A.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const be=cn.current;be&&(be.focus(),be.setSelectionRange(be.value.length,be.value.length),be.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const Af=A.useId(),kl=e===$p&&ce===Lz&&!se,Qh=A.useCallback(te=>{const be=te.scrollHeight-te.scrollTop-te.clientHeight<60;tn.current=be,Zn(be)},[]),pa=A.useCallback(()=>{var te;tn.current=!0,Zn(!0),(te=Mn.current)==null||te.call(Mn)},[]);A.useEffect(()=>{const te=Ve.current,be=bt.current;if(!te||!be)return;const ze=new ResizeObserver(()=>{var X;tn.current?(X=Mn.current)==null||X.call(Mn):Zn(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return ze.observe(te),ze.observe(be),()=>ze.disconnect()},[xl]);const Rf=A.useCallback(te=>{te.currentTarget.blur(),pa()},[pa]);async function Co({queue:te=!1}={}){var Yh,Zh,If,bi,Qu,ni;const be=ce.trim(),ze=gi?null:hOn(be,Wt==null?void 0:Wt.planActivation);if(ze&&ze.name!=="plan"){_e(c4(ze.name)?"":ze.prompt),Fr(!1),fa(ze.name,ze.prompt);return}if(ru({name:"first_action",surface:Tf,action:"typed_prompt"}),fn.current)return;const X=!!ze,ae=!bo,xe=l4(Wt==null?void 0:Wt.planActivation,X?ae:void 0,qe.current),Ae=X&&(st==null?void 0:st.id)==="claude-code"?ae?"plan":"auto":void 0,ke=ze?ze.prompt:be,Fe=We,Qe=fe,Dt=Qe.map(kn=>({text:kn.text})),Vn=e,Ur=i;let Gr=Z;const br=()=>{const kn=Oe.current;return An(Q.queryKey)&&kn.projectId===Vn&&kn.activeId===Gr&&kn.mainView===Ur},ti=()=>{br()&&(_e(kn=>kn||be),He(kn=>kn.length?kn:Fe),me(kn=>kn.length?kn:Qe))};if(X&&!ke&&Fe.length===0&&Qe.length===0){_e(""),Fr(!1);try{if((st==null?void 0:st.id)==="claude-code")qa(ae?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ar(ae);else throw new Error(Yg())}catch{ge(zN()),ti()}return}const Kn=It?{...It,...Ae?{permissionMode:Ae}:{}}:null;Ae&&qa(Ae);let va=null;const xc=qe.current;X&&(Wt==null?void 0:Wt.planActivation)==="command"&&(va=++rt.current,qe.current=ae,pt(ae));const ba=()=>{!br()||va===null||rt.current!==va||(qe.current=xc,pt(xc))};if(!ke&&Fe.length===0&&Qe.length===0)return;if((ke||Qe.length>0)&&gi&&Fe.length===0){_e(""),me([]),gs({promptId:gi,answers:[],note:ke||void 0,annotations:Dt}).then(kn=>{kn||ti()});return}const Um=JSON.stringify({text:ke,images:Fe.map(kn=>({mediaType:kn.mediaType,name:kn.name,dataUrl:kn.dataUrl})),annotations:Dt,settings:Kn?{model:Kn.model,serviceTier:Kn.serviceTier,permissionMode:Kn.permissionMode,planMode:xe,reasoningLevel:Kn.reasoningLevel}:null}),Wu=((Yh=wn.current)==null?void 0:Yh.signature)===Um?wn.current.id:`ct_${crypto.randomUUID()}`;if(wn.current={signature:Um,id:Wu},rr){if(!Z||!(st!=null&&st.agentReady)){ba();return}const kn=Z;_e(""),He([]),me([]),it(null);const Va=Kn?{model:Kn.model,serviceTier:Kn.serviceTier,permissionMode:Kn.permissionMode,planMode:(Wt==null?void 0:Wt.planActivation)==="command"?xe??(Gt==null?void 0:Gt.planMode):xe,reasoningLevel:Kn.reasoningLevel}:{};br()&&Rn({});const xa=Fe.map(Rr=>({mediaType:Rr.mediaType,dataBase64:Rr.dataUrl.slice(Rr.dataUrl.indexOf(",")+1),name:Rr.name}));try{(Zh=(await Ss(()=>Iz(kn,ke,Va,xa.length?xa:void 0,Dt,Wu,pc&&!te&&!X?"steer":void 0))).turn)!=null&&Zh.existing&&await as(kn),br()&&_r(Qp),((If=wn.current)==null?void 0:If.id)===Wu&&(wn.current=null)}catch{ba(),ti()}return}if(!(st!=null&&st.agentReady)){ba();return}if(!Kn){ba();return}let ya=Z;try{_e(Hn=>Hn===ce?"":Hn),He(Hn=>Hn===Fe?[]:Hn),me(Hn=>Hn===Qe?[]:Hn),it(null),fn.current=!0;try{if(!ya){const Jh=await ma(Kn,xe);ya=Jh.id,Gr=Jh.id}if(!An(Q.queryKey))return;const Hn=il(ya);await tt.fetchQuery({...Hn,...((bi=tt.getQueryState(Hn.queryKey))==null?void 0:bi.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{fn.current=!1}if(!An(Q.queryKey))return;mt({type:"optimisticUser",sessionId:ya,text:ke||Epe(),attachments:Fe.map(Hn=>({url:Hn.dataUrl,mediaType:Hn.mediaType,name:Hn.name})),annotations:Qe}),mt({type:"busy",sessionId:ya,busy:!0}),br()&&pa(),br()&&K==="archived"&&ne("active");const kn=Kn?{model:Kn.model,serviceTier:Kn.serviceTier,permissionMode:Kn.permissionMode,planMode:xe,reasoningLevel:Kn.reasoningLevel}:{};br()&&Rn({});const Va=Fe.map(Hn=>({mediaType:Hn.mediaType,dataBase64:Hn.dataUrl.slice(Hn.dataUrl.indexOf(",")+1),name:Hn.name})),xa=ya;if(!xa)throw new Error(L8e());(Qu=(await Ss(()=>Iz(xa,ke,kn,Va.length?Va:void 0,Dt,Wu))).turn)!=null&&Qu.existing&&await as(xa),br()&&_r(Qp),((ni=wn.current)==null?void 0:ni.id)===Wu&&(wn.current=null)}catch(kn){if(!An(Q.queryKey)||(ti(),ba(),!ya))return;const Va=kn instanceof Error?kn.message:String(kn);if(!/session is busy/i.test(Va)&&await tt.fetchQuery({...La(e),staleTime:0}).then(Rr=>{var El;return!!((El=Rr.find(Hn=>Hn.id===ya))!=null&&El.busy)}).catch(()=>!1)){br()&&(_e(Rr=>Rr===ke?"":Rr),He(Rr=>Rr===Fe?[]:Rr),me(Rr=>Rr===Qe?[]:Rr));return}mt({type:"busy",sessionId:ya,busy:!1}),mt({type:"localError",sessionId:ya,text:qge({error:Ne(Va)})})}}async function ma(te,be){const ze=Oe.current,X=L.current,ae=await I.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:be,reasoningLevel:te.reasoningLevel}]);return L.current===X&&(J(xe=>[ae,...xe.filter(Ae=>Ae.id!==ae.id)]),tt.getQueryData(Q.queryKey)||Ls(!0)),L.current===X&&Oe.current===ze&&(B.current(ae.id,{replace:!0}),Oe.current={...ze,activeId:ae.id}),ae}function Xh(){const te=NOn(ce);_e(te),window.requestAnimationFrame(()=>{var be,ze;(be=cn.current)==null||be.focus(),(ze=cn.current)==null||ze.setSelectionRange(te.length,te.length),qn(te.length)})}async function Sl(){const te=Ys;if(!te)return;if(ge(null),rr){ge(e0e());return}const be=ce,ze=Oe.current;let X=Z;const ae=()=>{const Fe=Oe.current;return Fe.projectId===ze.projectId&&Fe.activeId===X&&Fe.mainView===ze.mainView},xe=()=>{ae()&&_e(Fe=>Fe||be)};_e(""),Fr(!1);let Ae=Z;if(!Ae){if(!(st!=null&&st.agentReady)||!It){xe(),ge(Yg());return}try{const Fe=l4(Wt==null?void 0:Wt.planActivation,void 0,qe.current);Ae=(await ma(It,Fe)).id,X=Ae,ae()&&Rn({})}catch(Fe){xe();const Qe=Fe instanceof Error?Fe.message:String(Fe);ae()&&ge(ZE({error:Ne(Qe)}));return}}ae()&&K==="archived"&&ne("active");const ke=`${B_}shell-${Date.now()}`;mt({type:"localShell",sessionId:Ae,id:ke,command:te}),ae()&&pa();try{const{message:Fe}=await Jbn(Ae,te);mt({type:"upsertMessage",sessionId:Ae,message:Fe})}catch(Fe){const Qe=Fe instanceof Error?Fe.message:String(Fe);mt({type:"localShell",sessionId:Ae,id:ke,command:te,error:ZE({error:Ne(Qe)})})}}function Eo(){Z&&ryn(Z).catch(()=>{ge(g9e())})}const Mf=A.useCallback(async(te,be)=>{if(!(!Z||un.current)){un.current=!0,ge(null),Et(te);try{const ze=f7n({model:Fn.model,serviceTier:Fn.serviceTier,permissionMode:Fn.permissionMode,planMode:Fn.planMode,reasoningLevel:Fn.reasoningLevel}),X=Z;(await eyn(X,te,be,ze)).turn.existing&&await as(X),_r(Qp)}catch{ge(j7e())}finally{un.current=!1,Et(null)}}},[Z,Fn,as]),Of=A.useCallback((te,be)=>{if(!Z||rr||!(st!=null&&st.agentReady))return;const ze=Z;mt({type:"busy",sessionId:ze,busy:!0}),pa(),Ss(()=>tyn(ze,te,be)).catch(X=>{mt({type:"busy",sessionId:ze,busy:!1});const ae=X instanceof Error?X.message:String(X);mt({type:"localError",sessionId:ze,text:q7e({error:Ne(ae)})})})},[Z,rr,st==null?void 0:st.agentReady,pa,Ss]),Es=A.useCallback(te=>{if(!Z||rr)return;const be=Z,ze=zn.current;mt({type:"activeLeaf",sessionId:be,leafId:te}),Ss(()=>nyn(be,te)).catch(X=>{mt({type:"activeLeaf",sessionId:be,leafId:ze});const ae=X instanceof Error?X.message:String(X);mt({type:"localError",sessionId:be,text:S9e({error:Ne(ae)})})})},[Z,rr,Ss]);function hn(te){if(!Z)return;const be=Z;Qbn(be,te).then(({removed:ze})=>{if(ze)return as(be)}).catch(()=>ge(L7e()))}async function Fu(te){if(!Z||an)return;const be=Z;ge(null),fr(te);try{await Xbn(be,te),await as(be)}catch{ge(r8e())}finally{fr(null)}}A.useEffect(()=>{if(!rr||i!=="chat")return;function te(be){var ze;be.key!=="Escape"||be.defaultPrevented||(be.preventDefault(),Eo(),(ze=cn.current)==null||ze.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[rr,Z,i]);function Hu(te){zb(te),ot.current.delete(te),dt.current===te&&(dt.current=null),Oe.current.projectId===e&&Oe.current.activeId===te&&Oe.current.mainView==="chat"&&(_e(""),He([]),me([]),B.current(null,{replace:!0})),U(be=>{if(!be.has(te))return be;const ze=new Set(be);return ze.delete(te),ze}),At.current.delete(te)}function Cl(te,be){const ze=te.archived;J(X=>X.map(ae=>ae.id===te.id?{...ae,archived:be}:ae)),$.mutateAsync([te.id,be]).catch(()=>{J(X=>X.map(ae=>ae.id===te.id?{...ae,archived:ze}:ae))})}function Df(te,be){const ze=te.title;J(X=>X.map(ae=>ae.id===te.id?{...ae,title:be}:ae)),q.mutateAsync([te.id,be]).catch(()=>{J(X=>X.map(ae=>ae.id===te.id?{...ae,title:ze}:ae))})}async function os(te){var ze;const be=((ze=te.title)==null?void 0:ze.trim())||vd();if(window.confirm(eme({title:Gi(be)}))){try{await H.mutateAsync(te.id)}catch(X){yn(ome({title:Gi(be),error:Ne(X instanceof Error?X.message:String(X))}),"error");return}Hu(te.id)}}const gs=A.useCallback(te=>{if(!Z)return Promise.resolve(!1);const be=Z;return mt({type:"busy",sessionId:be,busy:!0}),Ss(()=>syn(be,te)).then(()=>!0).catch(()=>!1).finally(()=>{An(Q.queryKey)&&(tt.fetchQuery({...il(be),staleTime:0}).catch(()=>{}),tt.fetchQuery({...La(e),staleTime:0}).catch(()=>{}))})},[Z,e,Ss,Q]),vi=V.filter(te=>$Dn(K,te.archived)),qu=/Mac|iPhone|iPad/.test(navigator.platform),No=qu?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",vc=qu?"⌘ Enter":"Ctrl + Enter",Qr=A.useCallback(()=>{ne("active"),y(null)},[y]),bc=A.useCallback(te=>{ne("all"),y(te)},[y]);A.useEffect(()=>{const te=be=>{be.repeat||be.key!=="Enter"||!be.metaKey&&!be.ctrlKey||be.altKey||!be.shiftKey||(be.preventDefault(),Qr())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Qr]);const Xr=f.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,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.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":No,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Qr,children:[f.jsx(Dh,{size:15}),g4e()]}),f.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:[f.jsx(zI,{size:15}),Txe()]}),iOn.map(te=>f.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"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.id))]}),f.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:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((ga=IH.find(te=>te.id===K))==null?void 0:ga.railLabel())??CD()}),f.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:f.jsx(BDn,{value:K,onChange:ne})})]}),f.jsxs("div",{className:"rail-body",children:[vi.map(te=>f.jsx(qDn,{session:te,active:te.id===Z&&i==="chat",unread:F.has(te.id),busy:Tt.busySessions.has(te.id),waiting:dc.has(te.id),revealTitle:Yn.get(te.id),onOpen:()=>{if(y(te.id),e===$p){N3n(te.id);const be=A1n[te.id];be&&(ru({name:"demo_experiment_started",kind:"curated",experiment:be}),ru({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:be=>Df(te,be),onSetArchived:be=>Cl(te,be),onDelete:()=>void os(te)},te.id)),vi.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:K==="archived"?k1e():V.length>0?l1e():T1e()})]}),f.jsx(L$,{runtime:x})]}),Uu="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",Gu=!r&&f.jsx(Bt,{title:SN(),"aria-label":SN(),onClick:s,children:f.jsx(PI,{size:20})});return i!=="chat"?f.jsxs(f.Fragment,{children:[r&&Xr,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:Gu}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:z})]})]}):f.jsxs(f.Fragment,{children:[r&&Xr,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 mt-5",children:[f.jsxs("div",{className:r?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] items-center",children:[Gu,f.jsxs("div",{className:Uu,children:[f.jsx(O0,{variant:"header",title:sr?((yc=sr.title)==null?void 0:yc.trim())||vd():tN(),children:sr?f.jsx($H,{title:((Lf=sr.title)==null?void 0:Lf.trim())||vd(),animate:hc!==void 0},hc??"static"):tN()}),k&&f.jsx(Bt,{"data-tip":nN(),"aria-label":nN(),onClick:k,children:f.jsx(lwn,{size:15})})]})]}),So?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:So.message}),f.jsx(De,{onClick:()=>void Bn.refetch(),children:Vs()})]}):fc?f.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:[f.jsx(zt,{}),f.jsx("span",{children:u4e()})]}):xl?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Ve,tabIndex:0,role:"region","aria-label":((vs=sr==null?void 0:sr.title)==null?void 0:vs.trim())||vd(),onScroll:te=>{Qh(te.currentTarget),ms.dismiss()},children:f.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:bt,children:[f.jsx(tH,{projectId:e,sessionId:Z,children:f.jsx(IDn,{scrollRef:Ve,scrollToEndRef:Mn,stickToBottom:tn,onPinToBottom:pa,messages:ur,allMessages:uc,canFork:Sf,onFork:Of,onSelectFork:Es,busy:rr,onOpenFile:zf,onOpenRun:c,onOpenSpawnedSession:bc,runExperimentName:u,onOpenExperiment:h,experimentName:_,onRespond:gs,onOpenPlan:mc,onOpenSubagent:Nf,recoveringTurnId:Pr,onRecover:Mf,skills:Oi},Z)}),rr&&Mi&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:uCe()}),rr&&!Mi&&!xo&&!wo&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:$9e()})})]})}):f.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:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(zS,{})}),f.jsx("h2",{children:gCe()}),f.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:[f.jsx(Y_,{size:19}),f.jsx("span",{children:n})]}),Kh&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:SR,"aria-hidden":"true",children:kR.map((te,be)=>f.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 ${m4[be].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${m4[be].icon}`,children:[f.jsx(te,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},be))}),f.jsxs(Br,{className:"mt-3",role:"status",children:[f.jsx(zt,{}),f.jsx("span",{children:u6e()})]})]}),ei&&ei.length>0&&f.jsx("div",{className:SR,role:"group","aria-label":g6e(),children:ei.map((te,be)=>{const ze=kR[be],X=m4[be];return f.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 ${X.box}`,onClick:()=>{ru({name:"project_starter_clicked",slot:be+1}),ru({name:"first_action",surface:Tf,action:"starter_click"}),Wh(te.prompt)},children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(ze,{size:17,className:X.icon}),te.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},be)})})]}),ms.action&&f.jsxs(De,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:ms.action.x,top:ms.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:ms.add,children:[f.jsx(BI,{size:14}),vbe()]}),f.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:[xl&&f.jsx(Bt,{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 ${on?"opacity-0":"opacity-100"}`,title:NN(),"aria-label":NN(),inert:on,onClick:Rf,children:rr&&!Mi?f.jsx(dS,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(V2n,{size:16})}),Cs&&!(ko&&Cs.promptId===ko.promptId)&&f.jsx(_Mn,{synthesized:Cs.synthesized,agentLabel:sr?su[sr.harness]:A9e(),showResumeModes:(sr==null?void 0:sr.harness)==="claude-code",onView:te=>mc==null?void 0:mc(Cs.plan,Cs.promptId,te),onApprove:te=>gs({promptId:Cs.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>gs({promptId:Cs.promptId,approve:!1}),onRevise:te=>{Z&&Ef({sessionId:Z,promptId:Cs.promptId}),gs({promptId:Cs.promptId,approve:!1,note:te})}}),Ri.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Ri.map((te,be)=>f.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:te.error?`${te.text} - -${te.error}`:te.text,children:[te.dispatchState==="blocked"?f.jsx(bS,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(pwn,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?_7n(te.nextRetryAt,ha):l7e()}),te.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Fu(te.id),"aria-label":JZ({text:te.text}),disabled:an!==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:an===te.id?rL():Vs()}),f.jsx("button",{onClick:()=>hn(te.id),"aria-label":VZ({text:te.text}),disabled:an!==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:b5e()}),be===Is&&behn(te.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:f.jsx(or,{size:11})})]},te.id))}),kl&&f.jsxs("div",{id:Af,role:"note",className:`composer-demo-hint ${CR}`,children:[f.jsx(hh,{size:16,className:"shrink-0 text-primary"}),f.jsx("span",{className:"flex-1",dir:"auto",children:n2e()}),f.jsx(Bt,{size:"small","aria-label":Xg(),title:Xg(),onClick:()=>{var te;G(!0),(te=cn.current)==null||te.focus()},children:f.jsx(or,{size:14})})]}),b&&!oe&&c&&f.jsxs("div",{role:"note",className:`composer-demo-run-hint ${CR}`,children:[f.jsx(hh,{size:16,className:"shrink-0 text-primary"}),f.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[f.jsx("span",{children:uN()}),f.jsxs(De,{size:"small",onClick:()=>c(b,"keepOpen"),children:[f.jsx(lo,{size:14}),a3()]}),f.jsx("span",{children:lN()})]}),f.jsx(Bt,{size:"small","aria-label":Xg(),title:Xg(),onClick:()=>{var te;le(!0),(te=cn.current)==null||te.focus()},children:f.jsx(or,{size:14})})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${uN()} ${a3()} ${lN()}`:""}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${$s?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[st&&!st.agentReady&&f.jsx("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:st.catalogPending?f.jsxs("span",{children:[st.name," — ",V_()]}):f.jsxs(f.Fragment,{children:[f.jsxs("strong",{children:[st.name," ",Twe()]})," ",st.agentNote?ph(st.agentNote):w7e()]})}),mi&&f.jsx(xOn,{skills:Tr,activeIndex:hr,onPick:mo,onHover:Ms}),ps&&f.jsx(EOn,{activeSessionId:Z,onClose:()=>hi(!1),onResume:te=>{hi(!1),ne("all"),y(te.id,{projectId:te.projectId})},onImport:te=>{hi(!1),Ua(te)}}),fe.length>0&&f.jsx(WOn,{annotations:fe,onClear:()=>{me([]),window.requestAnimationFrame(()=>{var te;return(te=cn.current)==null?void 0:te.focus()})},onRemove:te=>{const be=fe.filter(ze=>ze.id!==te);me(be),be.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=cn.current)==null?void 0:ze.focus()})}}),We.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:We.map((te,be)=>{const ze=()=>He(X=>X.filter((ae,xe)=>xe!==be));return te.mediaType==="application/pdf"?f.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:te.name,children:[f.jsx(Ob,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),f.jsx("button",{title:bN(),"aria-label":bN(),onClick:ze,children:f.jsx(or,{size:11})})]},be):f.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:[f.jsx("img",{src:te.dataUrl,alt:kD()}),f.jsx("button",{title:yN(),"aria-label":yN(),onClick:ze,children:f.jsx(or,{size:11})})]},be)})}),Se&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Se}),Le&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Le}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${$s?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:cn,"aria-describedby":kl?Af:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:gi?rEe():pc&&st?u9e({harness:Ne(su[st.id]),shortcut:Ne(vc)}):It?st!=null&&st.agentReady?Lge({harness:Ne(su[It.harness])}):wge({harness:Ne(su[It.harness])}):bpe(),rows:2,onPaste:vo,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),Xs(Array.from(te.dataTransfer.files)))},onChange:te=>{const be=te.target.value,ze=te.target.selectionStart;qn(ze);const X=ze>0&&/\s/.test(be[ze-1])&&!gi&&!Hr.current&&hR(be)===null?o4(be,ze-1):null,ae=X&&H5(X.query),xe=X?(be.slice(0,X.start)+be.slice(X.end)).trim():"";if(X&&ae&&(ae==="plan"||!c4(ae)&&!xe)&&xs.some(Ae=>Ae.name===ae)){Pu(ae,be,X);return}_e(be),Fr(!1)},onSelect:te=>qn(te.currentTarget.selectionStart),onCompositionStart:()=>{Hr.current=!0},onCompositionEnd:()=>{Hr.current=!1},onKeyDown:te=>{if(mi){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const be=te.key==="ArrowDown"?1:-1;Ms((hr+be+Tr.length)%Tr.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),mo(Tr[hr]);return}if(te.key==="Escape"){te.preventDefault(),Fr(!0);return}}if(te.key==="Backspace"&&go(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),$s){Sl();return}Co({queue:te.metaKey||te.ctrlKey})}}}),f.jsx(yOn,{text:ce,editingTokenEnd:Gn==null?void 0:Gn.end,isCommand:yl,skills:xs,projectId:e,textareaRef:cn})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Rs.ref,children:[f.jsx(Bt,{type:"button",className:"composer-bare",title:Q2(),"aria-label":Q2(),"aria-haspopup":"dialog","aria-expanded":Rs.open,onClick:()=>Rs.setOpen(te=>!te),children:f.jsx(P4n,{size:16})}),Rs.open&&f.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:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:Q2()}),f.jsx(z7n,{})]})]}),f.jsx("input",{ref:sn,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{Xs(Array.from(te.target.files??[])),te.target.value=""}}),f.jsx(Bt,{type:"button",className:"composer-attach",title:sN(),"aria-label":sN(),onClick:()=>{var te;return(te=sn.current)==null?void 0:te.click()},children:f.jsx(y4n,{size:16})}),$u&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:cN({goal:Gi($u)}),"aria-label":cN({goal:Gi($u)}),onClick:()=>void Ga("clear"),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(LI,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(or,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{className:"truncate",children:kwe()})]}),bo&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:hN(),"aria-label":hN(),onClick:()=>void Bu(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Zwn,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(or,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:U4e()})]}),$s&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:dN(),"aria-label":dN(),onClick:Xh,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(mf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(or,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:bD()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(p5n,{value:It,onSelect:Ha,onOpenSettings:()=>a("harnesses"),permissionChoices:st!=null&&st.agentReady?(Wt==null?void 0:Wt.permissionModes)??[]:[],defaultPermissionId:(Wt==null?void 0:Wt.defaultPermissionMode)??null,onSelectPermission:qa,reasoningChoices:st!=null&&st.agentReady?ks.choices:[],defaultReasoningId:ks.defaultId,onSelectReasoning:Iu,lockHarness:!!Gt,openRequest:nr}),f.jsx(kOn,{usage:Gt==null?void 0:Gt.contextUsage})]}),rr&&!gi?f.jsx(Bt,{className:"send-btn",variant:"stop",title:CN(),"aria-label":CN(),onClick:Eo,children:f.jsx(or,{size:16})}):f.jsx(Bt,{className:`send-btn ${kl&&(st!=null&&st.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:$s?wN():i3(),"aria-label":$s?wN():i3(),onClick:()=>void($s?Sl():Co()),disabled:$s?!Ys||!Z&&!(st!=null&&st.agentReady):!(st!=null&&st.agentReady)||!ce.trim()&&We.length===0&&fe.length===0,children:f.jsx(MI,{size:16})})]})]})]})]})]})}const CR="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",VDn=[],KDn=[];function Aa({className:e,...n}){return f.jsx("div",{className:fs("relative flex min-h-0 flex-1 flex-col",e),...n})}function Pd({className:e,...n}){return f.jsx("div",{className:fs("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Vo({className:e,...n}){return f.jsx("div",{className:fs("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const ER=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function WDn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=lt(il(n)),h=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),_=A.useRef(null),p=A.useRef(null),m=A.useRef(!0);if(A.useLayoutEffect(()=>{m.current=!0;const v=_.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),A.useLayoutEffect(()=>{const v=_.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[h]),A.useEffect(()=>{const v=_.current,b=p.current;if(!v||!b)return;const w=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return w.observe(b),w.observe(v),()=>w.disconnect()},[h===null]),h===null)return f.jsx(Aa,{children:f.jsx("div",{className:ER,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:I_n()})})});let x=null;for(const v of h)if(x=cb(v.parts,t),x)break;return f.jsx(Aa,{children:f.jsx("div",{className:ER,ref:_,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:f.jsx("div",{ref:p,children:x?f.jsx(tH,{projectId:e,sessionId:n,children:f.jsx(MDn,{spawn:x,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:U_n()})})})})}function QDn({experiment:e}){var s;const n=lt(P$(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(Pd,{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?f.jsxs(Vo,{children:[bhe()," ",Ne(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(EB,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(zB,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Mhe():fhe()}):f.jsx(Vo,{children:Ehe()})})}function BH({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:c}){return f.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&&f.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":mNe(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:kNe()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:ED()})]}),r&&f.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:[f.jsx(Nm,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&f.jsx(Cm,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(Fb,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Bt,{title:TN(),"aria-label":TN(),onClick:c,children:o?f.jsx(zt,{}):f.jsx(N4n,{size:13})})]})}const XDn=/\.(md|mdx|markdown)$/i,YDn=/\.tex$/i,ZDn=/\.html?$/i,JDn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,eLn=/\.(csv|tsv|xlsx?|ods)$/i,tLn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,nLn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,rLn=/\.pdf$/i,sLn=/\.(docx?|log|rtf|txt)$/i;function iLn(e){return JDn.test(e)}function fC(e){return XDn.test(e)}function PH(e){return YDn.test(e)}function aLn(e){return ZDn.test(e)}function Ch({name:e}){const n=fC(e)?"markdown":iLn(e)?"image":eLn.test(e)?"spreadsheet":tLn.test(e)?"code":nLn.test(e)?"archive":rLn.test(e)?"pdf":sLn.test(e)||PH(e)?"document":"file";let t;return n==="markdown"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),f.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=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),f.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),f.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=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=f.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=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),f.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),f.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 FH(e,n){const t=navigator.clipboard;if(!t){yn(TD(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>yn(j0(),"success")).catch(r=>yn(r instanceof Error?r.message:String(r),"error"))}function HH({name:e,onCommit:n,onCancel:t}){const[r,s]=A.useState(e),i=A.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(Ir,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":U$e({path:Ne(e)}),onFocus:o=>{const c=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,c>0?c: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 qH(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 UH({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=A.useRef(null),c=A.useRef(a);c.current=a;const[u,h]=A.useState({x:e.x,y:e.y});A.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return h({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))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),A.useEffect(()=>{const m=()=>c.current(),x=v=>{var b;(b=o.current)!=null&&b.contains(v.target instanceof Node?v.target:null)||c.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),c.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),c.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const _=m=>{c.current(),m()},p=(m,x,k=!1)=>f.jsx(Xn,{size:"compact",role:"menuitem",danger:k,onClick:()=>_(x),children:f.jsx("span",{children:m})});return oa.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":T$e({path:Ne(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 b,w;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((b=o.current)==null?void 0:b.querySelectorAll("button"))??[]],k=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),v=m.key==="ArrowDown"?1:-1;(w=x[(k+v+x.length)%x.length])==null||w.focus()},children:[p(I$e(),n),t&&p(xD(),t),r&&p(k$e(),r),p(_fe(),s),i&&p(yD(),i,!0)]}),document.body)}const Q5=["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(" "),NR=["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 zR(){return{dirs:new Map,files:[]}}function GH(e){const n=zR();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?f.jsx(rc,{size:13,className:NR}):f.jsx(Ba,{size:13,className:NR}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(dC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function dC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(oLn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&u)return f.jsxs("div",{className:Q5,style:{paddingInlineStart:8+t*14},children:[f.jsx(Ch,{name:p}),f.jsx(HH,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const x=$r(k=>i(m,k));return f.jsxs("button",{type:"button",className:Q5,style:{paddingInlineStart:8+t*14},...x,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}x.onKeyDown(k)},title:vY({name:Ne(m)}),children:[f.jsx(Ch,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function cLn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,z;const c=t.branchName,u=lt({...H$(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=lt({...qv(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,x=P$(t.id),k=QV({queryKey:x.queryKey})>0,v=(z=h.data)!=null&&z.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},w=A.useMemo(()=>_?GH(_.entries):null,[_]),y=r==="files"?m:k,C=A.useCallback(T=>{const j=new Set(s);j.has(T)?j.delete(T):j.add(T),a(j)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(BH,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Rb(n.githubOwner,n.githubRepo,c):void 0,githubTitle:dD({branch:Ne(c)}),refreshing:y,onRefresh:()=>r==="files"?b():void tt.invalidateQueries(x)}),r==="changes"?f.jsx(QDn,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Vo,{children:LNe()}),p&&w&&f.jsxs(Vo,{children:[XNe()," ",Ne(p)]}),f.jsx(Pd,{children:w?w.dirs.size===0&&w.files.length===0?f.jsx(Vo,{children:qNe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(dC,{node:w,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(T,j)=>v?o(T,v,void 0,j):o(T,void 0,c,j)})}):f.jsx(Vo,{children:p?qk({error:Ne(p)}):Uk()})})]})]})}function hC({icon:e,title:n,description:t}){return f.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:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function lLn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var B,L,F;const c=n.id,h=((B=lt(La(c)).data)==null?void 0:B.some(U=>U.id===e&&U.busy))??!1,_=lt({...qv(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=lt({...H$(c,m),enabled:!e||_.isSuccess,refetchInterval:h?5e3:!1}),k=x.data,v=(L=_.error??x.error)==null?void 0:L.message,b=_.isFetching||x.isFetching,[w,y]=A.useState(null),[C,N]=A.useState(null),z=A.useCallback(()=>{e&&tt.invalidateQueries(qv(e)),tt.invalidateQueries({queryKey:Ct("getCodeTree",c),predicate:U=>!iD(U)})},[e,c]),T=A.useRef(h);A.useEffect(()=>{T.current&&!h&&z(),T.current=h},[h,z]);const j=A.useMemo(()=>k?GH(k.entries):null,[k]),M=A.useCallback(U=>{const K=new Set(r);K.has(U)?K.delete(U):K.add(U),i(K)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?Qgn({branch:Ne(D.baselineBranch)}):Xk()),$=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,q=D?Dgn({branch:Ne(`${I}${$>0?"*":""}`)}):Hgn({branch:Ne(n.baselineBranch)}),H=D?D.branch:n.baselineBranch,Q=(U,K)=>D?a(U,e,void 0,K):a(U,void 0,n.baselineBranch,K),V=(k==null?void 0:k.root)==="worktree",J=async(U,K)=>{try{await ovn(c,U,K,{sessionId:e}),z()}catch(ne){yn(ne instanceof Error?ne.message:String(ne),"error")}},Z=U=>{const K=(k==null?void 0:k.path)??n.repoPath;FH(K,U)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(BH,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:q,branchTitle:q,githubHref:n.githubEnabled&&H?Rb(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?dD({branch:Ne(H)}):void 0,refreshing:b,onRefresh:z}),v&&(p||k)&&f.jsxs(Vo,{children:[T1n()," ",Ne(v)]}),!k||e&&!p?f.jsx(Pd,{children:f.jsx(Vo,{children:v?qk({error:Ne(v)}):Uk()})}):D&&t==="changes"?f.jsx(Pd,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:$===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:m1n()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(EB,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(zB,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(Pd,{children:[k.truncated&&f.jsx(Vo,{children:n1n()}),j?j.dirs.size===0&&j.files.length===0?f.jsx(hC,{icon:Y_,title:k1n(),description:jUe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(dC,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(U,K)=>{y(qH(U,K))},onRename:(U,K)=>{N(null),J(U,{action:"rename",newName:K})},onCancelRename:()=>N(null)})}):f.jsx(Vo,{children:l1n()})]}),w&&f.jsx(UH,{target:w,onOpen:()=>Q(w.path,"keepOpen"),onRename:V&&o(w.path)?()=>N(w.path):void 0,onDuplicate:V?()=>void J(w.path,{action:"duplicate"}):void 0,onCopyPath:()=>Z(w.path),onDelete:V?()=>{window.confirm(m$e({path:Ne(w.path)}))&&J(w.path,{action:"delete"})}:void 0,onClose:()=>y(null)})]})}function VH({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=A.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` -`),_=R$(h,TS(n));return h.endsWith(` -`)?_.slice(0,-1):_},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=A.useRef(null);A.useEffect(()=>{var h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=h$(i.length),u=A.useMemo(()=>i.map((h,_)=>f.jsxs("div",{ref:_+1===a?o:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${d$} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${Fv} ${f$}`,children:M$(h)?f.jsx("br",{}):h})]},_)),[i,c,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Fv}`,children:[i.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}function KH(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function jR({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[_et()," ",f.jsxs("a",{href:e,download:n,children:[Ev()," ",Ne(n)]})]})}function X5({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=A.useState(!1);if(A.useEffect(()=>i(!1),[e,n]),s)return f.jsx(jR,{url:n,name:t});let a;return e==="image"?a=f.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:f.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.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=f.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:f.jsx(jR,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a,r&&f.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:f.jsxs("a",{href:n,download:t,children:[Ev()," ",t]})})]})}const uLn=e=>({queryKey:Ct("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 WH(e,n=!0){return lt({...uLn(e),enabled:n,subscribed:n}).data??null}function _Ln(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function fLn(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),c=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 h=u.join("/");if(!h)return null;const _=new URLSearchParams(c);_.delete("path");const p=_.toString();return{path:h,url:`${W_(e,h)}${p?`&${p}`:""}${i}`}}function dLn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const QH="orx:files-tree-width",XH="orx:artifacts-collapsed:",YH=180,ZH=320,hLn=8,pLn=280;function mLn(){try{const e=Number(localStorage.getItem(QH));if(Number.isFinite(e)&&e>=YH&&e<=ZH)return e}catch{}return pLn}function gLn(e){try{const n=localStorage.getItem(`${XH}${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 K0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=K0(t.children??[],n);if(r)return r}}return null}function JH({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(_Ln(i))return i;const a=fLn(e,n,i);if(!a)return null;const o=K0(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};return f.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:f.jsx(tzn,{remarkPlugins:[XF,[YF,rH]],rehypePlugins:[CF],components:{a:({href:i,children:a,...o})=>{const c=!i||i.startsWith("#"),u=c?i:s(i);return u?f.jsx("a",{...o,href:u,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...sH},children:JF(dLn(t))})})}function vLn(e){return e.presentation==="text"&&fC(e.name)?"markdown":KH(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function bLn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=UL,i=u6(e,n.path),a=lt({...i,enabled:s,subscribed:s}),o=A.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});A.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&tt.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((u=a.error)==null?void 0:u.message)??(c===null?vfe():null),wantsText:s}}function yLn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=vLn(n),i=WH(W_(e,n.path)),{text:a,binary:o,truncated:c,error:u,wantsText:h}=bLn(e,n,s,i),[_,p]=A.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),k=`${W_(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let v;return s==="image"||s==="audio"||s==="video"||s==="pdf"?v=f.jsx(X5,{kind:s,url:k,name:n.name}):s==="download"||!h||o?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?sfe():ihe()," ",f.jsx("a",{href:k,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?AD():Cfe()})]}):u?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Zfe()," ",Ne(u)]}):a===null?v=f.jsxs(Br,{children:[f.jsx(zt,{})," ",gD()]}):m&&!_?v=f.jsx(JH,{projectId:e,folder:x,markdown:a,entries:r}):v=f.jsx(VH,{text:a,path:n.path}),f.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:[f.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:[f.jsx(Ch,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[Rde()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:el(n.size)}),m&&f.jsx(Bt,{size:"small",active:_,"data-tip":_?Cv():Cd(),"data-tip-align":"end","aria-label":_?Cv():Cd(),onClick:()=>p(b=>!b),children:f.jsx(D3,{size:13})}),f.jsx(Cm,{size:"small",href:k,target:"_blank",rel:"noopener noreferrer","data-tip":XE(),"data-tip-align":"end","aria-label":XE(),children:f.jsx(X_,{size:13})}),f.jsx(Bt,{size:"small","data-tip":QE(),"data-tip-align":"end","aria-label":QE(),onClick:()=>{window.confirm(Pk({path:Ne(n.path)}))&&t(n.path)},children:f.jsx(gf,{size:13})})]}),f.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&&!_?"doc":""}`,children:[v,c&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:ide()})]})]})}function eq({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,onCancelRename:_}){return f.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,hLn)*14};if(p.isDir){const k=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.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:[f.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":k?A_e({name:Ne(p.name)}):Y_e({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:f.jsx(Ba,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(Bt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":Gfe(),"data-tip-align":"end","aria-label":U_e({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(Pk({path:Ne(p.path)}))&&o(p.path)},children:f.jsx(gf,{size:12})})]}),k&&(((x=p.children)==null?void 0:x.length)??0)>0&&f.jsx(eq,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,onCancelRename:_})]},p.path)}return c===p.path?f.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:[f.jsx(Ch,{name:p.name}),f.jsx(HH,{name:p.name,onCommit:k=>h(p.path,k),onCancel:_})]},p.path):f.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:AQ({path:Ne(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[f.jsx(Ch,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function xLn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=A.useState(null),[a,o]=A.useState(()=>gLn(e.id)),[c,u]=A.useState(mLn),[h,_]=A.useState(null),[p,m]=A.useState(null),x=A.useRef(null);A.useEffect(()=>{try{localStorage.setItem(`${XH}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=z=>{var I;z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId);const T=(I=x.current)==null?void 0:I.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=$=>{const q=Math.round($.clientX-((T==null?void 0:T.left)??0)),H=Math.min(Math.max(q,YH),ZH);u(H);try{localStorage.setItem(QH,String(H))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};A.useEffect(()=>{if(!s||!n)return;const z=K0(n.entries,s);(!z||z.isDir)&&i(null)},[s,n]);const v=z=>o(T=>{const j=new Set(T);return j.has(z)?j.delete(z):j.add(z),j}),b=z=>{(s===z||s!=null&&s.startsWith(z+"/"))&&i(null),fbn(e.id,z).catch(()=>{})},w=async(z,T)=>{try{await dbn(e.id,z,T),T.action==="rename"&&s===z&&i(null)}catch(j){yn(j instanceof Error?j.message:String(j),"error")}},y=z=>{n&&FH(n.dir,z)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(Br,{className:"p-5",children:[f.jsx(zt,{})," ",Cde()]})});const C=z=>f.jsx(eq,{entries:z,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(T,j)=>{_(qH(T,j))},onRename:(T,j)=>{m(null),w(T,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),N=s?K0(n.entries,s):null;return n.entries.length===0?f.jsx(hC,{icon:pS,title:Bde(),description:Zde()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.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:c},children:[f.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:k}),f.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&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:fde()})]})]}),N?f.jsx(yLn,{projectId:e.id,entry:N,onDelete:b,artifactEntries:n.entries},N.path):f.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:[f.jsx(p4n,{size:22,strokeWidth:1.5}),f.jsx("span",{children:Rfe()})]}),h&&f.jsx(UH,{target:h,onOpen:()=>t(h.path),onRename:r(h.path)?()=>m(h.path):void 0,onDuplicate:()=>void w(h.path,{action:"duplicate"}),onCopyPath:()=>y(h.path),onDelete:()=>{window.confirm(Pk({path:Ne(h.path)}))&&b(h.path)},onClose:()=>_(null)})]})}const tq=20*1024*1024,nq="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",rq="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",wLn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",kLn="text-sm font-normal text-text",SLn="mt-1 mb-0 text-sm leading-relaxed text-text";function sq(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 CLn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function iq({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=A.useState(!1),a=A.useRef(null);return f.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 c=(u=o.dataTransfer.files)==null?void 0:u[0];c&&r(c)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var c;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(c=a.current)==null||c.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const c=(u=o.target.files)==null?void 0:u[0];c&&r(c),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(zt,{}),f.jsx("span",{children:ron()})]}):f.jsxs(f.Fragment,{children:[f.jsx(U4n,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function aq({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[el(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",co(n)]})]})}function ELn({skill:e,onError:n}){const t=ln({mutationFn:Lbn}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:kLn,children:e.name}),e.origin&&f.jsx(Ut,{size:"small",children:e.origin})]}),f.jsx(aq,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Bt,{size:"small","data-tip":e.origin?ain():tan(),"data-tip-align":"end","aria-label":e.origin?yin({name:Ne(e.name)}):Zrn({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?din({name:Ne(e.name)}):Grn({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(gf,{size:13})})]})}function NLn({template:e,onError:n}){const t=ln({mutationFn:Mbn}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:wLn,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:SLn,children:[e.entry,s>0&&(s===1?Vsn():Nin({count:Xt(s)}))]})]}),f.jsx(aq,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Bt,{"data-tip":can(),"data-tip-align":"end","aria-label":fsn({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(isn({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:f.jsx(gf,{size:13})})]})}function zLn(){var w;const e=ln({mutationFn:Dbn}),n=lt(Nyn()),t=n.data,r=A.useRef(null),[s,i]=A.useState(!1),[a,o]=A.useState(!1),c=A.useCallback(()=>{const y=r.current;i(!!y&&y.scrollTop>1),o(!!y&&y.scrollHeight-y.scrollTop-y.clientHeight>1)},[]);A.useLayoutEffect(()=>{c();const y=r.current;if(!y)return;const C=new ResizeObserver(c);return C.observe(y),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(w=n.error)==null?void 0:w.message,[_,p]=A.useState(!1),[m,x]=A.useState(null),k=()=>{n.refetch()},v=A.useRef(!1),b=A.useCallback(async y=>{if(!v.current){if(x(null),!CLn(y.name)){x(gon());return}if(y.size>tq){x(NL());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:y.name,contentBase64:await sq(y)})}catch(C){x(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:nq,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:Xan()}),f.jsxs(De,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[f.jsx(Pa,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),f.jsx("p",{className:rq,children:bsn()}),f.jsx(iq,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Esn()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:$rn()})]}),onFile:y=>void b(y)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Oin()," ",h]}),t===void 0?h?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(zt,{})," ",wan()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Lan()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(y=>f.jsx(ELn,{skill:y,onError:x},y.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function jLn(){var h;const e=ln({mutationFn:Rbn}),n=lt(Eyn()),t=n.data,r=(h=n.error)==null?void 0:h.message,[s,i]=A.useState(!1),[a,o]=A.useState(null),c=A.useRef(!1),u=A.useCallback(async _=>{if(c.current)return;o(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(Son());return}if(_.size>tq){o(NL());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await sq(_)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return f.jsxs("section",{className:nq,children:[f.jsx("h3",{children:pan()}),f.jsx("p",{className:rq,children:uon()}),f.jsx(iq,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Msn()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:_fn()})]}),onFile:_=>void u(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Fin()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(zt,{})," ",jan()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:qan()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(NLn,{template:_,onError:o},_.name))})]})}function TLn(){return f.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:[f.jsx("h1",{children:Win()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:Jsn()}),f.jsx(zLn,{}),f.jsx(jLn,{})]})}const ALn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Fc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return f.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?ALn:""}`,onClick:i,onDoubleClick:a,title:s?sfn({label:n}):n,"aria-label":s?Y_n({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:rNe(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:f.jsx(or,{size:12})})]})}const TR=["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 RLn({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:TR,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:TR,href:Rb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Sv({name:Ne(t)}),children:[f.jsx("code",{children:t}),f.jsx(Fb,{size:12})]})}const g4=["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(" "),AR=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function RR(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function MR(e,n){return T0((e.endedAt??n)-e.createdAt)}function MLn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=r.some(h=>h.status==="running"||h.status==="starting"),[c,u]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!o)return;u(Date.now());const h=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(h)},[o]),f.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:f.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:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(al,{status:a?Qi(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(De,{...$r(h=>s(a.id,h)),children:[f.jsx(lo,{size:15}),PDe()]}),f.jsxs(De,{...$r(i),children:[f.jsx(Db,{size:15}),GOe()]})]}),e.description&&f.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:[f.jsx("h2",{children:fDe()}),f.jsx(Jo,{text:e.description})]}),f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:a?$Oe():hLe()}),a&&f.jsxs(f.Fragment,{children:[f.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:[f.jsx(al,{status:Qi(a)}),f.jsx(jS,{backend:a.backend}),f.jsxs("span",{title:oLe(),children:[f.jsx(ewn,{size:13}),RR(a.createdAt)]}),f.jsxs("span",{title:bDe(),children:[f.jsx(dwn,{size:13}),MR(a,c)]}),a.commitSha&&f.jsxs("span",{title:ZOe(),children:[f.jsx(qwn,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[EDe()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:AR,children:["$ ",a.command]}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx(Jo,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:"Git"}),f.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:[f.jsx(RLn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[MDe()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:RR(e.createdAt),children:[iDe()," ",co(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:AR,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:eLe()}),f.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((h,_)=>f.jsxs("button",{...$r(p=>s(h.id,p)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[KDe()," ",r.length-_]}),f.jsx(al,{status:Qi(h)}),f.jsx("span",{children:co(h.createdAt)}),f.jsx("span",{children:MR(h,c)}),f.jsx(lo,{size:13})]},h.id))})]})]})})}function OR(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}=Ib(t,!0);let i=!1,a=0,o=!1,c=!1;async function u(){if(o){c=!0;return}o=!0;try{for(;;){const _=await tvn(e,a);if(i)return;if(_.dataBase64&&r.write(OR(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=Dyn(e,_=>{if(i)return;const p=OR(_.dataBase64);!o&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function DLn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,_)=>_.createdAt-h.createdAt);return t==="overview"?f.jsx(MLn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,_)=>o("terminal",h,_),onOpenCode:h=>c("files",h)}):f.jsx(LLn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function LLn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=A.useState(null),[a,o]=A.useState(null),[c,u]=A.useState(!1),h=A.useRef(null),_=t?n.find(v=>v.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),x=v=>{const b=n.findIndex(w=>w.id===v);return b===-1?n.length:n.length-b};A.useEffect(()=>{if(!c)return;const v=b=>{var w;(w=h.current)!=null&&w.contains(b.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function k(){if(_){i(null),o(_.id);try{await LL(_.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.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:[f.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}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(De,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[f.jsx(AI,{size:13}),m?rze():zD()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[f.jsxs(De,{title:jMe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[f.jsxs("span",{children:[AN()," ",x(_.id)]}),f.jsx(al,{status:m?"cancelling":Qi(_)}),f.jsx(rc,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&f.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(v=>f.jsxs(Xn,{className:"justify-start",active:v.id===(_==null?void 0:_.id),onClick:()=>{r(v.id),u(!1)},children:[f.jsxs("span",{className:"font-medium",children:[AN()," ",x(v.id)]}),f.jsx(al,{status:Qi(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:co(v.createdAt)})]},v.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(OLn,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?ro():mMe()})})]})}let Y5=!1;function DR(e){Y5=!0;try{return window.confirm(e)}finally{Y5=!1}}const Z5=e=>e.replace(/\r\n/g,` -`),LR=(e,n,t)=>{const r=Z5(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},Gc=e=>e.draft!==e.baseline,ILn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),$Ln=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function BLn(e,n,t){return!Gc(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class PLn{constructor(){Bs(this,"buffer",null);Bs(this,"listeners",new Set);Bs(this,"saving",!1);Bs(this,"saveError",null);Bs(this,"revision",0);Bs(this,"saveRevision",0);Bs(this,"getSnapshot",()=>this.buffer);Bs(this,"getRevision",()=>this.revision);Bs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Bs(this,"set",n=>{this.buffer=n,this.notify()});Bs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Bs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Bs(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&&(Gc(this.buffer)||this.buffer.conflict!==null)}}function FLn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var J,Z,B;const c=lt({...dkn(),enabled:r,subscribed:r}),u=((J=c.data)==null?void 0:J.engine)??(c.isPending?void 0:null),h=((Z=c.data)==null?void 0:Z.hint)??null,_=((B=c.data)==null?void 0:B.installCommand)??null,[p,m]=A.useState(!1),[x,k]=A.useState(null),[v,b]=A.useState(null),[w,y]=A.useState(!1),[C,N]=A.useState(null),[z,T]=A.useState(null),[j,M]=A.useState(!1),[D,I]=A.useState(0),$=A.useCallback(L=>{M(L),L&&I(F=>F+1)},[]),q=A.useRef(o);q.current=o;const H=A.useRef(!1),Q=A.useRef(null),V=A.useCallback(()=>{if(H.current)return;Q.current=n,H.current=!0,m(!0);const L=q.current;T(null),b(null),N(null),uvn(e,n,{sessionId:t}).then(F=>{var K,ne;const U=F.pdfPath;if(F.ok&&U){k(ce=>({path:U,version:((ce==null?void 0:ce.version)??0)+1,source:L})),y(F.hadErrors),N(F.note),F.hadErrors&&b(((K=F.log)==null?void 0:K.trim())||null),$(!0);return}k(null),y(!1),N(F.note),M(!1),b(((ne=F.log)==null?void 0:ne.trim())||CYe())}).catch(F=>{k(null),y(!1),N(null),M(!1),T(F instanceof Error?F.message:String(F))}).finally(()=>{H.current=!1,m(!1)})},[e,n,t,$]);return A.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&V()},[r,s,a,u,n,V]),{engine:u,installHint:h,installCommand:_,compiling:p,compiled:x,stale:x!==null&&x.source!==o,log:v,builtWithErrors:w,note:C,error:z,showPdf:j,setShowPdf:$,viewNonce:D,compile:()=>{i==null||i(),V()},dismiss:()=>{T(null),b(null)}}}const HLn=3e4,qLn=3e4,ULn=5*6e4;function GLn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var _e,se,G,oe;const u=A.useMemo(()=>pkn(e,n,{sessionId:t}),[e,n,t]),h=lt({...u,enabled:r,subscribed:r}),_=((_e=h.data)==null?void 0:_e.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((G=h.data)==null?void 0:G.link)??null,x=!h.isPending,[k,v]=A.useState(null),[b,w]=A.useState(0),[y,C]=A.useState(!1),[N,z]=A.useState(null),[T,j]=A.useState(null),[M,D]=A.useState(!1),I=A.useCallback(le=>{An(u.queryKey)&&tt.setQueryData(u.queryKey,fe=>fe&&{...fe,hasSession:le})},[u]),$=A.useCallback(le=>{An(u.queryKey)&&tt.setQueryData(u.queryKey,le)},[u]);A.useEffect(()=>{z(null),w(0),L.current=!1,j(null),D(!1),V.current=!1},[r,e,n,t]),A.useEffect(()=>{D(!1)},[a]);const q=A.useRef(!1),H=A.useRef(c);H.current=c;const Q=A.useRef(o);Q.current=o;const V=A.useRef(!1),J=A.useCallback(le=>!_||!m||q.current||Q.current?!1:(q.current=!0,C(!0),j(null),yvn(e,n,{sessionId:t,resolve:le}).then(fe=>{V.current=!1,z(fe),fe.pulled.includes(n)&&(Q.current?D(!0):H.current(fe.pulled))}).catch(fe=>{V.current=!0,z(null),j(fe instanceof Error?fe.message:String(fe))}).finally(()=>{q.current=!1,C(!1)}),!0),[e,n,t,_,m]),Z=A.useRef(null),B=(k==null?void 0:k.state)==="live";A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||B)return;const le=`${n}:${m.projectId}:${a}`;Z.current!==le&&J()&&(Z.current=le)},[r,s,x,_,m,n,a,o,y,J,B]);const L=A.useRef(!1);!y&&N&&N.conflicts.length===0&&!T&&(L.current=!0);const F=r&&x&&!!m&&_&&p&&L.current,U=A.useRef(null),K=A.useRef(Promise.resolve()),ne=A.useRef(!1);ne.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ce=A.useRef(!1);return A.useEffect(()=>{if(!F)return;let le=!1;const fe=()=>{const Re=ce.current;ce.current=!1,!(!Re&&ne.current)&&(K.current=K.current.then(()=>{if(!le)return pvn(e,n,{sessionId:t,retry:Re}).then(Oe=>{var We;le||((U.current===null||((We=Oe.status)==null?void 0:We.state)==="stopped")&&v(Oe.status),U.current=Oe.key)}).catch(Oe=>{le||v({state:"stopped",error:Oe instanceof Error?Oe.message:String(Oe),needsSession:!1,note:null})})}))};fe();const me=setInterval(fe,qLn);return()=>{le=!0,clearInterval(me),U.current=null,v(null),K.current=K.current.then(()=>mvn(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),A.useEffect(()=>Fyn(le=>{if(le.key===U.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(Q.current?D(!0):H.current(le.paths))}}),[n]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||B)return;const le=setInterval(()=>{q.current||V.current||tt.fetchQuery({...mkn(e,n,{sessionId:t}),staleTime:0}).then(fe=>{fe.remoteChanged&&J()}).catch(fe=>{V.current=!0,j(fe instanceof Error?fe.message:String(fe))})},HLn);return()=>clearInterval(le)},[r,s,x,_,m,o,e,n,t,J,B]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||!B)return;const le=setInterval(J,ULn);return()=>clearInterval(le)},[r,s,x,_,m,B,J]),{hasToken:_,hasSession:p,live:k,retryLive:()=>{ce.current=!0,w(le=>le+1)},link:m,loaded:x,syncing:y,last:N,error:T??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:wvn(e,n,{sessionId:t}),saveToken:async le=>{const fe=await $L(le);Z.current=null,V.current=!1,j(null),An(u.queryKey)&&tt.setQueryData(u.queryKey,me=>me&&{...me,hasToken:fe.hasToken})},saveSession:async le=>{const fe=await BL(le,{host:m==null?void 0:m.host});I(fe.hasSession),ce.current=!0,w(me=>me+1)},importSession:async()=>{const le=await hvn({host:m==null?void 0:m.host});return I(le.hasSession),ce.current=!0,w(fe=>fe+1),le.source},linkProject:async le=>{z(null),v(null),L.current=!1,Z.current=null,$(await vvn(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{$(await bvn(e,n,{sessionId:t})),Z.current=null,V.current=!1,z(null),j(null)},sync:le=>{V.current=!1,J(le)&&(Z.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const IR=[{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"]}],VLn=4e6,KLn=200,$R=16e6,WLn=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)}),BR=e=>e.startsWith("//")?`https:${e}`:e;async function QLn(e,n){var s;let t=VLn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:c}of e){if(r.has(o)){const x=r.get(o);x&&i.setAttribute(a,x);continue}if(n.aborted)return;if(r.size>=KLn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!c.some(x=>h.startsWith(x))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await WLn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function XLn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(IR.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of IR){if(!o.matches(c))continue;const _=o.getAttribute(u);if(!_)continue;const p=n(_);p&&(p===_?o.setAttribute(u,BR(_)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await QLn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!w6(c)||(o.setAttribute("href",BR(c)),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 YLn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${$R-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>$R}}function ZLn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=A.useState(null);return A.useEffect(()=>{let o=!1;const c=new AbortController;return a(null),YLn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await XLn(u,s,c.signal),partial:h})).then(u=>{o||a(u)}),()=>{o=!0,c.abort()}},[e,n,t,s]),i===null?f.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[f.jsx(zt,{})," ",RD()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:lFe()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:mFe({name:Ne(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function JLn({overleaf:e}){var _;const n=A.useRef(null),{open:t,setOpen:r,ref:s}=_o(n),i=A.useId(),[a,o]=A.useState({top:0,left:0,maxHeight:0}),c=((_=e.last)==null?void 0:_.conflicts.length)??0,u=e.hasToken&&!!e.error,h=u?l3():c?E0t():!e.hasToken||!e.link?Fvt():e.syncing?ZD():e.blocked?YD():WD();return A.useEffect(()=>{c&&r(!0)},[c,r]),A.useEffect(()=>{u&&yn(l3(),"error",{id:i,duration:5e3})},[u,e.error,i]),A.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 k=()=>r(!1),v=b=>{var w;b.target instanceof Node&&!((w=s.current)!=null&&w.contains(b.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),f.jsxs(f.Fragment,{children:[f.jsx(Bt,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":vZ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?f.jsx(zt,{}):f.jsx(gwn,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&oa.createPortal(f.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":gL(),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:[f.jsx("div",{className:"absolute end-3 top-3",children:f.jsx(Bt,{size:"small","aria-label":TPe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:f.jsx(or,{size:13})})}),f.jsx(sIn,{overleaf:e})]}),document.body)]})}const j1=e=>Gi(new Intl.ListFormat(E()).format(e.map(Ne)));function eIn(e){if(e.error)return fmt();if(e.syncing)return ZD();if(e.blocked)return YD();const n=e.last;return n?n.pulled.length&&n.pushed.length?evt({pulled:j1(n.pulled),pushed:j1(n.pushed)}):n.pulled.length?K1t({paths:j1(n.pulled)}):n.pushed.length?ovt({paths:j1(n.pushed)}):n.conflicts.length?dgt():WD():M1t()}function tIn({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:XD()})}function nIn(e){return e.state==="live"?Mmt():e.state==="connecting"?Emt():e.error??Kmt()}function PR({overleaf:e,replacing:n}){const[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[c,u]=A.useState(null),h=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)))},_=a?ebt():n?hvt():V0t();return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("p",{className:"text-sm text-subtext",children:_}),a&&f.jsx(Ir,{className:"basis-full min-w-0","aria-label":c3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:c3(),autoComplete:"off"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&f.jsx(zt,{}),a?f.jsx(De,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?ia():b0t()}):f.jsx(De,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:J0t()}),f.jsx(De,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?QD():P1t()})]}),c&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function rIn({overleaf:e}){if(!e.hasSession)return f.jsx(PR,{overleaf:e});const n=e.live;if(!n)return f.jsx("p",{className:"text-sm text-subtext",children:egt()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),f.jsx("span",{className:"min-w-0 break-words",children:nIn(n)})]}),n.note&&f.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&f.jsx("div",{children:f.jsx(De,{onClick:e.retryLive,children:Pmt()})}),t&&f.jsx(PR,{overleaf:e,replacing:!0})]})}function sIn({overleaf:e}){var p,m,x;const[n,t]=A.useState(""),[r,s]=A.useState(!1),[i,a]=A.useState(null),[o,c]=A.useState(!1),u=()=>{t(""),a(null),c(!0)},h=!e.hasToken||o;async function _(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){const k=((p=e.last)==null?void 0:p.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[f.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&f.jsx(zt,{}),e.error?l3():eIn(e)]}),e.error&&f.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),f.jsx(rIn,{overleaf:e}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(De,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?xvt():((m=e.live)==null?void 0:m.state)==="live"?dbt():void 0,onClick:()=>e.sync(),children:e.error?Vs():a1t()}),f.jsxs(dh,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Kgt()," ",f.jsx(X_,{size:12})]})]}),k.map(v=>f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsxs("p",{className:"break-words text-accent-red",children:[f.jsx("code",{className:"font-mono",children:v})," ",Mgt()]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Pgt()}),f.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:E1t()})]})]},v)),((x=e.last)==null?void 0:x.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),f.jsxs("details",{className:"border-t border-border pt-3",children:[f.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:f.jsx("span",{className:"ms-2",children:tS()})}),f.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[f.jsx(De,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:_z()}),f.jsx(dh,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:XD()}),f.jsx(De,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:d1t()})]})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:_,children:[f.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?Ebt():Mbt()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx(Ir,{className:"basis-full min-w-0","aria-label":h?lz():uz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?lz():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(De,{type:"submit",disabled:r||!n.trim(),children:r?h?ia():ta():h?Ovt():bmt()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?M0t():uz()})]}),(i||e.error)&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(tIn,{href:e.uploadUrl}),o?f.jsx(De,{variant:"ghost",type:"button",onClick:()=>c(!1),children:QD()}):e.hasToken&&f.jsx(De,{variant:"ghost",type:"button",onClick:u,children:_z()})]})]})}function iIn({command:e}){const[n,t]=A.useState("idle"),r=A.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 f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.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}),f.jsx(Bt,{"data-tip":n==="copied"?j0():n==="select"?kqe():IBe(),"aria-label":UBe(),onClick:()=>void s(),children:n==="copied"?f.jsx(Xi,{size:13}):f.jsx(Oh,{size:13})})]})}function aIn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:_,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:w,showSource:y=!1,onShowSourceChange:C}){var kt,At;const N=U$(e,n,t??"repo",r,s),z=lt({...N,enabled:!k.saving}),T=z.data??null,j=((kt=z.error)==null?void 0:kt.message)??null,M=Ve=>{Wr(N.queryKey,bt=>(typeof Ve=="function"?Ve(bt??null):Ve)??void 0)},[D,I]=A.useState(0),$=t==="artifacts",q=t==="abs",H=fC(n),Q=PH(n),V=aLn(n),J=H||V,[Z,B]=A.useState(!1),L=!b||Z,F=()=>{B(!0),w==null||w()};A.useSyncExternalStore(k.subscribe,k.getRevision);const U=k.getSnapshot(),K=k.set,ne=k.saving,ce=k.setSaving,_e=k.saveRevision,se=k.saveError,G=k.setSaveError,oe=A.useRef(null),le=A.useRef(c),fe=(T==null?void 0:T.file)??null,me=U&&Gc(U)?U.path:(T==null?void 0:T.source)==="checkout"?T.file.path:n,Re=me.split("/").slice(0,-1).join("/"),Oe=(T==null?void 0:T.source)==="artifact",We=A.useCallback(Ve=>{var bt;return((bt=s5(Re,Ve,q))==null?void 0:bt.path)??null},[q,Re]),He=A.useCallback(Ve=>q?IL(Ve):Oe?W_(e,Ve):g3(e,Ve,{sessionId:r,ref:s}),[Oe,s,q,e,r]),Se=A.useCallback(Ve=>{if(w6(Ve))return Ve;const bt=s5(Re,Ve,q);return bt?$Cn(He(bt.path),bt):null},[q,Re,He]),it=KH(fe==null?void 0:fe.presentation),Je=(T==null?void 0:T.source)==="artifact"&&!$,ot=$&&(T==null?void 0:T.source)==="checkout",wt=!s&&(T==null?void 0:T.source)==="checkout"&&fe!=null&&!fe.notFound,Pt=r!=null&&(T==null?void 0:T.source)==="checkout"&&T.file.root==="clone",dt=wt&&fe!=null&&!fe.binary&&!fe.truncated&&!it&&!Pt,ft=dt&&fe.version===void 0,Le=U!==null&&Gc(U),ge=!ft&&(dt&&typeof fe.version=="string"||Le),Te=(U==null?void 0:U.draft)??Z5((fe==null?void 0:fe.content)??""),Pe=(U==null?void 0:U.baseline)??Z5((fe==null?void 0:fe.content)??""),rt=ge&&U!==null&&Gc(U),ut=async Ve=>{const bt=k.getSnapshot();if(!ge||!bt||!Gc(bt))return!0;if(k.saving)return!1;if(bt.conflict&&Ve===void 0)return G(bt.conflict.exists?RN():ON()),!1;const Mn=bt.draft,tn=$Ln(bt);ce(!0),G(null);try{await tt.cancelQueries(N);const on=await avn(e,me,tn,{sessionId:r,expectedVersion:Ve??bt.version});return k.getSnapshot()?(k.saved(Mn,on.version),M(cn=>cn&&cn.source==="checkout"?{source:"checkout",file:{...cn.file,content:tn,version:on.version}}:cn),!0):!1}catch(on){if(on instanceof m3){const Zn=k.getSnapshot();return!Zn||!Gc(Zn)||K({...Zn,conflict:{currentVersion:on.currentVersion,exists:on.exists}}),!1}return G(on instanceof Error?on.message:String(on)),!1}finally{ce(!1)}},pt=Q&&wt&&!Pt,qe=FLn({projectId:e,filePath:me,sessionId:r,enabled:pt,autoRun:L,onManualAction:F,ready:fe!=null&&!fe.notFound,source:ge?Te:(fe==null?void 0:fe.content)??""}),Kt=GLn({projectId:e,filePath:me,sessionId:r,enabled:pt,autoRun:L,onManualAction:F,savedSource:Pe,dirty:rt,onPulled:A.useCallback(Ve=>{Ve.includes(me)&&I(bt=>bt+1)},[me])}),sn=Q&&qe.showPdf&&qe.compiled!=null,Tt=ft&&Le,mt=(ge||Tt)&&!(J&&!y)&&!sn,Bn=qe.compiled?`${g3(e,qe.compiled.path,{sessionId:r})}&v=${qe.compiled.version}`:null,Jt=Bn?`${Bn}&view=${qe.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,xn=qe.compiled?qe.compiled.path.split("/").pop()??qe.compiled.path:null,vr=async()=>{rt&&!await ut()||Q&&qe.engine&&qe.compile()},Pn=async()=>{rt&&(L?await vr():await ut())},[Rn,Fn]=A.useState(!1),[_r,Pr]=A.useState(null),Et=async()=>{Fn(!0),Pr(null);try{await cvn(e,me,{sessionId:r})}catch(Ve){Pr(Ve instanceof Error?Ve.message:String(Ve))}finally{Fn(!1)}},un=A.useCallback(()=>{k.saving||I(Ve=>Ve+1)},[k]),zn=()=>{K(null),G(null),un()},an=WH(He(me),!s&&!ne);A.useEffect(()=>{if(!j||s)return;const Ve=window.setInterval(()=>{document.visibilityState!=="hidden"&&un()},2e3);return()=>window.clearInterval(Ve)},[j,s,un]);const fr=`${He(me)}&v=${encodeURIComponent(an??m??"")}&reload=${D}`;A.useEffect(()=>{var Mn,tn;if(!T||k.saving)return;const Ve=T,bt=k.getSnapshot();if(bt&&Gc(bt)){const on=Ve.source==="checkout"?Ve.file:null,Zn=on!==null&&on.path===bt.path&&(!r||on.root==="worktree"),cn=BLn(bt,Zn&&typeof on.version=="string"?on.version:null,Zn&&!on.notFound);cn&&(cn.currentVersion!==((Mn=bt.conflict)==null?void 0:Mn.currentVersion)||cn.exists!==((tn=bt.conflict)==null?void 0:tn.exists))?K({...bt,conflict:cn}):!cn&&bt.conflict&&K({...bt,conflict:null})}(!bt||!Gc(bt))&&Ve.source==="checkout"&&!Ve.file.notFound&&!Ve.file.binary&&!Ve.file.truncated&&typeof Ve.file.version=="string"&&(K(LR(Ve.file.path,Ve.file.content,Ve.file.version)),G(null))},[T,k,r,ne,_e]);const fn=JSON.stringify(N.queryKey),wn=A.useRef({sourceKey:fn,nonce:D,artifactVersion:m,diskVersion:an});A.useEffect(()=>{const Ve=wn.current;wn.current={sourceKey:fn,nonce:D,artifactVersion:m,diskVersion:an},Ve.sourceKey===fn&&(Ve.nonce!==D||Ve.diskVersion!==null&&Ve.diskVersion!==an||Ve.artifactVersion!=null&&Ve.artifactVersion!==m)&&gkn(e,n,t??"repo",r,s)},[fn,D,m,an,e,n,t,r,s]),A.useLayoutEffect(()=>{const Ve=oe.current,bt=le.current;!Ve||!fe||!bt||(Ve.scrollTop=bt.top,Ve.scrollLeft=bt.left)},[fe]);const Yn=Ve=>{if(Ve.source==="absolute")return XFe();if($)return LFe({root:r?Jg():Zg()});if(s)return qFe({branch:Ne(s)});if(r&&Ve.source==="checkout"&&Ve.file.root==="clone")return wUe();const bt=Ve.source==="checkout"?Ve.file.root:Ve.checkoutRoot;return rHe({root:bt==="worktree"?Jg():Zg()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",children:[f.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:[f.jsx(Ch,{name:me}),f.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(me),children:me.split("/").pop()||me}),a&&f.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:$Q({branch:Ne(a)}),children:[f.jsx(Nm,{size:11}),a]}),mt&&(ne||rt||se)&&f.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?ia():cUe()),children:ne?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",mqe()]}):se?lqe():MD()}),Q&&qe.compiled&&f.jsx(Bt,{size:"small",active:!qe.showPdf,"data-tip":qe.stale&&qe.showPdf?IHe():qe.showPdf?Cd():BN(),"data-tip-align":"end","aria-label":qe.showPdf?Cd():BN(),onClick:()=>qe.setShowPdf(!qe.showPdf),children:qe.showPdf?f.jsx(D3,{size:13}):f.jsx(Ob,{size:13,className:qe.stale?"text-accent-amber":void 0})}),Q&&Bn&&xn&&f.jsx(Cm,{size:"small","data-tip":qe.stale?qPe({name:Ne(xn)}):BE({name:Ne(xn)}),"data-tip-align":"end","aria-label":BE({name:Ne(xn)}),href:Bn,download:xn,children:f.jsx(fS,{size:13,className:qe.stale?"text-accent-amber":void 0})}),pt&&f.jsx(JLn,{overleaf:Kt}),Q&&wt&&f.jsx(Bt,{size:"small","data-tip":qe.compiled?$N():MN(),"data-tip-align":"end","aria-label":qe.compiled?$N():MN(),disabled:qe.compiling||!qe.engine,onClick:()=>void vr(),children:qe.compiling?f.jsx(zt,{}):f.jsx(Nwn,{size:13})}),J&&f.jsx(Bt,{size:"small",active:y,"data-tip":y?Cv():Cd(),"data-tip-align":"end","aria-label":y?Cv():Cd(),onClick:()=>C==null?void 0:C(!y),children:f.jsx(D3,{size:13})}),wt&&!v&&f.jsx(Bt,{size:"small","data-tip":_r??IN(),"data-tip-align":"end","aria-label":IN(),disabled:Rn,onClick:()=>void Et(),children:Rn?f.jsx(zt,{}):f.jsx(X_,{size:13})})]}),!j&&ot&&(T==null?void 0:T.source)==="checkout"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:uHe({root:T.file.root==="worktree"?Jg():Zg()})}),ft&&f.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:pUe()}),j&&fe!==null&&f.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:[LN()," ",Ne(j)]}),(U==null?void 0:U.conflict)&&f.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:[f.jsx("span",{className:"flex-1 min-w-0",role:"status",children:U.conflict.exists?RN():ON()}),((At=U==null?void 0:U.conflict)==null?void 0:At.exists)&&U.conflict.currentVersion&&f.jsx(De,{disabled:ne,onPointerDown:Ve=>Ve.preventDefault(),onClick:()=>{var Ve;return void ut(((Ve=U.conflict)==null?void 0:Ve.currentVersion)??void 0)},children:THe()}),f.jsx(De,{disabled:ne,onPointerDown:Ve=>Ve.preventDefault(),onClick:zn,children:nqe()})]}),(qe.error||qe.log)&&f.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:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:`flex-1 min-w-0 text-sm ${qe.builtWithErrors?"text-subtext":"text-accent-red"}`,children:qe.error??(qe.builtWithErrors?TBe():gBe())}),f.jsx(Bt,{"data-tip":mPe(),"data-tip-align":"end","aria-label":kPe(),onClick:qe.dismiss,children:f.jsx(or,{size:13})})]}),qe.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:qe.log})]}),pt&&Kt.staleOnDisk&&f.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:[f.jsx("span",{className:"flex-1 min-w-0",children:kHe()}),f.jsx(De,{onClick:()=>{Kt.reloaded(),I(Ve=>Ve+1)},children:rPe()})]}),Q&&wt&&qe.engine===null&&qe.installHint&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[qe.installHint,qe.installCommand&&f.jsx(iIn,{command:qe.installCommand})]}),qe.note&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:qe.note}),sn&&qe.stale&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:Hqe()}),f.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ve=>{const bt={top:Math.max(0,Ve.currentTarget.scrollTop),left:Math.max(0,Ve.currentTarget.scrollLeft)};le.current=bt,u==null||u(bt)},children:[!mt&&!j&&!$&&(T==null?void 0:T.source)==="checkout"&&!T.file.notFound&&!s&&r&&T.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Qqe()}),!mt&&!j&&(T==null?void 0:T.source)==="artifact"&&!T.file.notFound&&Je&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Y$e({root:T.checkoutRoot==="worktree"?Jg():Zg()})}),j&&fe===null?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[LN()," ",Ne(j)]}):fe===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:RD()}):mt?f.jsx(O$,{value:Te,onChange:Ve=>{const bt=k.getSnapshot()??(fe&&typeof fe.version=="string"?LR(fe.path,fe.content,fe.version):null);bt&&K(ILn(bt,Ve)),p==null||p(),se&&G(null)},onSave:()=>void Pn(),onBlur:()=>{Y5||Pn()},readOnly:Tt,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_,scrollPosition:le.current,onScrollPositionChange:Ve=>{le.current=Ve,u==null||u(Ve)}}):fe.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:T?Yn(T):jFe()}):it?f.jsx(X5,{kind:it,url:fr,name:n.split("/").pop()??n}):fe.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[sBe()," ",f.jsx("a",{href:fr,download:n.split("/").pop()??n,children:AD()})]}):sn&&Jt&&xn?f.jsx(X5,{kind:"pdf",url:Jt,name:xn,downloadBar:!1},Jt):H&&!y?f.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:Oe?f.jsx(JH,{projectId:e,folder:Re,markdown:fe.content,entries:x}):f.jsx(Jo,{text:fe.content,resolveFilePath:We,resolveImageSrc:Se,onOpenFile:o&&((Ve,bt,Mn,tn,on)=>o(Ve,r,s,on))})}):V&&!y?f.jsx(ZLn,{html:fe.content,truncated:fe.truncated,url:fr,name:me,resolveSrc:Se}):f.jsxs(f.Fragment,{children:[f.jsx(VH,{text:fe.content,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_}),fe.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:nFe()})]})]})]})}const v4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function oIn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=_o(),c=A.useRef(null);return A.useEffect(()=>{if(!i)return;const u=h=>{var _;h.key==="Escape"&&((_=c.current)==null||_.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),f.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:f.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[f.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[f.jsx(Bt,{size:"small",className:"project-back text-text","aria-label":FN(),onClick:n,children:f.jsx(A0,{size:18})}),f.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:rQe()}),s&&f.jsx(Bt,{size:"small","data-tip":HN(),"data-tip-align":"end","aria-label":HN(),onClick:s,children:f.jsx(PI,{size:18})})]}),f.jsxs("button",{ref:c,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:[f.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),f.jsx(rc,{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&&f.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:[f.jsx(Xn,{onClick:()=>{a(!1),r()},children:f.jsxs("span",{className:v4,children:[f.jsx(DI,{size:14}),IWe()]})}),f.jsx(Xn,{onClick:()=>{a(!1),n()},children:f.jsxs("span",{className:v4,children:[f.jsx(II,{size:14}),FN()]})}),f.jsx(Xn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:f.jsxs("span",{className:v4,children:[f.jsx(Dwn,{size:14}),UWe()]})})]})]})})}function cIn({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:a}){const[o,c]=A.useState(new Set),[u,h]=A.useState(null),_=new Map;for(const x of e){const k=_.get(x.experimentId);k?k.push(x):_.set(x.experimentId,[x])}for(const x of _.values())x.sort((k,v)=>v.createdAt-k.createdAt);const p=[...n].sort((x,k)=>{var w,y,C,N;const v=((y=(w=_.get(x.id))==null?void 0:w[0])==null?void 0:y.createdAt)??x.createdAt;return(((N=(C=_.get(k.id))==null?void 0:C[0])==null?void 0:N.createdAt)??k.createdAt)-v});if(p.length===0)return f.jsx(hC,{icon:hh,title:t??DLe(),description:t?void 0:xLe()});async function m(x){h(null),c(k=>new Set(k).add(x));try{await a(x)}catch(k){c(v=>{const b=new Set(v);return b.delete(x),b}),h(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[XIe()," ",u]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":IIe(),children:p.map(x=>{const k=_.get(x.id)??[],v=k[0]??null,b=k.find(N=>N.status==="running"||N.status==="starting"),w=b??v,y=!!(b&&(b.cancelRequested||o.has(b.id))),C=b?y?"cancelling":Qi(b):v?Qi(v):"idle";return f.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:[f.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[f.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...$r(N=>r(x,N),{stopPropagation:!0}),children:x.title||x.slug}),f.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:[f.jsx(Nm,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:x.branchName})]})]}),f.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:[f.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:f.jsx(al,{status:C})}),f.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:f.jsx("span",{children:k.length===1?QLe():lIe({count:Xt(k.length)})})}),f.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:f.jsx("span",{children:v?co(v.createdAt):HLe()})})]}),f.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":SQ({name:x.title||x.slug}),onClick:N=>N.stopPropagation(),onDoubleClick:N=>N.stopPropagation(),onAuxClick:N=>N.stopPropagation(),children:[f.jsxs(De,{size:"small",disabled:!w,title:w?nIe():zLe(),...$r(N=>{w&&s(x.id,w.id,N)},{stopPropagation:!0}),children:[f.jsx(lo,{size:15}),a3()]}),f.jsxs(De,{size:"small",title:fD({branch:Ne(x.branchName)}),...$r(N=>i(x.id,N),{stopPropagation:!0}),children:[f.jsx(Db,{size:15}),TIe()]}),b&&f.jsxs(De,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?mIe():kIe(),onClick:()=>void m(b.id),children:[f.jsx(AI,{size:15}),y?Sje():zD()]})]})]},x.id)})})]})}function lIn({onClose:e,onCreateProject:n}){const[t,r]=A.useState(!1),[s,i]=A.useState(null),a=A.useRef(null),o=A.useCallback(c=>{t||(r(!0),i(null),c().catch(()=>i(fdn())).finally(()=>r(!1)))},[t]);return A.useEffect(()=>{const c=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),A.useEffect(()=>{const c=a.current;if(!c)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const _=p=>{if(p.key!=="Tab")return;const m=h();if(m.length===0){p.preventDefault(),c.focus();return}const x=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0),u==null||u.focus()}},[]),oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:f.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:[f.jsx(Bt,{className:"absolute end-3.5 top-3.5","aria-label":p3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:f.jsx(or,{size:16})}),f.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[f.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:f.jsx(zS,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:$fn()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:Edn()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[bdn()," ",f.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:Zfn()}),vfn()]}),f.jsx("p",{dir:"auto",children:Gfn()})]}),s&&f.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),f.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[f.jsx(De,{onClick:()=>o(n),disabled:t,children:Afn()}),f.jsx(De,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?ia():idn()})]})]})}),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 Oy(){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}})}av.prototype=Oy.prototype={constructor:av,on:function(e,n){var t=this._,r=_In(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)),HR.hasOwnProperty(n)?{space:HR[n],local:e}:e}function dIn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===J5&&n.documentElement.namespaceURI===J5?n.createElement(e):n.createElementNS(t,e)}}function hIn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function oq(e){var n=Dy(e);return(n.local?hIn:dIn)(n)}function pIn(){}function pC(e){return e==null?pIn:function(){return this.querySelector(e)}}function mIn(e){typeof e!="function"&&(e=pC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=w+1);!(N=v[y])&&++y=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function FIn(e){e||(e=HIn);function n(_,p){return _&&p?e(_.__data__,p.__data__):!_-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function qIn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function UIn(){return Array.from(this)}function GIn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?n$n:typeof n=="function"?s$n:r$n)(e,n,t??"")):Eh(this.node(),e)}function Eh(e,n){return e.style.getPropertyValue(n)||fq(e).getComputedStyle(e,null).getPropertyValue(n)}function a$n(e){return function(){delete this[e]}}function o$n(e,n){return function(){this[e]=n}}function c$n(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function l$n(e,n){return arguments.length>1?this.each((n==null?a$n:typeof n=="function"?c$n:o$n)(e,n)):this.node()[e]}function dq(e){return e.trim().split(/^|\s+/)}function mC(e){return e.classList||new hq(e)}function hq(e){this._node=e,this._names=dq(e.getAttribute("class")||"")}hq.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 pq(e,n){for(var t=mC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function I$n(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function ek(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}ek.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function K$n(e){return!e.ctrlKey&&!e.button}function W$n(){return this.parentNode}function Q$n(e,n){return n??{x:e.x,y:e.y}}function X$n(){return navigator.maxTouchPoints||"ontouchstart"in this}function xq(){var e=K$n,n=W$n,t=Q$n,r=X$n,s={},i=Oy("start","drag","end"),a=0,o,c,u,h,_=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,V$n).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var z=y(this,n.call(this,C,N),C,N,"mouse");z&&(Vi(C.view).on("mousemove.drag",x,W0).on("mouseup.drag",k,W0),bq(C.view),b4(C),u=!1,o=C.clientX,c=C.clientY,z("start",C))}}function x(C){if(Fd(C),!u){var N=C.clientX-o,z=C.clientY-c;u=N*N+z*z>_}s.mouse("drag",C)}function k(C){Vi(C.view).on("mousemove.drag mouseup.drag",null),yq(C.view,u),Fd(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var z=C.changedTouches,T=n.call(this,C,N),j=z.length,M,D;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?A1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?A1(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=Z$n.exec(e))?new Ti(n[1],n[2],n[3],1):(n=J$n.exec(e))?new Ti(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=eBn.exec(e))?A1(n[1],n[2],n[3],n[4]):(n=tBn.exec(e))?A1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=nBn.exec(e))?QR(n[1],n[2]/100,n[3]/100,1):(n=rBn.exec(e))?QR(n[1],n[2]/100,n[3]/100,n[4]):qR.hasOwnProperty(e)?VR(qR[e]):e==="transparent"?new Ti(NaN,NaN,NaN,0):null}function VR(e){return new Ti(e>>16&255,e>>8&255,e&255,1)}function A1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ti(e,n,t,r)}function aBn(e){return e instanceof Bm||(e=rf(e)),e?(e=e.rgb(),new Ti(e.r,e.g,e.b,e.opacity)):new Ti}function tk(e,n,t,r){return arguments.length===1?aBn(e):new Ti(e,n,t,r??1)}function Ti(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}gC(Ti,tk,wq(Bm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new Ti(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q0:Math.pow(Q0,e),new Ti(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ti(q_(this.r),q_(this.g),q_(this.b),_b(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:KR,formatHex:KR,formatHex8:oBn,formatRgb:WR,toString:WR}));function KR(){return`#${k_(this.r)}${k_(this.g)}${k_(this.b)}`}function oBn(){return`#${k_(this.r)}${k_(this.g)}${k_(this.b)}${k_((isNaN(this.opacity)?1:this.opacity)*255)}`}function WR(){const e=_b(this.opacity);return`${e===1?"rgb(":"rgba("}${q_(this.r)}, ${q_(this.g)}, ${q_(this.b)}${e===1?")":`, ${e})`}`}function _b(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function q_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function k_(e){return e=q_(e),(e<16?"0":"")+e.toString(16)}function QR(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new no(e,n,t,r)}function kq(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Bm||(e=rf(e)),!e)return new no;if(e instanceof no)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,c=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&c<1?0:a,new no(a,o,c,e.opacity)}function cBn(e,n,t,r){return arguments.length===1?kq(e):new no(e,n,t,r??1)}function no(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}gC(no,cBn,wq(Bm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q0:Math.pow(Q0,e),new no(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 Ti(y4(e>=240?e-240:e+120,s,r),y4(e,s,r),y4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new no(XR(this.h),R1(this.s),R1(this.l),_b(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=_b(this.opacity);return`${e===1?"hsl(":"hsla("}${XR(this.h)}, ${R1(this.s)*100}%, ${R1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XR(e){return e=(e||0)%360,e<0?e+360:e}function R1(e){return Math.max(0,Math.min(1,e||0))}function y4(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 vC=e=>()=>e;function lBn(e,n){return function(t){return e+t*n}}function uBn(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 _Bn(e){return(e=+e)==1?Sq:function(n,t){return t-n?uBn(n,t,e):vC(isNaN(n)?t:n)}}function Sq(e,n){var t=n-e;return t?lBn(e,t):vC(isNaN(e)?n:e)}const fb=(function e(n){var t=_Bn(n);function r(s,i){var a=t((s=tk(s)).r,(i=tk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=Sq(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function fBn(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,c.push({i:a,x:Uo(r,s)})),t=x4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:_.push(s(_)+"rotate(",null,r)-2,x:Uo(u,h)})):h&&_.push(s(_)+"rotate("+h+r)}function o(u,h,_,p){u!==h?p.push({i:_.push(s(_)+"skewX(",null,r)-2,x:Uo(u,h)}):h&&_.push(s(_)+"skewX("+h+r)}function c(u,h,_,p,m,x){if(u!==_||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");x.push({i:k-4,x:Uo(u,_)},{i:k-2,x:Uo(h,p)})}else(_!==1||p!==1)&&m.push(s(m)+"scale("+_+","+p+")")}return function(u,h){var _=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,_,p),a(u.rotate,h.rotate,_,p),o(u.skewX,h.skewX,_,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,_,p),u=h=null,function(m){for(var x=-1,k=p.length,v;++x=0&&e._call.call(void 0,n),e=e._next;--Nh}function JR(){sf=(hb=Y0.now())+Ly,Nh=s0=0;try{NBn()}finally{Nh=0,jBn(),sf=0}}function zBn(){var e=Y0.now(),n=e-hb;n>zq&&(Ly-=n,hb=e)}function jBn(){for(var e,n=db,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:db=t);i0=e,sk(r)}function sk(e){if(!Nh){s0&&(s0=clearTimeout(s0));var n=e-sf;n>24?(e<1/0&&(s0=setTimeout(JR,e-Y0.now()-Ly)),Xp&&(Xp=clearInterval(Xp))):(Xp||(hb=Y0.now(),Xp=setInterval(zBn,zq)),Nh=1,jq(JR))}}function eM(e,n,t){var r=new pb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var TBn=Oy("start","end","cancel","interrupt"),ABn=[],Aq=0,tM=1,ik=2,cv=3,nM=4,ak=5,lv=6;function Iy(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;RBn(e,t,{name:n,index:r,group:s,on:TBn,tween:ABn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Aq})}function yC(e,n){var t=fo(e,n);if(t.state>Aq)throw new Error("too late; already scheduled");return t}function lc(e,n){var t=fo(e,n);if(t.state>cv)throw new Error("too late; already running");return t}function fo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function RBn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=Tq(i,0,t.time);function i(u){t.state=tM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,_,p,m;if(t.state!==tM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===cv)return eM(a);m.state===nM?(m.state=lv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hik&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function cPn(e,n,t){var r,s,i=oPn(n)?yC:lc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function lPn(e,n){var t=this._id;return arguments.length<2?fo(this.node(),t).on.on(e):this.each(cPn(t,e,n))}function uPn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function _Pn(){return this.on("end.remove",uPn(this._id))}function fPn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=pC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function IPn(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 rl(e,n,t){this.k=e,this.x=n,this.y=t}rl.prototype={constructor:rl,scale:function(e){return e===1?this:new rl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new rl(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 $y=new rl(1,0,0);Dq.prototype=rl.prototype;function Dq(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $y;return e.__zoom}function w4(e){e.stopImmediatePropagation()}function Yp(e){e.preventDefault(),e.stopImmediatePropagation()}function $Pn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function BPn(){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 rM(){return this.__zoom||$y}function PPn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function FPn(){return navigator.maxTouchPoints||"ontouchstart"in this}function HPn(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 Lq(){var e=$Pn,n=BPn,t=HPn,r=PPn,s=FPn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=ov,u=Oy("start","zoom","end"),h,_,p,m=500,x=150,k=0,v=10;function b(H){H.property("__zoom",rM).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(H,Q,V,J){var Z=H.selection?H.selection():H;Z.property("__zoom",rM),H!==Z?N(H,Q,V,J):Z.interrupt().each(function(){z(this,arguments).event(J).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(H,Q,V,J){b.scaleTo(H,function(){var Z=this.__zoom.k,B=typeof Q=="function"?Q.apply(this,arguments):Q;return Z*B},V,J)},b.scaleTo=function(H,Q,V,J){b.transform(H,function(){var Z=n.apply(this,arguments),B=this.__zoom,L=V==null?C(Z):typeof V=="function"?V.apply(this,arguments):V,F=B.invert(L),U=typeof Q=="function"?Q.apply(this,arguments):Q;return t(y(w(B,U),L,F),Z,a)},V,J)},b.translateBy=function(H,Q,V,J){b.transform(H,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),a)},null,J)},b.translateTo=function(H,Q,V,J,Z){b.transform(H,function(){var B=n.apply(this,arguments),L=this.__zoom,F=J==null?C(B):typeof J=="function"?J.apply(this,arguments):J;return t($y.translate(F[0],F[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof V=="function"?-V.apply(this,arguments):-V),B,a)},J,Z)};function w(H,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===H.k?H:new rl(Q,H.x,H.y)}function y(H,Q,V){var J=Q[0]-V[0]*H.k,Z=Q[1]-V[1]*H.k;return J===H.x&&Z===H.y?H:new rl(H.k,J,Z)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function N(H,Q,V,J){H.on("start.zoom",function(){z(this,arguments).event(J).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(J).end()}).tween("zoom",function(){var Z=this,B=arguments,L=z(Z,B).event(J),F=n.apply(Z,B),U=V==null?C(F):typeof V=="function"?V.apply(Z,B):V,K=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ne=Z.__zoom,ce=typeof Q=="function"?Q.apply(Z,B):Q,_e=c(ne.invert(U).concat(K/ne.k),ce.invert(U).concat(K/ce.k));return function(se){if(se===1)se=ce;else{var G=_e(se),oe=K/G[2];se=new rl(oe,U[0]-G[0]*oe,U[1]-G[1]*oe)}L.zoom(null,se)}})}function z(H,Q,V){return!V&&H.__zooming||new T(H,Q)}function T(H,Q){this.that=H,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(H,Q),this.taps=0}T.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,Q){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Q=Vi(this.that).datum();u.call(H,this.that,new IPn(H,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function j(H,...Q){if(!e.apply(this,arguments))return;var V=z(this,Q).event(H),J=this.__zoom,Z=Math.max(i[0],Math.min(i[1],J.k*Math.pow(2,r.apply(this,arguments)))),B=Ya(H);if(V.wheel)(V.mouse[0][0]!==B[0]||V.mouse[0][1]!==B[1])&&(V.mouse[1]=J.invert(V.mouse[0]=B)),clearTimeout(V.wheel);else{if(J.k===Z)return;V.mouse=[B,J.invert(B)],uv(this),V.start()}Yp(H),V.wheel=setTimeout(L,x),V.zoom("mouse",t(y(w(J,Z),V.mouse[0],V.mouse[1]),V.extent,a));function L(){V.wheel=null,V.end()}}function M(H,...Q){if(p||!e.apply(this,arguments))return;var V=H.currentTarget,J=z(this,Q,!0).event(H),Z=Vi(H.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",K,!0),B=Ya(H,V),L=H.clientX,F=H.clientY;bq(H.view),w4(H),J.mouse=[B,this.__zoom.invert(B)],uv(this),J.start();function U(ne){if(Yp(ne),!J.moved){var ce=ne.clientX-L,_e=ne.clientY-F;J.moved=ce*ce+_e*_e>k}J.event(ne).zoom("mouse",t(y(J.that.__zoom,J.mouse[0]=Ya(ne,V),J.mouse[1]),J.extent,a))}function K(ne){Z.on("mousemove.zoom mouseup.zoom",null),yq(ne.view,J.moved),Yp(ne),J.event(ne).end()}}function D(H,...Q){if(e.apply(this,arguments)){var V=this.__zoom,J=Ya(H.changedTouches?H.changedTouches[0]:H,this),Z=V.invert(J),B=V.k*(H.shiftKey?.5:2),L=t(y(w(V,B),J,Z),n.apply(this,Q),a);Yp(H),o>0?Vi(this).transition().duration(o).call(N,L,J,H):Vi(this).call(b.transform,L,J,H)}}function I(H,...Q){if(e.apply(this,arguments)){var V=H.touches,J=V.length,Z=z(this,Q,H.changedTouches.length===J).event(H),B,L,F,U;for(w4(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.`},Z0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Iq=["Enter"," ","Escape"],$q={"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 zh;(function(e){e.Strict="strict",e.Loose="loose"})(zh||(zh={}));var U_;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(U_||(U_={}));var J0;(function(e){e.Partial="partial",e.Full="full"})(J0||(J0={}));const Bq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var iu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(iu||(iu={}));var mb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(mb||(mb={}));var Rt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Rt||(Rt={}));const sM={[Rt.Left]:Rt.Right,[Rt.Right]:Rt.Left,[Rt.Top]:Rt.Bottom,[Rt.Bottom]:Rt.Top};function Pq(e){return e===null?null:e?"valid":"invalid"}const Fq=e=>"id"in e&&"source"in e&&"target"in e,qPn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),wC=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Pm=(e,n=[0,0])=>{const{width:t,height:r}=vl(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},UPn=(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):wC(s)?s:n.nodeLookup.get(s.id));const o=a?gb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return By(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Py(t)},Fm=(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=By(t,gb(s)),r=!0)}),r?Py(t):{x:0,y:0,width:0,height:0}},kC=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,u=n.width/s,h=n.height/s,_=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:k=!1}=p;if(a&&!x||k)continue;const v=m.width??p.width??p.initialWidth??0,b=m.height??p.height??p.initialHeight??0,{x:w,y}=p.internals.positionAbsolute,C=Gq(o,c,u,h,w,y,v,b),N=v*b,z=i&&C>0;(!p.internals.handleBounds||z||C>=N||p.dragging)&&_.push(p)}return _},GPn=(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 VPn(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 KPn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=VPn(e,a),c=Fm(o),u=CC(c,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 Hq({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:c,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},h=a.origin??r;let _=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",uo.error005());else{const m=o.measured.width,x=o.measured.height;m&&x&&(_=[[c,u],[c+m,u+x]])}else o&&of(a.extent)&&(_=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=of(_)?af(n,_,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",uo.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function WPn({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(k=>k.id===p.parentId);(m||x)&&a.push(p)}const o=new Set(n.map(p=>p.id)),c=r.filter(p=>p.deletable!==!1),h=GPn(a,c);for(const p of c)o.has(p.id)&&!h.find(x=>x.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const _=await s({nodes:a,edges:h});return typeof _=="boolean"?_?{edges:h,nodes:a}:{edges:[],nodes:[]}:_}const jh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),af=(e={x:0,y:0},n,t)=>({x:jh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:jh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function qq(e,n,t){const{width:r,height:s}=vl(t),{x:i,y:a}=t.internals.positionAbsolute;return af(e,[[i,a],[i+r,a+s]],n)}const iM=(e,n,t)=>et?-jh(Math.abs(e-t),1,n)/n:0,SC=(e,n,t=15,r=40)=>{const s=iM(e.x,r,n.width-r)*t,i=iM(e.y,r,n.height-r)*t;return[s,i]},By=(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)}),ok=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Py=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),em=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=wC(e)?e.internals.positionAbsolute:Pm(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}},gb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=wC(e)?e.internals.positionAbsolute:Pm(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)}},Uq=(e,n)=>Py(By(ok(e),ok(n))),Gq=(e,n,t,r,s,i,a,o)=>{const c=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(c*u)},vb=(e,n)=>Gq(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),aM=e=>so(e.width)&&so(e.height)&&so(e.x)&&so(e.y),so=e=>!isNaN(e)&&isFinite(e),Vq=(e,n)=>(t,r)=>{},Hm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),qm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Hm(o,a):o},Th=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function md(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 QPn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=md(e,t),s=md(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=md(e.top??e.y??0,t),s=md(e.bottom??e.y??0,t),i=md(e.left??e.x??0,n),a=md(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 XPn(e,n,t,r,s,i){const{x:a,y:o}=Th(e,[n,t,r]),{x:c,y:u}=Th({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,_=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(_)}}const CC=(e,n,t,r,s,i)=>{const a=QPn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=jh(u,r,s),_=e.x+e.width/2,p=e.y+e.height/2,m=n/2-_*h,x=t/2-p*h,k=XPn(e,m,x,h,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:x-v.top+v.bottom,zoom:h}},tm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function of(e){return e!=null&&e!=="parent"}function vl(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 Kq(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 Wq(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 oM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function YPn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function ZPn(e){return{...$q,...e||{}}}function y0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=io(e),o=qm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Hm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const EC=e=>({width:e.offsetWidth,height:e.offsetHeight}),Qq=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},JPn=["INPUT","SELECT","TEXTAREA"];function Xq(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:JPn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const Yq=e=>"clientX"in e,io=(e,n)=>{var i,a;const t=Yq(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)}},cM=(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,...EC(a)}})};function Zq({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const c=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,h=Math.abs(c-e),_=Math.abs(u-n);return[c,u,h,_]}function D1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function lM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Rt.Left:return[n-D1(n-r,i),t];case Rt.Right:return[n+D1(r-n,i),t];case Rt.Top:return[n,t-D1(t-s,i)];case Rt.Bottom:return[n,t+D1(s-t,i)]}}function Jq({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top,curvature:a=.25}){const[o,c]=lM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=lM({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[_,p,m,x]=Zq({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${c} ${u},${h} ${r},${s}`,_,p,m,x]}function eU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const nFn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,rFn=(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)),sFn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",uo.error006()),n;const r=t.getEdgeId||nFn;let s;return Fq(e)?s={...e}:s={...e,id:r(e)},rFn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function tU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=eU({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const uM={[Rt.Left]:{x:-1,y:0},[Rt.Right]:{x:1,y:0},[Rt.Top]:{x:0,y:-1},[Rt.Bottom]:{x:0,y:1}},iFn=({source:e,sourcePosition:n=Rt.Bottom,target:t})=>n===Rt.Left||n===Rt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function aFn({source:e,sourcePosition:n=Rt.Bottom,target:t,targetPosition:r=Rt.Top,center:s,offset:i,stepPosition:a}){const o=uM[n],c=uM[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},_=iFn({source:u,sourcePosition:n,target:h}),p=_.x!==0?"x":"y",m=_[p];let x=[],k,v;const b={x:0,y:0},w={x:0,y:0},[,,y,C]=eU({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*c[p]===-1){p==="x"?(k=s.x??u.x+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?x=p==="x"?j:M:x=p==="x"?M:j}else{const j=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?x=o.x===m?M:j:x=o.y===m?j:M,n===r){const H=Math.abs(e[p]-t[p]);if(H<=i){const Q=Math.min(i-1,i-H);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:w[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const H=p==="x"?"y":"x",Q=o[p]===c[H],V=u[H]>h[H],J=u[H]=q?(k=(D.x+I.x)/2,v=x[0].y):(k=x[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},z={x:h.x+w.x,y:h.y+w.y};return[[e,...N.x!==x[0].x||N.y!==x[0].y?[N]:[],...x,...z.x!==x[x.length-1].x||z.y!==x[x.length-1].y?[z]:[],t],k,v,y,C]}function oFn(e,n,t,r){const s=Math.min(_M(e,n)/2,_M(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 lk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function lFn(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(c=>{if(c&&typeof c=="object"){const u=lk(c,n);i.has(u)||(a.push({id:u,color:c.color||t,...c}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const nU=1e3,uFn=10,NC={nodeOrigin:[0,0],nodeExtent:Z0,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},_Fn={...NC,checkEquality:!0};function zC(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function fFn(e,n,t){const r=zC(NC,t);for(const s of e.values())if(s.parentId)TC(s,e,n,r);else{const i=Pm(s,r.nodeOrigin),a=of(s.extent)?s.extent:r.nodeExtent,o=af(i,a,vl(s));s.internals.positionAbsolute=o}}function dFn(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 jC(e){return e==="manual"}function uk(e,n,t,r={}){var h,_;const s=zC(_Fn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!jC(s.zIndexMode)?nU:0;let c=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=Pm(p,s.nodeOrigin),k=of(p.extent)?p.extent:s.nodeExtent,v=af(x,k,vl(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(_=p.measured)==null?void 0:_.height},internals:{positionAbsolute:v,handleBounds:dFn(p,m),z:rU(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&&(c=!1),p.parentId&&TC(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function hFn(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 TC(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=zC(NC,r),u=e.parentId,h=n.get(u);if(!h){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}hFn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*uFn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const _=i&&!jC(c)?nU:0,{x:p,y:m,z:x}=pFn(e,h,a,o,_,c),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:x}})}function rU(e,n,t){const r=so(e.zIndex)?e.zIndex:0;return jC(t)?r:r+(e.selected?n:0)}function pFn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=vl(e),u=Pm(e,t),h=of(e.extent)?af(u,e.extent,c):u;let _=af({x:a+h.x,y:o+h.y},r,c);e.extent==="parent"&&(_=qq(_,c,n));const p=rU(e,s,i),m=n.internals.z??0;return{x:_.x,y:_.y,z:m>=p?m+1:p}}function AC(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??em(c),h=Uq(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var y;const h=c.internals.positionAbsolute,_=vl(c),p=c.origin??r,m=o.x0||x>0||b||w)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-x+w}}),(y=t.get(u))==null||y.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}})})),(_.width0){const m=AC(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function gFn({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 pM(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 c=r.get(a)||new Map;if(r.set(a,c.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function sU(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,h=`${i}-${o}--${s}-${a}`;pM("source",c,h,e,s,a),pM("target",c,u,e,i,o),n.set(r.id,r)}}function iU(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:iU(t,n):!1}function mM(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 vFn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!iU(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 k4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const _=(a=t.get(u))==null?void 0:a.internals.userNode;_&&s.push({..._,position:h.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:((c=n.get(e))==null?void 0:c.position)||i.position,dragging:r}:s[0],s]}function bFn({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=Hm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function yFn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,c=!1,u={x:0,y:0},h=null,_=!1,p=null,m=!1,x=!1,k=null;function v({noDragClassName:w,handleSelector:y,domNode:C,isSelectable:N,nodeId:z,nodeClickDistance:T=0}){p=Vi(C);function j({x:$,y:q}){const{nodeLookup:H,nodeExtent:Q,snapGrid:V,snapToGrid:J,nodeOrigin:Z,onNodeDrag:B,onSelectionDrag:L,onError:F,updateNodePositions:U}=n();i={x:$,y:q};let K=!1;const ne=o.size>1,ce=ne&&Q?ok(Fm(o)):null,_e=ne&&J?bFn({dragItems:o,snapGrid:V,x:$,y:q}):null;for(const[se,G]of o){if(!H.has(se))continue;let oe={x:$-G.distance.x,y:q-G.distance.y};J&&(oe=_e?{x:Math.round(oe.x+_e.x),y:Math.round(oe.y+_e.y)}:Hm(oe,V));let le=null;if(ne&&Q&&!G.extent&&ce){const{positionAbsolute:Re}=G.internals,Oe=Re.x-ce.x+Q[0][0],We=Re.x+G.measured.width-ce.x2+Q[1][0],He=Re.y-ce.y+Q[0][1],Se=Re.y+G.measured.height-ce.y2+Q[1][1];le=[[Oe,He],[We,Se]]}const{position:fe,positionAbsolute:me}=Hq({nodeId:se,nextPosition:oe,nodeLookup:H,nodeExtent:le||Q,nodeOrigin:Z,onError:F});K=K||G.position.x!==fe.x||G.position.y!==fe.y,G.position=fe,G.internals.positionAbsolute=me}if(x=x||K,!!K&&(U(o,!0),k&&(r||B||!z&&L))){const[se,G]=k4({nodeId:z,dragItems:o,nodeLookup:H});r==null||r(k,o,se,G),B==null||B(k,se,G),z||L==null||L(k,G)}}async function M(){if(!h)return;const{transform:$,panBy:q,autoPanSpeed:H,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[V,J]=SC(u,h,H);(V!==0||J!==0)&&(i.x=(i.x??0)-V/$[2],i.y=(i.y??0)-J/$[2],await q({x:V,y:J})&&j(i)),a=requestAnimationFrame(M)}function D($){var ne;const{nodeLookup:q,multiSelectionActive:H,nodesDraggable:Q,transform:V,snapGrid:J,snapToGrid:Z,selectNodesOnDrag:B,onNodeDragStart:L,onSelectionDragStart:F,unselectNodesAndEdges:U}=n();_=!0,(!B||!N)&&!H&&z&&((ne=q.get(z))!=null&&ne.selected||U()),N&&B&&z&&(e==null||e(z));const K=y0($.sourceEvent,{transform:V,snapGrid:J,snapToGrid:Z,containerBounds:h});if(i=K,o=vFn(q,Q,K,z),o.size>0&&(t||L||!z&&F)){const[ce,_e]=k4({nodeId:z,dragItems:o,nodeLookup:q});t==null||t($.sourceEvent,o,ce,_e),L==null||L($.sourceEvent,ce,_e),z||F==null||F($.sourceEvent,_e)}}const I=xq().clickDistance(T).on("start",$=>{const{domNode:q,nodeDragThreshold:H,transform:Q,snapGrid:V,snapToGrid:J}=n();h=(q==null?void 0:q.getBoundingClientRect())||null,m=!1,x=!1,k=$.sourceEvent,H===0&&D($),i=y0($.sourceEvent,{transform:Q,snapGrid:V,snapToGrid:J,containerBounds:h}),u=io($.sourceEvent,h)}).on("drag",$=>{const{autoPanOnNodeDrag:q,transform:H,snapGrid:Q,snapToGrid:V,nodeDragThreshold:J,nodeLookup:Z}=n(),B=y0($.sourceEvent,{transform:H,snapGrid:Q,snapToGrid:V,containerBounds:h});if(k=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||z&&!Z.has(z))&&(m=!0),!m){if(!c&&q&&_&&(c=!0,M()),!_){const L=io($.sourceEvent,h),F=L.x-u.x,U=L.y-u.y;Math.sqrt(F*F+U*U)>J&&D($)}(i.x!==B.xSnapped||i.y!==B.ySnapped)&&o&&_&&(u=io($.sourceEvent,h),j(B))}}).on("end",$=>{if(!_||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,_=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:q,updateNodePositions:H,onNodeDragStop:Q,onSelectionDragStop:V}=n();if(x&&(H(o,!1),x=!1),s||Q||!z&&V){const[J,Z]=k4({nodeId:z,dragItems:o,nodeLookup:q,dragging:!1});s==null||s($.sourceEvent,o,J,Z),Q==null||Q($.sourceEvent,J,Z),z||V==null||V($.sourceEvent,Z)}}}).filter($=>{const q=$.target;return!$.button&&(!w||!mM(q,`.${w}`,C))&&(!y||mM(q,y,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function xFn(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())vb(s,em(i))>0&&r.push(i);return r}const wFn=250;function kFn(e,n,t,r){var o,c;let s=[],i=1/0;const a=xFn(e,t,n+wFn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const _ of h){if(r.nodeId===_.nodeId&&r.type===_.type&&r.id===_.id)continue;const{x:p,y:m}=cf(u,_,_.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(h=>h.type===u)??s[0]}return s[0]}function aU(e,n,t,r,s,i=!1){var u,h,_;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((_=a.internals.handleBounds)==null?void 0:_.target)??[]],c=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return c&&i?{...c,...cf(a,c,c.position,!0)}:c}function oU(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function SFn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const cU=()=>!0;function CFn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:_,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:k,onConnectEnd:v,isValidConnection:b=cU,onReconnectEnd:w,updateConnection:y,getTransform:C,getFromHandle:N,autoPanSpeed:z,dragThreshold:T=1,handleDomNode:j}){const M=Qq(e.target);let D=0,I;const{x:$,y:q}=io(e),H=oU(i,j),Q=o==null?void 0:o.getBoundingClientRect();let V=!1;if(!Q||!H)return;const J=aU(s,H,r,c,n);if(!J)return;let Z=io(e,Q),B=!1,L=null,F=!1,U=null;function K(){if(!h||!Q)return;const[fe,me]=SC(Z,Q,z);p({x:fe,y:me}),D=requestAnimationFrame(K)}const ne={...J,nodeId:s,type:H,position:J.position},ce=c.get(s);let se={inProgress:!0,isValid:null,from:cf(ce,ne,Rt.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:ce,to:Z,toHandle:null,toPosition:sM[ne.position],toNode:null,pointer:Z};function G(){V=!0,y(se),x==null||x(e,{nodeId:s,handleId:r,handleType:H})}T===0&&G();function oe(fe){if(!V){const{x:Se,y:it}=io(fe),Je=Se-$,ot=it-q;if(!(Je*Je+ot*ot>T*T))return;G()}if(!N()||!ne){le(fe);return}const me=C();Z=io(fe,Q),I=kFn(qm(Z,me,!1,[1,1]),t,c,ne),B||(K(),B=!0);const Re=lU(fe,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:_,nodeLookup:c});U=Re.handleDomNode,L=Re.connection,F=SFn(!!I,Re.isValid);const Oe=c.get(s),We=Oe?cf(Oe,ne,Rt.Left,!0):se.from,He={...se,from:We,isValid:F,to:Re.toHandle&&F?Th({x:Re.toHandle.x,y:Re.toHandle.y},me):Z,toHandle:Re.toHandle,toPosition:F&&Re.toHandle?Re.toHandle.position:sM[ne.position],toNode:Re.toHandle?c.get(Re.toHandle.nodeId):null,pointer:Z};y(He),se=He}function le(fe){if(!("touches"in fe&&fe.touches.length>0)){if(V){(I||U)&&L&&F&&(k==null||k(L));const{inProgress:me,...Re}=se,Oe={...Re,toPosition:se.toHandle?se.toPosition:null};v==null||v(fe,Oe),i&&(w==null||w(fe,Oe))}m(),cancelAnimationFrame(D),B=!1,F=!1,L=null,U=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",le),M.addEventListener("touchmove",oe),M.addEventListener("touchend",le)}function lU(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=cU,nodeLookup:h}){const _=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=io(e),k=a.elementFromPoint(m,x),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const w=oU(void 0,v),y=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),z=v.classList.contains("connectableend");if(!y||!w)return b;const T={source:_?y:r,sourceHandle:_?C:s,target:_?r:y,targetHandle:_?s:C};b.connection=T;const M=N&&z&&(t===zh.Strict?_&&w==="source"||!_&&w==="target":y!==r||C!==s);b.isValid=M&&u(T),b.toHandle=aU(y,w,C,h,t,!0)}return b}const _k={onPointerDown:CFn,isValid:lU};function EFn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Vi(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:_=!0,zoomable:p=!0,inversePan:m=!1}){const x=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=y.sourceEvent.ctrlKey&&tm()?10:1,z=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*h,T=C[2]*Math.pow(2,z*N);n.scaleTo(T)};let k=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const N=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],z=[N[0]-k[0],N[1]-k[1]];k=N;const T=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-z[0]*T,y:C[1]-z[1]*T},M=[[0,0],[c,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},w=Lq().on("start",v).on("zoom",_?b:null).on("zoom.wheel",p?x:null);s.call(w,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:Ya}}const Fy=e=>({x:e.x,y:e.y,zoom:e.k}),S4=({x:e,y:n,zoom:t})=>$y.translate(e,n).scale(t),zd=(e,n)=>e.target.closest(`.${n}`),uU=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),NFn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,C4=(e,n=0,t=NFn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},_U=e=>{const n=e.ctrlKey&&tm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function zFn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(zd(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const _=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=Ya(h),b=_U(h),w=_*Math.pow(2,b);r.scaleTo(t,w,v,h);return}const p=h.deltaMode===1?20:1;let m=s===U_.Vertical?0:h.deltaX*p,x=s===U_.Horizontal?0:h.deltaY*p;!tm()&&h.shiftKey&&s!==U_.Vertical&&(m=h.deltaY*p,x=0),r.translateBy(t,-(m/_)*i,-(x/_)*i,{internal:!0});const k=Fy(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function jFn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=zd(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function TFn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=Fy(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 AFn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&uU(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,Fy(i.transform)))}}function RFn({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&&uU(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Fy(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function MFn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return _=>{var v;const p=e||n,m=t&&_.ctrlKey,x=_.type==="wheel";if(_.button===1&&_.type==="mousedown"&&(zd(_,`${u}-flow__node`)||zd(_,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!x||zd(_,o)&&x||zd(_,c)&&(!x||s&&x&&!e)||!t&&_.ctrlKey&&x)return!1;if(!t&&_.type==="touchstart"&&((v=_.touches)==null?void 0:v.length)>1)return _.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(_.type==="mousedown"||_.type==="touchstart")||Array.isArray(r)&&!r.includes(_.button)&&_.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(_.button)||!_.button||_.button<=1;return(!_.ctrlKey||x)&&k}}function OFn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),_=Lq().scaleExtent([n,t]).translateExtent(r),p=Vi(e).call(_);w({x:s.x,y:s.y,zoom:jh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");_.wheelDelta(_U);async function k(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?b0:ov).transform(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:$,onPaneContextMenu:q,userSelectionActive:H,panOnScroll:Q,panOnDrag:V,panOnScrollMode:J,panOnScrollSpeed:Z,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:F,zoomOnDoubleClick:U,zoomActivationKeyPressed:K,lib:ne,onTransformChange:ce,connectionInProgress:_e,paneClickDistance:se,selectionOnDrag:G}){H&&!u.isZoomingOrPanning&&b();const oe=Q&&!K&&!H;_.clickDistance(G?1/0:!so(se)||se<0?0:se);const le=oe?zFn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:_,panOnScrollMode:J,panOnScrollSpeed:Z,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):jFn({noWheelClassName:I,preventScrolling:B,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const fe=TFn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});_.on("start",fe);const me=AFn({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!q,onPanZoom:i,onTransformChange:ce});_.on("zoom",me);const Re=RFn({zoomPanValues:u,panOnDrag:V,panOnScroll:Q,onPaneContextMenu:q,onPanZoomEnd:o,onDraggingChange:c});_.on("end",Re);const Oe=MFn({zoomActivationKeyPressed:K,panOnDrag:V,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:U,zoomOnPinch:L,userSelectionActive:H,noPanClassName:$,noWheelClassName:I,lib:ne,connectionInProgress:_e});_.filter(Oe),U?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function b(){_.on("zoom",null)}async function w(I,$,q){const H=S4(I),Q=_==null?void 0:_.constrain()(H,$,q);return Q&&await k(Q),Q}async function y(I,$){const q=S4(I);return await k(q,$),q}function C(I){if(p){const $=S4(I),q=p.property("__zoom");(q.k!==I.zoom||q.x!==I.x||q.y!==I.y)&&(_==null||_.transform(p,$,null,{sync:!0}))}}function N(){const I=p?Dq(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function z(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?b0:ov).scaleTo(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}async function T(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?b0:ov).scaleBy(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}function j(I){_==null||_.scaleExtent(I)}function M(I){_==null||_.translateExtent(I)}function D(I){const $=!so(I)||I<0?0:I;_==null||_.clickDistance($)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:w,getViewport:N,scaleTo:z,scaleBy:T,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Ah;(function(e){e.Line="line",e.Handle="handle"})(Ah||(Ah={}));function DFn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,c=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(c[0]=c[0]*-1),o&&i&&(c[1]=c[1]*-1),c}function gM(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 Jl(e,n){return Math.max(0,n-e)}function eu(e,n){return Math.max(0,e-n)}function L1(e,n,t){return Math.max(0,n-e,e-t)}function vM(e,n){return e?!n:n}function LFn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:_}=n,p=h&&_,{xSnapped:m,ySnapped:x}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:w}=r,{x:y,y:C,width:N,height:z,aspectRatio:T}=e;let j=Math.floor(h?m-e.pointerX:0),M=Math.floor(_?x-e.pointerY:0);const D=N+(c?-j:j),I=z+(u?-M:M),$=-i[0]*N,q=-i[1]*z;let H=L1(D,k,v),Q=L1(I,b,w);if(a){let Z=0,B=0;c&&j<0?Z=Jl(y+j+$,a[0][0]):!c&&j>0&&(Z=eu(y+D+$,a[1][0])),u&&M<0?B=Jl(C+M+q,a[0][1]):!u&&M>0&&(B=eu(C+I+q,a[1][1])),H=Math.max(H,Z),Q=Math.max(Q,B)}if(o){let Z=0,B=0;c&&j>0?Z=eu(y+j,o[0][0]):!c&&j<0&&(Z=Jl(y+D,o[1][0])),u&&M>0?B=eu(C+M,o[0][1]):!u&&M<0&&(B=Jl(C+I,o[1][1])),H=Math.max(H,Z),Q=Math.max(Q,B)}if(s){if(h){const Z=L1(D/T,b,w)*T;if(H=Math.max(H,Z),a){let B=0;!c&&!u||c&&!u&&p?B=eu(C+q+D/T,a[1][1])*T:B=Jl(C+q+(c?j:-j)/T,a[0][1])*T,H=Math.max(H,B)}if(o){let B=0;!c&&!u||c&&!u&&p?B=Jl(C+D/T,o[1][1])*T:B=eu(C+(c?j:-j)/T,o[0][1])*T,H=Math.max(H,B)}}if(_){const Z=L1(I*T,k,v)/T;if(Q=Math.max(Q,Z),a){let B=0;!c&&!u||u&&!c&&p?B=eu(y+I*T+$,a[1][0])/T:B=Jl(y+(u?M:-M)*T+$,a[0][0])/T,Q=Math.max(Q,B)}if(o){let B=0;!c&&!u||u&&!c&&p?B=Jl(y+I*T,o[1][0])/T:B=eu(y+(u?M:-M)*T,o[0][0])/T,Q=Math.max(Q,B)}}}M=M+(M<0?Q:-Q),j=j+(j<0?H:-H),s&&(p?D>I*T?M=(vM(c,u)?-j:j)/T:j=(vM(c,u)?-M:M)*T:h?(M=j/T,u=c):(j=M*T,c=u));const V=c?y+j:y,J=u?C+M:C;return{width:N+(c?-j:j),height:z+(u?-M:M),x:i[0]*j*(c?-1:1)+V,y:i[1]*M*(u?-1:1)+J}}const fU={width:0,height:0,x:0,y:0},IFn={...fU,pointerX:0,pointerY:0,aspectRatio:1};function $Fn(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,c=t[1]*a;return[[r-o,s-c],[r+i-o,s+a-c]]}function BFn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Vi(e);let a={controlDirection:gM("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:h,keepAspectRatio:_,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:k,shouldResize:v}){let b={...fU},w={...IFn};a={boundaries:h,resizeDirection:p,keepAspectRatio:_,controlDirection:gM(u)};let y,C=null,N=[],z,T,j,M=!1;const D=xq().on("start",I=>{const{nodeLookup:$,transform:q,snapGrid:H,snapToGrid:Q,nodeOrigin:V,paneDomNode:J}=t();if(y=$.get(n),!y)return;C=(J==null?void 0:J.getBoundingClientRect())??null;const{xSnapped:Z,ySnapped:B}=y0(I.sourceEvent,{transform:q,snapGrid:H,snapToGrid:Q,containerBounds:C});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...b,pointerX:Z,pointerY:B,aspectRatio:b.width/b.height},z=void 0,T=of(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(z=$.get(y.parentId)),z&&y.extent==="parent"&&(T=[[0,0],[z.measured.width,z.measured.height]]),N=[],j=void 0;for(const[L,F]of $)if(F.parentId===n&&(N.push({id:L,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const U=$Fn(F,y,F.origin??V);j?j=[[Math.min(U[0][0],j[0][0]),Math.min(U[0][1],j[0][1])],[Math.max(U[1][0],j[1][0]),Math.max(U[1][1],j[1][1])]]:j=U}m==null||m(I,{...b})}).on("drag",I=>{const{transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q}=t(),V=y0(I.sourceEvent,{transform:$,snapGrid:q,snapToGrid:H,containerBounds:C}),J=[];if(!y)return;const{x:Z,y:B,width:L,height:F}=b,U={},K=y.origin??Q,{width:ne,height:ce,x:_e,y:se}=LFn(w,a.controlDirection,V,a.boundaries,a.keepAspectRatio,K,T,j),G=ne!==L,oe=ce!==F,le=_e!==Z&&G,fe=se!==B&&oe;if(!le&&!fe&&!G&&!oe)return;if((le||fe||K[0]===1||K[1]===1)&&(U.x=le?_e:b.x,U.y=fe?se:b.y,b.x=U.x,b.y=U.y,N.length>0)){const We=_e-Z,He=se-B;for(const Se of N)Se.position={x:Se.position.x-We+K[0]*(ne-L),y:Se.position.y-He+K[1]*(ce-F)},J.push(Se)}if((G||oe)&&(U.width=G&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ne:b.width,U.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ce:b.height,b.width=U.width,b.height=U.height),z&&y.expandParent){const We=K[0]*(U.width??0);U.x&&U.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const PFn={},bM=e=>{let n;const t=new Set,r=(h,_)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const m=n;n=_??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(PFn?"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,c);return c},FFn=e=>e?bM(e):bM,{useDebugValue:HFn}=et,{useSyncExternalStoreWithSelector:qFn}=CW,UFn=e=>e;function dU(e,n=UFn,t){const r=qFn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return HFn(r),r}const yM=(e,n)=>{const t=FFn(e),r=(s,i=n)=>dU(t,s,i);return Object.assign(r,t),r},GFn=(e,n)=>e?yM(e,n):yM;function kr(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 Hy=A.createContext(null),VFn=Hy.Provider,hU=uo.error001("react");function Nn(e,n){const t=A.useContext(Hy);if(t===null)throw new Error(hU);return dU(t,e,n)}function Cr(){const e=A.useContext(Hy);if(e===null)throw new Error(hU);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const xM={display:"none"},KFn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},pU="react-flow__node-desc",mU="react-flow__edge-desc",WFn="react-flow__aria-live",QFn=e=>e.ariaLiveMessage,XFn=e=>e.ariaLabelConfig;function YFn({rfId:e}){const n=Nn(QFn);return f.jsx("div",{id:`${WFn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:KFn,children:n})}function ZFn({rfId:e,disableKeyboardA11y:n}){const t=Nn(XFn);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${pU}-${e}`,style:xM,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${mU}-${e}`,style:xM,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(YFn,{rfId:e})]})}const qy=A.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return f.jsx("div",{className:is(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});qy.displayName="Panel";const wM="https://reactflow.dev?utm_source=attribution";function JFn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(qy,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${wM}`,children:f.jsx("a",{href:wM,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const eHn=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 tHn(e,n){return kr(e.selectedNodes.map(I1),n.selectedNodes.map(I1))&&kr(e.selectedEdges.map(I1),n.selectedEdges.map(I1))}function nHn({onSelectionChange:e}){const n=Cr(),{selectedNodes:t,selectedEdges:r}=Nn(eHn,tHn);return A.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const rHn=e=>!!e.onSelectionChangeHandlers;function sHn({onSelectionChange:e}){const n=Nn(rHn);return e||n?f.jsx(nHn,{onSelectionChange:e}):null}const gU=[0,0],iHn={x:0,y:0,zoom:1},aHn=["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"],kM=[...aHn,"rfId"],oHn=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}),SM={translateExtent:Z0,nodeOrigin:gU,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function cHn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=Nn(oHn,kr),u=Cr();A.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=SM,o()}),[]);const h=A.useRef(SM);return A.useEffect(()=>{for(const _ of kM){const p=e[_],m=h.current[_];p!==m&&(typeof e[_]>"u"||(_==="nodes"?n(p):_==="edges"?t(p):_==="minZoom"?r(p):_==="maxZoom"?s(p):_==="translateExtent"?i(p):_==="nodeExtent"?a(p):_==="ariaLabelConfig"?u.setState({ariaLabelConfig:ZPn(p)}):_==="fitView"?u.setState({fitViewQueued:p}):_==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[_]:p})))}h.current=e},kM.map(_=>e[_])),null}function CM(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function lHn(e){var r;const[n,t]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){t(e);return}const s=CM(),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=CM())!=null&&r.matches?"dark":"light"}const EM=typeof document<"u"?document:null;function nm(e=null,n={target:EM,actInsideInputWithModifier:!0}){const[t,r]=A.useState(!1),s=A.useRef(!1),i=A.useRef(new Set([])),[a,o]=A.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(_=>typeof _=="string").map(_=>_.replace("+",` -`).replace(` - -`,` -+`).split(` -`)),h=u.reduce((_,p)=>_.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return A.useEffect(()=>{const c=(n==null?void 0:n.target)??EM,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&Xq(m))return!1;const k=zM(m.code,o);if(i.current.add(m[k]),NM(a,i.current,!1)){const w=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},_=m=>{const x=zM(m.code,o);NM(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 c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",_),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",_),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function NM(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function zM(e,n){return n.includes(e)?"code":"key"}const uHn=()=>{const e=Cr();return A.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(),c=CC(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(c,{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:c}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-c},h=t.snapGrid??s,_=t.snapToGrid??i;return qm(u,r,_,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Th(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function vU(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 c of a)_Hn(c,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 _Hn(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 fHn(e,n){return vU(e,n)}function dHn(e,n){return vU(e,n)}function v_(e,n){return{id:e,type:"select",selected:n}}function jd(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(v_(i.id,a)))}return r}function jM({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),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==a&&t.push({id:a.id,item:a,type:"replace"}),c===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 TM(e){return{id:e.id,type:"remove"}}const hHn=Vq();function pHn(e,n,t={}){return sFn(e,n,{...t,onError:t.onError??hHn})}const AM=e=>qPn(e),mHn=e=>Fq(e);function bU(e){return A.forwardRef(e)}const gHn=typeof window<"u"?A.useLayoutEffect:A.useEffect;function RM(e){const[n,t]=A.useState(BigInt(0)),[r]=A.useState(()=>vHn(()=>t(s=>s+BigInt(1))));return gHn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function vHn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const yU=A.createContext(null);function bHn({children:e}){const n=Cr(),t=A.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:_,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=jM({items:k,lookup:p});for(const b of x.values())v=b(v);h&&u(k),v.length>0?_==null||_(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:w,setNodes:y}=n.getState();b&&y(w)})},[]),r=RM(t),s=A.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:_,edgeLookup:p}=n.getState();let m=c;for(const x of o)m=typeof x=="function"?x(m):x;h?u(m):_&&_(jM({items:m,lookup:p}))},[]),i=RM(s),a=A.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(yU.Provider,{value:a,children:e})}function yHn(){const e=A.useContext(yU);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const xHn=e=>!!e.panZoom;function RC(){const e=uHn(),n=Cr(),t=yHn(),r=Nn(xHn),s=A.useMemo(()=>{const i=_=>n.getState().nodeLookup.get(_),a=_=>{t.nodeQueue.push(_)},o=_=>{t.edgeQueue.push(_)},c=_=>{var b,w;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=AM(_)?_:p.get(_.id),k=x.parentId?Wq(x.position,x.measured,x.parentId,p,m):x.position,v={...x,position:k,width:((b=x.measured)==null?void 0:b.width)??x.width,height:((w=x.measured)==null?void 0:w.height)??x.height};return em(v)},u=(_,p,m={replace:!1})=>{a(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&AM(v)?v:{...k,...v}}return k}))},h=(_,p,m={replace:!1})=>{o(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&mHn(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(_=>({..._})),getNode:_=>{var p;return(p=i(_))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:_=[]}=n.getState();return _.map(p=>({...p}))},getEdge:_=>n.getState().edgeLookup.get(_),setNodes:a,setEdges:o,addNodes:_=>{const p=Array.isArray(_)?_:[_];t.nodeQueue.push(m=>[...m,...p])},addEdges:_=>{const p=Array.isArray(_)?_:[_];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:_=[],edges:p=[],transform:m}=n.getState(),[x,k,v]=m;return{nodes:_.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x,y:k,zoom:v}}},deleteElements:async({nodes:_=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:N,edges:z}=await WPn({nodesToRemove:_,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),T=z.length>0,j=N.length>0;if(T){const M=z.map(TM);v==null||v(z),w(M)}if(j){const M=N.map(TM);k==null||k(N),b(M)}return(j||T)&&(y==null||y({nodes:N,edges:z})),{deletedNodes:N,deletedEdges:z}},getIntersectingNodes:(_,p=!0,m)=>{const x=aM(_),k=x?_:c(_),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const w=n.getState().nodeLookup.get(b.id);if(w&&!x&&(b.id===_.id||!w.internals.positionAbsolute))return!1;const y=em(v?b:w),C=vb(y,k);return p&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(_,p,m=!0)=>{const k=aM(_)?_:c(_);if(!k)return!1;const v=vb(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(_,p,m={replace:!1})=>{u(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},updateEdge:h,updateEdgeData:(_,p,m={replace:!1})=>{h(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},getNodesBounds:_=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return UPn(_,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:_,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${_}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:_,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${_?p?`-${_}-${p}`:`-${_}`:""}`))==null?void 0:x.values())??[])},fitView:async _=>{const p=n.getState().fitViewResolver??YPn();return n.setState({fitViewQueued:!0,fitViewOptions:_,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return A.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const MM=e=>e.selected,wHn=typeof window<"u"?window:void 0;function kHn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Cr(),{deleteElements:r}=RC(),s=nm(e,{actInsideInputWithModifier:!1}),i=nm(n,{target:wHn});A.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(MM),edges:a.filter(MM)}),t.setState({nodesSelectionActive:!1})}},[s]),A.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function SHn(e){const n=Cr();A.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=EC(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",uo.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 Uy={position:"absolute",width:"100%",height:"100%",top:0,left:0},CHn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function EHn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=U_.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:_,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:C}){const N=Cr(),z=A.useRef(null),{userSelectionActive:T,lib:j,connectionInProgress:M}=Nn(CHn,kr),D=nm(p),I=A.useRef();SHn(z);const $=A.useCallback(q=>{b==null||b({x:q[0],y:q[1],zoom:q[2]}),w||N.setState({transform:q})},[b,w]);return A.useEffect(()=>{if(z.current){I.current=OFn({domNode:z.current,minZoom:h,maxZoom:_,translateExtent:u,viewport:c,onDraggingChange:V=>N.setState(J=>J.paneDragging===V?J:{paneDragging:V}),onPanZoomStart:(V,J)=>{const{onViewportChangeStart:Z,onMoveStart:B}=N.getState();B==null||B(V,J),Z==null||Z(J)},onPanZoom:(V,J)=>{const{onViewportChange:Z,onMove:B}=N.getState();B==null||B(V,J),Z==null||Z(J)},onPanZoomEnd:(V,J)=>{const{onViewportChangeEnd:Z,onMoveEnd:B}=N.getState();B==null||B(V,J),Z==null||Z(J)}});const{x:q,y:H,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[q,H,Q],domNode:z.current.closest(".react-flow")}),()=>{var V;(V=I.current)==null||V.destroy()}}},[]),A.useEffect(()=>{var q;(q=I.current)==null||q.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:v,userSelectionActive:T,noWheelClassName:k,lib:j,onTransformChange:$,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,i,a,o,D,m,v,T,k,j,$,M,C,y]),f.jsx("div",{className:"react-flow__renderer",ref:z,style:Uy,children:x})}const NHn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function zHn(){const{userSelectionActive:e,userSelectionRect:n}=Nn(NHn,kr);return e&&n?f.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 E4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},jHn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function THn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=J0.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:_,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:k}){const v=A.useRef(0),b=Cr(),{userSelectionActive:w,elementsSelectable:y,dragging:C,panBy:N,autoPanSpeed:z}=Nn(jHn,kr),T=y&&(e||w),j=A.useRef(null),M=A.useRef(),D=A.useRef(new Set),I=A.useRef(new Set),$=A.useRef(!1),q=A.useRef(!1),H=A.useRef({x:0,y:0}),Q=A.useRef(!1),V=G=>{if(q.current||$.current||b.getState().connection.inProgress){q.current=!1,$.current=!1;return}u==null||u(G),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},J=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}h==null||h(G)},Z=_?G=>_(G):void 0,B=G=>{q.current&&(G.stopPropagation(),q.current=!1)},L=G=>{var Se,it;const{domNode:oe,transform:le}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const fe=G.target===j.current;if(!fe&&!!G.target.closest(".nokey")||!e||!(a&&fe||n)||G.button!==0||!G.isPrimary)return;(it=(Se=G.target)==null?void 0:Se.setPointerCapture)==null||it.call(Se,G.pointerId),q.current=!1;const{x:Oe,y:We}=io(G.nativeEvent,M.current),He=qm({x:Oe,y:We},le);b.setState({userSelectionRect:{width:0,height:0,startX:He.x,startY:He.y,x:Oe,y:We}}),fe||(G.stopPropagation(),G.preventDefault())};function F(G,oe){const{userSelectionRect:le}=b.getState();if(!le)return;const{transform:fe,nodeLookup:me,edgeLookup:Re,connectionLookup:Oe,triggerNodeChanges:We,triggerEdgeChanges:He,defaultEdgeOptions:Se}=b.getState(),it={x:le.startX,y:le.startY},{x:Je,y:ot}=Th(it,fe),wt={startX:it.x,startY:it.y,x:GLe.id)),I.current=new Set;const ft=(Se==null?void 0:Se.selectable)??!0;for(const Le of D.current){const ge=Oe.get(Le);if(ge)for(const{edgeId:Te}of ge.values()){const Pe=Re.get(Te);Pe&&(Pe.selectable??ft)&&I.current.add(Te)}}if(!oM(Pt,D.current)){const Le=jd(me,D.current,!0);We(Le)}if(!oM(dt,I.current)){const Le=jd(Re,I.current);He(Le)}b.setState({userSelectionRect:wt,userSelectionActive:!0,nodesSelectionActive:!1})}function U(){if(!s||!M.current)return;const[G,oe]=SC(H.current,M.current,z);N({x:G,y:oe}).then(le=>{if(!q.current||!le){v.current=requestAnimationFrame(U);return}const{x:fe,y:me}=H.current;F(fe,me),v.current=requestAnimationFrame(U)})}const K=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};A.useEffect(()=>()=>K(),[]);const ne=G=>{const{userSelectionRect:oe,transform:le,resetSelectedElements:fe}=b.getState();if(!M.current||!oe)return;const{x:me,y:Re}=io(G.nativeEvent,M.current);H.current={x:me,y:Re};const Oe=Th({x:oe.startX,y:oe.startY},le);if(!q.current){const We=n?0:i;if(Math.hypot(me-Oe.x,Re-Oe.y)<=We)return;fe(),o==null||o(G)}q.current=!0,Q.current||(U(),Q.current=!0),F(me,Re)},ce=G=>{var oe,le;if(!T){G.target===j.current&&b.getState().connection.inProgress&&($.current=!0);return}G.button===0&&((le=(oe=G.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,G.pointerId),!w&&G.target===j.current&&b.getState().userSelectionRect&&(V==null||V(G)),b.setState({userSelectionActive:!1,userSelectionRect:null}),q.current&&(c==null||c(G),b.setState({nodesSelectionActive:D.current.size>0})),K())},_e=G=>{var oe,le;(le=(oe=G.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,G.pointerId),K()},se=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:is(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:T?void 0:E4(V,j),onContextMenu:E4(J,j),onWheel:E4(Z,j),onPointerEnter:T?void 0:p,onPointerMove:T?ne:m,onPointerUp:ce,onPointerCancel:T?_e:void 0,onPointerDownCapture:T?L:void 0,onClickCapture:T?B:void 0,onPointerLeave:x,ref:j,style:Uy,children:[k,f.jsx(zHn,{})]})}function fk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:c}=n.getState(),u=o.get(e);if(!u){c==null||c("012",uo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function xU({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Cr(),[c,u]=A.useState(!1),h=A.useRef();return A.useEffect(()=>{h.current=yFn({getStoreItems:()=>o.getState(),onNodeMouseDown:_=>{fk({id:_,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),A.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var _;(_=h.current)==null||_.destroy()}},[t,r,n,i,e,s,a]),c}const AHn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function wU(){const e=Cr();return A.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),_=new Map,p=AHn(a),m=s?i[0]:5,x=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*x*t.factor;for(const[,b]of u){if(!p(b))continue;let w={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(w=Hm(w,i));const{position:y,positionAbsolute:C}=Hq({nodeId:b.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=y,b.internals.positionAbsolute=C,_.set(b.id,b)}c(_)},[])}const MC=A.createContext(null),RHn=MC.Provider;MC.Consumer;const kU=()=>A.useContext(MC),MHn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),SU=A.createContext(null);function OHn({children:e}){const n=Nn(MHn,kr);return f.jsx(SU.Provider,{value:n,children:e})}function DHn(){const e=A.useContext(SU);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const LHn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},IHn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return LHn;const h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===zh.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:h&&u}};function $Hn({type:e="source",position:n=Rt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:_,...p},m){var Q,V;const x=a||null,k=e==="target",v=Cr(),b=kU(),{connectOnClick:w,noPanClassName:y,rfId:C}=DHn(),{connectingFrom:N,connectingTo:z,clickConnecting:T,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=Nn(IHn(b,x,e),kr);b||(V=(Q=v.getState()).onError)==null||V.call(Q,"010",uo.error010());const $=J=>{const{defaultEdgeOptions:Z,onConnect:B,hasDefaultEdges:L}=v.getState(),F={...Z,...J};if(L){const{edges:U,setEdges:K,onError:ne}=v.getState();K(pHn(F,U,{onError:ne}))}B==null||B(F),o==null||o(F)},q=J=>{if(!b)return;const Z=Yq(J.nativeEvent);if(s&&(Z&&J.button===0||!Z)){const B=v.getState();_k.onPointerDown(J.nativeEvent,{handleDomNode:J.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:k,handleId:x,nodeId:b,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...L)=>{var F,U;return(U=(F=v.getState()).onConnectEnd)==null?void 0:U.call(F,...L)},updateConnection:B.updateConnection,onConnect:$,isValidConnection:t||((...L)=>{var F,U;return((U=(F=v.getState()).isValidConnection)==null?void 0:U.call(F,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}Z?h==null||h(J):_==null||_(J)},H=J=>{const{onClickConnectStart:Z,onClickConnectEnd:B,connectionClickStartHandle:L,connectionMode:F,isValidConnection:U,lib:K,rfId:ne,nodeLookup:ce,connection:_e}=v.getState();if(!b||!L&&!s)return;if(!L){Z==null||Z(J.nativeEvent,{nodeId:b,handleId:x,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:x}});return}const se=Qq(J.target),G=t||U,{connection:oe,isValid:le}=_k.isValid(J.nativeEvent,{handle:{nodeId:b,id:x,type:e},connectionMode:F,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:G,flowId:ne,doc:se,lib:K,nodeLookup:ce});le&&oe&&$(oe);const fe=structuredClone(_e);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,B==null||B(J,fe),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":x,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${x}-${e}`,className:is(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:T,connectingfrom:N,connectingto:z,valid:I,connectionindicator:r&&(!M||j)&&(M||D?i:s)}]),onMouseDown:q,onTouchStart:q,onClick:w?H:void 0,ref:m,...p,children:c})}const Tu=A.memo(bU($Hn));function BHn({data:e,isConnectable:n,sourcePosition:t=Rt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Tu,{type:"source",position:t,isConnectable:n})]})}function PHn({data:e,isConnectable:n,targetPosition:t=Rt.Top,sourcePosition:r=Rt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Tu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Tu,{type:"source",position:r,isConnectable:n})]})}function FHn(){return null}function HHn({data:e,isConnectable:n,targetPosition:t=Rt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Tu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const bb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},OM={input:BHn,default:PHn,output:HHn,group:FHn};function qHn(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 UHn=e=>{const{width:n,height:t,x:r,y:s}=Fm(e.nodeLookup,{filter:i=>!!i.selected});return{width:so(n)?n:null,height:so(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 GHn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Cr(),{width:s,height:i,transformString:a,userSelectionActive:o}=Nn(UHn,kr),c=wU(),u=A.useRef(null);A.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(xU({nodeRef:u,disabled:!h}),!h)return null;const _=e?m=>{const x=r.getState().nodes.filter(k=>k.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(bb,m.key)&&(m.preventDefault(),c({direction:bb[m.key],factor:m.shiftKey?4:1}))};return f.jsx("div",{className:is(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:_,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const DM=typeof window<"u"?window:void 0,VHn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function CU({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:h,selectionMode:_,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:T,panOnDrag:j,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:$,maxZoom:q,preventScrolling:H,onSelectionContextMenu:Q,noWheelClassName:V,noPanClassName:J,disableKeyboardA11y:Z,onViewportChange:B,isControlledViewport:L}){const{nodesSelectionActive:F,userSelectionActive:U}=Nn(VHn,kr),K=nm(u,{target:DM}),ne=nm(k,{target:DM}),ce=ne||j,_e=ne||C,se=h&&ce!==!0,G=K||U||se;return kHn({deleteKeyCode:c,multiSelectionKeyCode:x}),f.jsx(EHn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:_e,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:T,panOnDrag:!K&&ce,defaultViewport:D,translateExtent:I,minZoom:$,maxZoom:q,zoomActivationKeyCode:v,preventScrolling:H,noWheelClassName:V,noPanClassName:J,onViewportChange:B,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:f.jsxs(THn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ce,autoPanOnSelection:M,isSelecting:!!G,selectionMode:_,selectionKeyPressed:K,paneClickDistance:o,selectionOnDrag:se,children:[e,F&&f.jsx(GHn,{onSelectionContextMenu:Q,noPanClassName:J,disableKeyboardA11y:Z})]})})}CU.displayName="FlowRenderer";const KHn=A.memo(CU),WHn=e=>n=>e?kC(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 QHn(e){return Nn(A.useCallback(WHn(e),[e]),kr)}const XHn=e=>e.updateNodeInternals;function YHn(){const e=Nn(XHn),[n]=A.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 A.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function ZHn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Cr(),i=A.useRef(null),a=A.useRef(null),o=A.useRef(e.sourcePosition),c=A.useRef(e.targetPosition),u=A.useRef(n),h=t&&!!e.internals.handleBounds;return A.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,e.hidden]),A.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),A.useEffect(()=>{if(i.current){const _=u.current!==n,p=o.current!==e.sourcePosition,m=c.current!==e.targetPosition;(_||p||m)&&(u.current=n,o.current=e.sourcePosition,c.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 JHn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:_,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:w}){const{node:y,internals:C,isParent:N}=Nn(G=>{const oe=G.nodeLookup.get(e),le=G.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:le}},kr);let z=y.type||"default",T=(v==null?void 0:v[z])||OM[z];T===void 0&&(w==null||w("003",uo.error003(z)),z="default",T=(v==null?void 0:v.default)||OM.default);const j=!!(y.draggable||o&&typeof y.draggable>"u"),M=!!(y.selectable||c&&typeof y.selectable>"u"),D=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||h&&typeof y.focusable>"u"),$=Cr(),q=Kq(y),H=ZHn({node:y,nodeType:z,hasDimensions:q,resizeObserver:_}),Q=xU({nodeRef:H,disabled:y.hidden||!j,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),V=wU();if(y.hidden)return null;const J=vl(y),Z=qHn(y),B=M||j||n||t||r||s,L=t?G=>t(G,{...C.userNode}):void 0,F=r?G=>r(G,{...C.userNode}):void 0,U=s?G=>s(G,{...C.userNode}):void 0,K=i?G=>i(G,{...C.userNode}):void 0,ne=a?G=>a(G,{...C.userNode}):void 0,ce=G=>{const{selectNodesOnDrag:oe,nodeDragThreshold:le}=$.getState();M&&(!oe||!j||le>0)&&fk({id:e,store:$,nodeRef:H}),n&&n(G,{...C.userNode})},_e=G=>{if(!(Xq(G.nativeEvent)||x)){if(Iq.includes(G.key)&&M){const oe=G.key==="Escape";fk({id:e,store:$,unselect:oe,nodeRef:H})}else if(j&&y.selected&&Object.prototype.hasOwnProperty.call(bb,G.key)){G.preventDefault();const{ariaLabelConfig:oe}=$.getState();$.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:bb[G.key],factor:G.shiftKey?4:1})}}},se=()=>{var Oe;if(x||!((Oe=H.current)!=null&&Oe.matches(":focus-visible")))return;const{transform:G,width:oe,height:le,autoPanOnNodeFocus:fe,setCenter:me}=$.getState();if(!fe)return;kC(new Map([[e,y]]),{x:0,y:0,width:oe,height:le},G,!0).length>0||me(y.position.x+J.width/2,y.position.y+J.height/2,{zoom:G[2]})};return f.jsx("div",{className:is(["react-flow__node",`react-flow__node-${z}`,{[m]:j},y.className,{selected:y.selected,selectable:M,parent:N,draggable:j,dragging:Q}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:q?"visible":"hidden",...y.style,...Z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:F,onMouseLeave:U,onContextMenu:K,onClick:ce,onDoubleClick:ne,onKeyDown:I?_e:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${pU}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:f.jsx(RHn,{value:e,children:f.jsx(T,{id:e,data:y.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:j,deletable:y.deletable??!0,isConnectable:D,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:Q,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...J})})})}var eqn=A.memo(JHn);const tqn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function EU(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=Nn(tqn,kr),a=QHn(e.onlyRenderVisibleElements),o=YHn();return f.jsx("div",{className:"react-flow__nodes",style:Uy,children:a.map(c=>f.jsx(eqn,{id:c,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},c))})}EU.displayName="NodeRenderer";const nqn=A.memo(EU);function rqn(e){return Nn(A.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&&tFn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),kr)}const sqn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},iqn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},LM={[mb.Arrow]:sqn,[mb.ArrowClosed]:iqn};function aqn(e){const n=Cr();return A.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(LM,e)?LM[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",uo.error009(e)),null)},[e])}const oqn=({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 c=aqn(n);return c?f.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:f.jsx(c,{color:t,strokeWidth:a})}):null},NU=({defaultColor:e,rfId:n})=>{const t=Nn(i=>i.edges),r=Nn(i=>i.defaultEdgeOptions),s=A.useMemo(()=>lFn(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?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:s.map(i=>f.jsx(oqn,{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};NU.displayName="MarkerDefinitions";var cqn=A.memo(NU);function zU({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...h}){const[_,p]=A.useState({x:1,y:0,width:0,height:0}),m=is(["react-flow__edge-textwrapper",u]),x=A.useRef(null);return A.useEffect(()=>{if(x.current){const k=x.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-_.width/2} ${n-_.height/2})`,className:m,visibility:_.width?"visible":"hidden",...h,children:[s&&f.jsx("rect",{width:_.width+2*a[0],x:-a[0],y:-a[1],height:_.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:x,style:r,children:t}),c]}):null}zU.displayName="EdgeText";const lqn=A.memo(zU);function Gy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:is(["react-flow__edge-path",h.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&so(n)&&so(t)?f.jsx(lqn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function IM({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Rt.Left||e===Rt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function jU({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top}){const[a,o]=IM({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=IM({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,_,p,m]=Zq({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${o} ${c},${u} ${r},${s}`,h,_,p,m]}function TU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[w,y,C]=jU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return f.jsx(Gy,{id:N,path:w,labelX:y,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})})}const uqn=TU({isInternal:!1}),AU=TU({isInternal:!0});uqn.displayName="SimpleBezierEdge";AU.displayName="SimpleBezierEdgeInternal";function RU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,sourcePosition:m=Rt.Bottom,targetPosition:x=Rt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=ck({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),z=e.isInternal?void 0:n;return f.jsx(Gy,{id:z,path:y,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:k,markerStart:v,interactionWidth:w})})}const MU=RU({isInternal:!1}),OU=RU({isInternal:!0});MU.displayName="SmoothStepEdge";OU.displayName="SmoothStepEdgeInternal";function DU(e){return A.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(MU,{...t,id:r,pathOptions:A.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const _qn=DU({isInternal:!1}),LU=DU({isInternal:!0});_qn.displayName="StepEdge";LU.displayName="StepEdgeInternal";function IU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})=>{const[v,b,w]=tU({sourceX:t,sourceY:r,targetX:s,targetY:i}),y=e.isInternal?void 0:n;return f.jsx(Gy,{id:y,path:v,labelX:b,labelY:w,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})})}const fqn=IU({isInternal:!1}),$U=IU({isInternal:!0});fqn.displayName="StraightEdge";$U.displayName="StraightEdgeInternal";function BU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Rt.Bottom,targetPosition:o=Rt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=Jq({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),z=e.isInternal?void 0:n;return f.jsx(Gy,{id:z,path:y,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:w})})}const dqn=BU({isInternal:!1}),PU=BU({isInternal:!0});dqn.displayName="BezierEdge";PU.displayName="BezierEdgeInternal";const $M={default:PU,straight:$U,step:LU,smoothstep:OU,simplebezier:AU},BM={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},hqn=(e,n,t)=>t===Rt.Left?e-n:t===Rt.Right?e+n:e,pqn=(e,n,t)=>t===Rt.Top?e-n:t===Rt.Bottom?e+n:e,PM="react-flow__edgeupdater";function FM({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:is([PM,`${PM}-${o}`]),cx:hqn(n,r,e),cy:pqn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function mqn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:_,setReconnecting:p,setUpdateHover:m}){const x=Cr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:T,connectionMode:j,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:$,nodeLookup:q,rfId:H,panBy:Q,updateConnection:V}=x.getState(),J=N.type==="target",Z=(F,U)=>{p(!1),_==null||_(F,t,N.type,U)},B=F=>u==null?void 0:u(t,F),L=(F,U)=>{p(!0),h==null||h(C,t,N.type),I==null||I(F,U)};_k.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:j,connectionRadius:M,domNode:T,handleId:N.id,nodeId:N.nodeId,nodeLookup:q,isTarget:J,edgeUpdaterType:N.type,lib:D,flowId:H,cancelConnection:$,panBy:Q,isValidConnection:(...F)=>{var U,K;return((K=(U=x.getState()).isValidConnection)==null?void 0:K.call(U,...F))??!0},onConnect:B,onConnectStart:L,onConnectEnd:(...F)=>{var U,K;return(K=(U=x.getState()).onConnectEnd)==null?void 0:K.call(U,...F)},onReconnectEnd:Z,updateConnection:V,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),w=()=>m(!0),y=()=>m(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(FM,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&f.jsx(FM,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function gqn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:w}){let y=Nn(me=>me.edgeLookup.get(e));const C=Nn(me=>me.defaultEdgeOptions);y=C?{...C,...y}:y;let N=y.type||"default",z=(k==null?void 0:k[N])||$M[N];z===void 0&&(b==null||b("011",uo.error011(N)),N="default",z=(k==null?void 0:k.default)||$M.default);const T=!!(y.focusable||n&&typeof y.focusable>"u"),j=typeof _<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),D=A.useRef(null),[I,$]=A.useState(!1),[q,H]=A.useState(!1),Q=Cr(),{zIndex:V=y.zIndex,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U}=Nn(A.useCallback(me=>{const Re=me.nodeLookup.get(y.source),Oe=me.nodeLookup.get(y.target);if(!Re||!Oe)return BM;const We=cFn({id:e,sourceNode:Re,targetNode:Oe,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:me.connectionMode,onError:b}),He=eFn({selected:y.selected,zIndex:y.zIndex,sourceNode:Re,targetNode:Oe,elevateOnSelect:me.elevateEdgesOnSelect,zIndexMode:me.zIndexMode});return{...We||BM,zIndex:He}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),kr),K=A.useMemo(()=>y.markerStart?`url('#${lk(y.markerStart,x)}')`:void 0,[y.markerStart,x]),ne=A.useMemo(()=>y.markerEnd?`url('#${lk(y.markerEnd,x)}')`:void 0,[y.markerEnd,x]);if(y.hidden||J===null||Z===null||B===null||L===null)return null;const ce=me=>{var He;const{addSelectedEdges:Re,unselectNodesAndEdges:Oe,multiSelectionActive:We}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),y.selected&&We?(Oe({nodes:[],edges:[y]}),(He=D.current)==null||He.blur()):Re([e])),s&&s(me,y)},_e=i?me=>{i(me,{...y})}:void 0,se=a?me=>{a(me,{...y})}:void 0,G=o?me=>{o(me,{...y})}:void 0,oe=c?me=>{c(me,{...y})}:void 0,le=u?me=>{u(me,{...y})}:void 0,fe=me=>{var Re;if(!w&&Iq.includes(me.key)&&M){const{unselectNodesAndEdges:Oe,addSelectedEdges:We}=Q.getState();me.key==="Escape"?((Re=D.current)==null||Re.blur(),Oe({edges:[y]})):We([e])}};return f.jsx("svg",{style:{zIndex:V},children:f.jsxs("g",{className:is(["react-flow__edge",`react-flow__edge-${N}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ce,onDoubleClick:_e,onContextMenu:se,onMouseEnter:G,onMouseMove:oe,onMouseLeave:le,onKeyDown:T?fe:void 0,tabIndex:T?0:void 0,role:y.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":T?`${mU}-${x}`:void 0,ref:D,...y.domAttributes,children:[!q&&f.jsx(z,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:K,markerEnd:ne,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),j&&f.jsx(mqn,{edge:y,isReconnectable:j,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U,setUpdateHover:$,setReconnecting:H})]})})}var vqn=A.memo(gqn);const bqn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function FU({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:_,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,onError:y}=Nn(bqn,kr),C=rqn(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(cqn,{defaultColor:e,rfId:t}),C.map(N=>f.jsx(vqn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:_,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},N))]})}FU.displayName="EdgeRenderer";const yqn=A.memo(FU),xqn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function wqn({children:e}){const n=Nn(xqn);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function kqn(e){const n=RC(),t=A.useRef(!1);A.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const Sqn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function Cqn(e){const n=Nn(Sqn),t=Cr();return A.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function Eqn(e){return e.connection.inProgress?{...e.connection,to:qm(e.connection.to,e.transform)}:{...e.connection}}function Nqn(e){return Eqn}function zqn(e){const n=Nqn();return Nn(n,kr)}const jqn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Tqn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=Nn(jqn,kr);return!(i&&s&&c)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:is(["react-flow__connection",Pq(o)]),children:f.jsx(HU,{style:n,type:t,CustomComponent:r,isValid:o})})})}const HU=({style:e,type:n=iu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,toHandle:_,toPosition:p,pointer:m}=zqn();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:Pq(r),toNode:h,toHandle:_,pointer:m});let x="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case iu.Bezier:[x]=Jq(k);break;case iu.SimpleBezier:[x]=jU(k);break;case iu.Step:[x]=ck({...k,borderRadius:0});break;case iu.SmoothStep:[x]=ck(k);break;default:[x]=tU(k)}return f.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};HU.displayName="ConnectionLine";const Aqn={};function HM(e=Aqn){A.useRef(e),Cr(),A.useEffect(()=>{},[e])}function Rqn(){Cr(),A.useRef(!1),A.useEffect(()=>{},[])}function qU({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:_,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:T,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:$,minZoom:q,maxZoom:H,preventScrolling:Q,defaultMarkerColor:V,zoomOnScroll:J,zoomOnPinch:Z,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:U,panOnDrag:K,autoPanOnSelection:ne,onPaneClick:ce,onPaneMouseEnter:_e,onPaneMouseMove:se,onPaneMouseLeave:G,onPaneScroll:oe,onPaneContextMenu:le,paneClickDistance:fe,nodeClickDistance:me,onEdgeContextMenu:Re,onEdgeMouseEnter:Oe,onEdgeMouseMove:We,onEdgeMouseLeave:He,reconnectRadius:Se,onReconnect:it,onReconnectStart:Je,onReconnectEnd:ot,noDragClassName:wt,noWheelClassName:Pt,noPanClassName:dt,disableKeyboardA11y:ft,nodeExtent:Le,rfId:ge,viewport:Te,onViewportChange:Pe}){return HM(e),HM(n),Rqn(),kqn(t),Cqn(Te),f.jsx(KHn,{onPaneClick:ce,onPaneMouseEnter:_e,onPaneMouseMove:se,onPaneMouseLeave:G,onPaneContextMenu:le,onPaneScroll:oe,paneClickDistance:fe,deleteKeyCode:j,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:T,elementsSelectable:D,zoomOnScroll:J,zoomOnPinch:Z,zoomOnDoubleClick:U,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:K,autoPanOnSelection:ne,defaultViewport:I,translateExtent:$,minZoom:q,maxZoom:H,onSelectionContextMenu:_,preventScrolling:Q,noDragClassName:wt,noWheelClassName:Pt,noPanClassName:dt,disableKeyboardA11y:ft,onViewportChange:Pe,isControlledViewport:!!Te,children:f.jsxs(wqn,{children:[f.jsx(yqn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:it,onReconnectStart:Je,onReconnectEnd:ot,onlyRenderVisibleElements:M,onEdgeContextMenu:Re,onEdgeMouseEnter:Oe,onEdgeMouseMove:We,onEdgeMouseLeave:He,reconnectRadius:Se,defaultMarkerColor:V,noPanClassName:dt,disableKeyboardA11y:ft,rfId:ge}),f.jsx(Tqn,{style:k,type:x,component:v,containerStyle:b}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(nqn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:me,onlyRenderVisibleElements:M,noPanClassName:dt,noDragClassName:wt,disableKeyboardA11y:ft,nodeExtent:Le,rfId:ge}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}qU.displayName="GraphView";const Mqn=A.memo(qU),Oqn=Vq(),qM=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:_,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,k=new Map,v=new Map,b=r??n??[],w=t??e??[],y=h??[0,0],C=_??Z0;sU(k,v,b);const{nodesInitialized:N}=uk(w,m,x,{nodeOrigin:y,nodeExtent:C,zIndexMode:p});let z=[0,0,1];if(a&&s&&i){const T=Fm(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:j,y:M,zoom:D}=CC(T,s,i,c,u,(o==null?void 0:o.padding)??.1);z=[j,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:z,nodes:w,nodesInitialized:N,nodeLookup:m,parentLookup:x,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Z0,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:zh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:{...Bq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Oqn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:$q,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Dqn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p})=>GFn((m,x)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:w,fitViewResolver:y,width:C,height:N,minZoom:z,maxZoom:T}=x();b&&(await KPn({nodes:v,width:C,height:N,panZoom:b,minZoom:z,maxZoom:T},w),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...qM({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:_,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:z,nodesSelectionActive:T}=x(),{nodesInitialized:j,hasSelectedNodes:M}=uk(v,b,w,{nodeOrigin:y,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z}),D=T&&M;N&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:w}=x();sU(b,w,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:w}=x();w(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:w}=x();w(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:w,parentLookup:y,domNode:C,nodeOrigin:N,nodeExtent:z,debug:T,fitViewQueued:j,zIndexMode:M}=x(),{changes:D,updatedInternals:I}=mFn(v,w,y,C,N,z,M);I&&(fFn(w,y,{nodeOrigin:N,nodeExtent:z,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(T&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const w=[];let y=[];const{nodeLookup:C,triggerNodeChanges:N,connection:z,updateConnection:T,onNodesChangeMiddlewareMap:j}=x();for(const[M,D]of v){const I=C.get(M),$=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),q={id:M,type:"position",position:$?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&z.inProgress&&z.fromNode.id===I.id){const H=cf(I,z.fromHandle,Rt.Left,!0);T({...z,from:H})}$&&I.parentId&&w.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),y.push(q)}if(w.length>0){const{parentLookup:M,nodeOrigin:D}=x(),I=AC(w,C,M,D);y.push(...I)}for(const M of j.values())y=M(y);N(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:w,nodes:y,hasDefaultNodes:C,debug:N}=x();if(v!=null&&v.length){if(C){const z=fHn(v,y);w(z)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:w,edges:y,hasDefaultEdges:C,debug:N}=x();if(v!=null&&v.length){if(C){const z=dHn(v,y);w(z)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const z=v.map(T=>v_(T,!0));C(z);return}C(jd(y,new Set([...v]),!0)),N(jd(w))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const z=v.map(T=>v_(T,!0));N(z);return}N(jd(w,new Set([...v]))),C(jd(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:w,nodes:y,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:z}=x(),T=v||y,j=b||w,M=[];for(const I of T){if(!I.selected)continue;const $=C.get(I.id);$&&($.selected=!1),M.push(v_(I.id,!1))}const D=[];for(const I of j)I.selected&&D.push(v_(I.id,!1));N(M),z(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:w}=x();b==null||b.setScaleExtent([v,w]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:w}=x();b==null||b.setScaleExtent([w,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=x().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:C}=x();if(!C)return;const N=b.reduce((T,j)=>j.selected?[...T,v_(j.id,!1)]:T,[]),z=v.reduce((T,j)=>j.selected?[...T,v_(j.id,!1)]:T,[]);w(N),y(z)},setNodeExtent:v=>{const{nodes:b,nodeLookup:w,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:z,zIndexMode:T}=x();v[0][0]===z[0][0]&&v[0][1]===z[0][1]&&v[1][0]===z[1][0]&&v[1][1]===z[1][1]||(uk(b,w,y,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:T}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:w,height:y,panZoom:C,translateExtent:N}=x();return gFn({delta:v,panZoom:C,transform:b,translateExtent:N,width:w,height:y})},setCenter:async(v,b,w)=>{const{width:y,height:C,maxZoom:N,panZoom:z}=x();if(!z)return!1;const T=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:N;return await z.setViewport({x:y/2-v*T,y:C/2-b*T,zoom:T},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),!0},cancelConnection:()=>{m({connection:{...Bq}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...qM()})}},Object.is);function Lqn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p,children:m}){const[x]=A.useState(()=>Dqn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:_,zIndexMode:p}));return f.jsx(VFn,{value:x,children:f.jsx(bHn,{children:f.jsx(OHn,{children:m})})})}function Iqn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m}){return A.useContext(Hy)?f.jsx(f.Fragment,{children:e}):f.jsx(Lqn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m,children:e})}const $qn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Bqn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:_,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:$,onSelectionChange:q,onSelectionDragStart:H,onSelectionDrag:Q,onSelectionDragStop:V,onSelectionContextMenu:J,onSelectionStart:Z,onSelectionEnd:B,onBeforeDelete:L,connectionMode:F,connectionLineType:U=iu.Bezier,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:ce,deleteKeyCode:_e="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:G=!1,selectionMode:oe=J0.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:fe=tm()?"Meta":"Control",zoomActivationKeyCode:me=tm()?"Meta":"Control",snapToGrid:Re,snapGrid:Oe,onlyRenderVisibleElements:We=!1,selectNodesOnDrag:He,nodesDraggable:Se,autoPanOnNodeFocus:it,nodesConnectable:Je,nodesFocusable:ot,nodeOrigin:wt=gU,edgesFocusable:Pt,edgesReconnectable:dt,elementsSelectable:ft=!0,defaultViewport:Le=iHn,minZoom:ge=.5,maxZoom:Te=2,translateExtent:Pe=Z0,preventScrolling:rt=!0,nodeExtent:ut,defaultMarkerColor:pt="#b1b1b7",zoomOnScroll:qe=!0,zoomOnPinch:Kt=!0,panOnScroll:sn=!1,panOnScrollSpeed:Tt=.5,panOnScrollMode:mt=U_.Free,zoomOnDoubleClick:Bn=!0,panOnDrag:Jt=!0,onPaneClick:xn,onPaneMouseEnter:vr,onPaneMouseMove:Pn,onPaneMouseLeave:Rn,onPaneScroll:Fn,onPaneContextMenu:_r,paneClickDistance:Pr=1,nodeClickDistance:Et=0,children:un,onReconnect:zn,onReconnectStart:an,onReconnectEnd:fr,onEdgeContextMenu:fn,onEdgeDoubleClick:wn,onEdgeMouseEnter:Yn,onEdgeMouseMove:kt,onEdgeMouseLeave:At,reconnectRadius:Ve=10,onNodesChange:bt,onEdgesChange:Mn,noDragClassName:tn="nodrag",noWheelClassName:on="nowheel",noPanClassName:Zn="nopan",fitView:cn,fitViewOptions:ps,connectOnClick:hi,attributionPosition:Rs,proOptions:Qs,defaultEdgeOptions:ms,elevateNodesOnSelect:ua=!0,elevateEdgesOnSelect:Ms=!1,disableKeyboardA11y:_a=!1,autoPanOnConnect:Fr,autoPanOnNodeDrag:nr,autoPanOnSelection:ho=!0,autoPanSpeed:po,connectionRadius:qn,isValidConnection:Hr,onError:mo,style:go,id:Xs,nodeDragThreshold:vo,connectionDragThreshold:Gt,viewport:Fa,onViewportChange:Un,width:qr,height:st,colorMode:Wt="light",debug:xs,onScroll:Ys,ariaLabelConfig:pi,zIndexMode:Gn="basic",...dr},Os){const Ds=Xs||"1",Tr=lHn(Wt),mi=A.useCallback(hr=>{hr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ys==null||Ys(hr)},[Ys]);return f.jsx("div",{"data-testid":"rf__wrapper",...dr,onScroll:mi,style:{...go,...$qn},ref:Os,className:is(["react-flow",s,Tr]),id:Xs,role:"application",children:f.jsxs(Iqn,{nodes:e,edges:n,width:qr,height:st,fitView:cn,fitViewOptions:ps,minZoom:ge,maxZoom:Te,nodeOrigin:wt,nodeExtent:ut,zIndexMode:Gn,children:[f.jsx(cHn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Se,autoPanOnNodeFocus:it,nodesConnectable:Je,nodesFocusable:ot,edgesFocusable:Pt,edgesReconnectable:dt,elementsSelectable:ft,elevateNodesOnSelect:ua,elevateEdgesOnSelect:Ms,minZoom:ge,maxZoom:Te,nodeExtent:ut,onNodesChange:bt,onEdgesChange:Mn,snapToGrid:Re,snapGrid:Oe,connectionMode:F,translateExtent:Pe,connectOnClick:hi,defaultEdgeOptions:ms,fitView:cn,fitViewOptions:ps,onNodesDelete:D,onEdgesDelete:I,onDelete:$,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:H,onSelectionDragStop:V,onMove:h,onMoveStart:_,onMoveEnd:p,noPanClassName:Zn,nodeOrigin:wt,rfId:Ds,autoPanOnConnect:Fr,autoPanOnNodeDrag:nr,autoPanSpeed:po,onError:mo,connectionRadius:qn,isValidConnection:Hr,selectNodesOnDrag:He,nodeDragThreshold:vo,connectionDragThreshold:Gt,onBeforeDelete:L,debug:xs,ariaLabelConfig:pi,zIndexMode:Gn}),f.jsx(Mqn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,nodeTypes:i,edgeTypes:a,connectionLineType:U,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:ce,selectionKeyCode:se,selectionOnDrag:G,selectionMode:oe,deleteKeyCode:_e,multiSelectionKeyCode:fe,panActivationKeyCode:le,zoomActivationKeyCode:me,onlyRenderVisibleElements:We,defaultViewport:Le,translateExtent:Pe,minZoom:ge,maxZoom:Te,preventScrolling:rt,zoomOnScroll:qe,zoomOnPinch:Kt,zoomOnDoubleClick:Bn,panOnScroll:sn,panOnScrollSpeed:Tt,panOnScrollMode:mt,panOnDrag:Jt,autoPanOnSelection:ho,onPaneClick:xn,onPaneMouseEnter:vr,onPaneMouseMove:Pn,onPaneMouseLeave:Rn,onPaneScroll:Fn,onPaneContextMenu:_r,paneClickDistance:Pr,nodeClickDistance:Et,onSelectionContextMenu:J,onSelectionStart:Z,onSelectionEnd:B,onReconnect:zn,onReconnectStart:an,onReconnectEnd:fr,onEdgeContextMenu:fn,onEdgeDoubleClick:wn,onEdgeMouseEnter:Yn,onEdgeMouseMove:kt,onEdgeMouseLeave:At,reconnectRadius:Ve,defaultMarkerColor:pt,noDragClassName:tn,noWheelClassName:on,noPanClassName:Zn,rfId:Ds,disableKeyboardA11y:_a,nodeExtent:ut,viewport:Fa,onViewportChange:Un}),f.jsx(sHn,{onSelectionChange:q}),un,f.jsx(JFn,{proOptions:Qs,position:Rs}),f.jsx(ZFn,{rfId:Ds,disableKeyboardA11y:_a})]})})}var Pqn=bU(Bqn);function Fqn({dimensions:e,lineWidth:n,variant:t,className:r}){return f.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 Hqn({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:is(["react-flow__background-pattern","dots",n])})}var cl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(cl||(cl={}));const qqn={[cl.Dots]:1,[cl.Lines]:1,[cl.Cross]:6},Uqn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function UU({id:e,variant:n=cl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const _=A.useRef(null),{transform:p,patternId:m}=Nn(Uqn,kr),x=r||qqn[n],k=n===cl.Dots,v=n===cl.Cross,b=Array.isArray(t)?t:[t,t],w=[b[0]*p[2]||1,b[1]*p[2]||1],y=x*p[2],C=Array.isArray(i)?i:[i,i],N=v?[y,y]:w,z=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],T=`${m}${e||""}`;return f.jsxs("svg",{className:is(["react-flow__background",u]),style:{...c,...Uy,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:_,"data-testid":"rf__background",children:[f.jsx("pattern",{id:T,x:p[0]%w[0],y:p[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:k?f.jsx(Hqn,{radius:y/2,className:h}):f.jsx(Fqn,{dimensions:N,lineWidth:s,variant:n,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}UU.displayName="Background";const Gqn=A.memo(UU);function Vqn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Kqn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Wqn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.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 Qqn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 Xqn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 $1({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:is(["react-flow__controls-button",n]),...t,children:e})}const Yqn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function GU({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:_="bottom-left",orientation:p="vertical","aria-label":m}){const x=Cr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:w}=Nn(Yqn,kr),{zoomIn:y,zoomOut:C,fitView:N}=RC(),z=()=>{y(),i==null||i()},T=()=>{C(),a==null||a()},j=()=>{N(s),o==null||o()},M=()=>{x.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},D=p==="horizontal"?"horizontal":"vertical";return f.jsxs(qy,{className:is(["react-flow__controls",D,u]),position:_,style:e,"data-testid":"rf__controls","aria-label":m??w["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx($1,{onClick:z,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:b,children:f.jsx(Vqn,{})}),f.jsx($1,{onClick:T,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(Kqn,{})})]}),t&&f.jsx($1,{className:"react-flow__controls-fitview",onClick:j,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:f.jsx(Wqn,{})}),r&&f.jsx($1,{className:"react-flow__controls-interactive",onClick:M,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:k?f.jsx(Xqn,{}):f.jsx(Qqn,{})}),h]})}GU.displayName="Controls";A.memo(GU);function Zqn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:_,selected:p,onClick:m}){const{background:x,backgroundColor:k}=i||{},v=a||x||k;return f.jsx("rect",{className:is(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:_,onClick:m?b=>m(b,e):void 0})}const Jqn=A.memo(Zqn),eUn=e=>e.nodes.map(n=>n.id),N4=e=>e instanceof Function?e:()=>e;function tUn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=Jqn,onClick:a}){const o=Nn(eUn,kr),c=N4(n),u=N4(e),h=N4(t),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(p=>f.jsx(rUn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:_},p))})}function nUn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,y:_,width:p,height:m}=Nn(x=>{const k=x.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:b,y:w}=k.internals.positionAbsolute,{width:y,height:C}=vl(v);return{node:v,x:b,y:w,width:y,height:C}},kr);return!u||u.hidden||!Kq(u)?null:f.jsx(o,{x:h,y:_,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:c,id:u.id})}const rUn=A.memo(nUn);var sUn=A.memo(tUn);const iUn=200,aUn=150,oUn=e=>!e.hidden,cUn=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?Uq(Fm(e.nodeLookup,{filter:oUn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},lUn="react-flow__minimap-desc";function VU({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:_,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:w,zoomStep:y=1,offsetScale:C=5}){const N=Cr(),z=A.useRef(null),{boundingRect:T,viewBB:j,rfId:M,panZoom:D,translateExtent:I,flowWidth:$,flowHeight:q,ariaLabelConfig:H}=Nn(cUn,kr),Q=(e==null?void 0:e.width)??iUn,V=(e==null?void 0:e.height)??aUn,J=T.width/Q,Z=T.height/V,B=Math.max(J,Z),L=B*Q,F=B*V,U=C*B,K=T.x-(L-T.width)/2-U,ne=T.y-(F-T.height)/2-U,ce=L+U*2,_e=F+U*2,se=`${lUn}-${M}`,G=A.useRef(0),oe=A.useRef();G.current=B,A.useEffect(()=>{if(z.current&&D)return oe.current=EFn({domNode:z.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>G.current}),()=>{var Re;(Re=oe.current)==null||Re.destroy()}},[D]),A.useEffect(()=>{var Re;(Re=oe.current)==null||Re.update({translateExtent:I,width:$,height:q,inversePan:w,pannable:k,zoomStep:y,zoomable:v})},[k,v,w,y,I,$,q]);const le=m?Re=>{var He;const[Oe,We]=((He=oe.current)==null?void 0:He.pointer(Re))||[0,0];m(Re,{x:Oe,y:We})}:void 0,fe=x?A.useCallback((Re,Oe)=>{const We=N.getState().nodeLookup.get(Oe).internals.userNode;x(Re,We)},[]):void 0,me=b??H["minimap.ariaLabel"];return f.jsx(qy,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof _=="number"?_*B: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:is(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:Q,height:V,viewBox:`${K} ${ne} ${ce} ${_e}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:z,onClick:le,children:[me&&f.jsx("title",{id:se,children:me}),f.jsx(sUn,{onClick:fe,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-U},${ne-U}h${ce+U*2}v${_e+U*2}h${-ce-U*2}z - M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}VU.displayName="MiniMap";A.memo(VU);const uUn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,_Un={[Ah.Line]:"right",[Ah.Handle]:"bottom-right"};function fUn({nodeId:e,position:n,variant:t=Ah.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:k,onResize:v,onResizeEnd:b}){const w=kU(),y=typeof e=="string"?e:w,C=Cr(),N=A.useRef(null),z=t===Ah.Handle,T=Nn(A.useCallback(uUn(z&&m),[z,m]),kr),j=A.useRef(null),M=n??_Un[t];A.useEffect(()=>{if(!(!N.current||!y))return j.current||(j.current=BFn({domNode:N.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q,domNode:V}=C.getState();return{nodeLookup:I,transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q,paneDomNode:V}},onChange:(I,$)=>{const{triggerNodeChanges:q,nodeLookup:H,parentLookup:Q,nodeOrigin:V}=C.getState(),J=[],Z={x:I.x,y:I.y},B=H.get(y);if(B&&B.expandParent&&B.parentId){const L=B.origin??V,F=I.width??B.measured.width??0,U=I.height??B.measured.height??0,K={id:B.id,parentId:B.parentId,rect:{width:F,height:U,...Wq({x:I.x??B.position.x,y:I.y??B.position.y},{width:F,height:U},B.parentId,H,L)}},ne=AC([K],H,Q,V);J.push(...ne),Z.x=I.x?Math.max(L[0]*F,I.x):void 0,Z.y=I.y?Math.max(L[1]*U,I.y):void 0}if(Z.x!==void 0&&Z.y!==void 0){const L={id:y,type:"position",position:{...Z}};J.push(L)}if(I.width!==void 0&&I.height!==void 0){const F={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};J.push(F)}for(const L of $){const F={...L,type:"position"};J.push(F)}q(J)},onEnd:({width:I,height:$})=>{const q={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:$}};C.getState().triggerNodeChanges([q])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:_,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:x}),()=>{var I;(I=j.current)==null||I.destroy()}},[M,o,c,u,h,_,k,v,b,x]);const D=M.split("-");return f.jsx("div",{className:is(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:T,...a&&{[z?"backgroundColor":"borderColor"]:a}},children:i})}A.memo(fUn);function dUn(){const[e,n]=A.useState(0),[t,r]=A.useState(0);return{ref:A.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),c=new MutationObserver(a);return o.observe(i),c.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const B1=8;function hUn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=A.useState({viewWidth:0,viewHeight:0});A.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const _=o,p=c;o=Math.min(Math.max(o,B1),i-t-B1),c=Math.min(Math.max(c,B1),s-r-B1),u=e.anchor==="left"||e.anchor==="right"?p-c:_-o}return{x:o,y:c,arrowAdjustment:u}}const z4=380,j4=12,pUn=350,mUn=150,dk=new EventTarget;function gUn(){dk.dispatchEvent(new Event("move"))}function vUn(e,n){const[t,r]=A.useState(null),s=A.useRef(void 0),i=A.useRef(void 0);A.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return dk.addEventListener("move",u),()=>{dk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),A.useEffect(()=>{r(u=>{var _;if(!u)return u;const h=((_=e.current)==null?void 0:_.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[e,n]);const a=A.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)},pUn)},[e]),o=A.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),mUn)},[]),c=A.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function bUn(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(E(),t)}function yUn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=dUn(),h=s.right+j4+z4<=window.innerWidth,_=s.x-j4-z4>=0,p=h?"right":_?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=hUn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:j4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=lt({..._kn(k??""),enabled:!!k,subscribed:!!k}),b=A.useMemo(()=>{if(!v)return null;const I=v;let $=I.diff;if(I.truncated){const V=$.lastIndexOf(` -diff --git `);$=V!==-1?$.slice(0,V+1):$.slice(0,$.lastIndexOf(` -`)+1)}let q=[];try{q=$.trim()?W3($):[]}catch{return null}if(I.truncated&&q.every(V=>V.hunks.length===0))return null;let H=0,Q=0;for(const V of q){const J=oy(V);H+=J.additions,Q+=J.deletions}return{fileCount:q.length,additions:H,deletions:Q,truncated:I.truncated}},[v]),w={done:0,failed:0,cancelled:0,live:0};for(const I of n)I.status==="done"?w.done+=1:I.status==="failed"?w.failed+=1:I.status==="cancelled"?w.cancelled+=1:w.live+=1;const y=t?T0((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,z=A.useRef(null),[T,j]=A.useState(!1),[M,D]=A.useState(!1);return A.useEffect(()=>{j(!1)},[N]),A.useEffect(()=>{const I=z.current;I&&D(I.scrollHeight>I.clientHeight+1)},[N,T]),oa.createPortal(f.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:z4,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:c,children:[f.jsxs("div",{className:"hc-head",children:[f.jsx("span",{className:"hc-slug",children:e.slug}),f.jsx(al,{status:t?Qi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[i&&f.jsxs("button",{type:"button",...$r(i),children:[f.jsx(lo,{size:13}),AOe()]}),f.jsxs("button",{type:"button",...$r(a),children:[f.jsx(Db,{size:13}),uOe()]})]}),N&&f.jsx("div",{className:`hc-body${T?" expanded":""}`,ref:z,children:N}),N&&(M||T)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>j(I=>!I),children:T?ND():_je()}),C&&f.jsx("div",{className:"hc-failure",children:C}),f.jsxs("div",{className:"hc-stats",children:[f.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?iXe():fXe({count:Xt(n.length)}),...w.done>0?[gQe({count:Xt(w.done)})]:[],...w.failed>0?[SQe({count:Xt(w.failed)})]:[],...w.cancelled>0?[uQe({count:Xt(w.cancelled)})]:[],...w.live>0?[GQe({count:Xt(w.live)})]:[]])}),t&&nS(t.backend)&&f.jsx(jS,{backend:t.backend}),y&&f.jsx("span",{children:y}),t&&f.jsx("span",{children:co(t.createdAt)})]}),f.jsxs("div",{className:"hc-git",children:[f.jsxs("div",{className:"hc-git-row",children:[f.jsxs("span",{className:"hc-branch",title:e.branchName,children:[f.jsx(Nm,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[SOe()," ",f.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:b.truncated?vX({parent:Ne(r??"parent")}):_X({parent:Ne(r??"parent")}),children:f.jsxs("span",{children:[b.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?ZQe():b.truncated?$Qe({count:Xt(b.fileCount)}):AQe({count:Xt(b.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[gOe()," ",bUn(e.createdAt)]})]})]}),document.body)}const UM=["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(" "),xUn=264,GM=132,_v=44,wUn=72,kUn=148,SUn=44;function CUn(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 EUn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),0);return t.set(o,c),c},s=new Map,i=o=>{const c=s.get(o)??(n(o)||o.children.some(i));return s.set(o,c),c};function a(o){if(n(o)){const h=[];let _=0;for(const p of o.children)i(p)?h.push(...a(p)):_+=r(p);return _>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:_,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(_){c+=1;for(const p of _.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function hk(e){return e.kind==="exp"?xUn:kUn}function P1(e){return e.kind==="exp"?e.exp.id:e.id}function fv(e){if(e.children.length===0)return hk(e);const n=e.children.reduce((t,r)=>t+fv(r),0)+_v*(e.children.length-1);return Math.max(hk(e),n)}function NUn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const zUn=A.memo(function({data:n}){hf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h}=n,_=r?Qi(r):void 0,p=_==="running"||_==="starting"||_==="cancelling",m=i?Mdn():p?ahn():Vc(),x=s.slice(-8),k=A.useRef(null),v=vUn(k,n);return f.jsxs("div",{ref:k,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:v.onMouseEnter,onMouseLeave:v.onMouseLeave,children:[f.jsx(Tu,{type:"target",position:Rt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...$r(b=>u(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:m}),f.jsx(al,{status:_??"idle"})]}),f.jsx("div",{className:"node-head",children:f.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&f.jsx("div",{className:"node-title",children:t.title||t.description}),f.jsxs("div",{className:"node-meta",children:[f.jsx("span",{children:xpn()}),x.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(b=>f.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 ${NUn(Qi(b))}`,title:_6(Qi(b))},b.id))}):f.jsx("span",{children:epn()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:co(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:opn(),...$r(b=>u(t.id,"terminal",b)),children:[f.jsx(lo,{size:13}),TL()]}),f.jsxs("button",{className:"node-action",title:fD({branch:Ne(t.branchName)}),...$r(b=>h(t.id,t.branchName,"files",b)),children:[f.jsx(Db,{size:13}),Nhn()]}),o&&c&&f.jsx("a",{className:"node-action node-action-ext",title:Sv({name:Ne(t.branchName)}),"aria-label":Sv({name:Ne(t.branchName)}),href:Rb(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(Fb,{size:13})})]}),f.jsx(Tu,{type:"source",position:Rt.Bottom}),v.rect&&f.jsx(yUn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:v.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>h(t.id,t.branchName,"files",b),onMouseEnter:v.keepOpen,onMouseLeave:v.onMouseLeave})]})}),jUn=A.memo(function({data:n}){hf();const{count:t,onShowProjectScope:r}=n;return f.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:zpn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Tu,{type:"target",position:Rt.Top}),f.jsx(dS,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?Jdn():Vdn({count:Xt(t)}),f.jsx("span",{className:"elided-node-sub",children:hpn()})]}),f.jsx(Tu,{type:"source",position:Rt.Bottom})]})}),TUn={exp:zUn,elided:jUn},KU={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},AUn={...KU.style,strokeDasharray:"4 4"};function RUn({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:a,viewport:o,onViewportChange:c}){const{nodes:u,edges:h}=A.useMemo(()=>{const _=new Map;for(const y of n){const C=_.get(y.experimentId);C?C.push(y):_.set(y.experimentId,[y])}for(const y of _.values())y.sort((C,N)=>C.createdAt-N.createdAt);const p=[],m=[],x=y=>!i||y.exp.chatSessionId===i,k=EUn(CUn(e),x),v=new Map(e.map(y=>[y.id,y.slug]));function b(y,C,N){const z=C-hk(y)/2;if(y.kind==="exp"){const M=_.get(y.exp.id)??[];p.push({id:y.exp.id,type:"exp",position:{x:z,y:N},data:{exp:y.exp,latestRun:M[M.length-1]??null,runs:M,isBaseline:!y.exp.parentExperimentId,parentSlug:y.exp.parentExperimentId?v.get(y.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else p.push({id:y.id,type:"elided",position:{x:z,y:N+(GM-SUn)/2},data:{count:y.count,onShowProjectScope:a}});if(y.children.length===0)return;const T=y.children.reduce((M,D)=>M+fv(D),0)+_v*(y.children.length-1);let j=C-T/2;for(const M of y.children){const D=fv(M),I=y.kind==="elided"||M.kind==="elided";m.push({id:`e-${P1(y)}-${P1(M)}`,source:P1(y),target:P1(M),...I?{style:AUn}:{}}),b(M,j+D/2,N+GM+wUn),j+=D+_v}}let w=0;for(const y of k){const C=fv(y);b(y,w+C/2,0),w+=C+_v}return{nodes:p,edges:m}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,a]);return e.length===0?f.jsxs("div",{className:UM,children:[f.jsx("p",{className:"empty-state-title",children:Khn()}),f.jsx("p",{className:"empty-state-hint",children:yhn()})]}):u.length===0&&i?f.jsxs("div",{className:UM,children:[f.jsx("p",{className:"empty-state-title",children:Phn()}),f.jsx("p",{className:"empty-state-hint",children:dhn()})]}):f.jsx(Pqn,{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:u,edges:h,nodeTypes:TUn,defaultEdgeOptions:KU,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:gUn,onMoveEnd:(_,p)=>{_&&c(p)},minZoom:.15,defaultViewport:o??void 0,fitView:o===null,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(Gqn,{variant:cl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const Zp=["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 MUn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function OUn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),c=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("~/")||k6(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,k]=[m(i),m(p)];return x===k?"":x.startsWith(`${k}/`)?x.slice(k.length).replace(/^\/+/,""):null},h=i.startsWith("/")&&c?u(c):null,_=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(_!==null)i=_;else{const p=s?MUn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(a=x[1],i=x[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function DUn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const LUn=10,VM=1448,IUn=80,$Un=48;function KM(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 WM(e){const n=A.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function BUn({runtime:e,projectId:n,pane:t}){var te,be,ze;const r=ln({mutationFn:B1n}),s=_i(),i=sD({select:X=>X.location}),a=Z_(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",c=A.useRef(null),u=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,_=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=A.useState(null),[x,k]=A.useState(0),v=A.useRef({href:"",jump:0,value:0});(v.current.href!==i.href||v.current.jump!==x)&&(v.current={href:i.href,jump:x,value:v.current.value+1});const b=A.useMemo(()=>{const X=t?Ja(t):"experiments";return typeof X=="object"&&"path"in X&&X.line&&p!==v.current.value?{...X,lineScrollRequest:v.current.value}:X},[t,p,i.href,x]),w=lt(La(n)),y=A.useMemo(()=>{var X;return((X=w.data)==null?void 0:X.map(ae=>ae.id))??null},[w.data]),C=A.useRef(new Set),N=A.useRef(new Set),z=A.useRef({}),[T,j]=A.useState(0),M=A.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 D=A.useCallback((X,ae=!1)=>{const xe=M.current;xe.projectId&&s.navigate({href:X1(xe.projectId,xe.activeSessionId,X),replace:ae})},[s]),I=A.useCallback(X=>{const ae=tl(X);D(ae.kind==="file"?{...ae,line:void 0}:ae)},[D]),$=A.useCallback(()=>D(void 0),[D]),q=A.useCallback(X=>{(t==null?void 0:t.kind)==="experiment"&&D({...t,runId:X??void 0})},[t,D]),H=A.useCallback(X=>{s.navigate({href:X?`/projects/${encodeURIComponent(X)}`:"/projects"})},[s]),Q=A.useCallback(X=>{var ae;if(n)if(X==="chat"){const xe=c.current;s.navigate({href:X1(n,xe,(ae=yu(Ga.current,xe??"new"))==null?void 0:ae.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${X==="skills"?"skills":`settings/${X}`}`})},[s,n]),V=hf(),{status:J}=o6(e.kind==="local"),Z=A.useMemo(()=>_h(),[n]),B=lt(Z),L=B.data??null,F=A.useCallback(X=>{Wr(Z.queryKey,ae=>(typeof X=="function"?X(ae??null):X)??void 0)},[Z]),U=A.useMemo(()=>Sm(),[n]),K=lt(U),ne=K.data??null,ce=A.useCallback(X=>{Wr(U.queryKey,ae=>(typeof X=="function"?X(ae??null):X)??void 0)},[U]),_e=A.useRef(void 0);_e.current=ne==null?void 0:ne.tourCompleted;const se=[!w.data&&w.error?vD():null,!B.data&&B.error?l0():null,!K.data&&K.error?Xue():null].filter(X=>X!==null),G=se.length?r_e({items:new Intl.ListFormat(V).format(se)}):null,oe=A.useRef(null),le=lt(T3(n)),fe=le.data??[],me=!le.isPending,[Re,Oe]=A.useState(!1),He=lt(mu(n)).data??[],Se=A.useRef(He);Se.current=He;const it=A.useRef(new Map),Je=A.useRef(new Set),ot=A.useRef(null),wt=A.useRef(!1),Pt=A.useRef(new Map),dt=A.useRef(new Map),ft=A.useRef(0),Le=A.useRef(fe);Le.current=fe;const Te=lt(fkn(n)).data??null,[Pe,rt]=A.useState("table"),[ut,pt]=A.useState("project"),qe=A.useRef(null),{open:Kt,setOpen:sn,ref:Tt}=_o(qe),[mt,Bn]=A.useState(!1),Jt=fe.every(X=>X.chatSessionId),xn=u&&Jt?ut:"project",vr=A.useMemo(()=>xn!=="agent"?fe:fe.filter(X=>X.chatSessionId===u),[fe,xn,u]),Pn=A.useMemo(()=>{if(xn!=="agent")return He;const X=new Set(vr.map(ae=>ae.id));return He.filter(ae=>X.has(ae.experimentId))},[He,vr,xn]),[Rn,Fn]=A.useState([]),[_r,Pr]=A.useState(!1),[Et,un]=A.useState(!1),[zn,an]=A.useState(!1),[fr,fn]=A.useState(!1),[wn,Yn]=A.useState(null),[kt,At]=A.useState([]),[Ve,bt]=A.useState([]),Mn=A.useRef(new Map),tn=A.useRef(new Map),on=X=>{let ae=tn.current.get(X);return ae||(ae=new PLn,tn.current.set(X,ae)),ae},[Zn,cn]=A.useState([]),[ps,hi]=A.useState([]),[Rs,Qs]=A.useState([]),[ms,ua]=A.useState([]),[Ms,_a]=A.useState(null),[Fr,nr]=A.useState("files"),[ho,po]=A.useState(new Set),[qn,Hr]=A.useState(!1),[mo,go]=A.useState(null),[Xs,vo]=A.useState(s$),[Gt,Fa]=A.useState(()=>window.innerWidth>=VM),Un=o==="chat"&&!h&&Gt,[qr,st]=A.useState(!0),[Wt,xs]=A.useState(!1),Ys=A.useRef(CS()),pi=A.useRef(u);pi.current=u;const Gn=A.useRef(Rn);Gn.current=Rn;const dr=A.useRef(ms);dr.current=ms;const Os=A.useRef(null),Ds=A.useCallback(X=>{const ae=[...X];dr.current=ae,ua(ae)},[]),Tr=A.useCallback(X=>{Os.current=X,_a(X)},[]),mi=A.useCallback(X=>{const ae=Mt(X);At(ke=>Pp(ke,ae)),bt(ke=>Pp(ke,ae)),cn(ke=>Pp(ke,ae)),hi(ke=>Pp(ke,ae)),Qs(ke=>Pp(ke,ae));const xe=Is.current;if(xe&&"path"in X){const ke=As(xe,pi.current,X);Mn.current.delete(ke),tn.current.delete(ke),N.current.delete(ke),C.current.delete(ke)}const Ae=Gn.current.filter(ke=>Mt(ke)!==ae);Gn.current=Ae,Fn(Ae)},[]),hr=A.useCallback(X=>{const ae=Mt(X),xe=[...Gn.current.filter(Ae=>Mt(Ae)!==ae),c1(X)];Gn.current=xe,Fn(xe),I(X)},[I]),ws=A.useCallback((X,ae,xe)=>{const Ae=Mt(X),ke=Os.current,Fe=YRn({order:dr.current,previewKey:ke?Mt(ke):null},Ae,ae);Fe.replacedKey&&ke&&typeof ke!="string"&&Mt(ke)===Fe.replacedKey&&mi(ke),Ds(Fe.order),Fe.previewKey===null?Tr(null):Fe.previewKey===Ae&&Tr(c1(X));const Qe=[...Gn.current.filter(Dt=>Mt(Dt)!==Ae),c1(X)];Gn.current=Qe,Fn(Qe),D(tl(X,xe))},[mi,Ds,Tr,D]),It=A.useCallback(X=>{const ae=Os.current;ae&&Mt(ae)===Mt(X)&&Tr(null)},[Tr]);A.useEffect(()=>{let X=!1;const ae=Ae=>{const ke=Os.current,Fe=Ae.target;if(Fe instanceof Element&&Fe.closest("input, textarea, [contenteditable='true']")!==null){X=!1;return}if(ke&&Mt(ke)===Mt(Ys.current.rightTab)&&(Ae.metaKey||Ae.ctrlKey)&&!Ae.altKey&&!Ae.shiftKey&&Ae.key.toLowerCase()==="k"){Ae.preventDefault(),X=!0;return}if(X&&Ae.key==="Enter"){Ae.preventDefault(),X=!1;const Dt=Os.current;Dt&&It(Dt);return}X=!1},xe=()=>{X=!1};return window.addEventListener("keydown",ae),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",ae),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[It]);const ks=A.useCallback((X,ae)=>{const xe=Mt(X),Ae=Os.current;Ae&&Mt(Ae)===xe&&Tr(null);const ke=ZRn({order:dr.current,previewKey:Ae?Mt(Ae):null},xe,Gn.current.map(Mt));Ds(ke.order);const Fe=Gn.current.filter(Dt=>Mt(Dt)!==xe);if(Gn.current=Fe,Fn(Fe),!ae)return;const Qe=ke.fallbackKey?Fe.find(Dt=>Mt(Dt)===ke.fallbackKey):void 0;Qe?I(Qe):($(),Hr(!1))},[Ds,Tr,I,$]),Ha=Q,Ss=A.useMemo(()=>({rightTab:c1(b),tabHistory:Rn,experimentsTabOpen:_r,filesTabOpen:Et,artifactsTabOpen:zn,terminalTabOpen:fr,expTabs:kt,fileTabs:Ve,planTabs:Zn,subagentTabs:ps,codeTabs:Rs,contentTabOrder:dr.current,previewTab:Os.current,filesView:Fr,filesToggled:ho,selectedRunId:_,scope:ut,panelOpen:h,panelMax:qn,treeViewport:mo}),[b,Rn,_r,Et,zn,fr,kt,Ve,Zn,ps,Rs,ms,Ms,Fr,ho,_,ut,h,qn,mo]);Ys.current=Ss;const qa=A.useCallback(()=>Object.fromEntries(Mn.current),[]),Iu=A.useRef(void 0),$u=A.useCallback(()=>{clearTimeout(Iu.current),Iu.current=setTimeout(()=>j(X=>X+1),200)},[]);A.useEffect(()=>()=>clearTimeout(Iu.current),[]);const bo=A.useCallback((X,ae,xe)=>{if(Fn(X.tabHistory),Gn.current=X.tabHistory,Pr(X.experimentsTabOpen),un(X.filesTabOpen),an(X.artifactsTabOpen),fn(X.terminalTabOpen),At(X.expTabs),bt(X.fileTabs),cn(ke=>ke===X.planTabs?ke:X.planTabs.map(Fe=>{var Qe;return{...Fe,plan:((Qe=ke.find(Dt=>Dt.sessionId===Fe.sessionId&&Dt.promptId===Fe.promptId))==null?void 0:Qe.plan)??""}})),hi(X.subagentTabs),Qs(X.codeTabs),Ds(X.contentTabOrder),Tr(X.previewTab),nr(X.filesView),po(X.filesToggled),pt(X.scope),Hr(X.panelMax),go(X.treeViewport),Bn(M.current.activeSessionId===Od&&X.fileTabs.some(ke=>u_(ke,{path:tw,source:"artifacts"}))),xe){for(const[ke,Fe]of Object.entries((ae==null?void 0:ae.scroll)??{}))Mn.current.set(ke,Fe);Object.assign(z.current,ae==null?void 0:ae.sourceModes)}const Ae=M.current;if(Ae.projectId)for(const ke of X.fileTabs){const Fe=As(Ae.projectId,Ae.activeSessionId,ke);N.current.has(Fe)||C.current.add(Fe)}},[Ds,Tr]),{ready:Ar,loaded:Bu,error:yo,retry:fa,capture:Ua,workspace:Ga}=b3n({projectId:ne&&y!==null&&((a==null?void 0:a.kind)!=="task"||!u||y.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ne==null?void 0:ne.tourCompleted)===!1,state:Ss,apply:bo,getScroll:qa,sourceModes:z.current,revision:T}),bl=A.useRef(null);A.useLayoutEffect(()=>{if(!Ar||!me||(a==null?void 0:a.kind)!=="task")return;const X=bl.current;(X==null?void 0:X.projectId)===n&&X.taskId===u&&X.scope!==xn&&go(null),bl.current={projectId:n,taskId:u,scope:xn}},[Ar,me,a==null?void 0:a.kind,n,u,xn]);const Pu=A.useCallback((X,ae)=>{var Dt;const xe=(ae==null?void 0:ae.projectId)??n;if(!xe)return;const Ae=xe===n;X&&Ae&&ae!=null&&ae.replace&&u===null&&(Ua(),g3n(xe,X));const ke=yu(e$(xe),X??"new"),Fe=ke?ke.active:Uc(xe)?(Dt=ES(X??void 0,_e.current===!1))==null?void 0:Dt.active:void 0,Qe=Ae&&(ae!=null&&ae.replace)&&X&&u===null?M.current.pane:Fe;s.navigate({href:X1(xe,X,Qe),replace:Ae&&(ae==null?void 0:ae.replace)})},[s,n,u,Ua]);A.useEffect(()=>{Ar&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Ga.current.lastTaskId&&(y!=null&&y.includes(Ga.current.lastTaskId))&&(c.current=Ga.current.lastTaskId,j(X=>X+1))},[Ar,a==null?void 0:a.kind,Ga,y]),eQ({shouldBlockFn:({next:X})=>{var ae;return((ae=Z_(X.pathname))==null?void 0:ae.projectId)!==n&&[...tn.current.values()].some(xe=>xe.needsProtection)&&!DR(DN())},enableBeforeUnload:()=>[...tn.current.values()].some(X=>X.needsProtection)});const Ls=A.useRef(null);A.useEffect(()=>{const X=Lb(i.href);!ne||!Ar||!X||(Bb.queue({lastLocation:X,railOpen:qr,panelWidth:Xs,experimentsView:Pe},Ls.current===X?250:0),Ls.current=X)},[i.href,ne,Ar,qr,Xs,Pe]);const as=(ne==null?void 0:ne.onboardingCompleted)??!1,[uc,da]=A.useState(!1),[ur,_c]=A.useState(null),[rr,Sf]=A.useState(0),xo=A.useCallback(()=>da(!0),[]),wo=A.useCallback(async X=>{const ae=_e.current===!1,xe=await r.mutateAsync({tourCompleted:!0});ae&&ru({name:"demo_welcome_choice",choice:X}),ce(Ae=>Ae&&{...Ae,tourCompleted:xe.tourCompleted}),da(!1),X==="explore_demo"&&Sf(Ae=>Ae+1)},[]),Ri=A.useCallback(async()=>{await wo("create_project"),xs(!0)},[wo]);A.useEffect(()=>{!n||!Uc(n)||!as||ne!=null&&ne.tourCompleted||xo()},[n,as,xo,ne==null?void 0:ne.tourCompleted]);const Ft=(L==null?void 0:L.find(X=>X.id===n))??null;A.useEffect(()=>{const X=G||ne===null?null:Ft==null?void 0:Ft.name;document.title=X?`${Gi(X)} — OpenResearch`:"OpenResearch"},[G,ne,Ft]);const Is=A.useRef(n);Is.current=n;const Zs=A.useCallback(X=>{n&&ru({name:"first_action",surface:Uc(n)?"demo":"project",action:X})},[n]);A.useEffect(()=>{o!=="chat"&&o!=="skills"&&Zs("open_settings")},[o,Zs]);const ha=A.useCallback((X=!1)=>{X&&(!M.current.isTask||M.current.pane)||(Zs("open_experiment"),Pr(!0),D({kind:"home",view:"experiments"},X))},[D,Zs]),Cf=()=>{B.refetch(),K.refetch(),w.refetch()},fc=A.useRef(!1);A.useEffect(()=>{if(!ne||fc.current)return;fc.current=!0,oe.current=ne.preferredAgent;const X=kS()??ne.workspace;X&&(st(X.railOpen),vo(Math.min(X.panelWidth,n0())),rt(X.experimentsView))},[ne]),A.useEffect(()=>{y&&c.current&&!y.includes(c.current)&&(c.current=null)},[y]);const dc=A.useRef(Promise.resolve()),Mi=A.useRef(0),sr=A.useCallback(X=>{const ae=++Mi.current;ce(Ae=>Ae&&{...Ae,preferredAgent:X});const xe=dc.current.then(()=>r.mutateAsync({preferredAgent:X})).then(Ae=>{oe.current=Ae.preferredAgent,ae===Mi.current&&ce(ke=>ke&&{...ke,preferredAgent:Ae.preferredAgent})}).catch(Ae=>{throw ae===Mi.current&&ce(ke=>ke&&{...ke,preferredAgent:oe.current}),Ae});return dc.current=xe.catch(()=>{}),xe},[]);A.useEffect(()=>{const X=()=>{vo(ae=>Math.min(ae,n0())),Fa(window.innerWidth>=VM)};return window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[]);const hc=A.useCallback(X=>{wt.current=!1,Pt.current.clear(),dt.current.clear();const ae=++ft.current;tt.fetchQuery(mu(X)).then(xe=>{if(Is.current!==X||ot.current!==X||ft.current!==ae)return;Pt.current=new Map(xe.map(ke=>[ke.id,ke]));const Ae=[...dt.current.values()].some(ke=>{const Fe=Pt.current.get(ke.id);return!Fe||Fe.status!=="running"&&Fe.updatedAt<=ke.updatedAt});dt.current.clear();for(const ke of xe){const Fe=it.current.get(ke.id);(!Fe||Fe.updatedAt{var Fe;return xe.some(Qe=>Qe.id===ke&&Qe.status==="running")?ke:((Fe=xe.find(Qe=>Qe.status==="running"))==null?void 0:Fe.id)??null}),Ae&&ha(!0)}).catch(()=>{ft.current===ae&&(dt.current.clear(),Oe(!0))})},[ha]);A.useEffect(()=>{if(n)return ot.current=n,it.current.clear(),Je.current.clear(),Y1n(n).catch(()=>{}),hc(n),()=>{ft.current++}},[hc,n]);const Cs=A.useCallback(()=>{an(!0),hr("artifacts")},[hr]),gi=A.useCallback(()=>{fn(!0),hr("terminal")},[hr]),$s=u??(n?`project:${n}`:null);A.useEffect(()=>{Yn(h?b==="terminal"?$s:X=>X===$s?X:null:null)},[h,b,$s]),Wyn({onReconnect:()=>{const X=Is.current;X&&(ot.current=X,it.current.clear(),Je.current.clear(),hc(X))},onRun:X=>{if(X.projectId!==Is.current||X.projectId!==ot.current)return;const ae=it.current.get(X.id),xe=Je.current.has(X.id);if(ae&&ae.updatedAt>X.updatedAt||(it.current.set(X.id,X),Je.current.add(X.id),Uc(X.projectId)&&_c(Fe=>X.status==="running"?Fe??X.id:Fe===X.id?null:Fe),X.status!=="running"||(ae==null?void 0:ae.status)==="running"))return;const Ae=Pt.current.get(X.id),ke=wt.current&&(!Ae||Ae.status!=="running"&&Ae.updatedAt<=X.updatedAt);xe&&ae||ke?ha(!0):wt.current||dt.current.set(X.id,X)}});const yl=A.useCallback(()=>pt("project"),[]),Oi=A.useCallback((X,ae="overview",xe="preview",Ae)=>{Zs("open_experiment");const ke={id:X,view:ae};At(Fe=>Fe.some(Qe=>cw(Qe,ke))?Fe:[...Fe,ke]),ws(ke,xe,Ae)},[ws]),Di=A.useCallback((X,ae="preview")=>{const xe=Se.current.filter(ke=>ke.id===X||ke.id.startsWith(X)),Ae=xe.length===1?xe[0]:null;Ae&&Oi(Ae.experimentId,"terminal",ae,Ae.id)},[Oi]),Ef=A.useMemo(()=>new Map(fe.map(X=>{var ae;return[X.id,((ae=X.title)==null?void 0:ae.trim())||X.slug||Vc()]})),[fe,V]),ko=WM(Ef),Vh=A.useMemo(()=>{const X=new Map;for(const ae of He)X.set(ae.id,ko.get(ae.experimentId)??Vc());return X},[ko,He,V]),pc=WM(Vh),mc=A.useCallback(X=>{const ae=pc.get(X);if(ae)return ae;const xe=[...pc].filter(([Ae])=>Ae.startsWith(X));return xe.length===1?xe[0][1]:""},[pc]),Nf=A.useCallback(X=>{const ae=ko.get(X);if(ae)return ae;const xe=[...ko].filter(([Ae])=>Ae.startsWith(X));return xe.length===1?xe[0][1]:""},[ko]),zf=A.useCallback((X,ae="preview")=>{const xe=Le.current.filter(Ae=>Ae.id===X||Ae.id.startsWith(X));xe.length===1&&Oi(xe[0].id,"overview",ae)},[Oi]),xl=A.useCallback(X=>{const ae=kt.findIndex(xe=>cw(xe,X));ae!==-1&&(At(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,Mt(b)===Mt(X)))},[kt,ks,b]),Js=A.useCallback((X,ae="preview")=>{X.line!=null&&k(ke=>ke+1);const xe=Is.current;if(xe){const ke=As(xe,pi.current,X);Ys.current.fileTabs.some(Fe=>u_(Fe,X))||C.current.delete(ke),N.current.add(ke)}const Ae=ZI(X);bt(ke=>{const Fe=ke.findIndex(Dt=>u_(Dt,X));if(Fe===-1)return[...ke,Ae];const Qe=ke.slice();return Qe[Fe]=Ae,Qe}),ws(X,ae)},[ws]),wl=A.useCallback((X,ae,xe,Ae,ke,Fe)=>{const Qe=L==null?void 0:L.find(br=>br.id===n),Dt=OUn(X,Qe==null?void 0:Qe.repoPath,ae,(Qe==null?void 0:Qe.artifactsDir)??(Qe==null?void 0:Qe.filesDir),Qe==null?void 0:Qe.slug);if(!Dt)return null;const Vn=ke?Le.current.find(br=>br.id===ke||ke.length>=6&&br.id.startsWith(ke)):void 0,Ur=xe??(Vn==null?void 0:Vn.branchName),Gr=Dt.source==null||Dt.source==="repo";return Ur&&Gr&&(Dt.ref=Ur),Fe&&!Dt.ref&&Gr&&(Dt.branchLabel=Fe),Ae!=null&&(Dt.line=Ae),Dt},[L,n]),So=A.useCallback((X,ae,xe,Ae,ke,Fe,Qe="preview")=>{const Dt=wl(X,ae,xe,Ae,ke,Fe);Dt&&Js(Dt,Qe)},[Js,wl]),jf=A.useCallback(X=>Js({path:X,source:"artifacts"},"keepOpen"),[Js]),gc=A.useCallback((X,ae,xe,Ae,ke,Fe="preview")=>{const Qe=wl(X,ae,ke,xe,Ae);Qe&&Js(Qe,Fe)},[Js,wl]),ei=A.useCallback((X,ae)=>{It(X),ae()},[It]),Kh=A.useCallback(X=>{var Ae;const ae=Ve.findIndex(ke=>u_(ke,X));if(ae===-1)return;const xe=n?As(n,u,X):null;xe&&((Ae=tn.current.get(xe))!=null&&Ae.needsProtection)&&!DR(DN())||(bt(ke=>ke.filter((Fe,Qe)=>Qe!==ae)),xe&&(Mn.current.delete(xe),tn.current.delete(xe),N.current.delete(xe),C.current.delete(xe),delete z.current[xe]),u===Od&&u_(X,{path:tw,source:"artifacts"})&&Bn(!1),ks(X,Mt(b)===Mt(X)))},[u,Ve,ks,n,b]),Tf=A.useCallback(X=>{X.lineScrollRequest!==void 0&&m(X.lineScrollRequest)},[]),Wh=A.useCallback((X,ae,xe,Ae="preview")=>{const ke={kind:"plan",sessionId:ae,promptId:xe,plan:X};cn(Fe=>{const Qe=Fe.findIndex(Vn=>Vn.promptId===xe);if(Qe===-1)return[...Fe,ke];const Dt=Fe.slice();return Dt[Qe]=ke,Dt}),ws(ke,Ae)},[ws]),Af=A.useCallback(X=>{const ae=Zn.findIndex(xe=>xe.promptId===X.promptId);ae!==-1&&(cn(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,Mt(b)===Mt(X)))},[ks,Zn,b]),kl=A.useCallback((X,ae,xe,Ae="preview")=>{const ke={kind:"subagent",sessionId:X,spawnPartId:ae,label:xe};hi(Fe=>Fe.some(Qe=>Qe.spawnPartId===ae)?Fe:[...Fe,ke]),ws(ke,Ae)},[ws]),Qh=A.useCallback(X=>{const ae=ps.findIndex(xe=>xe.spawnPartId===X.spawnPartId);ae!==-1&&(hi(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,Mt(b)===Mt(X)))},[ks,b,ps]),[pa,Rf]=A.useState({});A.useEffect(()=>{if(Rf(Qe=>{const Dt=new Set(ps.map(Vn=>Vn.spawnPartId));return Object.keys(Qe).every(Vn=>Dt.has(Vn))?Qe:Object.fromEntries(Object.entries(Qe).filter(([Vn])=>Dt.has(Vn)))}),ps.length===0)return;let X=!0;const ae=new Set,xe=(Qe,Dt,Vn)=>{Rf(Ur=>{var br;let Gr=Ur;for(const ti of Dt)if(!(Vn&&ae.has(ti.spawnPartId)))for(const Kn of Qe){const va=cb(Kn.parts,ti.spawnPartId);if(!va)continue;Vn||ae.add(ti.spawnPartId);const xc={label:ADn(va),running:((br=va.state)==null?void 0:br.status)==="running"},ba=Gr[ti.spawnPartId];(!ba||ba.label!==xc.label||ba.running!==xc.running)&&(Gr===Ur&&(Gr={...Ur}),Gr[ti.spawnPartId]=xc);break}return Gr})};let Ae=0;const ke=()=>{const Qe=++Ae;for(const Dt of new Set(ps.map(Vn=>Vn.sessionId)))tt.fetchQuery({...il(Dt),staleTime:0}).then(({messages:Vn})=>{X&&Qe===Ae&&xe(Vn,ps.filter(Ur=>Ur.sessionId===Dt),!0)}).catch(()=>{})};ke();const Fe=Ov(Qe=>{if(Qe.type==="reconnected"){ae.clear(),ke();return}if(Qe.type!=="message")return;const Dt=ps.filter(Vn=>Vn.sessionId===Qe.sessionId);Dt.length&&xe([Qe.message],Dt,!1)});return()=>{X=!1,Fe()}},[ps]);const Co=A.useCallback((X,ae,xe="files",Ae="preview")=>{const ke={code:!0,experimentId:X,branch:ae,view:xe,toggled:new Set};Qs(Fe=>Fe.some(Qe=>ud(Qe,ke))?Fe.map(Qe=>ud(Qe,ke)?{...Qe,experimentId:X,view:xe}:Qe):[...Fe,ke]),ws(ke,Ae)},[ws]),ma=A.useCallback((X,ae)=>{Qs(xe=>xe.map(Ae=>ud(Ae,X)?{...Ae,...ae}:Ae)),ae.view&&D(tl({...X,...ae}))},[]),Xh=A.useCallback(X=>{const ae=Rs.findIndex(xe=>ud(xe,X));ae!==-1&&(Qs(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,Mt(b)===Mt(X)))},[Rs,ks,b]),Sl=A.useCallback(()=>{un(!0),hr("files")},[hr]),Eo=A.useCallback(X=>{X==="experiments"?Pr(!1):X==="files"?un(!1):X==="terminal"?(fn(!1),Yn(null)):an(!1),ks(X,b===X)},[ks,b]),Mf=X=>{X.preventDefault(),X.currentTarget.setPointerCapture(X.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const Ae=qn,ke=X.clientX,Fe=Xs;let Qe=!1;function Dt(){window.removeEventListener("pointermove",Vn),window.removeEventListener("pointerup",Dt),window.removeEventListener("pointercancel",Dt),document.body.style.userSelect=xe}function Vn(Ur){if(Ae){const Kn=Ur.clientX-ke;if(Qe||Kn<$Un)return;Qe=!0,Hr(!1);const va=Math.min(Math.max(Fe,Bv),n0());vo(va),window.removeEventListener("pointermove",Vn);return}const Gr=Math.round(window.innerWidth-Ur.clientX-LUn),br=n0();if(Gr>br+IUn){Hr(!0);return}Hr(!1);const ti=Math.min(Math.max(Gr,Bv),br);vo(ti)}window.addEventListener("pointermove",Vn),window.addEventListener("pointerup",Dt),window.addEventListener("pointercancel",Dt)},Of=(X,ae)=>{F(xe=>xe?KM(xe,X):[X]),s.navigate({href:`/projects/${encodeURIComponent(X.id)}${ae?"/settings/git":""}`}),ae&&yn(ae,"error")},Es=typeof b=="object"&&"id"in b?b:null,hn=typeof b=="object"&&"path"in b?b:null,Fu=(hn==null?void 0:hn.source)==="artifacts"&&Te?K0(Te.entries,hn.path):null,Hu=Fu?`${Fu.modifiedAt}:${Fu.size}`:null,Cl=u===Od&&mt?Ve.find(X=>u_(X,{path:tw,source:"artifacts"})):void 0,Df=Cl?[Cl]:[],os=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,gs=os==null?void 0:os.sessionId,vi=os==null?void 0:os.promptId,qu=!!(gs&&vi&&(y!=null&&y.includes(gs))),No=lt({...il(gs??""),enabled:qu,subscribed:qu}),vc=A.useMemo(()=>{var ae;if(!gs||!vi||!No.data)return null;const X=No.data.messages.flatMap(xe=>{const Ae=cb(xe.parts,vi);return Ae?[Ae]:[]})[0];return{key:`${gs}:${vi}`,text:((ae=X==null?void 0:X.prompt)==null?void 0:ae.plan)??null}},[gs,vi,No.data]),Qr=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,bc=typeof b=="object"&&"code"in b?b:null,Xr=bc?Rs.find(X=>ud(X,bc))??null:null,Uu=new Map;for(const X of[...kt,...Ve,...Zn,...ps,...Rs])Uu.set(Mt(X),X);const Gu=Cl?Mt(Cl):null,Vu=ms.filter(X=>X!==Gu).map(X=>Uu.get(X)).filter(h3n),zo=X=>Ms!==null&&Mt(Ms)===Mt(X),Ku=X=>f.jsx(Fc,{active:hn!==null&&u_(hn,X),label:X.path.split("/").pop()||X.path,icon:f.jsx(OI,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>hr(X),onPromote:()=>It(X),onClose:()=>Kh(X)},`file:${SS(X)}`),ga=Es?fe.find(X=>X.id===Es.id)??null:null,yc=Xr?fe.find(X=>X.id===Xr.experimentId&&X.branchName===Xr.branch)??null:null,Lf=X=>{var xe,Ae;if("path"in X)return Ku(X);if("id"in X){const ke=fe.find(Fe=>Fe.id===X.id);return f.jsx(Fc,{active:Es!==null&&cw(Es,X),label:ke?ke.title||ke.slug:"…",icon:X.view==="overview"?f.jsx(nwn,{size:12,className:"shrink-0"}):f.jsx(lo,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>hr(X),onPromote:()=>It(X),onClose:()=>xl(X)},Mt(X))}if("kind"in X&&X.kind==="plan")return f.jsx(Fc,{active:os!==null&&os.promptId===X.promptId,label:SD(),icon:f.jsx(gS,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>hr(X),onPromote:()=>It(X),onClose:()=>Af(X)},Mt(X));if("kind"in X)return f.jsx(Fc,{active:Qr!==null&&Qr.spawnPartId===X.spawnPartId,label:((xe=pa[X.spawnPartId])==null?void 0:xe.label)??X.label??u_e(),shimmer:((Ae=pa[X.spawnPartId])==null?void 0:Ae.running)??!1,icon:f.jsx(yS,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>hr(X),onPromote:()=>It(X),onClose:()=>Qh(X)},Mt(X));const ae=fe.find(ke=>ke.id===X.experimentId);return f.jsx(Fc,{active:Xr!==null&&ud(Xr,X),label:(ae==null?void 0:ae.slug)??X.branch,icon:f.jsx(Y_,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>hr(X),onPromote:()=>It(X),onClose:()=>Xh(X)},Mt(X))};if(!a||a.kind==="resume")return null;if(G)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:Zp,children:[f.jsx("p",{children:G}),f.jsx(De,{variant:"primary",onClick:Cf,children:Vs()})]}),e.kind==="ssh"&&f.jsx(P3,{runtime:e,corner:!0})]});if(L&&!Ft)return f.jsxs("div",{className:Zp,children:[ro(),f.jsx(De,{onClick:()=>H(null),children:l0()})]});if(yo&&!Ar)return f.jsxs("div",{className:Zp,children:[f.jsx("p",{role:"alert",children:yo}),f.jsx(De,{onClick:fa,children:Vs()})]});if(L===null||ne===null||!Bu||y===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:Zp,children:f.jsx(zt,{})}),e.kind==="ssh"&&f.jsx(P3,{runtime:e,corner:!0})]});if(!Ft||(a==null?void 0:a.kind)==="task"&&u&&!(y!=null&&y.includes(u)))return f.jsxs("div",{className:Zp,children:[ro(),f.jsx(De,{onClick:()=>H(null),children:l0()})]});const vs=f.jsx(oIn,{projectName:((te=L.find(X=>X.id===n))==null?void 0:te.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>xs(!0),onRepository:()=>Ha("git"),onCollapse:()=>st(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(c$,{}),e.kind==="local"&&f.jsx($$,{status:J}),yo&&f.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[f.jsx("span",{children:yo}),f.jsx(De,{onClick:fa,children:Vs()})]}),f.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${Un?"workspace-card-visible":""}`,children:[n&&f.jsx(GDn,{projectId:n,projectName:(Ft==null?void 0:Ft.name)??"",railHeader:vs,railOpen:qr,onShowRail:()=>st(!0),mainView:o,onSelectMainView:Ha,onOpenFile:gc,onOpenRun:Di,runExperimentName:mc,onOpenExperiment:zf,experimentName:Nf,onOpenPlan:Wh,onOpenSubagent:kl,composerFocusNonce:rr,demoRunningRunId:ur,runtime:e,onOpenDemoWelcome:Ft&&Uc(Ft.id)?xo:void 0,activeSessionId:u,onActiveSessionChange:Pu,preferredAgent:ne.preferredAgent,onPreferredAgentChange:sr,children:o==="skills"?f.jsx(TLn,{}):o!=="chat"?f.jsx(oOn,{remote:e.kind==="ssh",tab:o,project:Ft,onProjectUpdate:X=>{F(ae=>ae?KM(ae,X):[X])},onSelectTab:Ha}):null}),o==="chat"&&f.jsx(DCn,{expanded:Un,experiments:fe,runs:He,onOpenExperiment:(X,ae)=>Oi(X,"overview","preview",ae),rightOffset:h?Xs+28:void 0,activeView:h&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:Ft.id,onCompute:()=>Ha("compute"),sessionId:u,busy:((be=w.data)==null?void 0:be.some(X=>X.id===u&&X.busy))??!1,onChanges:()=>{nr("changes"),Sl()},onFiles:()=>{nr("files"),Sl()},onTerminal:gi,onArtifacts:Cs,onExperiments:()=>ha()}),o==="chat"&&h&&f.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 ${qn?"max":""}`,style:qn?void 0:{width:Xs},"data-onboarding":"experiments",children:[f.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 ${qn?"cursor-e-resize":"cursor-col-resize"}`,title:qn?ale():Jce(),onPointerDown:Mf}),f.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:[f.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:[Df.map(Ku),Et&&f.jsx(Fc,{active:b==="files",label:s3(),icon:f.jsx(Y_,{size:12,className:"shrink-0"}),onSelect:()=>hr("files"),onClose:()=>Eo("files")}),fr&&f.jsx(Fc,{active:b==="terminal",label:Tv(),icon:f.jsx(lo,{size:12,className:"shrink-0"}),onSelect:()=>hr("terminal"),onClose:()=>Eo("terminal")}),zn&&f.jsx(Fc,{active:b==="artifacts",label:pD(),icon:f.jsx(pS,{size:12,className:"shrink-0"}),onSelect:()=>hr("artifacts"),onClose:()=>Eo("artifacts")}),_r&&f.jsx(Fc,{active:b==="experiments",label:mD(),icon:f.jsx(hh,{size:12,className:"shrink-0"}),onSelect:()=>hr("experiments"),onClose:()=>Eo("experiments")}),Vu.map(Lf)]}),f.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[f.jsx(Bt,{title:qn?WE():KE(),"aria-label":qn?WE():KE(),onClick:()=>Hr(X=>!X),children:qn?f.jsx(o4n,{size:14}):f.jsx(s4n,{size:14})}),f.jsx(Bt,{title:z0(),"aria-label":z0(),onClick:()=>{$(),Hr(!1)},children:f.jsx(or,{size:14})})]})]}),b==="terminal"&&fr?null:!Ar||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!me||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Re?f.jsx(Aa,{children:f.jsx(zt,{})}):Es&&(!ga||_&&!He.some(X=>X.id===_&&X.experimentId===Es.id))||bc&&!yc||t&&"sessionId"in t&&t.sessionId&&!(y!=null&&y.includes(t.sessionId))?f.jsx(Aa,{children:f.jsx("div",{className:"p-6 text-subtext",children:ro()})}):b==="artifacts"?f.jsx(Aa,{children:Ft&&f.jsx(xLn,{project:Ft,artifacts:Te,onOpenFile:jf,canRenameFile:X=>{var ae;return!((ae=tn.current.get(As(Ft.id,u,{path:X,source:"artifacts"})))!=null&&ae.needsProtection)}},Ft.id)}):b==="experiments"?f.jsxs(Aa,{children:[f.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[f.jsx("span",{className:"flex-1"}),f.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[f.jsxs("div",{className:"option-picker relative inline-flex",ref:Tt,children:[f.jsx(Bt,{size:"small",ref:qe,className:"experiment-scope-trigger",active:xn==="agent",title:Cle({scope:xn==="agent"?GE():VE()}),"aria-label":Yle(),"aria-expanded":Kt,onClick:()=>sn(X=>!X),children:f.jsx($wn,{size:16,strokeWidth:2.5})}),Kt&&f.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:[f.jsxs(Xn,{"aria-pressed":xn==="agent",disabled:!u||!Jt,title:u?Jt?void 0:sue():vue(),onClick:()=>{pt("agent"),sn(!1)},children:[f.jsx("span",{children:GE()}),xn==="agent"&&f.jsx(Xi,{size:13})]}),f.jsxs(Xn,{"aria-pressed":xn==="project",onClick:()=>{pt("project"),sn(!1)},children:[f.jsx("span",{children:VE()}),xn==="project"&&f.jsx(Xi,{size:13})]})]})]}),f.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":Rle(),children:[f.jsx("button",{className:Pe==="table"?"active":"","aria-pressed":Pe==="table",onClick:()=>rt("table"),children:g_e()}),f.jsx("button",{className:Pe==="tree"?"active":"","aria-pressed":Pe==="tree",onClick:()=>rt("tree"),children:S_e()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:Pe==="tree"?Ft&&f.jsx(RUn,{experiments:fe,runs:Pn,project:Ft,onOpenView:Oi,onOpenCode:Co,agentSessionId:xn==="agent"?u:null,onShowProjectScope:yl,viewport:mo,onViewportChange:go}):f.jsx(cIn,{runs:Pn,emptyHint:xn==="agent"&&fe.length>0?_ue():void 0,experiments:vr,onOpen:(X,ae)=>{Oi(X.id,"overview",ae)},onOpenLogs:(X,ae,xe)=>{Oi(X,"terminal",xe,ae)},onOpenCode:(X,ae)=>{const xe=fe.find(Ae=>Ae.id===X);xe&&Co(xe.id,xe.branchName,"files",ae)},onCancel:LL})})]}):b==="files"?f.jsx(Aa,{children:Ft?f.jsx(lLn,{sessionId:u??void 0,project:Ft,view:Fr,toggled:ho,onViewChange:nr,onToggledChange:po,canRenameFile:X=>{var ae;return!((ae=tn.current.get(As(Ft.id,u,{path:X,source:"repo",sessionId:u??void 0})))!=null&&ae.needsProtection)},onOpenFile:(X,ae,xe,Ae)=>So(X,ae,xe,void 0,void 0,void 0,Ae)},`files:${u??`project:${Ft.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(Pd,{children:f.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:[f.jsx(DI,{size:22}),f.jsx("p",{children:que()})]})})})}):hn?f.jsx(Aa,{children:n&&f.jsx(aIn,{remote:e.kind==="ssh",restored:C.current.has(As(n,u,hn)),onRestoreActivated:()=>{const X=As(n,u,hn);C.current.delete(X),N.current.add(X)},showSource:z.current[As(n,u,hn)]??!1,onShowSourceChange:X=>{z.current[As(n,u,hn)]=X,j(ae=>ae+1)},projectId:n,path:hn.path,source:hn.source,sessionId:hn.source==="artifacts"?u??void 0:hn.sessionId,gitRef:hn.ref,line:hn.line,branchLabel:DUn(hn,Ft==null?void 0:Ft.baselineBranch),artifactVersion:Hu,artifactEntries:hn.source==="artifacts"?Te==null?void 0:Te.entries:void 0,bufferSession:on(As(n,u,hn)),onOpenFile:(X,ae,xe,Ae)=>ei(hn,()=>So(X,ae,xe,void 0,void 0,void 0,Ae)),scrollPosition:Mn.current.get(As(n,u,hn)),onScrollPositionChange:X=>{Mn.current.set(As(n,u,hn),X),$u()},lineScrollRequest:hn.lineScrollRequest,onLineScrollRequestHandled:()=>Tf(hn),onEdit:()=>It(hn)},As(n,u,hn))}):os?f.jsx(Aa,{children:f.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:f.jsx(Jo,{text:(vc==null?void 0:vc.key)===`${os.sessionId}:${os.promptId}`?vc.text??ro():((ze=Zn.find(X=>X.promptId===os.promptId))==null?void 0:ze.plan)||gD(),onOpenFile:(X,ae,xe,Ae,ke)=>ei(os,()=>So(X,os.sessionId,Ae,ae,xe,void 0,ke))})})}):Qr?f.jsx(WDn,{projectId:n,sessionId:Qr.sessionId,spawnPartId:Qr.spawnPartId,onOpenFile:(X,ae,xe,Ae,ke)=>ei(Qr,()=>gc(X,Qr.sessionId,ae,xe,Ae,ke)),onOpenRun:(X,ae)=>ei(Qr,()=>Di(X,ae)),runExperimentName:mc,onOpenExperiment:(X,ae)=>ei(Qr,()=>zf(X,ae)),experimentName:Nf,onOpenSubagent:(X,ae,xe)=>ei(Qr,()=>kl(Qr.sessionId,X,ae,xe))},Qr.spawnPartId):Xr?f.jsx(Aa,{children:n&&Ft&&Xr&&yc&&f.jsx(cLn,{projectId:n,project:Ft,experiment:yc,view:Xr.view,toggled:Xr.toggled,onViewChange:X=>ma(Xr,{view:X}),onToggledChange:X=>ma(Xr,{toggled:X}),onOpenFile:(X,ae,xe,Ae)=>ei(Xr,()=>So(X,ae,xe,void 0,void 0,yc.branchName,Ae))},`code:${Xr.branch}`)}):f.jsx(Aa,{children:Es&&ga&&Ft&&f.jsx(DLn,{experiment:ga,project:Ft,view:Es.view,runs:He,selectedRunId:_,onSelectRun:q,parentExperiment:fe.find(X=>X.id===ga.parentExperimentId)??null,onOpenView:(X,ae,xe)=>{ei(Es,()=>Oi(ga.id,X,xe,ae))},onOpenCode:(X,ae)=>ei(Es,()=>Co(ga.id,ga.branchName,X,ae))},`${Es.id}:${Es.view}`)}),fr&&wn!==null&&wn===$s&&Ft&&f.jsx(Aa,{className:b==="terminal"?void 0:"hidden",children:f.jsx(ICn,{projectId:Ft.id,sessionId:u,active:b==="terminal"},$s)})]})]}),Wt&&f.jsx(o$,{remote:e.kind==="ssh",onClose:()=>xs(!1),onCreated:(X,ae)=>{xs(!1),Of(X,ae)}}),uc&&Ft&&Uc(Ft.id)&&f.jsx(lIn,{onClose:wo,onCreateProject:Ri})]})}const pk=tc()({validateSearch:e=>({pane:xS(e.pane)}),beforeLoad:({location:e})=>{if(!Z_(e.pathname))throw NK()},component:PUn});function PUn(){const{projectId:e}=pk.useParams(),{pane:n}=pk.useSearch(),t=_i(),r=sD({select:s=>s.location});return A.useEffect(()=>{const s=FUn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),f.jsxs(f.Fragment,{children:[f.jsx(C0,{}),f.jsx(BUn,{projectId:e,pane:n,runtime:t$()},e)]})}function FUn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&xS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const WU=tc()({component:HUn});function HUn(){const{projectId:e}=WU.useParams();return f.jsx(ikn,{projectId:e})}const qUn=tc()({}),UUn=tc()({}),GUn=tc()({}),VUn=tc()({}),KUn=okn.update({id:"/",path:"/",getParentRoute:()=>Pb}),OC=ckn.update({id:"/projects",path:"/projects",getParentRoute:()=>Pb}),WUn=lkn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>Pb}),QUn=ukn.update({id:"/",path:"/",getParentRoute:()=>OC}),Gh=pk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>OC}),XUn=WU.update({id:"/",path:"/",getParentRoute:()=>Gh}),YUn=qUn.update({id:"/skills",path:"/skills",getParentRoute:()=>Gh}),ZUn=UUn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>Gh}),JUn=GUn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>Gh}),eGn=VUn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>Gh}),tGn={ProjectsProjectIdSkillsRoute:YUn,ProjectsProjectIdIndexRoute:XUn,ProjectsProjectIdSettingsTabRoute:ZUn,ProjectsProjectIdTasksSessionIdRoute:JUn,ProjectsProjectIdTasksNewRoute:eGn},nGn=Gh._addFileChildren(tGn),rGn={ProjectsProjectIdRoute:nGn,ProjectsIndexRoute:QUn},sGn=OC._addFileChildren(rGn),iGn={IndexRoute:KUn,ProjectsRoute:sGn,RemoteLaunchRoute:WUn},aGn=Pb._addFileChildren(iGn)._addFileTypes(),oGn=QW({routeTree:aGn,context:{queryClient:tt},trailingSlash:"never",defaultPendingComponent:c6,defaultErrorComponent:l6,defaultNotFoundComponent:rkn}),cGn=E();document.documentElement.lang=cGn;document.documentElement.dir="ltr";rK.createRoot(document.getElementById("root")).render(f.jsxs(A.StrictMode,{children:[f.jsx(gV,{client:tt,children:f.jsx(ZW,{router:oGn})}),f.jsx(I2n,{})]})); diff --git a/ui/dist/assets/index-Cgp9uIoj.js b/ui/dist/assets/index-yT9oNk64.js similarity index 59% rename from ui/dist/assets/index-Cgp9uIoj.js rename to ui/dist/assets/index-yT9oNk64.js index bab0c762..f8b11c98 100644 --- a/ui/dist/assets/index-Cgp9uIoj.js +++ b/ui/dist/assets/index-yT9oNk64.js @@ -1,4 +1,4 @@ -var pV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var mV=(e,n,t)=>n in e?pV(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Bs=(e,n,t)=>mV(e,typeof n!="symbol"?n+"":n,t),T2=(e,n,t)=>n.has(e)||L9("Cannot "+t);var ue=(e,n,t)=>(T2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?L9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(T2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),It=(e,n,t)=>(T2(e,n,"access private method"),t);var Rp=(e,n,t,r)=>({set _(s){Ge(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 gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A2={exports:{}},Mp={};/** +var mV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var gV=(e,n,t)=>n in e?mV(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Fs=(e,n,t)=>gV(e,typeof n!="symbol"?n+"":n,t),T2=(e,n,t)=>n.has(e)||L9("Cannot "+t);var ue=(e,n,t)=>(T2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?L9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ue=(e,n,t,r)=>(T2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Bt=(e,n,t)=>(T2(e,n,"access private method"),t);var Mp=(e,n,t,r)=>({set _(s){Ue(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 gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A2={exports:{}},Op={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ var pV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var mV=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var I9;function gV(){if(I9)return Mp;I9=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 Mp.Fragment=n,Mp.jsx=t,Mp.jsxs=t,Mp}var $9;function vV(){return $9||($9=1,A2.exports=gV()),A2.exports}var f=vV(),R2={exports:{}},Yt={};/** + */var I9;function vV(){if(I9)return Op;I9=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 Op.Fragment=n,Op.jsx=t,Op.jsxs=t,Op}var $9;function bV(){return $9||($9=1,A2.exports=vV()),A2.exports}var f=bV(),R2={exports:{}},Zt={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ var pV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var mV=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var B9;function bV(){if(B9)return Yt;B9=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"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(F,U,K){this.props=F,this.context=U,this.refs=v,this.updater=K||x}b.prototype.isReactComponent={},b.prototype.setState=function(F,U){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,U,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,U,K){this.props=F,this.context=U,this.refs=v,this.updater=K||x}var C=y.prototype=new w;C.constructor=y,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function z(){}var T={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,U,K){var ne=K.ref;return{$$typeof:e,type:F,key:U,ref:ne!==void 0?ne:null,props:K}}function D(F,U){return M(F.type,U,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function $(F){var U={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(K){return U[K]})}var q=/\/+/g;function H(F,U){return typeof F=="object"&&F!==null&&F.key!=null?$(""+F.key):U.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(z,z):(F.status="pending",F.then(function(U){F.status==="pending"&&(F.status="fulfilled",F.value=U)},function(U){F.status==="pending"&&(F.status="rejected",F.reason=U)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function V(F,U,K,ne,ce){var _e=typeof F;(_e==="undefined"||_e==="boolean")&&(F=null);var se=!1;if(F===null)se=!0;else switch(_e){case"bigint":case"string":case"number":se=!0;break;case"object":switch(F.$$typeof){case e:case n:se=!0;break;case h:return se=F._init,V(se(F._payload),U,K,ne,ce)}}if(se)return ce=ce(F),se=ne===""?"."+H(F,0):ne,N(ce)?(K="",se!=null&&(K=se.replace(q,"$&/")+"/"),V(ce,U,K,"",function(le){return le})):ce!=null&&(I(ce)&&(ce=D(ce,K+(ce.key==null||F&&F.key===ce.key?"":(""+ce.key).replace(q,"$&/")+"/")+se)),U.push(ce)),1;se=0;var G=ne===""?".":ne+":";if(N(F))for(var oe=0;oe{const n=A.useContext(uO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},yV=({client:e,children:n})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(uO.Provider,{value:e,children:n})),xV={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var au,mk,ZM,wV=(ZM=class{constructor(){lt(this,au,xV);lt(this,mk,!1)}setTimeoutProvider(e){Ge(this,au,e)}setTimeout(e,n){return ue(this,au).setTimeout(e,n)}clearTimeout(e){ue(this,au).clearTimeout(e)}setInterval(e,n){return ue(this,au).setInterval(e,n)}clearInterval(e){ue(this,au).clearInterval(e)}},au=new WeakMap,mk=new WeakMap,ZM);const x_=new wV;function kV(e){setTimeout(e,0)}const SV=typeof window>"u"||"Deno"in globalThis;function Us(){}function CV(e,n){return typeof e=="function"?e(n):e}function _O(e){return typeof e=="number"&&e>=0&&e!==1/0}function fO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Lr(e,n){return typeof e=="function"?e(n):e}function F9(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==gk(a,n.options))return!1}else if(!oh(n.queryKey,a))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function H9(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(V_(n.options.mutationKey)!==V_(i))return!1}else if(!oh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function gk(e,n){return((n==null?void 0:n.queryKeyHashFn)||V_)(e)}function V_(e){return JSON.stringify(e,(n,t)=>T4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function oh(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=q9(e)&&q9(n);if(!r&&!(T4(e)&&T4(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 c=0;for(let u=0;u{x_.setTimeout(n,e)})}function A4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?vk(e,n):n}function zV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function jV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const bk=Symbol();function dO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===bk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yk(e,n){return typeof e=="function"?e(...n):!!e}function TV(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 AV=()=>SV;const xk=()=>AV();var lf=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(){}},C_,ou,qd,JM,RV=(JM=class extends lf{constructor(){super();lt(this,C_);lt(this,ou);lt(this,qd);Ge(this,qd,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,ou)||this.setEventListener(ue(this,qd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,ou))==null||n.call(this),Ge(this,ou,void 0))}setEventListener(n){var t;Ge(this,qd,n),(t=ue(this,ou))==null||t.call(this),Ge(this,ou,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,C_)!==n&&(Ge(this,C_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,C_)=="boolean"?ue(this,C_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},C_=new WeakMap,ou=new WeakMap,qd=new WeakMap,JM);const wk=new RV,MV=kV;function OV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=MV;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Nr=OV();var Ud,cu,Gd,eO,DV=(eO=class extends lf{constructor(){super();lt(this,Ud,!0);lt(this,cu);lt(this,Gd);Ge(this,Gd,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,cu)||this.setEventListener(ue(this,Gd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,cu))==null||n.call(this),Ge(this,cu,void 0))}setEventListener(n){var t;Ge(this,Gd,n),(t=ue(this,cu))==null||t.call(this),Ge(this,cu,n(this.setOnline.bind(this)))}setOnline(n){ue(this,Ud)!==n&&(Ge(this,Ud,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,Ud)}},Ud=new WeakMap,cu=new WeakMap,Gd=new WeakMap,eO);const dv=new DV;function LV(e){return Math.min(1e3*2**e,3e4)}function hO(e){return(e??"online")==="online"?dv.isOnline():!0}var hv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function IV(e){return e instanceof hv}function pO(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((w,y)=>{i=w,a=y});o.catch(Us);const c=()=>s!=="pending",u=w=>{var y;if(!c()){const C=new hv(w);k(C),(y=e.onCancel)==null||y.call(e,C)}},h=()=>{n=!0},_=()=>{n=!1},p=()=>wk.isFocused()&&(e.networkMode==="always"||dv.isOnline())&&e.canRun(),m=()=>hO(e.networkMode)&&e.canRun(),x=w=>{c()||(r==null||r(),s="resolved",i(w))},k=w=>{c()||(r==null||r(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;r=C=>{(c()||p())&&w(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,c()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(c())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(x).catch(C=>{var M;if(c())return;const N=e.retry??(xk()?0:3),z=e.retryDelay??LV,T=typeof z=="function"?z(t,C):z,j=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),o)}}var E_,tO,mO=(tO=class{constructor(){lt(this,E_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_O(this.gcTime)&&Ge(this,E_,x_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xk()?1/0:3e5))}clearGcTimeout(){ue(this,E_)!==void 0&&(x_.clearTimeout(ue(this,E_)),Ge(this,E_,void 0))}},E_=new WeakMap,tO);function $V(e){return{onFetch:(n,t)=>{var h,_,p,m,x;const r=n.options,s=(p=(_=(h=n.fetchOptions)==null?void 0:h.meta)==null?void 0:_.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:[]},c=0;const u=async()=>{let k=!1;const v=y=>{TV(y,()=>n.signal,()=>k=!0)},b=dO(n.options,n.fetchOptions),w=async(y,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&y.pages.length)return Promise.resolve(y);const T=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),j=await b(T),{maxPages:M}=n.options,D=N?jV:zV;return{pages:D(y.pages,j,M),pageParams:D(y.pageParams,C,M)}};if(s&&i.length){const y=s==="backward",C=y?BV:G9,N={pages:i,pageParams:a};o=await w(N,C(r,N),y)}else{const y=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:G9(r,o);if(c>0&&C==null)break;o=await w(o,C),c++}while(c{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function G9(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 BV(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 Vd,N_,Kd,Ra,z_,us,rm,j_,Qa,qc,nO,PV=(nO=class extends mO{constructor(n){super();lt(this,Qa);lt(this,Vd);lt(this,N_);lt(this,Kd);lt(this,Ra);lt(this,z_);lt(this,us);lt(this,rm);lt(this,j_);Ge(this,j_,!1),Ge(this,rm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,z_,n.client),Ge(this,Ra,ue(this,z_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,N_,K9(this.options)),this.state=n.state??ue(this,N_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Vd)}get promise(){var n;return(n=ue(this,us))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,rm),...n},n!=null&&n._type&&Ge(this,Vd,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=K9(this.options);t.data!==void 0&&(this.setState(V9(t.data,t.dataUpdatedAt)),Ge(this,N_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Ra).remove(this)}setData(n,t){const r=A4(this.state.data,n,this.options);return It(this,Qa,qc).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){It(this,Qa,qc).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,us))==null?void 0:r.promise;return(s=ue(this,us))==null||s.cancel(n),t?t.then(Us).catch(Us):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,N_)}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===bk||!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:!fO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,us))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,us))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,Ra).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,us)&&(ue(this,j_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,us).cancel({revert:!0}):ue(this,us).cancelRetry()),this.scheduleGc()),ue(this,Ra).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||It(this,Qa,qc).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,_,p,m,x,k,v,b,w,y,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,us))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,us))return ue(this,us).continueRetry(),ue(this,us).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(z=>z.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,j_,!0),r.signal)})},i=()=>{const N=dO(this.options,t),T=(()=>{const j={client:ue(this,z_),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ge(this,j_,!1),this.options.persister?this.options.persister(N,T,this):N(T)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,z_),state:this.state,fetchFn:i};return s(N),N})();(h=ue(this,Vd)==="infinite"?$V(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,Kd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=o.fetchOptions)==null?void 0:_.meta))&&It(this,Qa,qc).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ge(this,us,pO({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof hv&&N.revert&&this.setState({...ue(this,Kd),fetchStatus:"idle"}),r.abort()},onFail:(N,z)=>{It(this,Qa,qc).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{It(this,Qa,qc).call(this,{type:"pause"})},onContinue:()=>{It(this,Qa,qc).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await c.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(x=(m=ue(this,Ra).config).onSuccess)==null||x.call(m,N,this),(v=(k=ue(this,Ra).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof hv){if(N.silent)return ue(this,us).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw It(this,Qa,qc).call(this,{type:"error",error:N}),(w=(b=ue(this,Ra).config).onError)==null||w.call(b,N,this),(C=(y=ue(this,Ra).config).onSettled)==null||C.call(y,this.state.data,N,this),N}finally{ue(this,us)===c&&Ge(this,us,void 0),this.scheduleGc()}}},Vd=new WeakMap,N_=new WeakMap,Kd=new WeakMap,Ra=new WeakMap,z_=new WeakMap,us=new WeakMap,rm=new WeakMap,j_=new WeakMap,Qa=new WeakSet,qc=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,...gO(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...V9(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Kd,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),Nr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,Ra).notify({query:this,type:"updated",action:n})})},nO);function gO(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hO(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function V9(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function K9(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 ii,kn,sm,ai,T_,Wd,Wc,im,Qd,Xd,A_,R_,lu,Yd,Ln,Jp,R4,M4,O4,D4,L4,I4,$4,B4,rO,kk=(rO=class extends lf{constructor(n,t){super();lt(this,Ln);lt(this,ii);lt(this,kn);lt(this,sm);lt(this,ai);lt(this,T_);lt(this,Wd);lt(this,Wc);lt(this,im);lt(this,Qd);lt(this,Xd);lt(this,A_);lt(this,R_);lt(this,lu);lt(this,Yd,new Set);this.options=t,Ge(this,ii,n),Ge(this,Wc,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,kn).addObserver(this),W9(ue(this,kn),this.options)?It(this,Ln,Jp).call(this):this.updateResult(),It(this,Ln,L4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return P4(ue(this,kn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return P4(ue(this,kn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,It(this,Ln,I4).call(this),It(this,Ln,$4).call(this),ue(this,kn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,kn);if(this.options=ue(this,ii).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,ue(this,kn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");It(this,Ln,B4).call(this),ue(this,kn).setOptions(this.options),t._defaulted&&!a0(this.options,t)&&ue(this,ii).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,kn),observer:this});const s=this.hasListeners();s&&Q9(ue(this,kn),r,this.options,t)&&It(this,Ln,Jp).call(this),this.updateResult(),s&&(ue(this,kn)!==r||Lr(this.options.enabled,ue(this,kn))!==Lr(t.enabled,ue(this,kn))||Lr(this.options.staleTime,ue(this,kn))!==Lr(t.staleTime,ue(this,kn)))&&It(this,Ln,M4).call(this);const i=It(this,Ln,O4).call(this);s&&(ue(this,kn)!==r||Lr(this.options.enabled,ue(this,kn))!==Lr(t.enabled,ue(this,kn))||i!==ue(this,lu))&&It(this,Ln,D4).call(this,i)}getOptimisticResult(n){const t=ue(this,ii).getQueryCache().build(ue(this,ii),n),r=this.createResult(t,n);return a0(this.getCurrentResult(),r)||(Ge(this,ai,r),Ge(this,Wd,this.options),Ge(this,T_,ue(this,kn).state)),r}getCurrentResult(){return ue(this,ai)}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,Yd).add(n)}getCurrentQuery(){return ue(this,kn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,ii).defaultQueryOptions(n),r=ue(this,ii).getQueryCache().build(ue(this,ii),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,ii).getQueryCache().subscribe(c=>{c.type==="updated"&&c.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 It(this,Ln,Jp).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ai)))}createResult(n,t){var z;const r=ue(this,kn),s=this.options,i=ue(this,ai),a=ue(this,T_),o=ue(this,Wd),c=n!==r?n.state:ue(this,sm),{state:u}=n;let h={...u},_=!1,p;if(t._optimisticResults){const T=this.hasListeners(),j=!T&&W9(n,t),M=T&&Q9(n,r,t,s);(j||M)&&(h={...h,...gO(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:k}=h;p=h.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let T;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(T=i.data,v=!0):T=typeof t.placeholderData=="function"?t.placeholderData((z=ue(this,Xd))==null?void 0:z.state.data,ue(this,Xd)):t.placeholderData,T!==void 0&&(k="success",p=A4(i==null?void 0:i.data,T,t),_=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,im))p=ue(this,Qd);else try{Ge(this,im,t.select),p=t.select(p),p=A4(i==null?void 0:i.data,p,t),Ge(this,Qd,p),Ge(this,Wc,null)}catch(T){Ge(this,Wc,T)}else p===void 0&&Ge(this,Wc,null);ue(this,Wc)&&(m=ue(this,Wc),p=ue(this,Qd),x=Date.now(),k="error",_=!1);const b=h.fetchStatus==="fetching",w=k==="pending",y=k==="error",C=w&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:w,isSuccess:k==="success",isError:y,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&N,isStale:Sk(n,t),refetch:this.refetch,isEnabled:Lr(t.enabled,n)!==!1}}updateResult(){const n=ue(this,ai),t=this.createResult(ue(this,kn),this.options);if(Ge(this,T_,ue(this,kn).state),Ge(this,Wd,this.options),ue(this,T_).data!==void 0&&Ge(this,Xd,ue(this,kn)),a0(t,n))return;Ge(this,ai,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Yd).size)return!0;const o=new Set(a??ue(this,Yd));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,ai)).some(c=>{const u=c;return ue(this,ai)[u]!==n[u]&&o.has(u)})})();Nr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,ai))}),ue(this,ii).getQueryCache().notify({query:ue(this,kn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&It(this,Ln,L4).call(this)}},ii=new WeakMap,kn=new WeakMap,sm=new WeakMap,ai=new WeakMap,T_=new WeakMap,Wd=new WeakMap,Wc=new WeakMap,im=new WeakMap,Qd=new WeakMap,Xd=new WeakMap,A_=new WeakMap,R_=new WeakMap,lu=new WeakMap,Yd=new WeakMap,Ln=new WeakSet,Jp=function(n){It(this,Ln,B4).call(this);let t=ue(this,kn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Us)),t},R4=function(n){return!xk()&&Lr(this.options.enabled,ue(this,kn))!==!1&&_O(n)},M4=function(){It(this,Ln,I4).call(this);const n=Lr(this.options.staleTime,ue(this,kn));if(ue(this,ai).isStale||!It(this,Ln,R4).call(this,n))return;const t=fO(ue(this,ai).dataUpdatedAt,n)+1;Ge(this,A_,x_.setTimeout(()=>{ue(this,ai).isStale||this.updateResult()},t))},O4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,kn)):this.options.refetchInterval)??!1},D4=function(n){It(this,Ln,$4).call(this),Ge(this,lu,n),!(ue(this,lu)===0||!It(this,Ln,R4).call(this,ue(this,lu)))&&Ge(this,R_,x_.setInterval(()=>{(this.options.refetchIntervalInBackground||wk.isFocused())&&It(this,Ln,Jp).call(this)},ue(this,lu)))},L4=function(){It(this,Ln,M4).call(this),It(this,Ln,D4).call(this,It(this,Ln,O4).call(this))},I4=function(){ue(this,A_)!==void 0&&(x_.clearTimeout(ue(this,A_)),Ge(this,A_,void 0))},$4=function(){ue(this,R_)!==void 0&&(x_.clearInterval(ue(this,R_)),Ge(this,R_,void 0))},B4=function(){const n=ue(this,ii).getQueryCache().build(ue(this,ii),this.options);if(n===ue(this,kn))return;const t=ue(this,kn);Ge(this,kn,n),Ge(this,sm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},rO);function FV(e,n){return Lr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Lr(n.retryOnMount,e)===!1)}function W9(e,n){return FV(e,n)||e.state.data!==void 0&&P4(e,n,n.refetchOnMount)}function P4(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&&Sk(e,n)}return!1}function Q9(e,n,t,r){return(e!==n||Lr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&Sk(e,t)}function Sk(e,n){return Lr(n.enabled,e)!==!1&&e.isStaleByTime(Lr(n.staleTime,e))}var am,Po,Fs,M_,Fo,tu,sO,HV=(sO=class extends mO{constructor(n){super();lt(this,Fo);lt(this,am);lt(this,Po);lt(this,Fs);lt(this,M_);Ge(this,am,n.client),this.mutationId=n.mutationId,Ge(this,Fs,n.mutationCache),Ge(this,Po,[]),this.state=n.state||vO(),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,Po).includes(n)||(ue(this,Po).push(n),this.clearGcTimeout(),ue(this,Fs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Po,ue(this,Po).filter(t=>t!==n)),this.scheduleGc(),ue(this,Fs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,Po).length||(this.state.status==="pending"?this.scheduleGc():ue(this,Fs).remove(this))}continue(){var n;return((n=ue(this,M_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,_,p,m,x,k,v,b,w,y,C,N,z,T,j;const t=()=>{It(this,Fo,tu).call(this,{type:"continue"})},r={client:ue(this,am),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,M_,pO({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{It(this,Fo,tu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{It(this,Fo,tu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,Fs).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{It(this,Fo,tu).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,Fs).config.onMutate&&await ue(this,Fs).config.onMutate(n,this,r);const D=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,n,r));D!==this.state.context&&It(this,Fo,tu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=ue(this,Fs).config).onSuccess)==null?void 0:h.call(u,M,n,this.state.context,this,r)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,n,this.state.context,r)),await((x=(m=ue(this,Fs).config).onSettled)==null?void 0:x.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),It(this,Fo,tu).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,Fs).config).onError)==null?void 0:w.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(y=this.options).onError)==null?void 0:C.call(y,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((z=(N=ue(this,Fs).config).onSettled)==null?void 0:z.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(T=this.options).onSettled)==null?void 0:j.call(T,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw It(this,Fo,tu).call(this,{type:"error",error:M}),M}finally{ue(this,M_)===s&&Ge(this,M_,void 0),ue(this,Fs).runNext(this)}}},am=new WeakMap,Po=new WeakMap,Fs=new WeakMap,M_=new WeakMap,Fo=new WeakSet,tu=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),Nr.batch(()=>{ue(this,Po).forEach(r=>{r.onMutationUpdate(n)}),ue(this,Fs).notify({mutation:this,type:"updated",action:n})})},sO);function vO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qc,Xa,om,iO,qV=(iO=class extends lf{constructor(n={}){super();lt(this,Qc);lt(this,Xa);lt(this,om);this.config=n,Ge(this,Qc,new Set),Ge(this,Xa,new Map),Ge(this,om,0)}build(n,t,r){const s=new HV({client:n,mutationCache:this,mutationId:++Rp(this,om)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,Qc).add(n);const t=Ug(n);if(typeof t=="string"){const r=ue(this,Xa).get(t);r?r.push(n):ue(this,Xa).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,Qc).delete(n)){const t=Ug(n);if(typeof t=="string"){const r=ue(this,Xa).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,Xa).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Ug(n);if(typeof t=="string"){const s=(r=ue(this,Xa).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=Ug(n);return typeof t=="string"?((s=(r=ue(this,Xa).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Nr.batch(()=>{ue(this,Qc).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,Qc).clear(),ue(this,Xa).clear()})}getAll(){return Array.from(ue(this,Qc))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>H9(t,r))}findAll(n={}){return this.getAll().filter(t=>H9(n,t))}notify(n){Nr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Nr.batch(()=>Promise.all(n.map(t=>t.continue().catch(Us))))}},Qc=new WeakMap,Xa=new WeakMap,om=new WeakMap,iO);function Ug(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Xc,uu,Hs,Yc,Ko,e0,F4,aO,UV=(aO=class extends lf{constructor(t,r){super();lt(this,Ko);lt(this,Xc);lt(this,uu);lt(this,Hs);lt(this,Yc);Ge(this,Xc,t),this.setOptions(r),this.bindMethods(),It(this,Ko,e0).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,Xc).defaultMutationOptions(t),a0(this.options,r)||ue(this,Xc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Hs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&V_(r.mutationKey)!==V_(this.options.mutationKey)?this.reset():((s=ue(this,Hs))==null?void 0:s.state.status)==="pending"&&ue(this,Hs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,Hs)&&(ue(this,Hs).addObserver(this),It(this,Ko,e0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,Hs))==null||t.removeObserver(this)}onMutationUpdate(t){It(this,Ko,e0).call(this),It(this,Ko,F4).call(this,t)}getCurrentResult(){return ue(this,uu)}reset(){var t;(t=ue(this,Hs))==null||t.removeObserver(this),Ge(this,Hs,void 0),It(this,Ko,e0).call(this),It(this,Ko,F4).call(this)}mutate(t,r){var s;return Ge(this,Yc,r),(s=ue(this,Hs))==null||s.removeObserver(this),Ge(this,Hs,ue(this,Xc).getMutationCache().build(ue(this,Xc),this.options)),ue(this,Hs).addObserver(this),ue(this,Hs).execute(t)}},Xc=new WeakMap,uu=new WeakMap,Hs=new WeakMap,Yc=new WeakMap,Ko=new WeakSet,e0=function(){var r;const t=((r=ue(this,Hs))==null?void 0:r.state)??vO();Ge(this,uu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},F4=function(t){Nr.batch(()=>{var r,s,i,a,o,c,u,h;if(ue(this,Yc)&&this.hasListeners()){const _=ue(this,uu).variables,p=ue(this,uu).context,m={client:ue(this,Xc),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Yc)).onSuccess)==null||s.call(r,t.data,_,p,m)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Yc)).onSettled)==null||a.call(i,t.data,null,_,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(c=(o=ue(this,Yc)).onError)==null||c.call(o,t.error,_,p,m)}catch(x){Promise.reject(x)}try{(h=(u=ue(this,Yc)).onSettled)==null||h.call(u,void 0,t.error,_,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(_=>{_(ue(this,uu))})})},aO);function X9(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Zd,oi,Jd,O_,Ui,D_,cm,lm,um,_m,hs,H4,q4,bO,U4,G4,V4,oO,GV=(oO=class extends lf{constructor(n,t,r){super();lt(this,hs);lt(this,Zd);lt(this,oi);lt(this,Jd);lt(this,O_);lt(this,Ui);lt(this,D_);lt(this,cm);lt(this,lm);lt(this,um);lt(this,_m,[]);Ge(this,Zd,n),Ge(this,O_,r),Ge(this,Jd,[]),Ge(this,Ui,[]),Ge(this,oi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Ui).forEach(n=>{n.subscribe(t=>{It(this,hs,G4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Ui).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,Jd,n),Ge(this,O_,t),Nr.batch(()=>{const r=ue(this,Ui),s=It(this,hs,U4).call(this,ue(this,Jd));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const i=s.map(_=>_.observer),a=i.map(_=>_.getCurrentResult()),o=r.length!==i.length,c=i.some((_,p)=>_!==r[p]),u=o||c,h=u?!0:a.some((_,p)=>{const m=ue(this,oi)[p];return!m||!a0(_,m)});!u&&!h||(u&&(Ge(this,_m,s),Ge(this,Ui,i)),Ge(this,oi,a),this.hasListeners()&&(u&&(X9(r,i).forEach(_=>{_.destroy()}),X9(i,r).forEach(_=>{_.subscribe(p=>{It(this,hs,G4).call(this,_,p)})})),It(this,hs,V4).call(this)))})}getCurrentResult(){return ue(this,oi)}getQueries(){return ue(this,Ui).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Ui)}getOptimisticResult(n,t){const r=It(this,hs,U4).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>It(this,hs,q4).call(this,a??s,t,i),()=>It(this,hs,H4).call(this,s,r)]}},Zd=new WeakMap,oi=new WeakMap,Jd=new WeakMap,O_=new WeakMap,Ui=new WeakMap,D_=new WeakMap,cm=new WeakMap,lm=new WeakMap,um=new WeakMap,_m=new WeakMap,hs=new WeakSet,H4=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(c=>{c.observer.trackProp(o)}))})})},q4=function(n,t,r){if(t){const s=ue(this,um),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,oi)!==ue(this,lm)||i||t!==ue(this,cm))&&(Ge(this,cm,t),Ge(this,lm,ue(this,oi)),r!==void 0&&Ge(this,um,r),Ge(this,D_,vk(ue(this,D_),t(n)))),ue(this,D_)}return n},bO=function(){var n;return!((n=ue(this,O_))!=null&&n.combine)||ue(this,Ui).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,oi)[r])==null?void 0:s.data)===void 0})},U4=function(n){const t=new Map;ue(this,Ui).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,Zd).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new kk(ue(this,Zd),i);r.push({defaultedQueryOptions:i,observer:a})}),r},G4=function(n,t){const r=ue(this,Ui).indexOf(n);r!==-1&&(Ge(this,oi,ue(this,oi).slice()),ue(this,oi)[r]=t,It(this,hs,V4).call(this))},V4=function(){var n;if(this.hasListeners()){const t=It(this,hs,bO).call(this),r=ue(this,D_),s=t?r:It(this,hs,q4).call(this,It(this,hs,H4).call(this,ue(this,oi),ue(this,_m)),(n=ue(this,O_))==null?void 0:n.combine);(t||r!==s)&&Nr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,oi))})})}},oO),Ho,cO,VV=(cO=class extends lf{constructor(n={}){super();lt(this,Ho);this.config=n,Ge(this,Ho,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??gk(s,t);let a=this.get(i);return a||(a=new PV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Ho).has(n.queryHash)||(ue(this,Ho).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Ho).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Ho).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Nr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Ho).get(n)}getAll(){return[...ue(this,Ho).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>F9(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>F9(n,r)):t}notify(n){Nr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Nr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Nr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Ho=new WeakMap,cO),Cr,_u,fu,eh,th,du,nh,rh,lO,KV=(lO=class{constructor(e={}){lt(this,Cr);lt(this,_u);lt(this,fu);lt(this,eh);lt(this,th);lt(this,du);lt(this,nh);lt(this,rh);Ge(this,Cr,e.queryCache||new VV),Ge(this,_u,e.mutationCache||new qV),Ge(this,fu,e.defaultOptions||{}),Ge(this,eh,new Map),Ge(this,th,new Map),Ge(this,du,0)}mount(){Rp(this,du)._++,ue(this,du)===1&&(Ge(this,nh,wk.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Cr).onFocus())})),Ge(this,rh,dv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Cr).onOnline())})))}unmount(){var e,n;Rp(this,du)._--,ue(this,du)===0&&((e=ue(this,nh))==null||e.call(this),Ge(this,nh,void 0),(n=ue(this,rh))==null||n.call(this),Ge(this,rh,void 0))}isFetching(e){return ue(this,Cr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,_u).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Cr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Cr).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 ue(this,Cr).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,Cr).get(r.queryHash))==null?void 0:a.state.data,i=CV(n,s);if(i!==void 0)return ue(this,Cr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Nr.batch(()=>ue(this,Cr).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,Cr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Cr);Nr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Cr);return Nr.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=Nr.batch(()=>ue(this,Cr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Us).catch(Us)}invalidateQueries(e,n={}){return Nr.batch(()=>(ue(this,Cr).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=Nr.batch(()=>ue(this,Cr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Us)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Us)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Cr).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=ue(this,Cr).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(Us).catch(Us)}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(Us).catch(Us)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return dv.isOnline()?ue(this,_u).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Cr)}getMutationCache(){return ue(this,_u)}getDefaultOptions(){return ue(this,fu)}setDefaultOptions(e){Ge(this,fu,e)}setQueryDefaults(e,n){ue(this,eh).set(V_(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,eh).values()],t={};return n.forEach(r=>{oh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,th).set(V_(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,th).values()],t={};return n.forEach(r=>{oh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,fu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=gk(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===bk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,fu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Cr).clear(),ue(this,_u).clear()}},Cr=new WeakMap,_u=new WeakMap,fu=new WeakMap,eh=new WeakMap,th=new WeakMap,du=new WeakMap,nh=new WeakMap,rh=new WeakMap,lO);const yO=A.createContext(!1),xO=()=>A.useContext(yO);yO.Provider;function WV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const QV=A.createContext(WV()),wO=()=>A.useContext(QV),kO=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?yk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},SO=e=>{A.useEffect(()=>{e.clearReset()},[e])},CO=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||yk(t,[e.error,r])),EO=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))}},K4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,NO=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function XV({queries:e,...n},t){const r=bm(),s=xO(),i=wO(),a=n.subscribed!==!1,o=A.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{EO(k);const v=r.getQueryCache().get(k.queryHash);kO(k,i,v)}),SO(i);const[c]=A.useState(()=>new GV(r,o,n)),[u,h,_]=c.getOptimisticResult(o,n.combine),p=!s&&a;A.useSyncExternalStore(A.useCallback(k=>p?c.subscribe(Nr.batchCalls(k)):Us,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>K4(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&K4(b,k)){const w=new kk(r,b);return NO(b,w,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((k,v)=>{const b=o[v];return b&&CO({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(x)throw x.error;return h(_())}function YV(e,n,t){const r=xO(),s=wO(),i=bm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,EO(a),kO(a,s,o),SO(s);const[u]=A.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),_=!r&&c;if(A.useSyncExternalStore(A.useCallback(p=>{const m=_?u.subscribe(Nr.batchCalls(p)):Us;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),A.useEffect(()=>{u.setOptions(a)},[a,u]),K4(a,h))throw NO(a,u,s);if(CO({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ut(e,n){return YV(e,kk)}function ZV(e,n){const t=bm(),r=t.getQueryCache();return A.useSyncExternalStore(A.useCallback(s=>r.subscribe(Nr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function an(e,n){const t=bm(),[r]=A.useState(()=>new UV(t,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const s=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Nr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Us)},[r]);if(s.error&&yk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const nt=new KV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),ll=new Set;let Y9=null,yb=0;const W4=new Set,JV=()=>yb,Z9=e=>(W4.add(e),()=>{W4.delete(e)}),Ia=()=>["workspace",yb],St=(e,...n)=>[...Ia(),e,...n];function eK(e,n=!1){if(Y9===e&&!n)return!1;const t=Ia();return Y9=e,yb++,ll.clear(),Ck({queryKey:t}),W4.forEach(r=>r()),!0}const Rn=e=>e[1]===yb;async function Ck(e){await nt.cancelQueries(e,{revert:!1}),nt.removeQueries(e)}function Vr(e,n){if(Rn(e))return nt.setQueryData(e,n)}var M2={exports:{}},Op={},O2={exports:{}},D2={};/** + */var B9;function yV(){if(B9)return Zt;B9=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"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(F,U,K){this.props=F,this.context=U,this.refs=v,this.updater=K||x}b.prototype.isReactComponent={},b.prototype.setState=function(F,U){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,U,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,U,K){this.props=F,this.context=U,this.refs=v,this.updater=K||x}var C=y.prototype=new w;C.constructor=y,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function z(){}var T={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,U,K){var ne=K.ref;return{$$typeof:e,type:F,key:U,ref:ne!==void 0?ne:null,props:K}}function D(F,U){return M(F.type,U,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function $(F){var U={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(K){return U[K]})}var q=/\/+/g;function H(F,U){return typeof F=="object"&&F!==null&&F.key!=null?$(""+F.key):U.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(z,z):(F.status="pending",F.then(function(U){F.status==="pending"&&(F.status="fulfilled",F.value=U)},function(U){F.status==="pending"&&(F.status="rejected",F.reason=U)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function V(F,U,K,ne,ce){var _e=typeof F;(_e==="undefined"||_e==="boolean")&&(F=null);var se=!1;if(F===null)se=!0;else switch(_e){case"bigint":case"string":case"number":se=!0;break;case"object":switch(F.$$typeof){case e:case n:se=!0;break;case h:return se=F._init,V(se(F._payload),U,K,ne,ce)}}if(se)return ce=ce(F),se=ne===""?"."+H(F,0):ne,N(ce)?(K="",se!=null&&(K=se.replace(q,"$&/")+"/"),V(ce,U,K,"",function(le){return le})):ce!=null&&(I(ce)&&(ce=D(ce,K+(ce.key==null||F&&F.key===ce.key?"":(""+ce.key).replace(q,"$&/")+"/")+se)),U.push(ce)),1;se=0;var G=ne===""?".":ne+":";if(N(F))for(var oe=0;oe{const n=A.useContext(_O);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},xV=({client:e,children:n})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(_O.Provider,{value:e,children:n})),wV={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var au,mk,JM,kV=(JM=class{constructor(){lt(this,au,wV);lt(this,mk,!1)}setTimeoutProvider(e){Ue(this,au,e)}setTimeout(e,n){return ue(this,au).setTimeout(e,n)}clearTimeout(e){ue(this,au).clearTimeout(e)}setInterval(e,n){return ue(this,au).setInterval(e,n)}clearInterval(e){ue(this,au).clearInterval(e)}},au=new WeakMap,mk=new WeakMap,JM);const x_=new kV;function SV(e){setTimeout(e,0)}const CV=typeof window>"u"||"Deno"in globalThis;function Vs(){}function EV(e,n){return typeof e=="function"?e(n):e}function fO(e){return typeof e=="number"&&e>=0&&e!==1/0}function dO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Hr(e,n){return typeof e=="function"?e(n):e}function F9(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==gk(a,n.options))return!1}else if(!lh(n.queryKey,a))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function H9(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(V_(n.options.mutationKey)!==V_(i))return!1}else if(!lh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function gk(e,n){return((n==null?void 0:n.queryKeyHashFn)||V_)(e)}function V_(e){return JSON.stringify(e,(n,t)=>T4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function lh(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=q9(e)&&q9(n);if(!r&&!(T4(e)&&T4(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 c=0;for(let u=0;u{x_.setTimeout(n,e)})}function A4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?vk(e,n):n}function jV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function TV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const bk=Symbol();function hO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===bk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yk(e,n){return typeof e=="function"?e(...n):!!e}function AV(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 RV=()=>CV;const xk=()=>RV();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(){}},C_,ou,Gd,eO,MV=(eO=class extends uf{constructor(){super();lt(this,C_);lt(this,ou);lt(this,Gd);Ue(this,Gd,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,ou)||this.setEventListener(ue(this,Gd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,ou))==null||n.call(this),Ue(this,ou,void 0))}setEventListener(n){var t;Ue(this,Gd,n),(t=ue(this,ou))==null||t.call(this),Ue(this,ou,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,C_)!==n&&(Ue(this,C_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,C_)=="boolean"?ue(this,C_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},C_=new WeakMap,ou=new WeakMap,Gd=new WeakMap,eO);const wk=new MV,OV=SV;function DV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=OV;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Mr=DV();var Vd,cu,Kd,tO,LV=(tO=class extends uf{constructor(){super();lt(this,Vd,!0);lt(this,cu);lt(this,Kd);Ue(this,Kd,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,cu)||this.setEventListener(ue(this,Kd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,cu))==null||n.call(this),Ue(this,cu,void 0))}setEventListener(n){var t;Ue(this,Kd,n),(t=ue(this,cu))==null||t.call(this),Ue(this,cu,n(this.setOnline.bind(this)))}setOnline(n){ue(this,Vd)!==n&&(Ue(this,Vd,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,Vd)}},Vd=new WeakMap,cu=new WeakMap,Kd=new WeakMap,tO);const dv=new LV;function IV(e){return Math.min(1e3*2**e,3e4)}function pO(e){return(e??"online")==="online"?dv.isOnline():!0}var hv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $V(e){return e instanceof hv}function mO(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((w,y)=>{i=w,a=y});o.catch(Vs);const c=()=>s!=="pending",u=w=>{var y;if(!c()){const C=new hv(w);k(C),(y=e.onCancel)==null||y.call(e,C)}},h=()=>{n=!0},_=()=>{n=!1},p=()=>wk.isFocused()&&(e.networkMode==="always"||dv.isOnline())&&e.canRun(),m=()=>pO(e.networkMode)&&e.canRun(),x=w=>{c()||(r==null||r(),s="resolved",i(w))},k=w=>{c()||(r==null||r(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;r=C=>{(c()||p())&&w(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,c()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(c())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(x).catch(C=>{var M;if(c())return;const N=e.retry??(xk()?0:3),z=e.retryDelay??IV,T=typeof z=="function"?z(t,C):z,j=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),o)}}var E_,nO,gO=(nO=class{constructor(){lt(this,E_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fO(this.gcTime)&&Ue(this,E_,x_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xk()?1/0:3e5))}clearGcTimeout(){ue(this,E_)!==void 0&&(x_.clearTimeout(ue(this,E_)),Ue(this,E_,void 0))}},E_=new WeakMap,nO);function BV(e){return{onFetch:(n,t)=>{var h,_,p,m,x;const r=n.options,s=(p=(_=(h=n.fetchOptions)==null?void 0:h.meta)==null?void 0:_.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:[]},c=0;const u=async()=>{let k=!1;const v=y=>{AV(y,()=>n.signal,()=>k=!0)},b=hO(n.options,n.fetchOptions),w=async(y,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&y.pages.length)return Promise.resolve(y);const T=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),j=await b(T),{maxPages:M}=n.options,D=N?TV:jV;return{pages:D(y.pages,j,M),pageParams:D(y.pageParams,C,M)}};if(s&&i.length){const y=s==="backward",C=y?PV:G9,N={pages:i,pageParams:a};o=await w(N,C(r,N),y)}else{const y=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:G9(r,o);if(c>0&&C==null)break;o=await w(o,C),c++}while(c{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function G9(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 PV(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 Wd,N_,Qd,Ra,z_,ps,rm,j_,Qa,qc,rO,FV=(rO=class extends gO{constructor(n){super();lt(this,Qa);lt(this,Wd);lt(this,N_);lt(this,Qd);lt(this,Ra);lt(this,z_);lt(this,ps);lt(this,rm);lt(this,j_);Ue(this,j_,!1),Ue(this,rm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ue(this,z_,n.client),Ue(this,Ra,ue(this,z_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ue(this,N_,K9(this.options)),this.state=n.state??ue(this,N_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Wd)}get promise(){var n;return(n=ue(this,ps))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,rm),...n},n!=null&&n._type&&Ue(this,Wd,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=K9(this.options);t.data!==void 0&&(this.setState(V9(t.data,t.dataUpdatedAt)),Ue(this,N_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Ra).remove(this)}setData(n,t){const r=A4(this.state.data,n,this.options);return Bt(this,Qa,qc).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Bt(this,Qa,qc).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,ps))==null?void 0:r.promise;return(s=ue(this,ps))==null||s.cancel(n),t?t.then(Vs).catch(Vs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,N_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Hr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bk||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Hr(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:!dO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,ps))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,ps))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,Ra).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,ps)&&(ue(this,j_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,ps).cancel({revert:!0}):ue(this,ps).cancelRetry()),this.scheduleGc()),ue(this,Ra).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Bt(this,Qa,qc).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,_,p,m,x,k,v,b,w,y,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,ps))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,ps))return ue(this,ps).continueRetry(),ue(this,ps).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(z=>z.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ue(this,j_,!0),r.signal)})},i=()=>{const N=hO(this.options,t),T=(()=>{const j={client:ue(this,z_),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ue(this,j_,!1),this.options.persister?this.options.persister(N,T,this):N(T)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,z_),state:this.state,fetchFn:i};return s(N),N})();(h=ue(this,Wd)==="infinite"?BV(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ue(this,Qd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=o.fetchOptions)==null?void 0:_.meta))&&Bt(this,Qa,qc).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ue(this,ps,mO({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof hv&&N.revert&&this.setState({...ue(this,Qd),fetchStatus:"idle"}),r.abort()},onFail:(N,z)=>{Bt(this,Qa,qc).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{Bt(this,Qa,qc).call(this,{type:"pause"})},onContinue:()=>{Bt(this,Qa,qc).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await c.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(x=(m=ue(this,Ra).config).onSuccess)==null||x.call(m,N,this),(v=(k=ue(this,Ra).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof hv){if(N.silent)return ue(this,ps).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Bt(this,Qa,qc).call(this,{type:"error",error:N}),(w=(b=ue(this,Ra).config).onError)==null||w.call(b,N,this),(C=(y=ue(this,Ra).config).onSettled)==null||C.call(y,this.state.data,N,this),N}finally{ue(this,ps)===c&&Ue(this,ps,void 0),this.scheduleGc()}}},Wd=new WeakMap,N_=new WeakMap,Qd=new WeakMap,Ra=new WeakMap,z_=new WeakMap,ps=new WeakMap,rm=new WeakMap,j_=new WeakMap,Qa=new WeakSet,qc=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,...vO(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...V9(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ue(this,Qd,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),Mr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,Ra).notify({query:this,type:"updated",action:n})})},rO);function vO(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pO(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function V9(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function K9(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 ai,Sn,sm,oi,T_,Xd,Wc,im,Yd,Zd,A_,R_,lu,Jd,Dn,e0,R4,M4,O4,D4,L4,I4,$4,B4,sO,kk=(sO=class extends uf{constructor(n,t){super();lt(this,Dn);lt(this,ai);lt(this,Sn);lt(this,sm);lt(this,oi);lt(this,T_);lt(this,Xd);lt(this,Wc);lt(this,im);lt(this,Yd);lt(this,Zd);lt(this,A_);lt(this,R_);lt(this,lu);lt(this,Jd,new Set);this.options=t,Ue(this,ai,n),Ue(this,Wc,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Sn).addObserver(this),W9(ue(this,Sn),this.options)?Bt(this,Dn,e0).call(this):this.updateResult(),Bt(this,Dn,L4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return P4(ue(this,Sn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return P4(ue(this,Sn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Bt(this,Dn,I4).call(this),Bt(this,Dn,$4).call(this),ue(this,Sn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Sn);if(this.options=ue(this,ai).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hr(this.options.enabled,ue(this,Sn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Bt(this,Dn,B4).call(this),ue(this,Sn).setOptions(this.options),t._defaulted&&!o0(this.options,t)&&ue(this,ai).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Sn),observer:this});const s=this.hasListeners();s&&Q9(ue(this,Sn),r,this.options,t)&&Bt(this,Dn,e0).call(this),this.updateResult(),s&&(ue(this,Sn)!==r||Hr(this.options.enabled,ue(this,Sn))!==Hr(t.enabled,ue(this,Sn))||Hr(this.options.staleTime,ue(this,Sn))!==Hr(t.staleTime,ue(this,Sn)))&&Bt(this,Dn,M4).call(this);const i=Bt(this,Dn,O4).call(this);s&&(ue(this,Sn)!==r||Hr(this.options.enabled,ue(this,Sn))!==Hr(t.enabled,ue(this,Sn))||i!==ue(this,lu))&&Bt(this,Dn,D4).call(this,i)}getOptimisticResult(n){const t=ue(this,ai).getQueryCache().build(ue(this,ai),n),r=this.createResult(t,n);return o0(this.getCurrentResult(),r)||(Ue(this,oi,r),Ue(this,Xd,this.options),Ue(this,T_,ue(this,Sn).state)),r}getCurrentResult(){return ue(this,oi)}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,Jd).add(n)}getCurrentQuery(){return ue(this,Sn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,ai).defaultQueryOptions(n),r=ue(this,ai).getQueryCache().build(ue(this,ai),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,ai).getQueryCache().subscribe(c=>{c.type==="updated"&&c.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 Bt(this,Dn,e0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,oi)))}createResult(n,t){var z;const r=ue(this,Sn),s=this.options,i=ue(this,oi),a=ue(this,T_),o=ue(this,Xd),c=n!==r?n.state:ue(this,sm),{state:u}=n;let h={...u},_=!1,p;if(t._optimisticResults){const T=this.hasListeners(),j=!T&&W9(n,t),M=T&&Q9(n,r,t,s);(j||M)&&(h={...h,...vO(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:k}=h;p=h.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let T;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(T=i.data,v=!0):T=typeof t.placeholderData=="function"?t.placeholderData((z=ue(this,Zd))==null?void 0:z.state.data,ue(this,Zd)):t.placeholderData,T!==void 0&&(k="success",p=A4(i==null?void 0:i.data,T,t),_=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,im))p=ue(this,Yd);else try{Ue(this,im,t.select),p=t.select(p),p=A4(i==null?void 0:i.data,p,t),Ue(this,Yd,p),Ue(this,Wc,null)}catch(T){Ue(this,Wc,T)}else p===void 0&&Ue(this,Wc,null);ue(this,Wc)&&(m=ue(this,Wc),p=ue(this,Yd),x=Date.now(),k="error",_=!1);const b=h.fetchStatus==="fetching",w=k==="pending",y=k==="error",C=w&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:w,isSuccess:k==="success",isError:y,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&N,isStale:Sk(n,t),refetch:this.refetch,isEnabled:Hr(t.enabled,n)!==!1}}updateResult(){const n=ue(this,oi),t=this.createResult(ue(this,Sn),this.options);if(Ue(this,T_,ue(this,Sn).state),Ue(this,Xd,this.options),ue(this,T_).data!==void 0&&Ue(this,Zd,ue(this,Sn)),o0(t,n))return;Ue(this,oi,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Jd).size)return!0;const o=new Set(a??ue(this,Jd));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,oi)).some(c=>{const u=c;return ue(this,oi)[u]!==n[u]&&o.has(u)})})();Mr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,oi))}),ue(this,ai).getQueryCache().notify({query:ue(this,Sn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Bt(this,Dn,L4).call(this)}},ai=new WeakMap,Sn=new WeakMap,sm=new WeakMap,oi=new WeakMap,T_=new WeakMap,Xd=new WeakMap,Wc=new WeakMap,im=new WeakMap,Yd=new WeakMap,Zd=new WeakMap,A_=new WeakMap,R_=new WeakMap,lu=new WeakMap,Jd=new WeakMap,Dn=new WeakSet,e0=function(n){Bt(this,Dn,B4).call(this);let t=ue(this,Sn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Vs)),t},R4=function(n){return!xk()&&Hr(this.options.enabled,ue(this,Sn))!==!1&&fO(n)},M4=function(){Bt(this,Dn,I4).call(this);const n=Hr(this.options.staleTime,ue(this,Sn));if(ue(this,oi).isStale||!Bt(this,Dn,R4).call(this,n))return;const t=dO(ue(this,oi).dataUpdatedAt,n)+1;Ue(this,A_,x_.setTimeout(()=>{ue(this,oi).isStale||this.updateResult()},t))},O4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Sn)):this.options.refetchInterval)??!1},D4=function(n){Bt(this,Dn,$4).call(this),Ue(this,lu,n),!(ue(this,lu)===0||!Bt(this,Dn,R4).call(this,ue(this,lu)))&&Ue(this,R_,x_.setInterval(()=>{(this.options.refetchIntervalInBackground||wk.isFocused())&&Bt(this,Dn,e0).call(this)},ue(this,lu)))},L4=function(){Bt(this,Dn,M4).call(this),Bt(this,Dn,D4).call(this,Bt(this,Dn,O4).call(this))},I4=function(){ue(this,A_)!==void 0&&(x_.clearTimeout(ue(this,A_)),Ue(this,A_,void 0))},$4=function(){ue(this,R_)!==void 0&&(x_.clearInterval(ue(this,R_)),Ue(this,R_,void 0))},B4=function(){const n=ue(this,ai).getQueryCache().build(ue(this,ai),this.options);if(n===ue(this,Sn))return;const t=ue(this,Sn);Ue(this,Sn,n),Ue(this,sm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},sO);function HV(e,n){return Hr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Hr(n.retryOnMount,e)===!1)}function W9(e,n){return HV(e,n)||e.state.data!==void 0&&P4(e,n,n.refetchOnMount)}function P4(e,n,t){if(Hr(n.enabled,e)!==!1&&Hr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&Sk(e,n)}return!1}function Q9(e,n,t,r){return(e!==n||Hr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&Sk(e,t)}function Sk(e,n){return Hr(n.enabled,e)!==!1&&e.isStaleByTime(Hr(n.staleTime,e))}var am,Po,qs,M_,Fo,tu,iO,qV=(iO=class extends gO{constructor(n){super();lt(this,Fo);lt(this,am);lt(this,Po);lt(this,qs);lt(this,M_);Ue(this,am,n.client),this.mutationId=n.mutationId,Ue(this,qs,n.mutationCache),Ue(this,Po,[]),this.state=n.state||bO(),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,Po).includes(n)||(ue(this,Po).push(n),this.clearGcTimeout(),ue(this,qs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ue(this,Po,ue(this,Po).filter(t=>t!==n)),this.scheduleGc(),ue(this,qs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,Po).length||(this.state.status==="pending"?this.scheduleGc():ue(this,qs).remove(this))}continue(){var n;return((n=ue(this,M_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,_,p,m,x,k,v,b,w,y,C,N,z,T,j;const t=()=>{Bt(this,Fo,tu).call(this,{type:"continue"})},r={client:ue(this,am),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ue(this,M_,mO({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Bt(this,Fo,tu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Bt(this,Fo,tu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,qs).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Bt(this,Fo,tu).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,qs).config.onMutate&&await ue(this,qs).config.onMutate(n,this,r);const D=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,n,r));D!==this.state.context&&Bt(this,Fo,tu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=ue(this,qs).config).onSuccess)==null?void 0:h.call(u,M,n,this.state.context,this,r)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,n,this.state.context,r)),await((x=(m=ue(this,qs).config).onSettled)==null?void 0:x.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),Bt(this,Fo,tu).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,qs).config).onError)==null?void 0:w.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(y=this.options).onError)==null?void 0:C.call(y,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((z=(N=ue(this,qs).config).onSettled)==null?void 0:z.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(T=this.options).onSettled)==null?void 0:j.call(T,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Bt(this,Fo,tu).call(this,{type:"error",error:M}),M}finally{ue(this,M_)===s&&Ue(this,M_,void 0),ue(this,qs).runNext(this)}}},am=new WeakMap,Po=new WeakMap,qs=new WeakMap,M_=new WeakMap,Fo=new WeakSet,tu=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),Mr.batch(()=>{ue(this,Po).forEach(r=>{r.onMutationUpdate(n)}),ue(this,qs).notify({mutation:this,type:"updated",action:n})})},iO);function bO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qc,Xa,om,aO,UV=(aO=class extends uf{constructor(n={}){super();lt(this,Qc);lt(this,Xa);lt(this,om);this.config=n,Ue(this,Qc,new Set),Ue(this,Xa,new Map),Ue(this,om,0)}build(n,t,r){const s=new qV({client:n,mutationCache:this,mutationId:++Mp(this,om)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,Qc).add(n);const t=Ug(n);if(typeof t=="string"){const r=ue(this,Xa).get(t);r?r.push(n):ue(this,Xa).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,Qc).delete(n)){const t=Ug(n);if(typeof t=="string"){const r=ue(this,Xa).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,Xa).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Ug(n);if(typeof t=="string"){const s=(r=ue(this,Xa).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=Ug(n);return typeof t=="string"?((s=(r=ue(this,Xa).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Mr.batch(()=>{ue(this,Qc).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,Qc).clear(),ue(this,Xa).clear()})}getAll(){return Array.from(ue(this,Qc))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>H9(t,r))}findAll(n={}){return this.getAll().filter(t=>H9(n,t))}notify(n){Mr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Mr.batch(()=>Promise.all(n.map(t=>t.continue().catch(Vs))))}},Qc=new WeakMap,Xa=new WeakMap,om=new WeakMap,aO);function Ug(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Xc,uu,Us,Yc,Ko,t0,F4,oO,GV=(oO=class extends uf{constructor(t,r){super();lt(this,Ko);lt(this,Xc);lt(this,uu);lt(this,Us);lt(this,Yc);Ue(this,Xc,t),this.setOptions(r),this.bindMethods(),Bt(this,Ko,t0).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,Xc).defaultMutationOptions(t),o0(this.options,r)||ue(this,Xc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Us),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&V_(r.mutationKey)!==V_(this.options.mutationKey)?this.reset():((s=ue(this,Us))==null?void 0:s.state.status)==="pending"&&ue(this,Us).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,Us)&&(ue(this,Us).addObserver(this),Bt(this,Ko,t0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,Us))==null||t.removeObserver(this)}onMutationUpdate(t){Bt(this,Ko,t0).call(this),Bt(this,Ko,F4).call(this,t)}getCurrentResult(){return ue(this,uu)}reset(){var t;(t=ue(this,Us))==null||t.removeObserver(this),Ue(this,Us,void 0),Bt(this,Ko,t0).call(this),Bt(this,Ko,F4).call(this)}mutate(t,r){var s;return Ue(this,Yc,r),(s=ue(this,Us))==null||s.removeObserver(this),Ue(this,Us,ue(this,Xc).getMutationCache().build(ue(this,Xc),this.options)),ue(this,Us).addObserver(this),ue(this,Us).execute(t)}},Xc=new WeakMap,uu=new WeakMap,Us=new WeakMap,Yc=new WeakMap,Ko=new WeakSet,t0=function(){var r;const t=((r=ue(this,Us))==null?void 0:r.state)??bO();Ue(this,uu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},F4=function(t){Mr.batch(()=>{var r,s,i,a,o,c,u,h;if(ue(this,Yc)&&this.hasListeners()){const _=ue(this,uu).variables,p=ue(this,uu).context,m={client:ue(this,Xc),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Yc)).onSuccess)==null||s.call(r,t.data,_,p,m)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Yc)).onSettled)==null||a.call(i,t.data,null,_,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(c=(o=ue(this,Yc)).onError)==null||c.call(o,t.error,_,p,m)}catch(x){Promise.reject(x)}try{(h=(u=ue(this,Yc)).onSettled)==null||h.call(u,void 0,t.error,_,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(_=>{_(ue(this,uu))})})},oO);function X9(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var eh,ci,th,O_,Gi,D_,cm,lm,um,_m,bs,H4,q4,yO,U4,G4,V4,cO,VV=(cO=class extends uf{constructor(n,t,r){super();lt(this,bs);lt(this,eh);lt(this,ci);lt(this,th);lt(this,O_);lt(this,Gi);lt(this,D_);lt(this,cm);lt(this,lm);lt(this,um);lt(this,_m,[]);Ue(this,eh,n),Ue(this,O_,r),Ue(this,th,[]),Ue(this,Gi,[]),Ue(this,ci,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Gi).forEach(n=>{n.subscribe(t=>{Bt(this,bs,G4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Gi).forEach(n=>{n.destroy()})}setQueries(n,t){Ue(this,th,n),Ue(this,O_,t),Mr.batch(()=>{const r=ue(this,Gi),s=Bt(this,bs,U4).call(this,ue(this,th));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const i=s.map(_=>_.observer),a=i.map(_=>_.getCurrentResult()),o=r.length!==i.length,c=i.some((_,p)=>_!==r[p]),u=o||c,h=u?!0:a.some((_,p)=>{const m=ue(this,ci)[p];return!m||!o0(_,m)});!u&&!h||(u&&(Ue(this,_m,s),Ue(this,Gi,i)),Ue(this,ci,a),this.hasListeners()&&(u&&(X9(r,i).forEach(_=>{_.destroy()}),X9(i,r).forEach(_=>{_.subscribe(p=>{Bt(this,bs,G4).call(this,_,p)})})),Bt(this,bs,V4).call(this)))})}getCurrentResult(){return ue(this,ci)}getQueries(){return ue(this,Gi).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Gi)}getOptimisticResult(n,t){const r=Bt(this,bs,U4).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Bt(this,bs,q4).call(this,a??s,t,i),()=>Bt(this,bs,H4).call(this,s,r)]}},eh=new WeakMap,ci=new WeakMap,th=new WeakMap,O_=new WeakMap,Gi=new WeakMap,D_=new WeakMap,cm=new WeakMap,lm=new WeakMap,um=new WeakMap,_m=new WeakMap,bs=new WeakSet,H4=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(c=>{c.observer.trackProp(o)}))})})},q4=function(n,t,r){if(t){const s=ue(this,um),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,ci)!==ue(this,lm)||i||t!==ue(this,cm))&&(Ue(this,cm,t),Ue(this,lm,ue(this,ci)),r!==void 0&&Ue(this,um,r),Ue(this,D_,vk(ue(this,D_),t(n)))),ue(this,D_)}return n},yO=function(){var n;return!((n=ue(this,O_))!=null&&n.combine)||ue(this,Gi).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,ci)[r])==null?void 0:s.data)===void 0})},U4=function(n){const t=new Map;ue(this,Gi).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,eh).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new kk(ue(this,eh),i);r.push({defaultedQueryOptions:i,observer:a})}),r},G4=function(n,t){const r=ue(this,Gi).indexOf(n);r!==-1&&(Ue(this,ci,ue(this,ci).slice()),ue(this,ci)[r]=t,Bt(this,bs,V4).call(this))},V4=function(){var n;if(this.hasListeners()){const t=Bt(this,bs,yO).call(this),r=ue(this,D_),s=t?r:Bt(this,bs,q4).call(this,Bt(this,bs,H4).call(this,ue(this,ci),ue(this,_m)),(n=ue(this,O_))==null?void 0:n.combine);(t||r!==s)&&Mr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,ci))})})}},cO),Ho,lO,KV=(lO=class extends uf{constructor(n={}){super();lt(this,Ho);this.config=n,Ue(this,Ho,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??gk(s,t);let a=this.get(i);return a||(a=new FV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Ho).has(n.queryHash)||(ue(this,Ho).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Ho).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Ho).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Mr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Ho).get(n)}getAll(){return[...ue(this,Ho).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>F9(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>F9(n,r)):t}notify(n){Mr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Mr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Mr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Ho=new WeakMap,lO),Ar,_u,fu,nh,rh,du,sh,ih,uO,WV=(uO=class{constructor(e={}){lt(this,Ar);lt(this,_u);lt(this,fu);lt(this,nh);lt(this,rh);lt(this,du);lt(this,sh);lt(this,ih);Ue(this,Ar,e.queryCache||new KV),Ue(this,_u,e.mutationCache||new UV),Ue(this,fu,e.defaultOptions||{}),Ue(this,nh,new Map),Ue(this,rh,new Map),Ue(this,du,0)}mount(){Mp(this,du)._++,ue(this,du)===1&&(Ue(this,sh,wk.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ar).onFocus())})),Ue(this,ih,dv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ar).onOnline())})))}unmount(){var e,n;Mp(this,du)._--,ue(this,du)===0&&((e=ue(this,sh))==null||e.call(this),Ue(this,sh,void 0),(n=ue(this,ih))==null||n.call(this),Ue(this,ih,void 0))}isFetching(e){return ue(this,Ar).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,_u).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Ar).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Ar).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Hr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return ue(this,Ar).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,Ar).get(r.queryHash))==null?void 0:a.state.data,i=EV(n,s);if(i!==void 0)return ue(this,Ar).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Mr.batch(()=>ue(this,Ar).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,Ar).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Ar);Mr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Ar);return Mr.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=Mr.batch(()=>ue(this,Ar).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Vs).catch(Vs)}invalidateQueries(e,n={}){return Mr.batch(()=>(ue(this,Ar).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=Mr.batch(()=>ue(this,Ar).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Vs)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Vs)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Ar).build(this,n),r=t.isStaleByTime(Hr(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,Ar).build(this,n);return t.isStaleByTime(Hr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vs).catch(Vs)}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(Vs).catch(Vs)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return dv.isOnline()?ue(this,_u).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Ar)}getMutationCache(){return ue(this,_u)}getDefaultOptions(){return ue(this,fu)}setDefaultOptions(e){Ue(this,fu,e)}setQueryDefaults(e,n){ue(this,nh).set(V_(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,nh).values()],t={};return n.forEach(r=>{lh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,rh).set(V_(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,rh).values()],t={};return n.forEach(r=>{lh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,fu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=gk(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===bk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,fu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Ar).clear(),ue(this,_u).clear()}},Ar=new WeakMap,_u=new WeakMap,fu=new WeakMap,nh=new WeakMap,rh=new WeakMap,du=new WeakMap,sh=new WeakMap,ih=new WeakMap,uO);const xO=A.createContext(!1),wO=()=>A.useContext(xO);xO.Provider;function QV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const XV=A.createContext(QV()),kO=()=>A.useContext(XV),SO=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?yk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},CO=e=>{A.useEffect(()=>{e.clearReset()},[e])},EO=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||yk(t,[e.error,r])),NO=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))}},K4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,zO=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function YV({queries:e,...n},t){const r=bm(),s=wO(),i=kO(),a=n.subscribed!==!1,o=A.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{NO(k);const v=r.getQueryCache().get(k.queryHash);SO(k,i,v)}),CO(i);const[c]=A.useState(()=>new VV(r,o,n)),[u,h,_]=c.getOptimisticResult(o,n.combine),p=!s&&a;A.useSyncExternalStore(A.useCallback(k=>p?c.subscribe(Mr.batchCalls(k)):Vs,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>K4(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&K4(b,k)){const w=new kk(r,b);return zO(b,w,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((k,v)=>{const b=o[v];return b&&EO({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(x)throw x.error;return h(_())}function ZV(e,n,t){const r=wO(),s=kO(),i=bm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,NO(a),SO(a,s,o),CO(s);const[u]=A.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),_=!r&&c;if(A.useSyncExternalStore(A.useCallback(p=>{const m=_?u.subscribe(Mr.batchCalls(p)):Vs;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),A.useEffect(()=>{u.setOptions(a)},[a,u]),K4(a,h))throw zO(a,u,s);if(EO({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ut(e,n){return ZV(e,kk)}function JV(e,n){const t=bm(),r=t.getQueryCache();return A.useSyncExternalStore(A.useCallback(s=>r.subscribe(Mr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function an(e,n){const t=bm(),[r]=A.useState(()=>new GV(t,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const s=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Mr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Vs)},[r]);if(s.error&&yk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const tt=new WV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),ll=new Set;let Y9=null,yb=0;const W4=new Set,eK=()=>yb,Z9=e=>(W4.add(e),()=>{W4.delete(e)}),Ia=()=>["workspace",yb],Nt=(e,...n)=>[...Ia(),e,...n];function tK(e,n=!1){if(Y9===e&&!n)return!1;const t=Ia();return Y9=e,yb++,ll.clear(),Ck({queryKey:t}),W4.forEach(r=>r()),!0}const An=e=>e[1]===yb;async function Ck(e){await tt.cancelQueries(e,{revert:!1}),tt.removeQueries(e)}function Jr(e,n){if(An(e))return tt.setQueryData(e,n)}var M2={exports:{}},Dp={},O2={exports:{}},D2={};/** * @license React * scheduler.production.js * @@ -22,7 +22,7 @@ var pV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var mV=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var J9;function tK(){return J9||(J9=1,(function(e){function n(V,J){var Z=V.length;V.push(J);e:for(;0>>1,L=V[B];if(0>>1;Bs(K,Z))nes(ce,K)?(V[B]=ce,V[ne]=Z,B=ne):(V[B]=K,V[U]=Z,B=U);else if(nes(ce,Z))V[B]=ce,V[ne]=Z,B=ne;else break e}}return J}function s(V,J){var Z=V.sortIndex-J.sortIndex;return Z!==0?Z:V.id-J.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 c=[],u=[],h=1,_=null,p=3,m=!1,x=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var J=t(u);J!==null;){if(J.callback===null)r(u);else if(J.startTime<=V)r(u),J.sortIndex=J.expirationTime,n(c,J);else break;J=t(u)}}function N(V){if(k=!1,C(V),!x)if(t(c)!==null)x=!0,z||(z=!0,$());else{var J=t(u);J!==null&&Q(N,J.startTime-V)}}var z=!1,T=-1,j=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MV&&D());){var B=_.callback;if(typeof B=="function"){_.callback=null,p=_.priorityLevel;var L=B(_.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){_.callback=L,C(V),J=!0;break t}_===t(c)&&r(c),C(V)}else r(c);_=t(c)}if(_!==null)J=!0;else{var F=t(u);F!==null&&Q(N,F.startTime-V),J=!1}}break e}finally{_=null,p=Z,m=!1}J=void 0}}finally{J?$():z=!1}}}var $;if(typeof y=="function")$=function(){y(I)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,H=q.port2;q.port1.onmessage=I,$=function(){H.postMessage(null)}}else $=function(){b(I,0)};function Q(V,J){T=b(function(){V(e.unstable_now())},J)}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||125B?(V.sortIndex=Z,n(u,V),t(c)===null&&V===t(u)&&(k?(w(T),T=-1):k=!0,Q(N,Z-B))):(V.sortIndex=L,n(c,V),x||m||(x=!0,z||(z=!0,$()))),V},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(V){var J=p;return function(){var Z=p;p=J;try{return V.apply(this,arguments)}finally{p=Z}}}})(D2)),D2}var eE;function nK(){return eE||(eE=1,O2.exports=tK()),O2.exports}var L2={exports:{}},Ps={};/** + */var J9;function nK(){return J9||(J9=1,(function(e){function n(V,J){var Z=V.length;V.push(J);e:for(;0>>1,L=V[B];if(0>>1;Bs(K,Z))nes(ce,K)?(V[B]=ce,V[ne]=Z,B=ne):(V[B]=K,V[U]=Z,B=U);else if(nes(ce,Z))V[B]=ce,V[ne]=Z,B=ne;else break e}}return J}function s(V,J){var Z=V.sortIndex-J.sortIndex;return Z!==0?Z:V.id-J.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 c=[],u=[],h=1,_=null,p=3,m=!1,x=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var J=t(u);J!==null;){if(J.callback===null)r(u);else if(J.startTime<=V)r(u),J.sortIndex=J.expirationTime,n(c,J);else break;J=t(u)}}function N(V){if(k=!1,C(V),!x)if(t(c)!==null)x=!0,z||(z=!0,$());else{var J=t(u);J!==null&&Q(N,J.startTime-V)}}var z=!1,T=-1,j=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MV&&D());){var B=_.callback;if(typeof B=="function"){_.callback=null,p=_.priorityLevel;var L=B(_.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){_.callback=L,C(V),J=!0;break t}_===t(c)&&r(c),C(V)}else r(c);_=t(c)}if(_!==null)J=!0;else{var F=t(u);F!==null&&Q(N,F.startTime-V),J=!1}}break e}finally{_=null,p=Z,m=!1}J=void 0}}finally{J?$():z=!1}}}var $;if(typeof y=="function")$=function(){y(I)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,H=q.port2;q.port1.onmessage=I,$=function(){H.postMessage(null)}}else $=function(){b(I,0)};function Q(V,J){T=b(function(){V(e.unstable_now())},J)}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||125B?(V.sortIndex=Z,n(u,V),t(c)===null&&V===t(u)&&(k?(w(T),T=-1):k=!0,Q(N,Z-B))):(V.sortIndex=L,n(c,V),x||m||(x=!0,z||(z=!0,$()))),V},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(V){var J=p;return function(){var Z=p;p=J;try{return V.apply(this,arguments)}finally{p=Z}}}})(D2)),D2}var eE;function rK(){return eE||(eE=1,O2.exports=nK()),O2.exports}var L2={exports:{}},Hs={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ var pV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var mV=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var tE;function rK(){if(tE)return Ps;tE=1;var e=vm();function n(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),L2.exports=rK(),L2.exports}/** + */var tE;function sK(){if(tE)return Hs;tE=1;var e=vm();function n(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),L2.exports=sK(),L2.exports}/** * @license React * react-dom-client.production.js * @@ -38,15 +38,15 @@ var pV=Object.defineProperty;var L9=e=>{throw TypeError(e)};var mV=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var rE;function sK(){if(rE)return Op;rE=1;var e=nK(),n=vm(),t=zO();function r(l){var d="https://react.dev/errors/"+l;if(1L||(l.current=B[L],B[L]=null,L--)}function K(l,d){L++,B[L]=l.current,l.current=d}var ne=F(null),ce=F(null),_e=F(null),se=F(null);function G(l,d){switch(K(_e,d),K(ce,l),K(ne,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?i9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=i9(d),l=a9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}U(ne),K(ne,l)}function oe(){U(ne),U(ce),U(_e)}function le(l){l.memoizedState!==null&&K(se,l);var d=ne.current,g=a9(d,l.type);d!==g&&(K(ce,l),K(ne,g))}function fe(l){ce.current===l&&(U(ne),U(ce)),se.current===l&&(U(se),zp._currentValue=Z)}var me,Re;function Oe(l){if(me===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);me=d&&d[1]||"",Re=-1L||(l.current=B[L],B[L]=null,L--)}function K(l,d){L++,B[L]=l.current,l.current=d}var ne=F(null),ce=F(null),_e=F(null),se=F(null);function G(l,d){switch(K(_e,d),K(ce,l),K(ne,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?i9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=i9(d),l=a9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}U(ne),K(ne,l)}function oe(){U(ne),U(ce),U(_e)}function le(l){l.memoizedState!==null&&K(se,l);var d=ne.current,g=a9(d,l.type);d!==g&&(K(ce,l),K(ne,g))}function pe(l){ce.current===l&&(U(ne),U(ce)),se.current===l&&(U(se),jp._currentValue=Z)}var be,Me;function we(l){if(be===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);be=d&&d[1]||"",Me=-1)":-1R||pe[S]!==Ee[R]){var $e=` -`+pe[S].replace(" at new "," at ");return l.displayName&&$e.includes("")&&($e=$e.replace("",l.displayName)),$e}while(1<=S&&0<=R);break}}}finally{Qe=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Oe(g):""}function Se(l,d){switch(l.tag){case 26:case 27:case 5:return Oe(l.type);case 16:return Oe("Lazy");case 13:return l.child!==d&&d!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return qe(l.type,!1);case 11:return qe(l.type.render,!1);case 1:return qe(l.type,!0);case 31:return Oe("Activity");default:return""}}function at(l){try{var d="",g=null;do d+=Se(l,g),g=l,l=l.return;while(l);return d}catch(S){return` +`+be+l+Me}var qe=!1;function He(l,d){if(!l||qe)return"";qe=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(d){var Pe=function(){throw Error()};if(Object.defineProperty(Pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pe,[])}catch(Oe){var Te=Oe}Reflect.construct(l,[],Pe)}else{try{Pe.call()}catch(Oe){Te=Oe}l.call(Pe.prototype)}}else{try{throw Error()}catch(Oe){Te=Oe}(Pe=l())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(Oe){if(Oe&&Te&&typeof Oe.stack=="string")return[Oe.stack,Te.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=S.DetermineComponentFrameRoot(),Y=O[0],re=O[1];if(Y&&re){var he=Y.split(` +`),Ne=re.split(` +`);for(R=S=0;SR||he[S]!==Ne[R]){var Ie=` +`+he[S].replace(" at new "," at ");return l.displayName&&Ie.includes("")&&(Ie=Ie.replace("",l.displayName)),Ie}while(1<=S&&0<=R);break}}}finally{qe=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?we(g):""}function Ce(l,d){switch(l.tag){case 26:case 27:case 5:return we(l.type);case 16:return we("Lazy");case 13:return l.child!==d&&d!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return He(l.type,!1);case 11:return He(l.type.render,!1);case 1:return He(l.type,!0);case 31:return we("Activity");default:return""}}function ot(l){try{var d="",g=null;do d+=Ce(l,g),g=l,l=l.return;while(l);return d}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var et=Object.prototype.hasOwnProperty,ct=e.unstable_scheduleCallback,wt=e.unstable_cancelCallback,$t=e.unstable_shouldYield,ht=e.unstable_requestPaint,dt=e.unstable_now,Le=e.unstable_getCurrentPriorityLevel,ge=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,st=e.unstable_LowPriority,_t=e.unstable_IdlePriority,mt=e.log,Ue=e.unstable_setDisableYieldValue,Gt=null,sn=null;function jt(l){if(typeof mt=="function"&&Ue(l),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(Gt,l)}catch{}}var gt=Math.clz32?Math.clz32:gn,$n=Math.log,Zt=Math.LN2;function gn(l){return l>>>=0,l===0?32:31-($n(l)/Zt|0)|0}var mr=256,Bn=262144,Nn=4194304;function zn(l){var d=l&42;if(d!==0)return d;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Pn(l,d,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,Y=l.pingedLanes;l=l.warmLanes;var re=S&134217727;return re!==0?(S=re&~O,S!==0?R=zn(S):(Y&=re,Y!==0?R=zn(Y):g||(g=re&~l,g!==0&&(R=zn(g))))):(re=S&~O,re!==0?R=zn(re):Y!==0?R=zn(Y):g||(g=S&~l,g!==0&&(R=zn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function jr(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function Ct(l,d){switch(l){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 tn(){var l=Nn;return Nn<<=1,(Nn&62914560)===0&&(Nn=4194304),l}function vn(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function on(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function gr(l,d,g,S,R,O){var Y=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var re=l.entanglements,pe=l.expirationTimes,Ee=l.hiddenUpdates;for(g=Y&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Vn=/[\n"\\]/g;function _r(l){return l.replace(Vn,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Os(l,d,g,S,R,O,Y,re){l.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?l.type=Y:l.removeAttribute("type"),d!=null?Y==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+Fr(d)):l.value!==""+Fr(d)&&(l.value=""+Fr(d)):Y!=="submit"&&Y!=="reset"||l.removeAttribute("value"),d!=null?Tr(l,Y,Fr(d)):g!=null?Tr(l,Y,Fr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?l.name=""+Fr(re):l.removeAttribute("name")}function Ds(l,d,g,S,R,O,Y,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){xs(l);return}g=g!=null?""+Fr(g):"",d=d!=null?""+Fr(d):g,re||d===l.value||(l.value=d),l.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=re?l.checked:!!S,l.defaultChecked=!!S,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(l.name=Y),xs(l)}function Tr(l,d,g){d==="number"&&pi(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function mi(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uc=!1;if(as)try{var da={};Object.defineProperty(da,"passive",{get:function(){uc=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{uc=!1}var ur=null,_c=null,rr=null;function Sf(){if(rr)return rr;var l,d=_c,g=d.length,S,R="value"in ur?ur.value:ur.textContent,O=R.length;for(l=0;l=ma),Eo=" ",Mf=!1;function Of(l,d){switch(l){case"keyup":return Rf.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Es(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var un=!1;function Hu(l,d){switch(l){case"compositionend":return Es(d);case"keypress":return d.which!==32?null:(Mf=!0,Eo);case"textInput":return l=d.data,l===Eo&&Mf?null:l;default:return null}}function qu(l,d){if(un)return l==="compositionend"||!Co&&Of(l,d)?(l=Sf(),rr=_c=ur=null,un=!1,l):null;switch(l){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-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=be(g)}}function X(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?X(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function ae(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=pi(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=pi(l.document)}return d}function xe(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var Ae=as&&"documentMode"in document&&11>=document.documentMode,ke=null,He=null,Xe=null,Mt=!1;function Kn(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Mt||ke==null||ke!==pi(S)||(S=ke,"selectionStart"in S&&xe(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Xe&&te(Xe,S)||(Xe=S,S=jg(He,"onSelect"),0>=Y,R-=Y,jo=1<<32-gt(d)+R|g<nn?(pn=kt,kt=null):pn=kt.sibling;var An=je(we,kt,Ce[nn],Be);if(An===null){kt===null&&(kt=pn);break}l&&kt&&An.alternate===null&&d(we,kt),ve=O(An,ve,nn),Tn===null?Ot=An:Tn.sibling=An,Tn=An,kt=pn}if(nn===Ce.length)return g(we,kt),wn&&kc(we,nn),Ot;if(kt===null){for(;nnnn?(pn=kt,kt=null):pn=kt.sibling;var Wl=je(we,kt,An.value,Be);if(Wl===null){kt===null&&(kt=pn);break}l&&kt&&Wl.alternate===null&&d(we,kt),ve=O(Wl,ve,nn),Tn===null?Ot=Wl:Tn.sibling=Wl,Tn=Wl,kt=pn}if(An.done)return g(we,kt),wn&&kc(we,nn),Ot;if(kt===null){for(;!An.done;nn++,An=Ce.next())An=Pe(we,An.value,Be),An!==null&&(ve=O(An,ve,nn),Tn===null?Ot=An:Tn.sibling=An,Tn=An);return wn&&kc(we,nn),Ot}for(kt=S(kt);!An.done;nn++,An=Ce.next())An=Me(kt,we,nn,An.value,Be),An!==null&&(l&&An.alternate!==null&&kt.delete(An.key===null?nn:An.key),ve=O(An,ve,nn),Tn===null?Ot=An:Tn.sibling=An,Tn=An);return l&&kt.forEach(function(hV){return d(we,hV)}),wn&&kc(we,nn),Ot}function tr(we,ve,Ce,Be){if(typeof Ce=="object"&&Ce!==null&&Ce.type===k&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case m:e:{for(var Ot=Ce.key;ve!==null;){if(ve.key===Ot){if(Ot=Ce.type,Ot===k){if(ve.tag===7){g(we,ve.sibling),Be=R(ve,Ce.props.children),Be.return=we,we=Be;break e}}else if(ve.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===j&&n_(Ot)===ve.type){g(we,ve.sibling),Be=R(ve,Ce.props),ip(Be,Ce),Be.return=we,we=Be;break e}g(we,ve);break}else d(we,ve);ve=ve.sibling}Ce.type===k?(Be=Yu(Ce.props.children,we.mode,Be,Ce.key),Be.return=we,we=Be):(Be=Vm(Ce.type,Ce.key,Ce.props,null,we.mode,Be),ip(Be,Ce),Be.return=we,we=Be)}return Y(we);case x:e:{for(Ot=Ce.key;ve!==null;){if(ve.key===Ot)if(ve.tag===4&&ve.stateNode.containerInfo===Ce.containerInfo&&ve.stateNode.implementation===Ce.implementation){g(we,ve.sibling),Be=R(ve,Ce.children||[]),Be.return=we,we=Be;break e}else{g(we,ve);break}else d(we,ve);ve=ve.sibling}Be=Wy(Ce,we.mode,Be),Be.return=we,we=Be}return Y(we);case j:return Ce=n_(Ce),tr(we,ve,Ce,Be)}if(Q(Ce))return yt(we,ve,Ce,Be);if($(Ce)){if(Ot=$(Ce),typeof Ot!="function")throw Error(r(150));return Ce=Ot.call(Ce),Ft(we,ve,Ce,Be)}if(typeof Ce.then=="function")return tr(we,ve,Jm(Ce),Be);if(Ce.$$typeof===y)return tr(we,ve,Qm(we,Ce),Be);eg(we,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ve!==null&&ve.tag===6?(g(we,ve.sibling),Be=R(ve,Ce),Be.return=we,we=Be):(g(we,ve),Be=Ky(Ce,we.mode,Be),Be.return=we,we=Be),Y(we)):g(we,ve)}return function(we,ve,Ce,Be){try{sp=0;var Ot=tr(we,ve,Ce,Be);return Vf=null,Ot}catch(kt){if(kt===Gf||kt===Ym)throw kt;var Tn=Li(29,kt,null,we.mode);return Tn.lanes=Be,Tn.return=we,Tn}finally{}}}var s_=XC(!0),YC=XC(!1),Al=!1;function ax(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ox(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Rl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ml(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(Mn&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Gm(l),Jh(l,null,g),d}return Rr(l,S,d,g),Gm(l)}function ap(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,yn(l,g)}}function cx(l,d){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var Y={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=Y:O=O.next=Y,g=g.next}while(g!==null);O===null?R=O=d:O=O.next=d}else R=O=d;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=d:l.next=d,g.lastBaseUpdate=d}var lx=!1;function op(){if(lx){var l=Uf;if(l!==null)throw l}}function cp(l,d,g,S){lx=!1;var R=l.updateQueue;Al=!1;var O=R.firstBaseUpdate,Y=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var pe=re,Ee=pe.next;pe.next=null,Y===null?O=Ee:Y.next=Ee,Y=pe;var $e=l.alternate;$e!==null&&($e=$e.updateQueue,re=$e.lastBaseUpdate,re!==Y&&(re===null?$e.firstBaseUpdate=Ee:re.next=Ee,$e.lastBaseUpdate=pe))}if(O!==null){var Pe=R.baseState;Y=0,$e=Ee=pe=null,re=O;do{var je=re.lane&-536870913,Me=je!==re.lane;if(Me?(hn&je)===je:(S&je)===je){je!==0&&je===qf&&(lx=!0),$e!==null&&($e=$e.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var yt=l,Ft=re;je=d;var tr=g;switch(Ft.tag){case 1:if(yt=Ft.payload,typeof yt=="function"){Pe=yt.call(tr,Pe,je);break e}Pe=yt;break e;case 3:yt.flags=yt.flags&-65537|128;case 0:if(yt=Ft.payload,je=typeof yt=="function"?yt.call(tr,Pe,je):yt,je==null)break e;Pe=_({},Pe,je);break e;case 2:Al=!0}}je=re.callback,je!==null&&(l.flags|=64,Me&&(l.flags|=8192),Me=R.callbacks,Me===null?R.callbacks=[je]:Me.push(je))}else Me={lane:je,tag:re.tag,payload:re.payload,callback:re.callback,next:null},$e===null?(Ee=$e=Me,pe=Pe):$e=$e.next=Me,Y|=je;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Me=re,re=Me.next,Me.next=null,R.lastBaseUpdate=Me,R.shared.pending=null}}while(!0);$e===null&&(pe=Pe),R.baseState=pe,R.firstBaseUpdate=Ee,R.lastBaseUpdate=$e,O===null&&(R.shared.lanes=0),$l|=Y,l.lanes=Y,l.memoizedState=Pe}}function ZC(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function JC(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var Y=V.T,re={};V.T=re,zx(l,!1,d,g);try{var pe=R(),Ee=V.S;if(Ee!==null&&Ee(re,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var $e=rG(pe,S);_p(l,d,$e,Fi(l))}else _p(l,d,S,Fi(l))}catch(Pe){_p(l,d,{then:function(){},status:"rejected",reason:Pe},Fi())}finally{J.p=O,Y!==null&&re.types!==null&&(Y.types=re.types),V.T=Y}}function lG(){}function Ex(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=A7(l).queue;T7(l,R,d,Z,g===null?lG:function(){return R7(l),g(S)})}function A7(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:Z},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function R7(l){var d=A7(l);d.next===null&&(d=l.alternate.memoizedState),_p(l,d.next.queue,{},Fi())}function Nx(){return zs(zp)}function M7(){return Gr().memoizedState}function O7(){return Gr().memoizedState}function uG(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=Fi();l=Rl(g);var S=Ml(d,l,g);S!==null&&(Si(S,d,g),ap(S,d,g)),d={cache:nx()},l.payload=d;return}d=d.return}}function _G(l,d,g){var S=Fi();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},ug(l)?L7(d,g):(g=El(l,d,g,S),g!==null&&(Si(g,l,S),I7(g,d,S)))}function D7(l,d,g){var S=Fi();_p(l,d,g,S)}function _p(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(ug(l))L7(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var Y=d.lastRenderedState,re=O(Y,g);if(R.hasEagerState=!0,R.eagerState=re,vs(re,Y))return Rr(l,d,R,0),ir===null&&xa(),!1}catch{}finally{}if(g=El(l,d,R,S),g!==null)return Si(g,l,S),I7(g,d,S),!0}return!1}function zx(l,d,g,S){if(S={lane:2,revertLane:a2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},ug(l)){if(d)throw Error(r(479))}else d=El(l,g,S,2),d!==null&&Si(d,l,2)}function ug(l){var d=l.alternate;return l===en||d!==null&&d===en}function L7(l,d){Wf=rg=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function I7(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,yn(l,g)}}var fp={readContext:zs,use:ag,useCallback:Mr,useContext:Mr,useEffect:Mr,useImperativeHandle:Mr,useLayoutEffect:Mr,useInsertionEffect:Mr,useMemo:Mr,useReducer:Mr,useRef:Mr,useState:Mr,useDebugValue:Mr,useDeferredValue:Mr,useTransition:Mr,useSyncExternalStore:Mr,useId:Mr,useHostTransitionStatus:Mr,useFormState:Mr,useActionState:Mr,useOptimistic:Mr,useMemoCache:Mr,useCacheRefresh:Mr};fp.useEffectEvent=Mr;var $7={readContext:zs,use:ag,useCallback:function(l,d){return ri().memoizedState=[l,d===void 0?null:d],l},useContext:zs,useEffect:x7,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,cg(4194308,4,C7.bind(null,d,l),g)},useLayoutEffect:function(l,d){return cg(4194308,4,l,d)},useInsertionEffect:function(l,d){cg(4,2,l,d)},useMemo:function(l,d){var g=ri();d=d===void 0?null:d;var S=l();if(i_){jt(!0);try{l()}finally{jt(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=ri();if(g!==void 0){var R=g(d);if(i_){jt(!0);try{g(d)}finally{jt(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=_G.bind(null,en,l),[S.memoizedState,l]},useRef:function(l){var d=ri();return l={current:l},d.memoizedState=l},useState:function(l){l=xx(l);var d=l.queue,g=D7.bind(null,en,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Sx,useDeferredValue:function(l,d){var g=ri();return Cx(g,l,d)},useTransition:function(){var l=xx(!1);return l=T7.bind(null,en,l.queue,!0,!1),ri().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=en,R=ri();if(wn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),ir===null)throw Error(r(349));(hn&127)!==0||i7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,x7(o7.bind(null,S,O,l),[l]),S.flags|=2048,Xf(9,{destroy:void 0},a7.bind(null,S,O,g,d),null),g},useId:function(){var l=ri(),d=ir.identifierPrefix;if(wn){var g=To,S=jo;g=(S&~(1<<32-gt(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=sg++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?Y.createElement("select",{is:S.is}):Y.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?Y.createElement(R,{is:S.is}):Y.createElement(R)}}O[Jt]=d,O[jn]=S;e:for(Y=d.child;Y!==null;){if(Y.tag===5||Y.tag===6)O.appendChild(Y.stateNode);else if(Y.tag!==4&&Y.tag!==27&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===d)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===d)break e;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}d.stateNode=O;e:switch(Ts(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&jc(d)}}return hr(d),Hx(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&jc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=_e.current,Ff(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=Ns,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[Jt]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||r9(l.nodeValue,g)),l||jl(d,!0)}else l=Tg(l).createTextNode(S),l[Jt]=d,d.stateNode=l}return hr(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=Ff(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[Jt]=d}else Zu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hr(d),l=!1}else g=Zy(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?($i(d),d):($i(d),null);if((d.flags&128)!==0)throw Error(r(558))}return hr(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=Ff(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Jt]=d}else Zu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hr(d),R=!1}else R=Zy(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?($i(d),d):($i(d),null)}return $i(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==l&&g&&(d.child.flags|=8192),pg(d,d.updateQueue),hr(d),null);case 4:return oe(),l===null&&u2(d.stateNode.containerInfo),hr(d),null;case 10:return Cc(d.type),hr(d),null;case 19:if(U(Ur),S=d.memoizedState,S===null)return hr(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)hp(S,!1);else{if(Or!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ng(l),O!==null){for(d.flags|=128,hp(S,!1),l=O.updateQueue,d.updateQueue=l,pg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)DC(g,l),g=g.sibling;return K(Ur,Ur.current&1|2),wn&&kc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&dt()>yg&&(d.flags|=128,R=!0,hp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ng(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,pg(d,l),hp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!wn)return hr(d),null}else 2*dt()-S.renderingStartTime>yg&&g!==536870912&&(d.flags|=128,R=!0,hp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=dt(),l.sibling=null,g=Ur.current,K(Ur,R?g&1|2:g&1),wn&&kc(d,S.treeForkCount),l):(hr(d),null);case 22:case 23:return $i(d),_x(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(hr(d),d.subtreeFlags&6&&(d.flags|=8192)):hr(d),g=d.updateQueue,g!==null&&pg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&U(t_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),Cc(Yr),hr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function mG(l,d){switch(Xy(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Cc(Yr),oe(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return fe(d),null;case 31:if(d.memoizedState!==null){if($i(d),d.alternate===null)throw Error(r(340));Zu()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if($i(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Zu()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return U(Ur),null;case 4:return oe(),null;case 10:return Cc(d.type),null;case 22:case 23:return $i(d),_x(),l!==null&&U(t_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return Cc(Yr),null;case 25:return null;default:return null}}function c8(l,d){switch(Xy(d),d.tag){case 3:Cc(Yr),oe();break;case 26:case 27:case 5:fe(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&$i(d);break;case 13:$i(d);break;case 19:U(Ur);break;case 10:Cc(d.type);break;case 22:case 23:$i(d),_x(),l!==null&&U(t_);break;case 24:Cc(Yr)}}function pp(l,d){try{var g=d.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&l)===l){S=void 0;var O=g.create,Y=g.inst;S=O(),Y.destroy=S}g=g.next}while(g!==R)}}catch(re){Xn(d,d.return,re)}}function Ll(l,d,g){try{var S=d.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&l)===l){var Y=S.inst,re=Y.destroy;if(re!==void 0){Y.destroy=void 0,R=d;var pe=g,Ee=re;try{Ee()}catch($e){Xn(R,pe,$e)}}}S=S.next}while(S!==O)}}catch($e){Xn(d,d.return,$e)}}function l8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{JC(d,g)}catch(S){Xn(l,l.return,S)}}}function u8(l,d,g){g.props=a_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){Xn(l,d,S)}}function mp(l,d){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var S=l.stateNode;break;case 30:S=l.stateNode;break;default:S=l.stateNode}typeof g=="function"?l.refCleanup=g(S):g.current=S}}catch(R){Xn(l,d,R)}}function Ao(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){Xn(l,d,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){Xn(l,d,R)}else g.current=null}function _8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){Xn(l,l.return,R)}}function qx(l,d,g){try{var S=l.stateNode;$G(S,l.type,g,d),S[jn]=d}catch(R){Xn(l,l.return,R)}}function f8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ql(l.type)||l.tag===4}function Ux(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||f8(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&ql(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Gx(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Ar));else if(S!==4&&(S===27&&ql(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(Gx(l,d,g),l=l.sibling;l!==null;)Gx(l,d,g),l=l.sibling}function mg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&ql(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(mg(l,d,g),l=l.sibling;l!==null;)mg(l,d,g),l=l.sibling}function d8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Ts(d,S,g),d[Jt]=l,d[jn]=g}catch(O){Xn(l,l.return,O)}}var Tc=!1,es=!1,Vx=!1,h8=typeof WeakSet=="function"?WeakSet:Set,bs=null;function gG(l,d){if(l=l.containerInfo,d2=Ig,l=ae(l),xe(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var Y=0,re=-1,pe=-1,Ee=0,$e=0,Pe=l,je=null;t:for(;;){for(var Me;Pe!==g||R!==0&&Pe.nodeType!==3||(re=Y+R),Pe!==O||S!==0&&Pe.nodeType!==3||(pe=Y+S),Pe.nodeType===3&&(Y+=Pe.nodeValue.length),(Me=Pe.firstChild)!==null;)je=Pe,Pe=Me;for(;;){if(Pe===l)break t;if(je===g&&++Ee===R&&(re=Y),je===O&&++$e===S&&(pe=Y),(Me=Pe.nextSibling)!==null)break;Pe=je,je=Pe.parentNode}Pe=Me}g=re===-1||pe===-1?null:{start:re,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(h2={focusedElem:l,selectionRange:g},Ig=!1,bs=d;bs!==null;)if(d=bs,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,bs=l;else for(;bs!==null;){switch(d=bs,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Ts(O,S,g),O[Jt]=l,nr(O),S=O;break e;case"link":var Y=y9("link","href",R).get(S+(g.href||""));if(Y){for(var re=0;retr&&(Y=tr,tr=Ft,Ft=Y);var we=ze(re,Ft),ve=ze(re,tr);if(we&&ve&&(Me.rangeCount!==1||Me.anchorNode!==we.node||Me.anchorOffset!==we.offset||Me.focusNode!==ve.node||Me.focusOffset!==ve.offset)){var Ce=Pe.createRange();Ce.setStart(we.node,we.offset),Me.removeAllRanges(),Ft>tr?(Me.addRange(Ce),Me.extend(ve.node,ve.offset)):(Ce.setEnd(ve.node,ve.offset),Me.addRange(Ce))}}}}for(Pe=[],Me=re;Me=Me.parentNode;)Me.nodeType===1&&Pe.push({element:Me,left:Me.scrollLeft,top:Me.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,V.T=null,g=Jx,Jx=null;var O=Pl,Y=Dc;if(cs=0,td=Pl=null,Dc=0,(Mn&6)!==0)throw Error(r(331));var re=Mn;if(Mn|=4,C8(O.current),w8(O,O.current,Y,g),Mn=re,wp(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(Gt,O)}catch{}return!0}finally{J.p=R,V.T=S,q8(l,d)}}function G8(l,d,g){d=wa(g,d),d=Rx(l.stateNode,d,2),l=Ml(l,d,2),l!==null&&(on(l,2),Ro(l))}function Xn(l,d,g){if(l.tag===3)G8(l,l,g);else for(;d!==null;){if(d.tag===3){G8(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Bl===null||!Bl.has(S))){l=wa(g,l),g=V7(2),S=Ml(d,g,2),S!==null&&(K7(g,S,d,l),on(S,2),Ro(S));break}}d=d.return}}function r2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new yG;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(Qx=!0,R.add(g),l=CG.bind(null,l,d,g),d.then(l,l))}function CG(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,ir===l&&(hn&g)===g&&(Or===4||Or===3&&(hn&62914560)===hn&&300>dt()-bg?(Mn&2)===0&&nd(l,0):Xx|=g,ed===hn&&(ed=0)),Ro(l)}function V8(l,d){d===0&&(d=tn()),l=Fn(l,d),l!==null&&(on(l,d),Ro(l))}function EG(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),V8(l,g)}function NG(l,d){var g=0;switch(l.tag){case 31:case 13:var S=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=l.stateNode;break;case 22:S=l.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(d),V8(l,g)}function zG(l,d){return ct(l,d)}var Eg=null,sd=null,s2=!1,Ng=!1,i2=!1,Hl=0;function Ro(l){l!==sd&&l.next===null&&(sd===null?Eg=sd=l:sd=sd.next=l),Ng=!0,s2||(s2=!0,TG())}function wp(l,d){if(!i2&&Ng){i2=!0;do for(var g=!1,S=Eg;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var Y=S.suspendedLanes,re=S.pingedLanes;O=(1<<31-gt(42|l)+1)-1,O&=R&~(Y&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,X8(S,O))}else O=hn,O=Pn(S,S===ir?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||jr(S,O)||(g=!0,X8(S,O));S=S.next}while(g);i2=!1}}function jG(){K8()}function K8(){Ng=s2=!1;var l=0;Hl!==0&&PG()&&(l=Hl);for(var d=dt(),g=null,S=Eg;S!==null;){var R=S.next,O=W8(S,d);O===0?(S.next=null,g===null?Eg=R:g.next=R,R===null&&(sd=g)):(g=S,(l!==0||(O&3)!==0)&&(Ng=!0)),S=R}cs!==0&&cs!==5||wp(l),Hl!==0&&(Hl=0)}function W8(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0re)break;var $e=pe.transferSize,Pe=pe.initiatorType;$e&&s9(Pe)&&(pe=pe.responseEnd,Y+=$e*(pe"u"?null:document;function m9(l,d,g){var S=id;if(S&&typeof d=="string"&&d){var R=_r(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),p9.has(R)||(p9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Ts(d,"link",l),nr(d),S.head.appendChild(d)))}}function QG(l){Lc.D(l),m9("dns-prefetch",l,null)}function XG(l,d){Lc.C(l,d),m9("preconnect",l,d)}function YG(l,d,g){Lc.L(l,d,g);var S=id;if(S&&l&&d){var R='link[rel="preload"][as="'+_r(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+_r(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+_r(g.imageSizes)+'"]')):R+='[href="'+_r(l)+'"]';var O=R;switch(d){case"style":O=ad(l);break;case"script":O=od(l)}za.has(O)||(l=_({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),za.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Ep(O))||d==="script"&&S.querySelector(Np(O))||(d=S.createElement("link"),Ts(d,"link",l),nr(d),S.head.appendChild(d)))}}function ZG(l,d){Lc.m(l,d);var g=id;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+_r(S)+'"][href="'+_r(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=od(l)}if(!za.has(O)&&(l=_({rel:"modulepreload",href:l},d),za.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Np(O)))return}S=g.createElement("link"),Ts(S,"link",l),nr(S),g.head.appendChild(S)}}}function JG(l,d,g){Lc.S(l,d,g);var S=id;if(S&&l){var R=Br(S).hoistableStyles,O=ad(l);d=d||"default";var Y=R.get(O);if(!Y){var re={loading:0,preload:null};if(Y=S.querySelector(Ep(O)))re.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":d},g),(g=za.get(O))&&x2(l,g);var pe=Y=S.createElement("link");nr(pe),Ts(pe,"link",l),pe._p=new Promise(function(Ee,$e){pe.onload=Ee,pe.onerror=$e}),pe.addEventListener("load",function(){re.loading|=1}),pe.addEventListener("error",function(){re.loading|=2}),re.loading|=4,Rg(Y,d,S)}Y={type:"stylesheet",instance:Y,count:1,state:re},R.set(O,Y)}}}function eV(l,d){Lc.X(l,d);var g=id;if(g&&l){var S=Br(g).hoistableScripts,R=od(l),O=S.get(R);O||(O=g.querySelector(Np(R)),O||(l=_({src:l,async:!0},d),(d=za.get(R))&&w2(l,d),O=g.createElement("script"),nr(O),Ts(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function tV(l,d){Lc.M(l,d);var g=id;if(g&&l){var S=Br(g).hoistableScripts,R=od(l),O=S.get(R);O||(O=g.querySelector(Np(R)),O||(l=_({src:l,async:!0,type:"module"},d),(d=za.get(R))&&w2(l,d),O=g.createElement("script"),nr(O),Ts(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function g9(l,d,g,S){var R=(R=_e.current)?Ag(R):null;if(!R)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=ad(g.href),g=Br(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=ad(g.href);var O=Br(R).hoistableStyles,Y=O.get(l);if(Y||(R=R.ownerDocument||R,Y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,Y),(O=R.querySelector(Ep(l)))&&!O._p&&(Y.instance=O,Y.state.loading=5),za.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},za.set(l,g),O||nV(R,l,g,Y.state))),d&&S===null)throw Error(r(528,""));return Y}if(d&&S!==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=Br(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function ad(l){return'href="'+_r(l)+'"'}function Ep(l){return'link[rel="stylesheet"]['+l+"]"}function v9(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function nV(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Ts(d,"link",g),nr(d),l.head.appendChild(d))}function od(l){return'[src="'+_r(l)+'"]'}function Np(l){return"script[async]"+l}function b9(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+_r(g.href)+'"]');if(S)return d.instance=S,nr(S),S;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(l.ownerDocument||l).createElement("style"),nr(S),Ts(S,"style",R),Rg(S,g.precedence,l),d.instance=S;case"stylesheet":R=ad(g.href);var O=l.querySelector(Ep(R));if(O)return d.state.loading|=4,d.instance=O,nr(O),O;S=v9(g),(R=za.get(R))&&x2(S,R),O=(l.ownerDocument||l).createElement("link"),nr(O);var Y=O;return Y._p=new Promise(function(re,pe){Y.onload=re,Y.onerror=pe}),Ts(O,"link",S),d.state.loading|=4,Rg(O,g.precedence,l),d.instance=O;case"script":return O=od(g.src),(R=l.querySelector(Np(O)))?(d.instance=R,nr(R),R):(S=g,(R=za.get(O))&&(S=_({},g),w2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),nr(R),Ts(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Rg(S,g.precedence,l));return d.instance}function Rg(l,d,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,Y=0;Y title"):null)}function rV(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){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 l=d.disabled,typeof d.precedence=="string"&&l==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 w9(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function sV(l,d,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=ad(S.href),O=d.querySelector(Ep(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Og.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,nr(O);return}O=d.ownerDocument||d,S=v9(S),(R=za.get(R))&&x2(S,R),O=O.createElement("link"),nr(O);var Y=O;Y._p=new Promise(function(re,pe){Y.onload=re,Y.onerror=pe}),Ts(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Og.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var k2=0;function iV(l,d){return l.stylesheets&&l.count===0&&Lg(l,l.stylesheets),0k2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Og(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lg(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Dg=null;function Lg(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Dg=new Map,d.forEach(aV,l),Dg=null,Og.call(l))}function aV(l,d){if(!(d.state.loading&4)){var g=Dg.get(l);if(g)var S=g.get(null);else{g=new Map,Dg.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),M2.exports=sK(),M2.exports}var aK=iK();const oK=!1;var jO=A.useLayoutEffect;function cK(e,n,t){A.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 lK(e){const n=A.useRef(null);return A.useImperativeHandle(e,()=>n.current,[]),n}function x0(e){return e[e.length-1]}function ch(e,n){return typeof e=="function"?e(n):e}const TO=Object.prototype.hasOwnProperty,uK=Object.prototype.propertyIsEnumerable;function AO(e){for(const n in e)if(TO.call(e,n))return!0;return!1}const _K=()=>Object.create(null),l_=(e,n)=>w_(e,n,_K);function w_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=oE(e)&&oE(s);if(!i&&!(pv(e)&&pv(s)))return s;const a=i?e:iE(e);if(!a)return s;const o=i?s:iE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!aE(t)||!t.hasOwnProperty("isPrototypeOf"))}function aE(e){return Object.prototype.toString.call(e)==="[object Object]"}function oE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vu(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||!vu(e[a],n[a],t)))return!1;return s===i}return!1}const fK=/[\x00-\x1f\x7f"<>`{}]/g;function dK(e){return e.replace(fK,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function cE(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 dK(n)}const hK=["http:","https:","mailto:","tel:"];function mv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Dp(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+=cE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+cE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function pK(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function mK(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 c=t;n.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,t||(t=c),n.set(i,c)}},clear(){n.clear(),t=void 0,r=void 0}}}const pu=4,RO=5;function MO(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 c=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=c,t[4]=c,t[5]=c,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!I.parse&&I.caseSensitive===j&&I.prefix===z&&I.suffix===T));if(D)w=D;else{const I=gK(N,_,j,z,T);w=I,I.parent=s,I.depth=i;let $;N===1?$=s.dynamic??(s.dynamic=[]):N===3?$=s.optional??(s.optional=[]):$=s.wildcard??(s.wildcard=[]),$.push(I),$.length===2&&(a==null||a.push($))}break}}s=w}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Td(_);b.kind=RO,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=Td(_);b.kind=pu,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)xb(e,n,_,c,s,i,a,o)}function OO(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 Td(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 gK(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 vK(e,n){const t=Td("/"),r=new Uint16Array(6),s=[];for(const i of e)xb(!1,r,i,1,t,0,s);for(const i of s)i.sort(OO);n.masksTree=t,n.flatCache=gv(1e3)}function bK(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=Nk(e,n.masksTree);return n.flatCache.set(e,r),r}function yK(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=Td("/"),xb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),Nk(r,a,t)}function xK(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=Nk(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=LO(i.route)),n.matchCache.set(r,i),i}function wK(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function kK(e,n=!1,t){const r=Td(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;xb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&Ek(),a[u.id]=u,c!==0&&u.path){const h=wK(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(OO);return{processedTree:{segmentTree:r,singleCache:gv(1e3),matchCache:gv(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Nk(e,n,t=!1){const r=e.split("/"),s=CK(e,r,n,t);if(!s)return null;const[i]=DO(e,r,s);return{route:s.node.route,rawParams:i}}function DO(e,n,t){var h,_,p,m;const r=SK(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.part)??0,o=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;z--){const T=_.wildcard[z],{prefix:j,suffix:M}=T;if(!(j&&(y||!(T.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(j)))){if(M){if(y)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((T.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;T--){const j=_.optional[T];o.push({node:j,index:p,skipped:z,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}if(!y)for(let T=_.optional.length-1;T>=0;T--){const j=_.optional[T],{prefix:M,suffix:D}=j;if(M||D){const I=j.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;z--){const T=_.dynamic[z],{prefix:j,suffix:M}=T;if(j||M){const D=T.caseSensitive?C:N??(N=C.toLowerCase());if(j&&!D.startsWith(j)||M&&D.indexOf(M,D.length-M.length)=0;z--){const T=_.pathless[z];o.push({node:T,index:p,skipped:m,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(r&&c){let h=c.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===pu)>(e.node.kind===pu)||n.node.kind===pu==(e.node.kind===pu)&&n.node.depth>e.node.depth))):!0}function F1(e){return H1(e.filter(n=>n!==void 0).join("/"))}function H1(e){return e.replace(/\/{2,}/g,"/")}function IO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Zc(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function $O(e){return Zc(IO(e))}function vv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function NK(e,n,t){return vv(e,t)===vv(n,t)}function zK({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 a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=H1(e)),a=e.split("/");a.length>1&&x0(a)==="";)a.pop();const u=n.split("/");for(let h=0,_=u.length;h<_;h++){const p=u[h];p===""?h?h===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(x0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?H1(o):o)||"/";return i&&r&&r.set(i,c),c}function jK(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 I2(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=>_E(s,t)).join("/"):_E(r,t)}function uE({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,c,u="";for(;oe.state.__TSR_key||e.href;function LK(e){const n=e.getAttribute(fE);if(n)return`[${fE}="${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 Kg=!1;const q1="window";function Q4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function dE(e){const n=new Set;for(const t of e){if(t===q1)continue;const r=Q4(t);r&&n.add(r)}return n}function IK(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||DK,i=new Set,a=o=>{const c=nu[o]||(nu[o]={});for(const u of i)u===document?c[q1]={scrollX,scrollY}:u.isConnected&&(c[LK(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,Kg=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{Kg||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())),OK()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=r.next,_=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 v=nu[x];if(v){let b=nu[m];for(const w in v){if(w===q1){if(h)continue}else{const y=Q4(w);if(!y||h&&u&&(p??(p=dE(u)),p.has(y)))continue}b||(b=nu[m]={}),b[w]??(b[w]=v[w])}}}Kg=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!v&&u&&(p??(p=dE(u)));const y=v&&b&&_,C=r.restoring?nu[m]:void 0;if(C)for(const N in C){const{scrollX:z,scrollY:T}=C[N];if(N===q1){if(y)continue;scrollTo({top:T,left:z,behavior:c}),w=!0}else{const j=Q4(N);j&&(j.scrollLeft=z,j.scrollTop=T,p==null||p.delete(j))}}if(!v){const N={top:0,left:0,behavior:c};if(w||scrollTo(N),p)for(const z of p)z.scrollTo(N)}}!w&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{Kg=!1}}))}function $K(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 $2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function BK(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]=$2(s):Array.isArray(i)?i.push($2(s)):t[r]=[i,$2(s)]}return t}const PK=/^(?:\s|["[{\d-]|fa|nu|tr)/,FK=qK(JSON.parse),HK=UK(JSON.stringify,JSON.parse);function qK(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=BK(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function UK(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&&!PK.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=$K(s,r);return i?`?${i}`:""}}const Rd="__root__";function GK(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 BO(e){return e instanceof Response&&!!e.options}function VK(e){return{input:({url:n})=>{for(const t of e)n=X4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=PO(e[t],n);return n}}}function KK(e){const n=$O(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=F1(["/",n,i.pathname]),i)}}function X4(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 PO(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 WK(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),c=t(void 0),u=t([]),h=r(()=>u.get().map(k=>i.get(k).get())),_=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.get(),location:o.get(),resolvedLocation:c.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:c,ids:u,matches:h,byRoute:i,__store:_,getMatchStore:p,setMatches:x};function x(k){const v=u.get(),b=k.map(w=>w.routeId);s(()=>{mK(v,b)||u.set(b);for(const w of v)b.includes(w)||i.get(w).set(()=>{});for(const w of k){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var bu="__TSR_index",hE="popstate",pE="beforeunload";function QK(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,...c})=>{var _,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const x=bv(c.path,c.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:c.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,c)=>{const u=n.state[bu];o=mE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=n.state[bu];o=mE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,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[bu]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const o=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...o,a]),()=>{var h,_;const u=((h=e.getBlockers)==null?void 0:h.call(e))??[];(_=e.setBlockers)==null||_.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 mE(e,n){n||(n={});const t=zk();return{...n,key:t,__TSR_key:t,[bu]:e}}function XK(e){var T,j;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),c=(()=>bv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((T=n.history.state)!=null&&T.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=zk();n.history.replaceState({[bu]:0,key:M,__TSR_key:M},"")}let u=c(),h,_=!1,p=!1,m=!1,x=!1;const k=()=>u;let v;const b=()=>{v&&(z._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),z._ignoreSubscribers=!1,v=void 0,h=void 0)},w=(M,D,I)=>{const $=o(D),q=!!v;q||(h=u),u=bv(D,I),v=[$,I,(v==null?void 0:v[2])||M],q||queueMicrotask(()=>b())},y=M=>{u=c(),z.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[bu]-u.state[bu],I=D===1,$=D===-1,q=!I&&!$||_;_=!1;const H=q?"GO":$?"BACK":"FORWARD",Q=q?{type:"GO",index:D}:{type:$?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const J of V)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,n.history.go(1),z.notify(Q);return}}}u=c(),z.notify(Q)},N=M=>{if(x){x=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const $ of I){const q=$.enableBeforeUnload??!0;if(q===!0){D=!0;break}if(typeof q=="function"&&q()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},z=QK({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>w(!0,M,D),replaceState:(M,D)=>w(!1,M,D),back:M=>(M&&(m=!0),x=!0,n.history.back()),forward:M=>{M&&(m=!0),x=!0,n.history.forward()},go:M=>{_=!0,n.history.go(M)},createHref:M=>o(M),flush:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(pE,N,{capture:!0}),n.removeEventListener(hE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(pE,N,{capture:!0}),n.addEventListener(hE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return z._ignoreSubscribers||y("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return z._ignoreSubscribers||y("REPLACE"),D},z}function YK(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function bv(e,n){const t=YK(e),r=t.indexOf("#"),s=t.indexOf("?"),i=zk();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||{[bu]:0,key:i,__TSR_key:i}}}function zk(){return(Math.random()+1).toString(36).substring(7)}function gE(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 wb(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 vE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function ZK(e,n,t,r){var s,i,a,o;for(const c of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===c.routeId)||(i=(s=e.routesById[c.routeId].options).onLeave)==null||i.call(s,c)}for(const c of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[c.routeId].options)[n.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||o.call(a,c)}}var JK=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??oK??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=jK(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=XK()),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=gv(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=WK(this.latestLocation,u),IK(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=$O(o);h&&h!=="/"&&u.push(KK({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:VK(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=kK(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&vK(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:c,search:u,hash:h,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:c+w+h,publicHref:c+w+h,pathname:Dp(c).path,external:!1,searchStr:w,search:l_(r==null?void 0:r.search,b),hash:Dp(h.slice(1)).path,state:w_(r==null?void 0:r.state,p)}}const m=new URL(_,this.origin),x=X4(this.rewrite,m),k=this.options.parseSearch(x.search),v=this.options.stringifySearch(k);return x.search=v,{href:x.href.replace(x.origin,""),publicHref:_,pathname:Dp(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:v,search:l_(r==null?void 0:r.search,k),hash:Dp(x.hash.slice(1)).path,state:w_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>zK({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=xK(Zc(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,D;if(i.href){const I=bv(i.href,{});i={...i,to:X4(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],h=o[3],_=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=bE(i.params,h);const m=this.routesByPath[Zc(_)];let x;if(m)x=this.getRouteBranch(m);else if(_.includes("$"))x=[];else{const[I,$,q]=this.getMatchedRoutes(_);x=I,this.options.notFoundRoute&&(!q||q.path!=="/"&&$["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&AO(p))for(const I of x){const $=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if($){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,$(p))}catch{}}}const k=t.leaveParams?_:Dp(uE({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const I={};x.forEach($=>{if($.options.validateSearch)try{Object.assign(I,U1($.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=tW(v,i,x,t._includeValidateSearch),v=l_(u,v);const b=this.options.stringifySearch(v),w=i.hash===!0?a.hash:i.hash?ch(i.hash,a.hash):void 0,y=w?`#${w}`:"";let C=i.state===!0?a.state:i.state?ch(i.state,a.state):{};i.state&&(C=w_(a.state,C));const N=`${k}${b}${y}`;let z,T,j=!1;if(this.rewrite){const I=new URL(N,this.origin),$=PO(this.rewrite,I);z=I.href.replace(I.origin,""),$.origin!==this.origin?(T=$.href,j=!0):T=$.pathname+$.search+$.hash}else z=pK(N),T=z;return{publicHref:T,href:z,pathname:k,search:v,searchStr:b,state:C,hash:w??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=bK(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=bE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Zc(this.latestLocation.href)===Zc(s.href)&&vu(vE(s.state),vE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:_,...p}=s;h&&(p={...h,state:{...h.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=_??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 c=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var c,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 _=this.buildLocation({to:t,...a});s=s??_.publicHref,i=i??_.publicHref}const h=!o&&i?i:s;if(mv(h,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(h):window.location.href=h;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 uW(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,c=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(wb(o,c)):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,h;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(_=>!s||s(_)).map(_=>_.id)),o=[];for(const[_,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(_),o.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&gE(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=r.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(h=this._flights)==null||h.delete(_);for(const _ of o)_.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&&mv(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[h,_]of r)(!i||i(_))&&(o.push(h),a.push(_));const c=[];for(const[h,_]of s??[])(!i||_.some(i))&&(c.push(h),a.push(..._));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const _=h._flight;h._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===_&&this._flights.delete(h.id),c.push(_[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Md,this.preloadRoute=t=>_W(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(),c=yK(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!vu(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?vu(o.search,i.search,{partial:!0})?c.rawParams:!1:c.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??HK,parseSearch:e.parseSearch??FK,protocolAllowlist:e.protocolAllowlist??hK}),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=LO(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["**"]:Zc(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?nW(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(x,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===x.id?v:x===this.options.notFoundRoute?u.find(b=>b.routeId===x.id):void 0};let _;for(let x=0;x{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((x,k)=>k(x),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((x,k)=>k(x),m):m};s.push(h)}const u=c.validateSearch;if(r&&u){const h=({search:_,next:p,meta:m})=>{const x=p(_);try{const k=U1(u,x);if(m&&k)for(const v in k)v in x||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...x,...k}}catch{}return x};s.push(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const _=ch(n.search,c);return u&&(u.explicit=_),_}const h=(_,p)=>{if(p){const m=u||{};return{search:i(o+1,_,m),meta:m}}return i(o+1,_,u)};return s[o]({search:c,next:h,meta:u})};return i(0,e)}function nW(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 Rd}function bE(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,ch(e,t))}function yE(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 Y4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function rW(e,n){const t=Y4(e,"component");let r=Y4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Md(e,n,t){const r=()=>n===!1?void 0:n?Y4(e,n):rW(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,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function jk(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 _f(e,n){return e.routesById[n.routeId]}function k0(e,n,t){return BO(e)?[Ki,e]:lh(e)?(e.routeId||(e.routeId=t),[kb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[sl,e]):[Wo,e]}function Tk(e,n){var r,s;let t=k0(n,!0,e.id);if(t[0]!==sl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=k0(i,!0,e.id)}return t}function o0(e,n,t,r,s){return s[0].signal.aborted?wu:Mk(e,n,t,Tk(t,r),s)}async function sW(e,n,t,r,s,i){var h,_;const[a,o]=n,c=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({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Jc(e,m),[p,o0(e,n,x,C,t)]}if(c.aborted)return[p,wu];const b=m.paramsError??m.searchError;if(b!==void 0)return Jc(e,m),[p,o0(e,n,x,b,t)];const w=x.options.beforeLoad;if(!w)continue;const y=m.status;p>=i&&(m.status="pending",(_=t[7])==null||_.call(t));try{S0(e,m,"beforeLoad",t[0]);const C=await uf(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,wu];const N=Mk(e,n,x,k0(C,!1,x.id),t);if(N[0]!==Wo)return Jc(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Jc(e,m),[p,o0(e,n,x,C,t)]}finally{m.status=y,S0(e,m,!1,t[0])}}s()}function Ak(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 Jc(e,n){var r;const t=n._flight;n._flight=void 0,(r=Ak(e,n,t))==null||r.abort()}function ji(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(c=>c.id===a.id)))o[2]=0;else{const c=Ak(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function Rk(e){for(const n of e){const t=n._flight;t&&t[2]++}}function S0(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 FO(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:c=>e.navigate({...c,_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 xE(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return wu;if(!s)return[Wo,void 0];let u=t._flight;S0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(FO(e,n,t,r,h,i,!!a[3]))).then(_=>k0(_,!1,r.id),_=>k0(_,!0,r.id)).then(_=>{var p;return _[0]!==Wo&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),_[0]===sl&&u[2]?Tk(r,_[1]):_}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Mk(e,n,r,await uf(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return Jc(e,t),wu}finally{S0(e,t,!1,o)}}function wE(e,n,t){n[0]!==Ki&&(e.status="success",e.error=void 0,n[0]===Wo?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function iW(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&&Jc(e,r)}function kE(e,n){return n[0]===sl||n[0]===kb?{...e,status:n[0]===sl?"error":"notFound",error:n[1],_flight:void 0}:e}function aW(e,n,t,r,s,i,a){var $,q;const o=n[1][t],c=_f(e,o),u=!!i[3],h=e._cache.get(o.id);let _,p=!1,m;try{if(o.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(FO(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=wu)),!m)if(o.status!=="success")p=!0;else{const H=u||o.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||_||_===void 0&&Date.now()-o.updatedAt>=H&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(H){o.invalid=!0,Jc(e,o),m=o0(e,n,c,H,i)}const x=c.options.loader,k=typeof x=="function",v=k?x:x==null?void 0:x.handler,b=!u||c.options.preload!==!1;let w=b&&x?($=e._flights)==null?void 0:$.get(o.id):void 0;w===o._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(x&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!y&&(o.status!=="success"||!!x),z=t>=a?i[7]:void 0,T=c.lazyFn&&c._lazy!==!0?z:void 0;if(C&&!x&&(o.invalid=!1,o.updatedAt=Date.now()),w&&w[2]++,N){const H=o._flight;o._flight=w,(q=Ak(e,o,H))==null||q.abort(),t>=a&&(o.status="pending"),z==null||z()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):N?xE(e,n,o,c,v,s,i):Promise.resolve([Wo,o.loaderData])).then(H=>(N&&(wE(o,H,u),H[0]===Wo&&(x&&!i[0].signal.aborted&&iW(e,o,h),t>=a&&(o.status="pending"))),H)),M=uf(Promise.resolve().then(()=>Md(c,void 0,T)),i[0].signal).then(()=>{},H=>n[1].some((Q,V)=>V<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,o0(e,n,c,H,i)]).then(H=>j.then(Q=>(N&&!H&&Q[0]===Wo&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",z==null||z()),H)));if(r.push([t,j,M]),!y)return j.then(H=>kE(o,H));const D={...o,status:"pending",preload:!1,_flight:w};o.invalid=!1,o.isFetching="loader";const I=xE(e,n,D,c,v,s,i).then(H=>(o.isFetching=!1,wE(D,H,!1),H));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(H=>kE(D,H))}async function Z4(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 c=_f(e,n[o]);try{const u=Md(c,!1);u&&await uf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(c.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function B_(e,n){n[2]&&(ji(e,n[2].map(t=>t[3])),n[2]=void 0)}async function SE(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]>=Ki)throw[o,a];!s&&a[0]!==Wo&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===Ki)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function Mk(e,n,t,r,s,i){for(;r[0]===Ki;){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):[Ki,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[sl,c]:Tk(t,c),i=!0}}return r}async function HO(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===kb?Z4(e,a,m,r.signal):m[0];let _=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=Ki)_=0;else if(o){_=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=_)break;const x=await m[1];if(x[0]!==Wo&&x[0]=_)break;const x=await m[2];if(x){o=x;break}}if(((o==null?void 0:o[1][0])??0)>=Ki){const m=o[1];if(m[0]!==Ki||m[1].options.reloadDocument||m[2])return B_(e,n),m;c=!0,o=[0,[sl,new Error("Too many redirects")]]}const p=o?o[2]??await h(o):u;if(p>=0){const m=o==null?void 0:o[1],x=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],b=()=>{m&&(k._notFound=void 0,x===sl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};b(),m||i==null||i();const w=_f(e,k);try{await uf(m?Promise.resolve().then(()=>Md(w,x===sl?"errorComponent":"notFoundComponent")):Promise.all([Md(w),Md(w,"notFoundComponent")]),r.signal)}catch(y){if(y===r.signal&&r.signal.aborted)return B_(e,n),wu}m?c&&(r.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(n[2]??[]).map(y=>y[1])]),B_(e,n),ji(e,a),b()):k.status="success"}return n}async function qO(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await Z4(e,t,void 0,i,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let h=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Ki&&(h=0);k()}if(!i.aborted&&!r[3]){const w=[];for(const[y,C]of e._flights??[])C[2]||(e._flights.delete(y),w.push(C[1]));for(const y of w)y.abort()}const b=HO(e,s,p,r[0],SE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=SE(s[2],void 0,void 0,b.then(w=>w0(w)?0:jk(t).length,()=>0))),a=await b}catch(c){if(B_(e,s),c===i&&i.aborted)return wu;throw c}return w0(a)?a:qO(e,a,i,r[6]===t.length?r[6]:0)}function J4(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(()=>J4(e,n),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+x),w));return}}function Lp(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 CE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!jk(n[3]).some(i=>i.id===t[1]))return;let s;try{await uf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function GO(e,n){e._committed=n,e.stores.setMatches(n)}function oW(e,n,t,r){const s=e._committed,i=e._cache;for(const c of t)c.preload=!1,r&&(c._assetEnd=void 0);const a=jk(t).length,o=new Map;{const c=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,GO(e,t),ji(e,[...i.values(),...s],[...t,...o.values()]),ZK(e,s,t,n)}async function Wg(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function VO(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 cW(e,n,t,r,s){const i=t.map(c=>({...c}));Rk(i);for(const c of r)Jc(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await HO(e,a,r,n[0],s)}catch(c){throw ji(e,i),c}if(w0(o)){ji(e,i),o[0]===Ki&&e._tx===n&&e._committed===t&&await VO(e,n,o);return}if(await qO(e,o,n[0].signal),e._tx!==n||e._committed!==t){ji(e,i);return}for(const c of i){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Jc(e,u))}GO(e,i),ji(e,t,i)}async function lW(e,n,t,r,s,i){const a=await UO(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(w0(a)){const _=a[0]===Ki&&e._tx===n;if((!_||a[1].options.reloadDocument)&&Lp(e,n),ji(e,n[3]),n[3]=[],!_)return;if(e._tx!==n){Lp(e,n);return}await VO(e,n,a);return}const o=a[1];if(e._tx===n&&await CE(e,n),e._tx!==n){Lp(e,n),ji(e,o),B_(e,a);return}const c=n[2],u=wb(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await CE(e,n),e._tx!==n){Lp(e,n),ji(e,o),B_(e,a);return}const _=()=>{Lp(e,n),oW(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,o);if(e._tx!==n){B_(e,a);return}h!=null&&h.length&&cW(e,n,o,h,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),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 uW(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,c=e._handoff,u=c==null?void 0:c[0](),h=new AbortController,_=e._preflight;if(e._preflight=h,u||c==null||c[1](),_==null||_.abort(),!h.signal.aborted){const N=wb(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await Wg(e,t);return}const p=s.href===i.href;let m=h;const x=e.matchRoutes(i,{_controller:h});Rk(x);const k=u?c[1](x):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){ji(e,x),await Wg(e,t);return}e._preflight=void 0;let v;const b=()=>lW(e,y,p,()=>J4(e,y),n==null?void 0:n.sync,k),w=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),y=[m,o,i,x,Date.now(),w];if(e._tx=y,t){for(const N of e.stores.matches.get()){if(e._tx!==y)break;N.isFetching&&S0(e,N,!1)}t[0].abort(),ji(e,t[3],y[3],!0)}if(e._tx!==y){ji(e,y[3]),y[3]=[],v==null||v(),await Wg(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(N=>N._notFound))&&J4(e,y),v==null||v(b()),await w,await Wg(e,y)}async function _W(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,c;try{try{a=e.matchRoutes(t,{_controller:i}),Rk(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await UO(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),ji(e,a)),i.abort()}if(!w0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){lh(u)||console.error(u);return}}}const fW="Error preloading route! ☝️";var KO=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 c,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),r?this._path=Rd:this.parentRoute||Ek();let s=r?Rd:t==null?void 0:t.path;s&&s!=="/"&&(s=IO(s));const i=(t==null?void 0:t.id)||s;let a=r?Rd:F1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=F1(["/",a]));const o=a==="__root__"?"/":F1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Zc(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=>GK({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.")}},dW=class extends KO{constructor(e){super(e)}},Ok=class extends A.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?A.createElement(this.props.errorComponent??hW,{error:e,reset:this.reset}):this.props.children}};function hW({error:e}){const[n,t]=A.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.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"})]}),f.jsx("div",{style:{height:".25rem"}}),n?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function pW({children:e,fallback:n=null}){return f.jsx(tt.Fragment,{children:WO()?e:n})}function WO(){return tt.useSyncExternalStore(mW,()=>!0,()=>!1)}function mW(){return()=>{}}var QO=A.createContext(null);function _i(e){return A.useContext(QO)}var Sb=A.createContext(void 0),gW=A.createContext(void 0),yr=(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))(yr||{});function vW({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,_){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=_,h.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===_&&x.sub===h)return;const k=h.depsTail=u.subsTail={version:_,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,x!==void 0?x.nextSub=k:u.subs=k}function s(u,h=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:h.depsTail=p,p!==void 0?p.nextDep=m:h.deps=m,x!==void 0?x.prevSub=k:_.subsTail=k,k!==void 0?k.nextSub=x:(_.subs=x)===void 0&&t(_),m}function i(u){let h=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(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 k=(u=x).nextSub;k!==void 0&&(_={value:h,prev:_},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let _,p=0,m=!1;e:do{const x=u.dep,k=x.flags;if(h.flags&16)m=!0;else if((k&17)===17){if(e(x)){const v=x.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=x.deps,h=x,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,_=h.flags;(_&48)===32&&(h.flags=_|16,(_&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let _=h.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function bW(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 e3=[];let G1=0;const{link:EE,unlink:yW,propagate:xW,checkDirty:XO,shallowPropagate:NE}=vW({update(e){return e._update()},notify(e){e3[t3++]=e,e.flags&=~yr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=yr.Mutable|yr.Dirty,xv(e))}});let Qg=0,t3=0,Bo,n3=0;function wW(e){try{++n3,e()}finally{--n3||YO()}}function xv(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=yW(t,e)}function YO(){if(!(n3>0)){for(;Qg{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=Bo,o=(n==null?void 0:n.compare)??Object.is;if(t)Bo=s,++G1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=yr.Mutable|yr.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&t?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{Bo=a,t&&(s.flags&=~yr.RecursedCheck),xv(s)}}};return t?(s.flags=yr.Mutable|yr.Dirty,s.get=function(){const i=s.flags;if(i&yr.Dirty||i&yr.Pending&&XO(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&NE(a)}}else i&yr.Pending&&(s.flags=i&~yr.Pending);return Bo!==void 0&&EE(s,Bo,G1),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(xW(a),NE(a),YO())}},s}function kW(e){const n=()=>{const r=Bo;Bo=t,++G1,t.depsTail=void 0,t.flags=yr.Watching|yr.RecursedCheck;try{return e()}finally{Bo=r,t.flags&=~yr.RecursedCheck,xv(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:yr.Watching|yr.RecursedCheck,notify(){const r=this.flags;r&yr.Dirty||r&yr.Pending&&XO(this.deps,this)?n():this.flags=yr.Watching},stop(){this.flags=yr.None,this.depsTail=void 0,xv(this)}};return n(),t}var B2={exports:{}},P2={},F2={exports:{}},H2={};/** +`+S.stack}}var Qe=Object.prototype.hasOwnProperty,it=e.unstable_scheduleCallback,Ct=e.unstable_cancelCallback,Ht=e.unstable_shouldYield,pt=e.unstable_requestPaint,_t=e.unstable_now,Le=e.unstable_getCurrentPriorityLevel,me=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,rt=e.unstable_LowPriority,ft=e.unstable_IdlePriority,St=e.log,gt=e.unstable_setDisableYieldValue,Kt=null,en=null;function Ke(l){if(typeof St=="function"&>(l),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Kt,l)}catch{}}var vt=Math.clz32?Math.clz32:yn,In=Math.log,tn=Math.LN2;function yn(l){return l>>>=0,l===0?32:31-(In(l)/tn|0)|0}var yr=256,Pn=262144,$n=4194304;function Fn(l){var d=l&42;if(d!==0)return d;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Yn(l,d,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,Y=l.pingedLanes;l=l.warmLanes;var re=S&134217727;return re!==0?(S=re&~O,S!==0?R=Fn(S):(Y&=re,Y!==0?R=Fn(Y):g||(g=re&~l,g!==0&&(R=Fn(g))))):(re=S&~O,re!==0?R=Fn(re):Y!==0?R=Fn(Y):g||(g=S&~l,g!==0&&(R=Fn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function Dr(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function bt(l,d){switch(l){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 ln(){var l=$n;return $n<<=1,($n&62914560)===0&&($n=4194304),l}function En(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function on(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function dr(l,d,g,S,R,O){var Y=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var re=l.entanglements,he=l.expirationTimes,Ne=l.hiddenUpdates;for(g=Y&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Gn=/[\n"\\]/g;function pr(l){return l.replace(Gn,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Ls(l,d,g,S,R,O,Y,re){l.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?l.type=Y:l.removeAttribute("type"),d!=null?Y==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+Wr(d)):l.value!==""+Wr(d)&&(l.value=""+Wr(d)):Y!=="submit"&&Y!=="reset"||l.removeAttribute("value"),d!=null?Lr(l,Y,Wr(d)):g!=null?Lr(l,Y,Wr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?l.name=""+Wr(re):l.removeAttribute("name")}function Is(l,d,g,S,R,O,Y,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){Ss(l);return}g=g!=null?""+Wr(g):"",d=d!=null?""+Wr(d):g,re||d===l.value||(l.value=d),l.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=re?l.checked:!!S,l.defaultChecked=!!S,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(l.name=Y),Ss(l)}function Lr(l,d,g){d==="number"&&pi(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function mi(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uc=!1;if(_s)try{var da={};Object.defineProperty(da,"passive",{get:function(){uc=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{uc=!1}var hr=null,_c=null,ar=null;function Ef(){if(ar)return ar;var l,d=_c,g=d.length,S,R="value"in hr?hr.value:hr.textContent,O=R.length;for(l=0;l=ma),Eo=" ",Df=!1;function Lf(l,d){switch(l){case"keyup":return Of.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function js(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var fn=!1;function Hu(l,d){switch(l){case"compositionend":return js(d);case"keypress":return d.which!==32?null:(Df=!0,Eo);case"textInput":return l=d.data,l===Eo&&Df?null:l;default:return null}}function qu(l,d){if(fn)return l==="compositionend"||!Co&&Lf(l,d)?(l=Ef(),ar=_c=hr=null,fn=!1,l):null;switch(l){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-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=ve(g)}}function X(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?X(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function ae(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=pi(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=pi(l.document)}return d}function xe(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var Re=_s&&"documentMode"in document&&11>=document.documentMode,Se=null,Fe=null,Xe=null,Dt=!1;function Vn(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Dt||Se==null||Se!==pi(S)||(S=Se,"selectionStart"in S&&xe(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Xe&&te(Xe,S)||(Xe=S,S=jg(Fe,"onSelect"),0>=Y,R-=Y,jo=1<<32-vt(d)+R|g<nn?(bn=Et,Et=null):bn=Et.sibling;var Tn=Te(ke,Et,Ee[nn],$e);if(Tn===null){Et===null&&(Et=bn);break}l&&Et&&Tn.alternate===null&&d(ke,Et),ge=O(Tn,ge,nn),jn===null?Lt=Tn:jn.sibling=Tn,jn=Tn,Et=bn}if(nn===Ee.length)return g(ke,Et),kn&&kc(ke,nn),Lt;if(Et===null){for(;nnnn?(bn=Et,Et=null):bn=Et.sibling;var Wl=Te(ke,Et,Tn.value,$e);if(Wl===null){Et===null&&(Et=bn);break}l&&Et&&Wl.alternate===null&&d(ke,Et),ge=O(Wl,ge,nn),jn===null?Lt=Wl:jn.sibling=Wl,jn=Wl,Et=bn}if(Tn.done)return g(ke,Et),kn&&kc(ke,nn),Lt;if(Et===null){for(;!Tn.done;nn++,Tn=Ee.next())Tn=Pe(ke,Tn.value,$e),Tn!==null&&(ge=O(Tn,ge,nn),jn===null?Lt=Tn:jn.sibling=Tn,jn=Tn);return kn&&kc(ke,nn),Lt}for(Et=S(Et);!Tn.done;nn++,Tn=Ee.next())Tn=Oe(Et,ke,nn,Tn.value,$e),Tn!==null&&(l&&Tn.alternate!==null&&Et.delete(Tn.key===null?nn:Tn.key),ge=O(Tn,ge,nn),jn===null?Lt=Tn:jn.sibling=Tn,jn=Tn);return l&&Et.forEach(function(pV){return d(ke,pV)}),kn&&kc(ke,nn),Lt}function nr(ke,ge,Ee,$e){if(typeof Ee=="object"&&Ee!==null&&Ee.type===k&&Ee.key===null&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case m:e:{for(var Lt=Ee.key;ge!==null;){if(ge.key===Lt){if(Lt=Ee.type,Lt===k){if(ge.tag===7){g(ke,ge.sibling),$e=R(ge,Ee.props.children),$e.return=ke,ke=$e;break e}}else if(ge.elementType===Lt||typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===j&&n_(Lt)===ge.type){g(ke,ge.sibling),$e=R(ge,Ee.props),ap($e,Ee),$e.return=ke,ke=$e;break e}g(ke,ge);break}else d(ke,ge);ge=ge.sibling}Ee.type===k?($e=Yu(Ee.props.children,ke.mode,$e,Ee.key),$e.return=ke,ke=$e):($e=Vm(Ee.type,Ee.key,Ee.props,null,ke.mode,$e),ap($e,Ee),$e.return=ke,ke=$e)}return Y(ke);case x:e:{for(Lt=Ee.key;ge!==null;){if(ge.key===Lt)if(ge.tag===4&&ge.stateNode.containerInfo===Ee.containerInfo&&ge.stateNode.implementation===Ee.implementation){g(ke,ge.sibling),$e=R(ge,Ee.children||[]),$e.return=ke,ke=$e;break e}else{g(ke,ge);break}else d(ke,ge);ge=ge.sibling}$e=Wy(Ee,ke.mode,$e),$e.return=ke,ke=$e}return Y(ke);case j:return Ee=n_(Ee),nr(ke,ge,Ee,$e)}if(Q(Ee))return wt(ke,ge,Ee,$e);if($(Ee)){if(Lt=$(Ee),typeof Lt!="function")throw Error(r(150));return Ee=Lt.call(Ee),qt(ke,ge,Ee,$e)}if(typeof Ee.then=="function")return nr(ke,ge,Jm(Ee),$e);if(Ee.$$typeof===y)return nr(ke,ge,Qm(ke,Ee),$e);eg(ke,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,ge!==null&&ge.tag===6?(g(ke,ge.sibling),$e=R(ge,Ee),$e.return=ke,ke=$e):(g(ke,ge),$e=Ky(Ee,ke.mode,$e),$e.return=ke,ke=$e),Y(ke)):g(ke,ge)}return function(ke,ge,Ee,$e){try{ip=0;var Lt=nr(ke,ge,Ee,$e);return Wf=null,Lt}catch(Et){if(Et===Kf||Et===Ym)throw Et;var jn=Ii(29,Et,null,ke.mode);return jn.lanes=$e,jn.return=ke,jn}finally{}}}var s_=XC(!0),YC=XC(!1),Al=!1;function ax(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ox(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Rl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ml(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(Rn&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Gm(l),ep(l,null,g),d}return $r(l,S,d,g),Gm(l)}function op(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,gn(l,g)}}function cx(l,d){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var Y={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=Y:O=O.next=Y,g=g.next}while(g!==null);O===null?R=O=d:O=O.next=d}else R=O=d;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=d:l.next=d,g.lastBaseUpdate=d}var lx=!1;function cp(){if(lx){var l=Vf;if(l!==null)throw l}}function lp(l,d,g,S){lx=!1;var R=l.updateQueue;Al=!1;var O=R.firstBaseUpdate,Y=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var he=re,Ne=he.next;he.next=null,Y===null?O=Ne:Y.next=Ne,Y=he;var Ie=l.alternate;Ie!==null&&(Ie=Ie.updateQueue,re=Ie.lastBaseUpdate,re!==Y&&(re===null?Ie.firstBaseUpdate=Ne:re.next=Ne,Ie.lastBaseUpdate=he))}if(O!==null){var Pe=R.baseState;Y=0,Ie=Ne=he=null,re=O;do{var Te=re.lane&-536870913,Oe=Te!==re.lane;if(Oe?(vn&Te)===Te:(S&Te)===Te){Te!==0&&Te===Gf&&(lx=!0),Ie!==null&&(Ie=Ie.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var wt=l,qt=re;Te=d;var nr=g;switch(qt.tag){case 1:if(wt=qt.payload,typeof wt=="function"){Pe=wt.call(nr,Pe,Te);break e}Pe=wt;break e;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=qt.payload,Te=typeof wt=="function"?wt.call(nr,Pe,Te):wt,Te==null)break e;Pe=_({},Pe,Te);break e;case 2:Al=!0}}Te=re.callback,Te!==null&&(l.flags|=64,Oe&&(l.flags|=8192),Oe=R.callbacks,Oe===null?R.callbacks=[Te]:Oe.push(Te))}else Oe={lane:Te,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Ie===null?(Ne=Ie=Oe,he=Pe):Ie=Ie.next=Oe,Y|=Te;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Oe=re,re=Oe.next,Oe.next=null,R.lastBaseUpdate=Oe,R.shared.pending=null}}while(!0);Ie===null&&(he=Pe),R.baseState=he,R.firstBaseUpdate=Ne,R.lastBaseUpdate=Ie,O===null&&(R.shared.lanes=0),$l|=Y,l.lanes=Y,l.memoizedState=Pe}}function ZC(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function JC(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var Y=V.T,re={};V.T=re,zx(l,!1,d,g);try{var he=R(),Ne=V.S;if(Ne!==null&&Ne(re,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Ie=sG(he,S);fp(l,d,Ie,Hi(l))}else fp(l,d,S,Hi(l))}catch(Pe){fp(l,d,{then:function(){},status:"rejected",reason:Pe},Hi())}finally{J.p=O,Y!==null&&re.types!==null&&(Y.types=re.types),V.T=Y}}function uG(){}function Ex(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=A7(l).queue;T7(l,R,d,Z,g===null?uG:function(){return R7(l),g(S)})}function A7(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:Z},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function R7(l){var d=A7(l);d.next===null&&(d=l.alternate.memoizedState),fp(l,d.next.queue,{},Hi())}function Nx(){return As(jp)}function M7(){return Zr().memoizedState}function O7(){return Zr().memoizedState}function _G(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=Hi();l=Rl(g);var S=Ml(d,l,g);S!==null&&(Si(S,d,g),op(S,d,g)),d={cache:nx()},l.payload=d;return}d=d.return}}function fG(l,d,g){var S=Hi();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},ug(l)?L7(d,g):(g=El(l,d,g,S),g!==null&&(Si(g,l,S),I7(g,d,S)))}function D7(l,d,g){var S=Hi();fp(l,d,g,S)}function fp(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(ug(l))L7(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var Y=d.lastRenderedState,re=O(Y,g);if(R.hasEagerState=!0,R.eagerState=re,xs(re,Y))return $r(l,d,R,0),cr===null&&xa(),!1}catch{}finally{}if(g=El(l,d,R,S),g!==null)return Si(g,l,S),I7(g,d,S),!0}return!1}function zx(l,d,g,S){if(S={lane:2,revertLane:a2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},ug(l)){if(d)throw Error(r(479))}else d=El(l,g,S,2),d!==null&&Si(d,l,2)}function ug(l){var d=l.alternate;return l===Jt||d!==null&&d===Jt}function L7(l,d){Xf=rg=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function I7(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,gn(l,g)}}var dp={readContext:As,use:ag,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useLayoutEffect:Br,useInsertionEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useSyncExternalStore:Br,useId:Br,useHostTransitionStatus:Br,useFormState:Br,useActionState:Br,useOptimistic:Br,useMemoCache:Br,useCacheRefresh:Br};dp.useEffectEvent=Br;var $7={readContext:As,use:ag,useCallback:function(l,d){return si().memoizedState=[l,d===void 0?null:d],l},useContext:As,useEffect:x7,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,cg(4194308,4,C7.bind(null,d,l),g)},useLayoutEffect:function(l,d){return cg(4194308,4,l,d)},useInsertionEffect:function(l,d){cg(4,2,l,d)},useMemo:function(l,d){var g=si();d=d===void 0?null:d;var S=l();if(i_){Ke(!0);try{l()}finally{Ke(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=si();if(g!==void 0){var R=g(d);if(i_){Ke(!0);try{g(d)}finally{Ke(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=fG.bind(null,Jt,l),[S.memoizedState,l]},useRef:function(l){var d=si();return l={current:l},d.memoizedState=l},useState:function(l){l=xx(l);var d=l.queue,g=D7.bind(null,Jt,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Sx,useDeferredValue:function(l,d){var g=si();return Cx(g,l,d)},useTransition:function(){var l=xx(!1);return l=T7.bind(null,Jt,l.queue,!0,!1),si().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=Jt,R=si();if(kn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),cr===null)throw Error(r(349));(vn&127)!==0||i7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,x7(o7.bind(null,S,O,l),[l]),S.flags|=2048,Zf(9,{destroy:void 0},a7.bind(null,S,O,g,d),null),g},useId:function(){var l=si(),d=cr.identifierPrefix;if(kn){var g=To,S=jo;g=(S&~(1<<32-vt(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=sg++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?Y.createElement("select",{is:S.is}):Y.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?Y.createElement(R,{is:S.is}):Y.createElement(R)}}O[_n]=d,O[wr]=S;e:for(Y=d.child;Y!==null;){if(Y.tag===5||Y.tag===6)O.appendChild(Y.stateNode);else if(Y.tag!==4&&Y.tag!==27&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===d)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===d)break e;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}d.stateNode=O;e:switch(Ms(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&jc(d)}}return vr(d),Hx(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&jc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=_e.current,qf(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=Ts,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[_n]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||r9(l.nodeValue,g)),l||jl(d,!0)}else l=Tg(l).createTextNode(S),l[_n]=d,d.stateNode=l}return vr(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=qf(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[_n]=d}else Zu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;vr(d),l=!1}else g=Zy(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?(Bi(d),d):(Bi(d),null);if((d.flags&128)!==0)throw Error(r(558))}return vr(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=qf(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[_n]=d}else Zu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;vr(d),R=!1}else R=Zy(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(Bi(d),d):(Bi(d),null)}return Bi(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==l&&g&&(d.child.flags|=8192),pg(d,d.updateQueue),vr(d),null);case 4:return oe(),l===null&&u2(d.stateNode.containerInfo),vr(d),null;case 10:return Cc(d.type),vr(d),null;case 19:if(U(Yr),S=d.memoizedState,S===null)return vr(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)pp(S,!1);else{if(Pr!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ng(l),O!==null){for(d.flags|=128,pp(S,!1),l=O.updateQueue,d.updateQueue=l,pg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)DC(g,l),g=g.sibling;return K(Yr,Yr.current&1|2),kn&&kc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&_t()>yg&&(d.flags|=128,R=!0,pp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ng(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,pg(d,l),pp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!kn)return vr(d),null}else 2*_t()-S.renderingStartTime>yg&&g!==536870912&&(d.flags|=128,R=!0,pp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=_t(),l.sibling=null,g=Yr.current,K(Yr,R?g&1|2:g&1),kn&&kc(d,S.treeForkCount),l):(vr(d),null);case 22:case 23:return Bi(d),_x(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(vr(d),d.subtreeFlags&6&&(d.flags|=8192)):vr(d),g=d.updateQueue,g!==null&&pg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&U(t_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),Cc(ns),vr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function gG(l,d){switch(Xy(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Cc(ns),oe(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return pe(d),null;case 31:if(d.memoizedState!==null){if(Bi(d),d.alternate===null)throw Error(r(340));Zu()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if(Bi(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Zu()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return U(Yr),null;case 4:return oe(),null;case 10:return Cc(d.type),null;case 22:case 23:return Bi(d),_x(),l!==null&&U(t_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return Cc(ns),null;case 25:return null;default:return null}}function c8(l,d){switch(Xy(d),d.tag){case 3:Cc(ns),oe();break;case 26:case 27:case 5:pe(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&Bi(d);break;case 13:Bi(d);break;case 19:U(Yr);break;case 10:Cc(d.type);break;case 22:case 23:Bi(d),_x(),l!==null&&U(t_);break;case 24:Cc(ns)}}function mp(l,d){try{var g=d.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&l)===l){S=void 0;var O=g.create,Y=g.inst;S=O(),Y.destroy=S}g=g.next}while(g!==R)}}catch(re){Qn(d,d.return,re)}}function Ll(l,d,g){try{var S=d.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&l)===l){var Y=S.inst,re=Y.destroy;if(re!==void 0){Y.destroy=void 0,R=d;var he=g,Ne=re;try{Ne()}catch(Ie){Qn(R,he,Ie)}}}S=S.next}while(S!==O)}}catch(Ie){Qn(d,d.return,Ie)}}function l8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{JC(d,g)}catch(S){Qn(l,l.return,S)}}}function u8(l,d,g){g.props=a_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){Qn(l,d,S)}}function gp(l,d){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var S=l.stateNode;break;case 30:S=l.stateNode;break;default:S=l.stateNode}typeof g=="function"?l.refCleanup=g(S):g.current=S}}catch(R){Qn(l,d,R)}}function Ao(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){Qn(l,d,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){Qn(l,d,R)}else g.current=null}function _8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){Qn(l,l.return,R)}}function qx(l,d,g){try{var S=l.stateNode;BG(S,l.type,g,d),S[wr]=d}catch(R){Qn(l,l.return,R)}}function f8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ql(l.type)||l.tag===4}function Ux(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||f8(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&ql(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Gx(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Ir));else if(S!==4&&(S===27&&ql(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(Gx(l,d,g),l=l.sibling;l!==null;)Gx(l,d,g),l=l.sibling}function mg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&ql(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(mg(l,d,g),l=l.sibling;l!==null;)mg(l,d,g),l=l.sibling}function d8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Ms(d,S,g),d[_n]=l,d[wr]=g}catch(O){Qn(l,l.return,O)}}var Tc=!1,is=!1,Vx=!1,h8=typeof WeakSet=="function"?WeakSet:Set,ws=null;function vG(l,d){if(l=l.containerInfo,d2=Ig,l=ae(l),xe(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var Y=0,re=-1,he=-1,Ne=0,Ie=0,Pe=l,Te=null;t:for(;;){for(var Oe;Pe!==g||R!==0&&Pe.nodeType!==3||(re=Y+R),Pe!==O||S!==0&&Pe.nodeType!==3||(he=Y+S),Pe.nodeType===3&&(Y+=Pe.nodeValue.length),(Oe=Pe.firstChild)!==null;)Te=Pe,Pe=Oe;for(;;){if(Pe===l)break t;if(Te===g&&++Ne===R&&(re=Y),Te===O&&++Ie===S&&(he=Y),(Oe=Pe.nextSibling)!==null)break;Pe=Te,Te=Pe.parentNode}Pe=Oe}g=re===-1||he===-1?null:{start:re,end:he}}else g=null}g=g||{start:0,end:0}}else g=null;for(h2={focusedElem:l,selectionRange:g},Ig=!1,ws=d;ws!==null;)if(d=ws,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,ws=l;else for(;ws!==null;){switch(d=ws,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Ms(O,S,g),O[_n]=l,ir(O),S=O;break e;case"link":var Y=y9("link","href",R).get(S+(g.href||""));if(Y){for(var re=0;renr&&(Y=nr,nr=qt,qt=Y);var ke=je(re,qt),ge=je(re,nr);if(ke&&ge&&(Oe.rangeCount!==1||Oe.anchorNode!==ke.node||Oe.anchorOffset!==ke.offset||Oe.focusNode!==ge.node||Oe.focusOffset!==ge.offset)){var Ee=Pe.createRange();Ee.setStart(ke.node,ke.offset),Oe.removeAllRanges(),qt>nr?(Oe.addRange(Ee),Oe.extend(ge.node,ge.offset)):(Ee.setEnd(ge.node,ge.offset),Oe.addRange(Ee))}}}}for(Pe=[],Oe=re;Oe=Oe.parentNode;)Oe.nodeType===1&&Pe.push({element:Oe,left:Oe.scrollLeft,top:Oe.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,V.T=null,g=Jx,Jx=null;var O=Pl,Y=Dc;if(ds=0,rd=Pl=null,Dc=0,(Rn&6)!==0)throw Error(r(331));var re=Rn;if(Rn|=4,C8(O.current),w8(O,O.current,Y,g),Rn=re,kp(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Kt,O)}catch{}return!0}finally{J.p=R,V.T=S,q8(l,d)}}function G8(l,d,g){d=wa(g,d),d=Rx(l.stateNode,d,2),l=Ml(l,d,2),l!==null&&(on(l,2),Ro(l))}function Qn(l,d,g){if(l.tag===3)G8(l,l,g);else for(;d!==null;){if(d.tag===3){G8(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Bl===null||!Bl.has(S))){l=wa(g,l),g=V7(2),S=Ml(d,g,2),S!==null&&(K7(g,S,d,l),on(S,2),Ro(S));break}}d=d.return}}function r2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new xG;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(Qx=!0,R.add(g),l=EG.bind(null,l,d,g),d.then(l,l))}function EG(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,cr===l&&(vn&g)===g&&(Pr===4||Pr===3&&(vn&62914560)===vn&&300>_t()-bg?(Rn&2)===0&&sd(l,0):Xx|=g,nd===vn&&(nd=0)),Ro(l)}function V8(l,d){d===0&&(d=ln()),l=Bn(l,d),l!==null&&(on(l,d),Ro(l))}function NG(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),V8(l,g)}function zG(l,d){var g=0;switch(l.tag){case 31:case 13:var S=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=l.stateNode;break;case 22:S=l.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(d),V8(l,g)}function jG(l,d){return it(l,d)}var Eg=null,ad=null,s2=!1,Ng=!1,i2=!1,Hl=0;function Ro(l){l!==ad&&l.next===null&&(ad===null?Eg=ad=l:ad=ad.next=l),Ng=!0,s2||(s2=!0,AG())}function kp(l,d){if(!i2&&Ng){i2=!0;do for(var g=!1,S=Eg;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var Y=S.suspendedLanes,re=S.pingedLanes;O=(1<<31-vt(42|l)+1)-1,O&=R&~(Y&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,X8(S,O))}else O=vn,O=Yn(S,S===cr?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||Dr(S,O)||(g=!0,X8(S,O));S=S.next}while(g);i2=!1}}function TG(){K8()}function K8(){Ng=s2=!1;var l=0;Hl!==0&&FG()&&(l=Hl);for(var d=_t(),g=null,S=Eg;S!==null;){var R=S.next,O=W8(S,d);O===0?(S.next=null,g===null?Eg=R:g.next=R,R===null&&(ad=g)):(g=S,(l!==0||(O&3)!==0)&&(Ng=!0)),S=R}ds!==0&&ds!==5||kp(l),Hl!==0&&(Hl=0)}function W8(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0re)break;var Ie=he.transferSize,Pe=he.initiatorType;Ie&&s9(Pe)&&(he=he.responseEnd,Y+=Ie*(he"u"?null:document;function m9(l,d,g){var S=od;if(S&&typeof d=="string"&&d){var R=pr(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),p9.has(R)||(p9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Ms(d,"link",l),ir(d),S.head.appendChild(d)))}}function XG(l){Lc.D(l),m9("dns-prefetch",l,null)}function YG(l,d){Lc.C(l,d),m9("preconnect",l,d)}function ZG(l,d,g){Lc.L(l,d,g);var S=od;if(S&&l&&d){var R='link[rel="preload"][as="'+pr(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+pr(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+pr(g.imageSizes)+'"]')):R+='[href="'+pr(l)+'"]';var O=R;switch(d){case"style":O=cd(l);break;case"script":O=ld(l)}za.has(O)||(l=_({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),za.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Np(O))||d==="script"&&S.querySelector(zp(O))||(d=S.createElement("link"),Ms(d,"link",l),ir(d),S.head.appendChild(d)))}}function JG(l,d){Lc.m(l,d);var g=od;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+pr(S)+'"][href="'+pr(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=ld(l)}if(!za.has(O)&&(l=_({rel:"modulepreload",href:l},d),za.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(zp(O)))return}S=g.createElement("link"),Ms(S,"link",l),ir(S),g.head.appendChild(S)}}}function eV(l,d,g){Lc.S(l,d,g);var S=od;if(S&&l){var R=Vr(S).hoistableStyles,O=cd(l);d=d||"default";var Y=R.get(O);if(!Y){var re={loading:0,preload:null};if(Y=S.querySelector(Np(O)))re.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":d},g),(g=za.get(O))&&x2(l,g);var he=Y=S.createElement("link");ir(he),Ms(he,"link",l),he._p=new Promise(function(Ne,Ie){he.onload=Ne,he.onerror=Ie}),he.addEventListener("load",function(){re.loading|=1}),he.addEventListener("error",function(){re.loading|=2}),re.loading|=4,Rg(Y,d,S)}Y={type:"stylesheet",instance:Y,count:1,state:re},R.set(O,Y)}}}function tV(l,d){Lc.X(l,d);var g=od;if(g&&l){var S=Vr(g).hoistableScripts,R=ld(l),O=S.get(R);O||(O=g.querySelector(zp(R)),O||(l=_({src:l,async:!0},d),(d=za.get(R))&&w2(l,d),O=g.createElement("script"),ir(O),Ms(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function nV(l,d){Lc.M(l,d);var g=od;if(g&&l){var S=Vr(g).hoistableScripts,R=ld(l),O=S.get(R);O||(O=g.querySelector(zp(R)),O||(l=_({src:l,async:!0,type:"module"},d),(d=za.get(R))&&w2(l,d),O=g.createElement("script"),ir(O),Ms(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function g9(l,d,g,S){var R=(R=_e.current)?Ag(R):null;if(!R)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=cd(g.href),g=Vr(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=cd(g.href);var O=Vr(R).hoistableStyles,Y=O.get(l);if(Y||(R=R.ownerDocument||R,Y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,Y),(O=R.querySelector(Np(l)))&&!O._p&&(Y.instance=O,Y.state.loading=5),za.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},za.set(l,g),O||rV(R,l,g,Y.state))),d&&S===null)throw Error(r(528,""));return Y}if(d&&S!==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=Vr(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function cd(l){return'href="'+pr(l)+'"'}function Np(l){return'link[rel="stylesheet"]['+l+"]"}function v9(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function rV(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Ms(d,"link",g),ir(d),l.head.appendChild(d))}function ld(l){return'[src="'+pr(l)+'"]'}function zp(l){return"script[async]"+l}function b9(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+pr(g.href)+'"]');if(S)return d.instance=S,ir(S),S;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(l.ownerDocument||l).createElement("style"),ir(S),Ms(S,"style",R),Rg(S,g.precedence,l),d.instance=S;case"stylesheet":R=cd(g.href);var O=l.querySelector(Np(R));if(O)return d.state.loading|=4,d.instance=O,ir(O),O;S=v9(g),(R=za.get(R))&&x2(S,R),O=(l.ownerDocument||l).createElement("link"),ir(O);var Y=O;return Y._p=new Promise(function(re,he){Y.onload=re,Y.onerror=he}),Ms(O,"link",S),d.state.loading|=4,Rg(O,g.precedence,l),d.instance=O;case"script":return O=ld(g.src),(R=l.querySelector(zp(O)))?(d.instance=R,ir(R),R):(S=g,(R=za.get(O))&&(S=_({},g),w2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),ir(R),Ms(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Rg(S,g.precedence,l));return d.instance}function Rg(l,d,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,Y=0;Y title"):null)}function sV(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){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 l=d.disabled,typeof d.precedence=="string"&&l==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 w9(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function iV(l,d,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=cd(S.href),O=d.querySelector(Np(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Og.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,ir(O);return}O=d.ownerDocument||d,S=v9(S),(R=za.get(R))&&x2(S,R),O=O.createElement("link"),ir(O);var Y=O;Y._p=new Promise(function(re,he){Y.onload=re,Y.onerror=he}),Ms(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Og.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var k2=0;function aV(l,d){return l.stylesheets&&l.count===0&&Lg(l,l.stylesheets),0k2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Og(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lg(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Dg=null;function Lg(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Dg=new Map,d.forEach(oV,l),Dg=null,Og.call(l))}function oV(l,d){if(!(d.state.loading&4)){var g=Dg.get(l);if(g)var S=g.get(null);else{g=new Map,Dg.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),M2.exports=iK(),M2.exports}var oK=aK();const cK=!1;var TO=A.useLayoutEffect;function lK(e,n,t){A.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 uK(e){const n=A.useRef(null);return A.useImperativeHandle(e,()=>n.current,[]),n}function w0(e){return e[e.length-1]}function uh(e,n){return typeof e=="function"?e(n):e}const AO=Object.prototype.hasOwnProperty,_K=Object.prototype.propertyIsEnumerable;function RO(e){for(const n in e)if(AO.call(e,n))return!0;return!1}const fK=()=>Object.create(null),l_=(e,n)=>w_(e,n,fK);function w_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=oE(e)&&oE(s);if(!i&&!(pv(e)&&pv(s)))return s;const a=i?e:iE(e);if(!a)return s;const o=i?s:iE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!aE(t)||!t.hasOwnProperty("isPrototypeOf"))}function aE(e){return Object.prototype.toString.call(e)==="[object Object]"}function oE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vu(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||!vu(e[a],n[a],t)))return!1;return s===i}return!1}const dK=/[\x00-\x1f\x7f"<>`{}]/g;function hK(e){return e.replace(dK,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function cE(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 hK(n)}const pK=["http:","https:","mailto:","tel:"];function mv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Lp(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+=cE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+cE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function mK(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function gK(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 c=t;n.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,t||(t=c),n.set(i,c)}},clear(){n.clear(),t=void 0,r=void 0}}}const pu=4,MO=5;function OO(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 c=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=c,t[4]=c,t[5]=c,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!I.parse&&I.caseSensitive===j&&I.prefix===z&&I.suffix===T));if(D)w=D;else{const I=vK(N,_,j,z,T);w=I,I.parent=s,I.depth=i;let $;N===1?$=s.dynamic??(s.dynamic=[]):N===3?$=s.optional??(s.optional=[]):$=s.wildcard??(s.wildcard=[]),$.push(I),$.length===2&&(a==null||a.push($))}break}}s=w}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Rd(_);b.kind=MO,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=Rd(_);b.kind=pu,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)xb(e,n,_,c,s,i,a,o)}function DO(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 Rd(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 vK(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 bK(e,n){const t=Rd("/"),r=new Uint16Array(6),s=[];for(const i of e)xb(!1,r,i,1,t,0,s);for(const i of s)i.sort(DO);n.masksTree=t,n.flatCache=gv(1e3)}function yK(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=Nk(e,n.masksTree);return n.flatCache.set(e,r),r}function xK(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=Rd("/"),xb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),Nk(r,a,t)}function wK(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=Nk(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=IO(i.route)),n.matchCache.set(r,i),i}function kK(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function SK(e,n=!1,t){const r=Rd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;xb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&Ek(),a[u.id]=u,c!==0&&u.path){const h=kK(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(DO);return{processedTree:{segmentTree:r,singleCache:gv(1e3),matchCache:gv(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Nk(e,n,t=!1){const r=e.split("/"),s=EK(e,r,n,t);if(!s)return null;const[i]=LO(e,r,s);return{route:s.node.route,rawParams:i}}function LO(e,n,t){var h,_,p,m;const r=CK(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.part)??0,o=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;z--){const T=_.wildcard[z],{prefix:j,suffix:M}=T;if(!(j&&(y||!(T.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(j)))){if(M){if(y)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((T.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;T--){const j=_.optional[T];o.push({node:j,index:p,skipped:z,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}if(!y)for(let T=_.optional.length-1;T>=0;T--){const j=_.optional[T],{prefix:M,suffix:D}=j;if(M||D){const I=j.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;z--){const T=_.dynamic[z],{prefix:j,suffix:M}=T;if(j||M){const D=T.caseSensitive?C:N??(N=C.toLowerCase());if(j&&!D.startsWith(j)||M&&D.indexOf(M,D.length-M.length)=0;z--){const T=_.pathless[z];o.push({node:T,index:p,skipped:m,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(r&&c){let h=c.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===pu)>(e.node.kind===pu)||n.node.kind===pu==(e.node.kind===pu)&&n.node.depth>e.node.depth))):!0}function F1(e){return H1(e.filter(n=>n!==void 0).join("/"))}function H1(e){return e.replace(/\/{2,}/g,"/")}function $O(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Zc(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function BO(e){return Zc($O(e))}function vv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function zK(e,n,t){return vv(e,t)===vv(n,t)}function jK({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 a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=H1(e)),a=e.split("/");a.length>1&&w0(a)==="";)a.pop();const u=n.split("/");for(let h=0,_=u.length;h<_;h++){const p=u[h];p===""?h?h===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(w0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?H1(o):o)||"/";return i&&r&&r.set(i,c),c}function TK(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 I2(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=>_E(s,t)).join("/"):_E(r,t)}function uE({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,c,u="";for(;oe.state.__TSR_key||e.href;function IK(e){const n=e.getAttribute(fE);if(n)return`[${fE}="${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 Kg=!1;const q1="window";function Q4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function dE(e){const n=new Set;for(const t of e){if(t===q1)continue;const r=Q4(t);r&&n.add(r)}return n}function $K(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||LK,i=new Set,a=o=>{const c=nu[o]||(nu[o]={});for(const u of i)u===document?c[q1]={scrollX,scrollY}:u.isConnected&&(c[IK(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,Kg=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{Kg||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())),DK()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=r.next,_=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 v=nu[x];if(v){let b=nu[m];for(const w in v){if(w===q1){if(h)continue}else{const y=Q4(w);if(!y||h&&u&&(p??(p=dE(u)),p.has(y)))continue}b||(b=nu[m]={}),b[w]??(b[w]=v[w])}}}Kg=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!v&&u&&(p??(p=dE(u)));const y=v&&b&&_,C=r.restoring?nu[m]:void 0;if(C)for(const N in C){const{scrollX:z,scrollY:T}=C[N];if(N===q1){if(y)continue;scrollTo({top:T,left:z,behavior:c}),w=!0}else{const j=Q4(N);j&&(j.scrollLeft=z,j.scrollTop=T,p==null||p.delete(j))}}if(!v){const N={top:0,left:0,behavior:c};if(w||scrollTo(N),p)for(const z of p)z.scrollTo(N)}}!w&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{Kg=!1}}))}function BK(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 $2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function PK(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]=$2(s):Array.isArray(i)?i.push($2(s)):t[r]=[i,$2(s)]}return t}const FK=/^(?:\s|["[{\d-]|fa|nu|tr)/,HK=UK(JSON.parse),qK=GK(JSON.stringify,JSON.parse);function UK(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=PK(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function GK(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&&!FK.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=BK(s,r);return i?`?${i}`:""}}const Od="__root__";function VK(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 PO(e){return e instanceof Response&&!!e.options}function KK(e){return{input:({url:n})=>{for(const t of e)n=X4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=FO(e[t],n);return n}}}function WK(e){const n=BO(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=F1(["/",n,i.pathname]),i)}}function X4(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 FO(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 QK(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),c=t(void 0),u=t([]),h=r(()=>u.get().map(k=>i.get(k).get())),_=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.get(),location:o.get(),resolvedLocation:c.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:c,ids:u,matches:h,byRoute:i,__store:_,getMatchStore:p,setMatches:x};function x(k){const v=u.get(),b=k.map(w=>w.routeId);s(()=>{gK(v,b)||u.set(b);for(const w of v)b.includes(w)||i.get(w).set(()=>{});for(const w of k){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var bu="__TSR_index",hE="popstate",pE="beforeunload";function XK(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,...c})=>{var _,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const x=bv(c.path,c.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:c.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,c)=>{const u=n.state[bu];o=mE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=n.state[bu];o=mE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,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[bu]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const o=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...o,a]),()=>{var h,_;const u=((h=e.getBlockers)==null?void 0:h.call(e))??[];(_=e.setBlockers)==null||_.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 mE(e,n){n||(n={});const t=zk();return{...n,key:t,__TSR_key:t,[bu]:e}}function YK(e){var T,j;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),c=(()=>bv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((T=n.history.state)!=null&&T.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=zk();n.history.replaceState({[bu]:0,key:M,__TSR_key:M},"")}let u=c(),h,_=!1,p=!1,m=!1,x=!1;const k=()=>u;let v;const b=()=>{v&&(z._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),z._ignoreSubscribers=!1,v=void 0,h=void 0)},w=(M,D,I)=>{const $=o(D),q=!!v;q||(h=u),u=bv(D,I),v=[$,I,(v==null?void 0:v[2])||M],q||queueMicrotask(()=>b())},y=M=>{u=c(),z.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[bu]-u.state[bu],I=D===1,$=D===-1,q=!I&&!$||_;_=!1;const H=q?"GO":$?"BACK":"FORWARD",Q=q?{type:"GO",index:D}:{type:$?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const J of V)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,n.history.go(1),z.notify(Q);return}}}u=c(),z.notify(Q)},N=M=>{if(x){x=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const $ of I){const q=$.enableBeforeUnload??!0;if(q===!0){D=!0;break}if(typeof q=="function"&&q()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},z=XK({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>w(!0,M,D),replaceState:(M,D)=>w(!1,M,D),back:M=>(M&&(m=!0),x=!0,n.history.back()),forward:M=>{M&&(m=!0),x=!0,n.history.forward()},go:M=>{_=!0,n.history.go(M)},createHref:M=>o(M),flush:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(pE,N,{capture:!0}),n.removeEventListener(hE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(pE,N,{capture:!0}),n.addEventListener(hE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return z._ignoreSubscribers||y("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return z._ignoreSubscribers||y("REPLACE"),D},z}function ZK(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function bv(e,n){const t=ZK(e),r=t.indexOf("#"),s=t.indexOf("?"),i=zk();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||{[bu]:0,key:i,__TSR_key:i}}}function zk(){return(Math.random()+1).toString(36).substring(7)}function gE(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 wb(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 vE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function JK(e,n,t,r){var s,i,a,o;for(const c of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===c.routeId)||(i=(s=e.routesById[c.routeId].options).onLeave)==null||i.call(s,c)}for(const c of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[c.routeId].options)[n.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||o.call(a,c)}}var eW=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??cK??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=TK(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=YK()),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=gv(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=QK(this.latestLocation,u),$K(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=BO(o);h&&h!=="/"&&u.push(WK({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:KK(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=SK(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&bK(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:c,search:u,hash:h,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:c+w+h,publicHref:c+w+h,pathname:Lp(c).path,external:!1,searchStr:w,search:l_(r==null?void 0:r.search,b),hash:Lp(h.slice(1)).path,state:w_(r==null?void 0:r.state,p)}}const m=new URL(_,this.origin),x=X4(this.rewrite,m),k=this.options.parseSearch(x.search),v=this.options.stringifySearch(k);return x.search=v,{href:x.href.replace(x.origin,""),publicHref:_,pathname:Lp(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:v,search:l_(r==null?void 0:r.search,k),hash:Lp(x.hash.slice(1)).path,state:w_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>jK({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=wK(Zc(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,D;if(i.href){const I=bv(i.href,{});i={...i,to:X4(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],h=o[3],_=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=bE(i.params,h);const m=this.routesByPath[Zc(_)];let x;if(m)x=this.getRouteBranch(m);else if(_.includes("$"))x=[];else{const[I,$,q]=this.getMatchedRoutes(_);x=I,this.options.notFoundRoute&&(!q||q.path!=="/"&&$["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&RO(p))for(const I of x){const $=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if($){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,$(p))}catch{}}}const k=t.leaveParams?_:Lp(uE({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const I={};x.forEach($=>{if($.options.validateSearch)try{Object.assign(I,U1($.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=nW(v,i,x,t._includeValidateSearch),v=l_(u,v);const b=this.options.stringifySearch(v),w=i.hash===!0?a.hash:i.hash?uh(i.hash,a.hash):void 0,y=w?`#${w}`:"";let C=i.state===!0?a.state:i.state?uh(i.state,a.state):{};i.state&&(C=w_(a.state,C));const N=`${k}${b}${y}`;let z,T,j=!1;if(this.rewrite){const I=new URL(N,this.origin),$=FO(this.rewrite,I);z=I.href.replace(I.origin,""),$.origin!==this.origin?(T=$.href,j=!0):T=$.pathname+$.search+$.hash}else z=mK(N),T=z;return{publicHref:T,href:z,pathname:k,search:v,searchStr:b,state:C,hash:w??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=yK(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=bE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Zc(this.latestLocation.href)===Zc(s.href)&&vu(vE(s.state),vE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:_,...p}=s;h&&(p={...h,state:{...h.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=_??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 c=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var c,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 _=this.buildLocation({to:t,...a});s=s??_.publicHref,i=i??_.publicHref}const h=!o&&i?i:s;if(mv(h,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(h):window.location.href=h;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 _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 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,c=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(wb(o,c)):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,h;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(_=>!s||s(_)).map(_=>_.id)),o=[];for(const[_,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(_),o.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&gE(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=r.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(h=this._flights)==null||h.delete(_);for(const _ of o)_.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&&mv(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[h,_]of r)(!i||i(_))&&(o.push(h),a.push(_));const c=[];for(const[h,_]of s??[])(!i||_.some(i))&&(c.push(h),a.push(..._));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const _=h._flight;h._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===_&&this._flights.delete(h.id),c.push(_[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Dd,this.preloadRoute=t=>fW(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(),c=xK(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!vu(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?vu(o.search,i.search,{partial:!0})?c.rawParams:!1:c.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??qK,parseSearch:e.parseSearch??HK,protocolAllowlist:e.protocolAllowlist??pK}),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=IO(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["**"]:Zc(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?rW(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(x,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===x.id?v:x===this.options.notFoundRoute?u.find(b=>b.routeId===x.id):void 0};let _;for(let x=0;x{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((x,k)=>k(x),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((x,k)=>k(x),m):m};s.push(h)}const u=c.validateSearch;if(r&&u){const h=({search:_,next:p,meta:m})=>{const x=p(_);try{const k=U1(u,x);if(m&&k)for(const v in k)v in x||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...x,...k}}catch{}return x};s.push(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const _=uh(n.search,c);return u&&(u.explicit=_),_}const h=(_,p)=>{if(p){const m=u||{};return{search:i(o+1,_,m),meta:m}}return i(o+1,_,u)};return s[o]({search:c,next:h,meta:u})};return i(0,e)}function rW(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 Od}function bE(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,uh(e,t))}function yE(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 Y4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function sW(e,n){const t=Y4(e,"component");let r=Y4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Dd(e,n,t){const r=()=>n===!1?void 0:n?Y4(e,n):sW(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,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function jk(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 ff(e,n){return e.routesById[n.routeId]}function S0(e,n,t){return PO(e)?[Wi,e]:_h(e)?(e.routeId||(e.routeId=t),[kb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[sl,e]):[Wo,e]}function Tk(e,n){var r,s;let t=S0(n,!0,e.id);if(t[0]!==sl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=S0(i,!0,e.id)}return t}function c0(e,n,t,r,s){return s[0].signal.aborted?wu:Mk(e,n,t,Tk(t,r),s)}async function iW(e,n,t,r,s,i){var h,_;const[a,o]=n,c=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({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Jc(e,m),[p,c0(e,n,x,C,t)]}if(c.aborted)return[p,wu];const b=m.paramsError??m.searchError;if(b!==void 0)return Jc(e,m),[p,c0(e,n,x,b,t)];const w=x.options.beforeLoad;if(!w)continue;const y=m.status;p>=i&&(m.status="pending",(_=t[7])==null||_.call(t));try{C0(e,m,"beforeLoad",t[0]);const C=await _f(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,wu];const N=Mk(e,n,x,S0(C,!1,x.id),t);if(N[0]!==Wo)return Jc(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Jc(e,m),[p,c0(e,n,x,C,t)]}finally{m.status=y,C0(e,m,!1,t[0])}}s()}function Ak(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 Jc(e,n){var r;const t=n._flight;n._flight=void 0,(r=Ak(e,n,t))==null||r.abort()}function ji(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(c=>c.id===a.id)))o[2]=0;else{const c=Ak(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function Rk(e){for(const n of e){const t=n._flight;t&&t[2]++}}function C0(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 HO(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:c=>e.navigate({...c,_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 xE(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return wu;if(!s)return[Wo,void 0];let u=t._flight;C0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(HO(e,n,t,r,h,i,!!a[3]))).then(_=>S0(_,!1,r.id),_=>S0(_,!0,r.id)).then(_=>{var p;return _[0]!==Wo&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),_[0]===sl&&u[2]?Tk(r,_[1]):_}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Mk(e,n,r,await _f(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return Jc(e,t),wu}finally{C0(e,t,!1,o)}}function wE(e,n,t){n[0]!==Wi&&(e.status="success",e.error=void 0,n[0]===Wo?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function aW(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&&Jc(e,r)}function kE(e,n){return n[0]===sl||n[0]===kb?{...e,status:n[0]===sl?"error":"notFound",error:n[1],_flight:void 0}:e}function oW(e,n,t,r,s,i,a){var $,q;const o=n[1][t],c=ff(e,o),u=!!i[3],h=e._cache.get(o.id);let _,p=!1,m;try{if(o.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(HO(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=wu)),!m)if(o.status!=="success")p=!0;else{const H=u||o.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||_||_===void 0&&Date.now()-o.updatedAt>=H&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(H){o.invalid=!0,Jc(e,o),m=c0(e,n,c,H,i)}const x=c.options.loader,k=typeof x=="function",v=k?x:x==null?void 0:x.handler,b=!u||c.options.preload!==!1;let w=b&&x?($=e._flights)==null?void 0:$.get(o.id):void 0;w===o._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(x&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!y&&(o.status!=="success"||!!x),z=t>=a?i[7]:void 0,T=c.lazyFn&&c._lazy!==!0?z:void 0;if(C&&!x&&(o.invalid=!1,o.updatedAt=Date.now()),w&&w[2]++,N){const H=o._flight;o._flight=w,(q=Ak(e,o,H))==null||q.abort(),t>=a&&(o.status="pending"),z==null||z()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):N?xE(e,n,o,c,v,s,i):Promise.resolve([Wo,o.loaderData])).then(H=>(N&&(wE(o,H,u),H[0]===Wo&&(x&&!i[0].signal.aborted&&aW(e,o,h),t>=a&&(o.status="pending"))),H)),M=_f(Promise.resolve().then(()=>Dd(c,void 0,T)),i[0].signal).then(()=>{},H=>n[1].some((Q,V)=>V<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,c0(e,n,c,H,i)]).then(H=>j.then(Q=>(N&&!H&&Q[0]===Wo&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",z==null||z()),H)));if(r.push([t,j,M]),!y)return j.then(H=>kE(o,H));const D={...o,status:"pending",preload:!1,_flight:w};o.invalid=!1,o.isFetching="loader";const I=xE(e,n,D,c,v,s,i).then(H=>(o.isFetching=!1,wE(D,H,!1),H));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(H=>kE(D,H))}async function Z4(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 c=ff(e,n[o]);try{const u=Dd(c,!1);u&&await _f(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(c.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function B_(e,n){n[2]&&(ji(e,n[2].map(t=>t[3])),n[2]=void 0)}async function SE(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]>=Wi)throw[o,a];!s&&a[0]!==Wo&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===Wi)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function Mk(e,n,t,r,s,i){for(;r[0]===Wi;){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):[Wi,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[sl,c]:Tk(t,c),i=!0}}return r}async function qO(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===kb?Z4(e,a,m,r.signal):m[0];let _=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=Wi)_=0;else if(o){_=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=_)break;const x=await m[1];if(x[0]!==Wo&&x[0]=_)break;const x=await m[2];if(x){o=x;break}}if(((o==null?void 0:o[1][0])??0)>=Wi){const m=o[1];if(m[0]!==Wi||m[1].options.reloadDocument||m[2])return B_(e,n),m;c=!0,o=[0,[sl,new Error("Too many redirects")]]}const p=o?o[2]??await h(o):u;if(p>=0){const m=o==null?void 0:o[1],x=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],b=()=>{m&&(k._notFound=void 0,x===sl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};b(),m||i==null||i();const w=ff(e,k);try{await _f(m?Promise.resolve().then(()=>Dd(w,x===sl?"errorComponent":"notFoundComponent")):Promise.all([Dd(w),Dd(w,"notFoundComponent")]),r.signal)}catch(y){if(y===r.signal&&r.signal.aborted)return B_(e,n),wu}m?c&&(r.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(n[2]??[]).map(y=>y[1])]),B_(e,n),ji(e,a),b()):k.status="success"}return n}async function UO(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await Z4(e,t,void 0,i,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let h=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Wi&&(h=0);k()}if(!i.aborted&&!r[3]){const w=[];for(const[y,C]of e._flights??[])C[2]||(e._flights.delete(y),w.push(C[1]));for(const y of w)y.abort()}const b=qO(e,s,p,r[0],SE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=SE(s[2],void 0,void 0,b.then(w=>k0(w)?0:jk(t).length,()=>0))),a=await b}catch(c){if(B_(e,s),c===i&&i.aborted)return wu;throw c}return k0(a)?a:UO(e,a,i,r[6]===t.length?r[6]:0)}function J4(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(()=>J4(e,n),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+x),w));return}}function Ip(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 CE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!jk(n[3]).some(i=>i.id===t[1]))return;let s;try{await _f(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function VO(e,n){e._committed=n,e.stores.setMatches(n)}function cW(e,n,t,r){const s=e._committed,i=e._cache;for(const c of t)c.preload=!1,r&&(c._assetEnd=void 0);const a=jk(t).length,o=new Map;{const c=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,VO(e,t),ji(e,[...i.values(),...s],[...t,...o.values()]),JK(e,s,t,n)}async function Wg(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function KO(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 lW(e,n,t,r,s){const i=t.map(c=>({...c}));Rk(i);for(const c of r)Jc(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await qO(e,a,r,n[0],s)}catch(c){throw ji(e,i),c}if(k0(o)){ji(e,i),o[0]===Wi&&e._tx===n&&e._committed===t&&await KO(e,n,o);return}if(await UO(e,o,n[0].signal),e._tx!==n||e._committed!==t){ji(e,i);return}for(const c of i){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Jc(e,u))}VO(e,i),ji(e,t,i)}async function uW(e,n,t,r,s,i){const a=await GO(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(k0(a)){const _=a[0]===Wi&&e._tx===n;if((!_||a[1].options.reloadDocument)&&Ip(e,n),ji(e,n[3]),n[3]=[],!_)return;if(e._tx!==n){Ip(e,n);return}await KO(e,n,a);return}const o=a[1];if(e._tx===n&&await CE(e,n),e._tx!==n){Ip(e,n),ji(e,o),B_(e,a);return}const c=n[2],u=wb(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await CE(e,n),e._tx!==n){Ip(e,n),ji(e,o),B_(e,a);return}const _=()=>{Ip(e,n),cW(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,o);if(e._tx!==n){B_(e,a);return}h!=null&&h.length&&lW(e,n,o,h,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),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,a=e._pendingLocation,o=(a==null?void 0:a.href)===i.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),h=new AbortController,_=e._preflight;if(e._preflight=h,u||c==null||c[1](),_==null||_.abort(),!h.signal.aborted){const N=wb(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await Wg(e,t);return}const p=s.href===i.href;let m=h;const x=e.matchRoutes(i,{_controller:h});Rk(x);const k=u?c[1](x):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){ji(e,x),await Wg(e,t);return}e._preflight=void 0;let v;const b=()=>uW(e,y,p,()=>J4(e,y),n==null?void 0:n.sync,k),w=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),y=[m,o,i,x,Date.now(),w];if(e._tx=y,t){for(const N of e.stores.matches.get()){if(e._tx!==y)break;N.isFetching&&C0(e,N,!1)}t[0].abort(),ji(e,t[3],y[3],!0)}if(e._tx!==y){ji(e,y[3]),y[3]=[],v==null||v(),await Wg(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(N=>N._notFound))&&J4(e,y),v==null||v(b()),await w,await Wg(e,y)}async function fW(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,c;try{try{a=e.matchRoutes(t,{_controller:i}),Rk(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await GO(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),ji(e,a)),i.abort()}if(!k0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){_h(u)||console.error(u);return}}}const dW="Error preloading route! ☝️";var WO=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 c,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),r?this._path=Od:this.parentRoute||Ek();let s=r?Od:t==null?void 0:t.path;s&&s!=="/"&&(s=$O(s));const i=(t==null?void 0:t.id)||s;let a=r?Od:F1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=F1(["/",a]));const o=a==="__root__"?"/":F1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Zc(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=>VK({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.")}},hW=class extends WO{constructor(e){super(e)}},Ok=class extends A.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?A.createElement(this.props.errorComponent??pW,{error:e,reset:this.reset}):this.props.children}};function pW({error:e}){const[n,t]=A.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.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"})]}),f.jsx("div",{style:{height:".25rem"}}),n?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function mW({children:e,fallback:n=null}){return f.jsx(et.Fragment,{children:QO()?e:n})}function QO(){return et.useSyncExternalStore(gW,()=>!0,()=>!1)}function gW(){return()=>{}}var XO=A.createContext(null);function fi(e){return A.useContext(XO)}var Sb=A.createContext(void 0),vW=A.createContext(void 0),Cr=(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))(Cr||{});function bW({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,_){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=_,h.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===_&&x.sub===h)return;const k=h.depsTail=u.subsTail={version:_,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,x!==void 0?x.nextSub=k:u.subs=k}function s(u,h=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:h.depsTail=p,p!==void 0?p.nextDep=m:h.deps=m,x!==void 0?x.prevSub=k:_.subsTail=k,k!==void 0?k.nextSub=x:(_.subs=x)===void 0&&t(_),m}function i(u){let h=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(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 k=(u=x).nextSub;k!==void 0&&(_={value:h,prev:_},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let _,p=0,m=!1;e:do{const x=u.dep,k=x.flags;if(h.flags&16)m=!0;else if((k&17)===17){if(e(x)){const v=x.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=x.deps,h=x,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,_=h.flags;(_&48)===32&&(h.flags=_|16,(_&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let _=h.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function yW(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 e3=[];let G1=0;const{link:EE,unlink:xW,propagate:wW,checkDirty:YO,shallowPropagate:NE}=bW({update(e){return e._update()},notify(e){e3[t3++]=e,e.flags&=~Cr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Cr.Mutable|Cr.Dirty,xv(e))}});let Qg=0,t3=0,Bo,n3=0;function kW(e){try{++n3,e()}finally{--n3||ZO()}}function xv(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=xW(t,e)}function ZO(){if(!(n3>0)){for(;Qg{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=Bo,o=(n==null?void 0:n.compare)??Object.is;if(t)Bo=s,++G1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=Cr.Mutable|Cr.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&t?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{Bo=a,t&&(s.flags&=~Cr.RecursedCheck),xv(s)}}};return t?(s.flags=Cr.Mutable|Cr.Dirty,s.get=function(){const i=s.flags;if(i&Cr.Dirty||i&Cr.Pending&&YO(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&NE(a)}}else i&Cr.Pending&&(s.flags=i&~Cr.Pending);return Bo!==void 0&&EE(s,Bo,G1),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(wW(a),NE(a),ZO())}},s}function SW(e){const n=()=>{const r=Bo;Bo=t,++G1,t.depsTail=void 0,t.flags=Cr.Watching|Cr.RecursedCheck;try{return e()}finally{Bo=r,t.flags&=~Cr.RecursedCheck,xv(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Cr.Watching|Cr.RecursedCheck,notify(){const r=this.flags;r&Cr.Dirty||r&Cr.Pending&&YO(this.deps,this)?n():this.flags=Cr.Watching},stop(){this.flags=Cr.None,this.depsTail=void 0,xv(this)}};return n(),t}var B2={exports:{}},P2={},F2={exports:{}},H2={};/** * @license React * use-sync-external-store-shim.production.js * @@ -54,7 +54,7 @@ Error generating stack: `+S.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var jE;function SW(){if(jE)return H2;jE=1;var e=vm();function n(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&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(_,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),k=x[0].inst,v=x[1];return i(function(){k.value=m,k.getSnapshot=p,c(k)&&v({inst:k})},[_,m,p]),s(function(){return c(k)&&v({inst:k}),_(function(){c(k)&&v({inst:k})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return H2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,H2}var TE;function CW(){return TE||(TE=1,F2.exports=SW()),F2.exports}/** + */var jE;function CW(){if(jE)return H2;jE=1;var e=vm();function n(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&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(_,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),k=x[0].inst,v=x[1];return i(function(){k.value=m,k.getSnapshot=p,c(k)&&v({inst:k})},[_,m,p]),s(function(){return c(k)&&v({inst:k}),_(function(){c(k)&&v({inst:k})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return H2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,H2}var TE;function EW(){return TE||(TE=1,F2.exports=CW()),F2.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -62,57 +62,57 @@ Error generating stack: `+S.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var AE;function EW(){if(AE)return P2;AE=1;var e=vm(),n=CW();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return P2.useSyncExternalStoreWithSelector=function(u,h,_,p,m){var x=i(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=o(function(){function b(z){if(!w){if(w=!0,y=z,z=p(z),m!==void 0&&k.hasValue){var T=k.value;if(m(T,z))return C=T}return C=z}if(T=C,r(y,z))return T;var j=p(z);return m!==void 0&&m(T,j)?(y=z,T):(y=z,C=j)}var w=!1,y,C,N=_===void 0?null:_;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,_,p,m]);var v=s(u,x[0],x[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},P2}var RE;function NW(){return RE||(RE=1,B2.exports=EW()),B2.exports}var ZO=NW();const zW=gm(ZO);function jW(e,n){return e===n}function Xo(e,n,t=jW){const r=A.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=A.useCallback(()=>e==null?void 0:e.get(),[e]);return ZO.useSyncExternalStoreWithSelector(r,s,s,n,t)}var ME={};function Dk(e,n){const t=A.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=w_(t.current,s):s}}function ff(e){const n=_i(),t=A.useContext(e.from?gW:Sb),r=e.from??t,s=n.stores.getMatchStore(r),i=Dk(e,n),a=Xo(s,o=>o?i(o):ME);if(a!==ME)return a;(e.shouldThrow??!0)&&Ek()}function JO(e){return ff({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function eD(e){const{select:n,...t}=e;return ff({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function tD(e){return ff({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 nD(e){return ff({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Cb(e){const n=_i();return A.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function Lk(e){return ff({...e,select:n=>e.select?e.select(n.context):n.context})}function q2(e){const n=A.useRef(e);return vu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function TW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function AW(e,n,t){if(e!=null&&e.external)return mv(e.href,t)?void 0:e.href;if(!$W(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),mv(n,t)?void 0:n}catch{}}function RW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!NK(e.pathname,n.pathname,r))return!1}else{const a=vv(e.pathname,r),o=vv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!vu(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 MW(e,n){const t=_i(),r=lK(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:x,viewTransition:k,children:v,target:b,disabled:w,style:y,className:C,onClick:N,onBlur:z,onFocus:T,onMouseEnter:j,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:$,search:q,hash:H,state:Q,mask:V,reloadDocument:J,unsafeRelative:Z,from:B,_fromLocation:L,...F}=e,U=WO(),K=q2(e.search),ne=q2(e.params),ce=q2(a),_e=A.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,K,ne,e.state,e.mask,e.unsafeRelative]),se=A.useCallback(ht=>{const dt=t.buildLocation({_fromLocation:ht,..._e}),Le=IW(dt.maskedLocation?dt.maskedLocation.publicHref:dt.publicHref,dt.maskedLocation?dt.maskedLocation.external:dt.external,t.history,w),ge=AW(Le,o,t.protocolAllowlist);return[Le==null?void 0:Le.href,ge,RW(ht,dt,ce,t.basepath,U,ge!==void 0)]},[ce,w,U,_e,t,o]),[G,oe,le]=Xo(t.stores.location,se,TW),fe=le?ch(s,{})??OW:U2,me=le?U2:ch(i,{})??U2,Re=[C,fe.className,me.className].filter(Boolean).join(" "),Oe=(y||fe.style||me.style)&&{...y,...fe.style,...me.style},Qe=A.useRef(!1),qe=e.reloadDocument||oe||w?!1:c??t.options.defaultPreload,Se=u??t.options.defaultPreloadDelay??0,at=A.useCallback(()=>{t.preloadRoute(_e).catch(ht=>{console.warn(ht),console.warn(fW)})},[t,_e]),et=A.useCallback(ht=>{if(!ht){G2(r);return}if(!(ht.isIntersecting??qe==="intent")){ht.isIntersecting===!1&&G2(r);return}if(!Se){at();return}c0.has(r)||c0.set(r,setTimeout(()=>{c0.delete(r),at()},Se))},[at,r,qe,Se]);cK(r,et,qe!=="viewport"),A.useEffect(()=>{Qe.current||qe==="render"&&(at(),Qe.current=!0)},[at,qe]);const ct=ht=>{const dt=ht.currentTarget.getAttribute("target"),Le=b!==void 0?b:dt;!w&&!(ht.metaKey||ht.altKey||ht.ctrlKey||ht.shiftKey)&&!ht.defaultPrevented&&(!Le||Le==="_self")&&ht.button===0&&(ht.preventDefault(),t.navigate({..._e,replace:p,resetScroll:x,hashScrollIntoView:_,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...F,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...C&&{className:C},...N&&{onClick:N},...z&&{onBlur:z},...T&&{onFocus:T},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const wt=()=>{qe==="intent"&&at()},$t=()=>{qe==="intent"&&G2(r)};return{...F,...fe,...me,href:G,ref:r,onClick:ld([N,ct]),onBlur:ld([z,$t]),onFocus:ld([T,et]),onMouseEnter:ld([j,et]),onMouseLeave:ld([M,$t]),onTouchStart:ld([D,wt]),disabled:!!w,target:b,...Oe&&{style:Oe},...Re&&{className:Re},...w&&DW,...le&&LW}}var U2={},OW={className:"active"},DW={role:"link","aria-disabled":!0},LW={"data-status":"active","aria-current":"page"},c0=new WeakMap,G2=e=>{clearTimeout(c0.get(e)),c0.delete(e)},ld=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function IW(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function $W(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Eb=A.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=MW(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...c}=i;return A.createElement("a",c,a)}return A.createElement(t,i,a)}),BW=class extends KO{constructor(n){super(n),this.useMatch=t=>ff({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Lk({...t,from:this.id}),this.useSearch=t=>nD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>tD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>eD({...t,from:this.id}),this.useLoaderData=t=>JO({...t,from:this.id}),this.useNavigate=()=>Cb({from:this.fullPath}),this.Link=tt.forwardRef((t,r)=>f.jsx(Eb,{ref:r,from:this.fullPath,...t}))}};function PW(e){return new BW(e)}function FW(){return e=>qW(e)}var HW=class extends dW{constructor(e){super(e),this.useMatch=n=>ff({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Lk({...n,from:this.id}),this.useSearch=n=>nD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>tD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>eD({...n,from:this.id}),this.useLoaderData=n=>JO({...n,from:this.id}),this.useNavigate=()=>Cb({from:this.fullPath}),this.Link=tt.forwardRef((n,t)=>f.jsx(Eb,{ref:t,from:this.fullPath,...n}))}};function qW(e){return new HW(e)}function tc(e){return n=>{const t=PW(n);return t.isRoot=!1,t}}function UW(e){const n=_i(),t=`not-found-${Xo(n.stores.location,r=>r.pathname)}-${Xo(n.stores.status,r=>r)}`;return f.jsx(Ok,{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 GW(){return f.jsx("p",{children:"Not Found"})}function gd(e){return f.jsx(f.Fragment,{children:e.children})}function rD(e,n,t){return n.options.notFoundComponent?f.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(GW,{})}function Nb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var VW=(e,n)=>e[0]===n[0]&&e[1]===n[1],sD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,iD=A.memo(function({routeId:n}){const t=_i();return f.jsx(KW,{router:t,match:Xo(t.stores.getMatchStore(n),r=>r)})});function KW({router:e,match:n}){var _,p;const t=e.routesById[n.routeId],r=Nb(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",c=sD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?A.Suspense:gd,u=s?Ok:gd,h=a?UW:gd;return f.jsxs(t.isRoot?t.options.shellComponent??gd:gd,{children:[f.jsx(Sb.Provider,{value:n.routeId,children:f.jsx(c,{fallback:r,children:f.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:f.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return A.createElement(a,m)},children:o?f.jsx(pW,{fallback:r,children:f.jsx(OE,{match:n})}):f.jsx(OE,{match:n})})})})}),null]})}var OE=A.memo(function({match:n}){const t=_i(),r=n.routeId,s=t.routesById[r],i=A.useMemo(()=>{var c;const o=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({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=A.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?f.jsx(o,{},i):f.jsx(C0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!sD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Nb(t,s)}if(n.status==="notFound")return rD(t,s,n.error);if(n.status==="error")throw n.error;return a}),C0=A.memo(function(){const n=_i(),t=A.useContext(Sb);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Xo(o,c=>[!!c._notFound,c.error],VW),i=Xo(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return rD(n,n.routesById[t],s);if(!i)return null;const a=f.jsx(iD,{routeId:i});return t===Rd?f.jsx(A.Suspense,{fallback:Nb(n),children:a}):a});function aD(e,n){const t=e[1];e.length=0,t==null||t(n)}function WW({t:e}){const n=_i(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{aD(t,!1),t.push(s,i),e(n),A.startTransition(r)}),jO(()=>{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(Zc(s.publicHref)!==Zc(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",...wb(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function QW(){const e=_i(),n=e.routesById[Rd],t=Nb(e,n),r=e.ssr?gd:A.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(WW,{t:A.useState()[1]}),f.jsx(r,{fallback:t,children:f.jsx(XW,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function XW(){const e=_i(),n=e._rendered,t=Xo(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;jO(()=>{n[0]===t&&aD(n,!0)},[n,t]);const i=s?f.jsx(iD,{routeId:s}):null;return f.jsx(Sb.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:f.jsx(Ok,{getResetKey:()=>r,onCatch:void 0,children:i})})}var YW=e=>({createMutableStore:zE,createReadonlyStore:zE,batch:wW}),ZW=e=>new JW(e),JW=class extends JK{constructor(e){super(e,YW)}};function eQ({router:e,children:n,...t}){AO(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=f.jsx(QO.Provider,{value:e,children:n});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function tQ({router:e,...n}){return f.jsx(eQ,{router:e,...n,children:f.jsx(QW,{})})}function nQ(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 rQ(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=nQ(e),a=_i(),{history:o}=a,[c,u]=A.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return A.useEffect(()=>{const h=async _=>{function p(b){const w=a.parseLocation(b),[,y,C]=a.getMatchedRoutes(w.pathname);return C===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),x=p(_.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const k=await t({action:_.action,current:m,next:x});if(!i)return k;if(!k)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:x,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function oD(e){const n=_i({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Xo(t.stores.__store,Dk(e,t))}function sQ(e){const n=_i();return Xo(n.stores.location,Dk(e,n))}const wv=new WeakMap,V1=new WeakMap;function Za(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))wv.set(s,(wv.get(s)??0)+1),(r=V1.get(s))==null||r.add(t)}function ym(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(c=>[c.id,c])),i=new Set(e.map(c=>c.id)),a=n.filter(c=>t.has(c.id)&&!i.has(c.id)),o=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return r?[...a,...o]:[...o,...a]}async function Rh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?wv.get(s):void 0,a=await t();if(!s||wv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,c=>c??a);const o=new Set;V1.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{V1.get(s)===o&&V1.delete(s)}}const uh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function cD(e){const n=e.queryKey[2];if(n==="resolvedFile")return uh(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&&uh(t.ref)}function Ta(e,n=Ia(),t,r=!1){if(!Rn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!cD(i)&&(!t||t(i))};r?nt.cancelQueries(s).then(()=>{Rn(n)&&nt.invalidateQueries(s)}):nt.invalidateQueries(s)}const lD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Ik=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],iQ=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Ik,...lD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function aQ(e,n=Ia(),t=!1){const r=nt.getQueryData([...n,"listChatSessions",e])??[],s=nt.getQueryData([...n,"listRuns",e])??[],i=nt.getQueryData([...n,"listExperiments",e])??[];Ta([...lD,...Ik,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(c=>c.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(c=>c.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function zb(e){const n=Ia();ll.add(e),Za(nt,[...n,"listChatSessions"],e),nt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])Ck({queryKey:[...n,t,e]})}function oQ(e){const n=Ia(),t=nt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])zb(r.id);Ck({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const cQ={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:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function lQ(e,n){var a;if(!Rn(n))return;const t=(o,c=n,u)=>Ta(o,c,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t(cQ[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],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),nt.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,c]=i;if(c.startsWith("/file")){aQ(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 uQ={},_Q="en",$k=["en","zh-CN","fa","ar","es","hi"],uD="orx:locale",Bk=["localStorage","preferredLanguage","baseLocale"],DE=[],E0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let LE=!1,E=()=>{var t;let e=Bk;!E0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=dD(window.location.href));const n=fQ(e);if(n)return LE||(LE=!0,_D(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function fQ(e,n){let t;for(const r of e){if(r==="baseLocale")t=_Q;else if(r==="preferredLanguage"&&!E0)t=gQ();else if(r==="localStorage"&&!E0)t=localStorage.getItem(uD)??void 0;else if(hD(r)&&kv.has(r)){const i=kv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return pQ(a)}}const s=N0(t);if(s)return s}}const dQ=e=>{window.location.reload()};let _D=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=Bk;!E0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=dD(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(uD,e);else if(hD(c)&&kv.has(c)){const u=kv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(h))}}}const a=()=>{!E0&&t.reload&&window.location&&e!==r&&dQ()};if(s.length)return Promise.all(s).then(()=>{a()});a()},hQ=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function N0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of $k)if(t.toLowerCase()===n)return t}function fD(e){return!!e&&$k.some(n=>n===e)}function pQ(e){const n=N0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${$k.join(", ")}`)}function mQ(e,n){return e.exec(n.href)}function gQ(){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=N0(t.fullTag);if(r)return r;const s=N0(t.baseTag);if(s)return s}}function vQ(e){return bQ(e)}function bQ(e){const n=typeof e=="string"?new URL(e,hQ()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&N0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let IE,$E;function yQ(e){if(DE.length===0)return;const n=typeof e=="string"?e:e.href;if(IE===n)return $E;const t=new URL(n,"http://example.com"),r=vQ(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of DE){const c=new uQ(o.match,a.href);if(mQ(c,a)){i=o;break}}if(i)break}return IE=n,$E=i,i}function dD(e){const n=yQ(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:Bk}const kv=new Map;function hD(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const xQ=e=>`Actions for ${e==null?void 0:e.name}`,wQ=e=>`${e==null?void 0:e.name} 的操作`,kQ=e=>`عملیات ${e==null?void 0:e.name}`,SQ=e=>`إجراءات ${e==null?void 0:e.name}`,CQ=e=>`Acciones para ${e==null?void 0:e.name}`,EQ=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,NQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wQ(e):t==="fa"?kQ(e):t==="ar"?SQ(e):t==="es"?CQ(e):t==="hi"?EQ(e):xQ(e)}),zQ=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,jQ=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,TQ=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,AQ=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,RQ=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,MQ=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,OQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jQ(e):t==="fa"?TQ(e):t==="ar"?AQ(e):t==="es"?RQ(e):t==="hi"?MQ(e):zQ(e)}),DQ=e=>`Branch: ${e==null?void 0:e.branch}`,LQ=e=>`分支:${e==null?void 0:e.branch}`,IQ=e=>`شاخه: ${e==null?void 0:e.branch}`,$Q=e=>`الفرع: ${e==null?void 0:e.branch}`,BQ=e=>`Rama: ${e==null?void 0:e.branch}`,PQ=e=>`ब्रांच: ${e==null?void 0:e.branch}`,FQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LQ(e):t==="fa"?IQ(e):t==="ar"?$Q(e):t==="es"?BQ(e):t==="hi"?PQ(e):DQ(e)}),HQ=e=>`Browse code on ${e==null?void 0:e.branch}`,qQ=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,UQ=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,GQ=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,VQ=e=>`Explorar el código en ${e==null?void 0:e.branch}`,KQ=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,pD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qQ(e):t==="fa"?UQ(e):t==="ar"?GQ(e):t==="es"?VQ(e):t==="hi"?KQ(e):HQ(e)}),WQ=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,QQ=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,XQ=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,YQ=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,ZQ=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,JQ=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,eX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QQ(e):t==="fa"?XQ(e):t==="ar"?YQ(e):t==="es"?ZQ(e):t==="hi"?JQ(e):WQ(e)}),tX=e=>`Collapse ${e==null?void 0:e.name}`,nX=e=>`折叠 ${e==null?void 0:e.name}`,rX=e=>`بستن ${e==null?void 0:e.name}`,sX=e=>`طيّ ${e==null?void 0:e.name}`,iX=e=>`Contraer ${e==null?void 0:e.name}`,aX=e=>`${e==null?void 0:e.name} समेटें`,oX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nX(e):t==="fa"?rX(e):t==="ar"?sX(e):t==="es"?iX(e):t==="hi"?aX(e):tX(e)}),cX=e=>`Committed changes versus ${e==null?void 0:e.parent}`,lX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,uX=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,_X=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,fX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,dX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,hX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lX(e):t==="fa"?uX(e):t==="ar"?_X(e):t==="es"?fX(e):t==="hi"?dX(e):cX(e)}),pX=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,mX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,gX=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,vX=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,bX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,yX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,xX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mX(e):t==="fa"?gX(e):t==="ar"?vX(e):t==="es"?bX(e):t==="hi"?yX(e):pX(e)}),wX=e=>`Copy ${e==null?void 0:e.value}`,kX=e=>`复制 ${e==null?void 0:e.value}`,SX=e=>`کپی ${e==null?void 0:e.value}`,CX=e=>`نسخ ${e==null?void 0:e.value}`,EX=e=>`Copiar ${e==null?void 0:e.value}`,NX=e=>`${e==null?void 0:e.value} कॉपी करें`,zX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kX(e):t==="fa"?SX(e):t==="ar"?CX(e):t==="es"?EX(e):t==="hi"?NX(e):wX(e)}),jX=e=>`Delete ${e==null?void 0:e.name}`,TX=e=>`删除 ${e==null?void 0:e.name}`,AX=e=>`حذف ${e==null?void 0:e.name}`,RX=e=>`حذف ${e==null?void 0:e.name}`,MX=e=>`Eliminar ${e==null?void 0:e.name}`,OX=e=>`${e==null?void 0:e.name} हटाएं`,r3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TX(e):t==="fa"?AX(e):t==="ar"?RX(e):t==="es"?MX(e):t==="hi"?OX(e):jX(e)}),DX=e=>`Download ${e==null?void 0:e.name}`,LX=e=>`下载 ${e==null?void 0:e.name}`,IX=e=>`بارگیری ${e==null?void 0:e.name}`,$X=e=>`تنزيل ${e==null?void 0:e.name}`,BX=e=>`Descargar ${e==null?void 0:e.name}`,PX=e=>`${e==null?void 0:e.name} डाउनलोड करें`,BE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LX(e):t==="fa"?IX(e):t==="ar"?$X(e):t==="es"?BX(e):t==="hi"?PX(e):DX(e)}),FX=e=>`Expand ${e==null?void 0:e.name}`,HX=e=>`展开 ${e==null?void 0:e.name}`,qX=e=>`باز کردن ${e==null?void 0:e.name}`,UX=e=>`توسيع ${e==null?void 0:e.name}`,GX=e=>`Expandir ${e==null?void 0:e.name}`,VX=e=>`${e==null?void 0:e.name} फैलाएं`,KX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HX(e):t==="fa"?qX(e):t==="ar"?UX(e):t==="es"?GX(e):t==="hi"?VX(e):FX(e)}),WX=e=>`Hide additional ${e==null?void 0:e.target}`,QX=e=>`隐藏其余${e==null?void 0:e.target}`,XX=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,YX=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,ZX=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,JX=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,eY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QX(e):t==="fa"?XX(e):t==="ar"?YX(e):t==="es"?ZX(e):t==="hi"?JX(e):WX(e)}),tY=e=>`Hide error details for ${e==null?void 0:e.activity}`,nY=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,rY=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,sY=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,iY=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,aY=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,oY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nY(e):t==="fa"?rY(e):t==="ar"?sY(e):t==="es"?iY(e):t==="hi"?aY(e):tY(e)}),cY=e=>`${e==null?void 0:e.count} consecutive identical calls`,lY=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,uY=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,_Y=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,fY=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,dY=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,hY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lY(e):t==="fa"?uY(e):t==="ar"?_Y(e):t==="es"?fY(e):t==="hi"?dY(e):cY(e)}),pY=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,mY=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,gY=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,vY=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,bY=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,yY=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,xY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mY(e):t==="fa"?gY(e):t==="ar"?vY(e):t==="es"?bY(e):t==="hi"?yY(e):pY(e)}),wY=e=>`Open ${e==null?void 0:e.branch} on GitHub`,kY=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,SY=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,CY=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,EY=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,NY=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,mD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kY(e):t==="fa"?SY(e):t==="ar"?CY(e):t==="es"?EY(e):t==="hi"?NY(e):wY(e)}),zY=e=>`Open experiment ${e==null?void 0:e.name}`,jY=e=>`打开实验 ${e==null?void 0:e.name}`,TY=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,AY=e=>`فتح التجربة ${e==null?void 0:e.name}`,RY=e=>`Abrir el experimento ${e==null?void 0:e.name}`,MY=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,OY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jY(e):t==="fa"?TY(e):t==="ar"?AY(e):t==="es"?RY(e):t==="hi"?MY(e):zY(e)}),DY=e=>`Open ${e==null?void 0:e.path} in the right pane`,LY=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,IY=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,$Y=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,BY=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,PY=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,FY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LY(e):t==="fa"?IY(e):t==="ar"?$Y(e):t==="es"?BY(e):t==="hi"?PY(e):DY(e)}),HY=e=>`Open ${e==null?void 0:e.name}`,qY=e=>`打开 ${e==null?void 0:e.name}`,UY=e=>`باز کردن ${e==null?void 0:e.name}`,GY=e=>`فتح ${e==null?void 0:e.name}`,VY=e=>`Abrir ${e==null?void 0:e.name}`,KY=e=>`${e==null?void 0:e.name} खोलें`,WY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qY(e):t==="fa"?UY(e):t==="ar"?GY(e):t==="es"?VY(e):t==="hi"?KY(e):HY(e)}),QY=e=>`Open logs for run ${e==null?void 0:e.run}`,XY=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,YY=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,ZY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,JY=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,eZ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,tZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):QY(e)}),nZ=e=>`Open ${e==null?void 0:e.name} on GitHub`,rZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,sZ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,iZ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,aZ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,oZ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Sv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rZ(e):t==="fa"?sZ(e):t==="ar"?iZ(e):t==="es"?aZ(e):t==="hi"?oZ(e):nZ(e)}),cZ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,lZ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,uZ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,_Z=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,fZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,dZ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,hZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lZ(e):t==="fa"?uZ(e):t==="ar"?_Z(e):t==="es"?fZ(e):t==="hi"?dZ(e):cZ(e)}),pZ=e=>`Overleaf — ${e==null?void 0:e.status}`,mZ=e=>`Overleaf — ${e==null?void 0:e.status}`,gZ=e=>`Overleaf — ${e==null?void 0:e.status}`,vZ=e=>`Overleaf — ${e==null?void 0:e.status}`,bZ=e=>`Overleaf — ${e==null?void 0:e.status}`,yZ=e=>`Overleaf — ${e==null?void 0:e.status}`,xZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mZ(e):t==="fa"?gZ(e):t==="ar"?vZ(e):t==="es"?bZ(e):t==="hi"?yZ(e):pZ(e)}),wZ=e=>`Preview /${e==null?void 0:e.name} skill`,kZ=e=>`预览 /${e==null?void 0:e.name} 技能`,SZ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,CZ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,EZ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,NZ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,zZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kZ(e):t==="fa"?SZ(e):t==="ar"?CZ(e):t==="es"?EZ(e):t==="hi"?NZ(e):wZ(e)}),jZ=e=>`Remove annotation ${e==null?void 0:e.number}`,TZ=e=>`移除批注 ${e==null?void 0:e.number}`,AZ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,RZ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,MZ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,OZ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,DZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TZ(e):t==="fa"?AZ(e):t==="ar"?RZ(e):t==="es"?MZ(e):t==="hi"?OZ(e):jZ(e)}),LZ=e=>`Remove ${e==null?void 0:e.name}`,IZ=e=>`移除 ${e==null?void 0:e.name}`,$Z=e=>`حذف ${e==null?void 0:e.name}`,BZ=e=>`إزالة ${e==null?void 0:e.name}`,PZ=e=>`Quitar ${e==null?void 0:e.name}`,FZ=e=>`${e==null?void 0:e.name} हटाएं`,HZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IZ(e):t==="fa"?$Z(e):t==="ar"?BZ(e):t==="es"?PZ(e):t==="hi"?FZ(e):LZ(e)}),qZ=e=>`Remove queued message: ${e==null?void 0:e.text}`,UZ=e=>`移除排队消息:${e==null?void 0:e.text}`,GZ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,VZ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,KZ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,WZ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,QZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?VZ(e):t==="es"?KZ(e):t==="hi"?WZ(e):qZ(e)}),XZ=e=>`Retry queued message: ${e==null?void 0:e.text}`,YZ=e=>`重试排队消息:${e==null?void 0:e.text}`,ZZ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,JZ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,eJ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,tJ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,nJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YZ(e):t==="fa"?ZZ(e):t==="ar"?JZ(e):t==="es"?eJ(e):t==="hi"?tJ(e):XZ(e)}),rJ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,sJ=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,iJ=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,aJ=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,oJ=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,cJ=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,PE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sJ(e):t==="fa"?iJ(e):t==="ar"?aJ(e):t==="es"?oJ(e):t==="hi"?cJ(e):rJ(e)}),lJ=e=>`Run ${e==null?void 0:e.id}`,uJ=e=>`运行 ${e==null?void 0:e.id}`,_J=e=>`اجرای ${e==null?void 0:e.id}`,fJ=e=>`تشغيل ${e==null?void 0:e.id}`,dJ=e=>`Ejecución ${e==null?void 0:e.id}`,hJ=e=>`रन ${e==null?void 0:e.id}`,pJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):lJ(e)}),mJ=e=>`Show error details for ${e==null?void 0:e.activity}`,gJ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,vJ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,bJ=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,yJ=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,xJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,wJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gJ(e):t==="fa"?vJ(e):t==="ar"?bJ(e):t==="es"?yJ(e):t==="hi"?xJ(e):mJ(e)}),kJ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,SJ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,CJ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,EJ=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,NJ=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,zJ=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,jJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SJ(e):t==="fa"?CJ(e):t==="ar"?EJ(e):t==="es"?NJ(e):t==="hi"?zJ(e):kJ(e)}),TJ=e=>`${e==null?void 0:e.name} skill`,AJ=e=>`${e==null?void 0:e.name} 技能`,RJ=e=>`مهارت ${e==null?void 0:e.name}`,MJ=e=>`مهارة ${e==null?void 0:e.name}`,OJ=e=>`Skill ${e==null?void 0:e.name}`,DJ=e=>`${e==null?void 0:e.name} स्किल`,LJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AJ(e):t==="fa"?RJ(e):t==="ar"?MJ(e):t==="es"?OJ(e):t==="hi"?DJ(e):TJ(e)}),IJ=e=>`Value for ${e==null?void 0:e.name}`,$J=e=>`${e==null?void 0:e.name} 的值`,BJ=e=>`مقدار ${e==null?void 0:e.name}`,PJ=e=>`قيمة ${e==null?void 0:e.name}`,FJ=e=>`Valor de ${e==null?void 0:e.name}`,HJ=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,qJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$J(e):t==="fa"?BJ(e):t==="ar"?PJ(e):t==="es"?FJ(e):t==="hi"?HJ(e):IJ(e)}),UJ=()=>"Agent reported back",GJ=()=>"智能体已返回结果",VJ=()=>"عامل نتیجه را گزارش کرد",KJ=()=>"أبلغ الوكيل بالنتيجة",WJ=()=>"El agente informó de los resultados",QJ=()=>"एजेंट ने रिपोर्ट भेजी",XJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJ():t==="fa"?VJ():t==="ar"?KJ():t==="es"?WJ():t==="hi"?QJ():UJ()}),YJ=()=>"Browse",ZJ=()=>"浏览",JJ=()=>"مرور",eee=()=>"تصفّح",tee=()=>"Navegar",nee=()=>"ब्राउज़ करें",ree=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJ():t==="fa"?JJ():t==="ar"?eee():t==="es"?tee():t==="hi"?nee():YJ()}),see=()=>"Browsing…",iee=()=>"正在浏览…",aee=()=>"در حال مرور…",oee=()=>"جارٍ التصفّح…",cee=()=>"Navegando…",lee=()=>"ब्राउज़ कर रहा है…",uee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iee():t==="fa"?aee():t==="ar"?oee():t==="es"?cee():t==="hi"?lee():see()}),_ee=()=>"Checked experiment status and updated notes",fee=()=>"已检查实验状态并更新笔记",dee=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",hee=()=>"فحص حالة التجربة وحدّث الملاحظات",pee=()=>"Consultó el estado del experimento y actualizó las notas",mee=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",gee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fee():t==="fa"?dee():t==="ar"?hee():t==="es"?pee():t==="hi"?mee():_ee()}),vee=()=>"Closed an agent",bee=()=>"已关闭智能体",yee=()=>"عامل بسته شد",xee=()=>"أغلق وكيلًا",wee=()=>"Cerró un agente",kee=()=>"एक एजेंट बंद किया",See=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bee():t==="fa"?yee():t==="ar"?xee():t==="es"?wee():t==="hi"?kee():vee()}),Cee=()=>"Context compacted",Eee=()=>"上下文已压缩",Nee=()=>"زمینه فشرده شد",zee=()=>"تم ضغط السياق",jee=()=>"Contexto comprimido",Tee=()=>"कॉन्टेक्स्ट छोटा किया गया",Aee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eee():t==="fa"?Nee():t==="ar"?zee():t==="es"?jee():t==="hi"?Tee():Cee()}),Ree=()=>"Compacting conversation…",Mee=()=>"正在压缩对话…",Oee=()=>"در حال فشرده‌سازی گفت‌وگو…",Dee=()=>"جارٍ ضغط المحادثة…",Lee=()=>"Comprimiendo la conversación…",Iee=()=>"बातचीत छोटी की जा रही है…",FE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mee():t==="fa"?Oee():t==="ar"?Dee():t==="es"?Lee():t==="hi"?Iee():Ree()}),$ee=()=>"Compacting failed",Bee=()=>"压缩失败",Pee=()=>"فشرده‌سازی ناموفق بود",Fee=()=>"فشل الضغط",Hee=()=>"Error al comprimir",qee=()=>"छोटा करना विफल",Uee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bee():t==="fa"?Pee():t==="ar"?Fee():t==="es"?Hee():t==="hi"?qee():$ee()}),Gee=e=>`Created ${e==null?void 0:e.target}`,Vee=e=>`已创建 ${e==null?void 0:e.target}`,Kee=e=>`${e==null?void 0:e.target} ایجاد شد`,Wee=e=>`أنشأ ${e==null?void 0:e.target}`,Qee=e=>`Creó ${e==null?void 0:e.target}`,Xee=e=>`${e==null?void 0:e.target} बनाया`,Yee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vee(e):t==="fa"?Kee(e):t==="ar"?Wee(e):t==="es"?Qee(e):t==="hi"?Xee(e):Gee(e)}),Zee=()=>"Delegate",Jee=()=>"委派",ete=()=>"واگذاری",tte=()=>"تفويض",nte=()=>"Delegar",rte=()=>"सौंपें",ste=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jee():t==="fa"?ete():t==="ar"?tte():t==="es"?nte():t==="hi"?rte():Zee()}),ite=()=>"Delegating…",ate=()=>"正在委派…",ote=()=>"در حال واگذاری…",cte=()=>"جارٍ التفويض…",lte=()=>"Delegando…",ute=()=>"सौंप रहा है…",_te=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ate():t==="fa"?ote():t==="ar"?cte():t==="es"?lte():t==="hi"?ute():ite()}),fte=e=>`Deleted ${e==null?void 0:e.target}`,dte=e=>`已删除 ${e==null?void 0:e.target}`,hte=e=>`${e==null?void 0:e.target} حذف شد`,pte=e=>`حذف ${e==null?void 0:e.target}`,mte=e=>`Eliminó ${e==null?void 0:e.target}`,gte=e=>`${e==null?void 0:e.target} हटाया`,vte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dte(e):t==="fa"?hte(e):t==="ar"?pte(e):t==="es"?mte(e):t==="hi"?gte(e):fte(e)}),bte=()=>"Edit",yte=()=>"编辑",xte=()=>"ویرایش",wte=()=>"تعديل",kte=()=>"Editar",Ste=()=>"संपादित करें",Cte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yte():t==="fa"?xte():t==="ar"?wte():t==="es"?kte():t==="hi"?Ste():bte()}),Ete=e=>`Edited ${e==null?void 0:e.target}`,Nte=e=>`已编辑 ${e==null?void 0:e.target}`,zte=e=>`${e==null?void 0:e.target} ویرایش شد`,jte=e=>`عدّل ${e==null?void 0:e.target}`,Tte=e=>`Editó ${e==null?void 0:e.target}`,Ate=e=>`${e==null?void 0:e.target} संपादित किया`,Rte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nte(e):t==="fa"?zte(e):t==="ar"?jte(e):t==="es"?Tte(e):t==="hi"?Ate(e):Ete(e)}),Mte=()=>"Editing…",Ote=()=>"正在编辑…",Dte=()=>"در حال ویرایش…",Lte=()=>"جارٍ التعديل…",Ite=()=>"Editando…",$te=()=>"संपादित कर रहा है…",Bte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ote():t==="fa"?Dte():t==="ar"?Lte():t==="es"?Ite():t==="hi"?$te():Mte()}),Pte=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Fte=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Hte=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,qte=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Ute=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Gte=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Vte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fte(e):t==="fa"?Hte(e):t==="ar"?qte(e):t==="es"?Ute(e):t==="hi"?Gte(e):Pte(e)}),Kte=()=>"Imported from your terminal — new turns continue in the agent's own history",Wte=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Qte=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Xte=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Yte=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",Zte=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",Jte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wte():t==="fa"?Qte():t==="ar"?Xte():t==="es"?Yte():t==="hi"?Zte():Kte()}),ene=e=>`Listed files matching ${e==null?void 0:e.pattern}`,tne=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,nne=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,rne=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,sne=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,ine=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,ane=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tne(e):t==="fa"?nne(e):t==="ar"?rne(e):t==="es"?sne(e):t==="hi"?ine(e):ene(e)}),one=()=>"Load",cne=()=>"加载",lne=()=>"بارگیری",une=()=>"تحميل",_ne=()=>"Cargar",fne=()=>"लोड करें",dne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cne():t==="fa"?lne():t==="ar"?une():t==="es"?_ne():t==="hi"?fne():one()}),hne=()=>"Loaded a skill",pne=()=>"已加载技能",mne=()=>"یک مهارت بارگیری شد",gne=()=>"حمّل مهارة",vne=()=>"Cargó una skill",bne=()=>"एक स्किल लोड की",yne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pne():t==="fa"?mne():t==="ar"?gne():t==="es"?vne():t==="hi"?bne():hne()}),xne=e=>`Loaded ${e==null?void 0:e.name} skill`,wne=e=>`已加载技能 ${e==null?void 0:e.name}`,kne=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Sne=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Cne=e=>`Cargó la skill ${e==null?void 0:e.name}`,Ene=e=>`${e==null?void 0:e.name} स्किल लोड की`,Nne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wne(e):t==="fa"?kne(e):t==="ar"?Sne(e):t==="es"?Cne(e):t==="hi"?Ene(e):xne(e)}),zne=()=>"Loading…",jne=()=>"正在加载…",Tne=()=>"در حال بارگیری…",Ane=()=>"جارٍ التحميل…",Rne=()=>"Cargando…",Mne=()=>"लोड हो रहा है…",One=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jne():t==="fa"?Tne():t==="ar"?Ane():t==="es"?Rne():t==="hi"?Mne():zne()}),Dne=e=>`Opened ${e==null?void 0:e.target}`,Lne=e=>`已打开 ${e==null?void 0:e.target}`,Ine=e=>`${e==null?void 0:e.target} باز شد`,$ne=e=>`فتح ${e==null?void 0:e.target}`,Bne=e=>`Abrió ${e==null?void 0:e.target}`,Pne=e=>`${e==null?void 0:e.target} खोला`,Fne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lne(e):t==="fa"?Ine(e):t==="ar"?$ne(e):t==="es"?Bne(e):t==="hi"?Pne(e):Dne(e)}),Hne=e=>`Ran ${e==null?void 0:e.command}`,qne=e=>`已运行 ${e==null?void 0:e.command}`,Une=e=>`${e==null?void 0:e.command} اجرا شد`,Gne=e=>`نفّذ ${e==null?void 0:e.command}`,Vne=e=>`Ejecutó ${e==null?void 0:e.command}`,Kne=e=>`${e==null?void 0:e.command} चलाया`,Wne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qne(e):t==="fa"?Une(e):t==="ar"?Gne(e):t==="es"?Vne(e):t==="hi"?Kne(e):Hne(e)}),Qne=()=>"Ran a sub-agent",Xne=()=>"已运行子智能体",Yne=()=>"یک عامل فرعی اجرا شد",Zne=()=>"شغّل وكيلًا فرعيًا",Jne=()=>"Ejecutó un subagente",ere=()=>"एक सब-एजेंट चलाया",tre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xne():t==="fa"?Yne():t==="ar"?Zne():t==="es"?Jne():t==="hi"?ere():Qne()}),nre=()=>"Read",rre=()=>"读取",sre=()=>"خواندن",ire=()=>"قراءة",are=()=>"Leer",ore=()=>"पढ़ें",cre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rre():t==="fa"?sre():t==="ar"?ire():t==="es"?are():t==="hi"?ore():nre()}),lre=()=>"Read experiment notes",ure=()=>"已读取实验笔记",_re=()=>"یادداشت‌های آزمایش خوانده شد",fre=()=>"قرأ ملاحظات التجربة",dre=()=>"Leyó las notas del experimento",hre=()=>"प्रयोग के नोट्स पढ़े",pre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ure():t==="fa"?_re():t==="ar"?fre():t==="es"?dre():t==="hi"?hre():lre()}),mre=()=>"Read a paper",gre=()=>"已读取论文",vre=()=>"یک مقاله خوانده شد",bre=()=>"قرأ ورقة",yre=()=>"Leyó un paper",xre=()=>"एक पेपर पढ़ा",wre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gre():t==="fa"?vre():t==="ar"?bre():t==="es"?yre():t==="hi"?xre():mre()}),kre=e=>`Read ${e==null?void 0:e.name} skill`,Sre=e=>`已读取技能 ${e==null?void 0:e.name}`,Cre=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Ere=e=>`قرأ مهارة ${e==null?void 0:e.name}`,Nre=e=>`Leyó la skill ${e==null?void 0:e.name}`,zre=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,V2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sre(e):t==="fa"?Cre(e):t==="ar"?Ere(e):t==="es"?Nre(e):t==="hi"?zre(e):kre(e)}),jre=e=>`Read ${e==null?void 0:e.target}`,Tre=e=>`已读取 ${e==null?void 0:e.target}`,Are=e=>`${e==null?void 0:e.target} خوانده شد`,Rre=e=>`قرأ ${e==null?void 0:e.target}`,Mre=e=>`Leyó ${e==null?void 0:e.target}`,Ore=e=>`${e==null?void 0:e.target} पढ़ा`,Ip=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tre(e):t==="fa"?Are(e):t==="ar"?Rre(e):t==="es"?Mre(e):t==="hi"?Ore(e):jre(e)}),Dre=()=>"Read a web page",Lre=()=>"已读取网页",Ire=()=>"یک صفحهٔ وب خوانده شد",$re=()=>"قرأ صفحة ويب",Bre=()=>"Leyó una página web",Pre=()=>"एक वेब पेज पढ़ा",Fre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lre():t==="fa"?Ire():t==="ar"?$re():t==="es"?Bre():t==="hi"?Pre():Dre()}),Hre=()=>"Reading…",qre=()=>"正在读取…",Ure=()=>"در حال خواندن…",Gre=()=>"جارٍ القراءة…",Vre=()=>"Leyendo…",Kre=()=>"पढ़ रहा है…",Wre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qre():t==="fa"?Ure():t==="ar"?Gre():t==="es"?Vre():t==="hi"?Kre():Hre()}),Qre=()=>"Resumed an agent",Xre=()=>"已恢复智能体",Yre=()=>"عامل از سر گرفته شد",Zre=()=>"استأنف عمل وكيل",Jre=()=>"Reanudó un agente",ese=()=>"एक एजेंट फिर से शुरू किया",tse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xre():t==="fa"?Yre():t==="ar"?Zre():t==="es"?Jre():t==="hi"?ese():Qre()}),nse=()=>"Review",rse=()=>"查看",sse=()=>"بازبینی",ise=()=>"مراجعة",ase=()=>"Revisar",ose=()=>"समीक्षा करें",cse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rse():t==="fa"?sse():t==="ar"?ise():t==="es"?ase():t==="hi"?ose():nse()}),lse=()=>"Reviewed run log",use=()=>"已查看运行日志",_se=()=>"گزارش اجرا بازبینی شد",fse=()=>"راجع سجل التشغيل",dse=()=>"Revisó el log de la ejecución",hse=()=>"रन लॉग की समीक्षा की",pse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?use():t==="fa"?_se():t==="ar"?fse():t==="es"?dse():t==="hi"?hse():lse()}),mse=()=>"Reviewed run logs",gse=()=>"已查看运行日志",vse=()=>"گزارش‌های اجرا بازبینی شد",bse=()=>"راجع سجلات التشغيل",yse=()=>"Revisó los logs de las ejecuciones",xse=()=>"रन लॉग की समीक्षा की",wse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gse():t==="fa"?vse():t==="ar"?bse():t==="es"?yse():t==="hi"?xse():mse()}),kse=()=>"Reviewed experiment status and notes",Sse=()=>"已查看实验状态和笔记",Cse=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Ese=()=>"راجع حالة التجربة وملاحظاتها",Nse=()=>"Revisó el estado y las notas del experimento",zse=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",jse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sse():t==="fa"?Cse():t==="ar"?Ese():t==="es"?Nse():t==="hi"?zse():kse()}),Tse=()=>"Reviewing…",Ase=()=>"正在查看…",Rse=()=>"در حال بازبینی…",Mse=()=>"جارٍ المراجعة…",Ose=()=>"Revisando…",Dse=()=>"समीक्षा कर रहा है…",Lse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ase():t==="fa"?Rse():t==="ar"?Mse():t==="es"?Ose():t==="hi"?Dse():Tse()}),Ise=()=>"Run",$se=()=>"运行",Bse=()=>"اجرا",Pse=()=>"تشغيل",Fse=()=>"Ejecutar",Hse=()=>"चलाएं",qse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$se():t==="fa"?Bse():t==="ar"?Pse():t==="es"?Fse():t==="hi"?Hse():Ise()}),Use=()=>"Running…",Gse=()=>"正在运行…",Vse=()=>"در حال اجرا…",Kse=()=>"جارٍ التشغيل…",Wse=()=>"Ejecutando…",Qse=()=>"चल रहा है…",gD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gse():t==="fa"?Vse():t==="ar"?Kse():t==="es"?Wse():t==="hi"?Qse():Use()}),Xse=()=>"Search",Yse=()=>"搜索",Zse=()=>"جست‌وجو",Jse=()=>"بحث",eie=()=>"Buscar",tie=()=>"खोजें",nie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yse():t==="fa"?Zse():t==="ar"?Jse():t==="es"?eie():t==="hi"?tie():Xse()}),rie=()=>"Searched alphaXiv full text",sie=()=>"已搜索 alphaXiv 全文",iie=()=>"متن کامل alphaXiv جست‌وجو شد",aie=()=>"بحث في نص alphaXiv الكامل",oie=()=>"Buscó en el texto completo de alphaXiv",cie=()=>"alphaXiv का पूरा टेक्स्ट खोजा",lie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sie():t==="fa"?iie():t==="ar"?aie():t==="es"?oie():t==="hi"?cie():rie()}),uie=()=>"Searched alphaXiv semantically",_ie=()=>"已对 alphaXiv 进行语义搜索",fie=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",die=()=>"أجرى بحثًا دلاليًا في alphaXiv",hie=()=>"Hizo una búsqueda semántica en alphaXiv",pie=()=>"alphaXiv को सिमेंटिक रूप से खोजा",mie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ie():t==="fa"?fie():t==="ar"?die():t==="es"?hie():t==="hi"?pie():uie()}),gie=()=>"Searched bioRxiv",vie=()=>"已搜索 bioRxiv",bie=()=>"bioRxiv جست‌وجو شد",yie=()=>"بحث في bioRxiv",xie=()=>"Buscó en bioRxiv",wie=()=>"bioRxiv खोजा",kie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vie():t==="fa"?bie():t==="ar"?yie():t==="es"?xie():t==="hi"?wie():gie()}),Sie=()=>"Searched code",Cie=()=>"已搜索代码",Eie=()=>"کد جست‌وجو شد",Nie=()=>"بحث في الشيفرة",zie=()=>"Buscó en el código",jie=()=>"कोड खोजा",K2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cie():t==="fa"?Eie():t==="ar"?Nie():t==="es"?zie():t==="hi"?jie():Sie()}),Tie=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Aie=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Rie=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Mie=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Oie=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Die=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,W2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Aie(e):t==="fa"?Rie(e):t==="ar"?Mie(e):t==="es"?Oie(e):t==="hi"?Die(e):Tie(e)}),Lie=e=>`Searched images for “${e==null?void 0:e.query}”`,Iie=e=>`已搜索图片“${e==null?void 0:e.query}”`,$ie=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,Bie=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Pie=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,Fie=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,Hie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iie(e):t==="fa"?$ie(e):t==="ar"?Bie(e):t==="es"?Pie(e):t==="hi"?Fie(e):Lie(e)}),qie=()=>"Searched the literature",Uie=()=>"已搜索文献",Gie=()=>"منابع علمی جست‌وجو شد",Vie=()=>"بحث في الأدبيات",Kie=()=>"Buscó en la literatura",Wie=()=>"साहित्य खोजा",HE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uie():t==="fa"?Gie():t==="ar"?Vie():t==="es"?Kie():t==="hi"?Wie():qie()}),Qie=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Xie=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Yie=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Zie=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,Jie=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,eae=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,tae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xie(e):t==="fa"?Yie(e):t==="ar"?Zie(e):t==="es"?Jie(e):t==="hi"?eae(e):Qie(e)}),nae=()=>"Searched OpenAlex",rae=()=>"已搜索 OpenAlex",sae=()=>"OpenAlex جست‌وجو شد",iae=()=>"بحث في OpenAlex",aae=()=>"Buscó en OpenAlex",oae=()=>"OpenAlex खोजा",cae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rae():t==="fa"?sae():t==="ar"?iae():t==="es"?aae():t==="hi"?oae():nae()}),lae=()=>"Searched PubMed",uae=()=>"已搜索 PubMed",_ae=()=>"PubMed جست‌وجو شد",fae=()=>"بحث في PubMed",dae=()=>"Buscó en PubMed",hae=()=>"PubMed खोजा",pae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uae():t==="fa"?_ae():t==="ar"?fae():t==="es"?dae():t==="hi"?hae():lae()}),mae=e=>`Searched the web for “${e==null?void 0:e.query}”`,gae=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,vae=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,bae=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,yae=e=>`Buscó “${e==null?void 0:e.query}” en la web`,xae=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,qE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gae(e):t==="fa"?vae(e):t==="ar"?bae(e):t==="es"?yae(e):t==="hi"?xae(e):mae(e)}),wae=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,kae=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Sae=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Cae=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Eae=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Nae=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,zae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kae(e):t==="fa"?Sae(e):t==="ar"?Cae(e):t==="es"?Eae(e):t==="hi"?Nae(e):wae(e)}),jae=()=>"Searching…",Tae=()=>"正在搜索…",Aae=()=>"در حال جست‌وجو…",Rae=()=>"جارٍ البحث…",Mae=()=>"Buscando…",Oae=()=>"खोज रहा है…",Dae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tae():t==="fa"?Aae():t==="ar"?Rae():t==="es"?Mae():t==="hi"?Oae():jae()}),Lae=()=>"Sent input to an agent",Iae=()=>"已向智能体发送输入",$ae=()=>"ورودی به عامل فرستاده شد",Bae=()=>"أرسل مدخلًا إلى وكيل",Pae=()=>"Envió información a un agente",Fae=()=>"एक एजेंट को इनपुट भेजा",Hae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iae():t==="fa"?$ae():t==="ar"?Bae():t==="es"?Pae():t==="hi"?Fae():Lae()}),qae=()=>"Spawned an agent",Uae=()=>"已创建智能体",Gae=()=>"یک عامل ساخته شد",Vae=()=>"أنشأ وكيلًا",Kae=()=>"Creó un agente",Wae=()=>"एक एजेंट शुरू किया",Qae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uae():t==="fa"?Gae():t==="ar"?Vae():t==="es"?Kae():t==="hi"?Wae():qae()}),Xae=()=>"Sub-agent",Yae=()=>"子智能体",Zae=()=>"عامل فرعی",Jae=()=>"وكيل فرعي",eoe=()=>"Subagente",toe=()=>"सब-एजेंट",noe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yae():t==="fa"?Zae():t==="ar"?Jae():t==="es"?eoe():t==="hi"?toe():Xae()}),roe=()=>"Sub-agent interrupted",soe=()=>"子智能体已中断",ioe=()=>"عامل فرعی متوقف شد",aoe=()=>"قُوطع الوكيل الفرعي",ooe=()=>"Subagente interrumpido",coe=()=>"सब-एजेंट बाधित हुआ",loe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?soe():t==="fa"?ioe():t==="ar"?aoe():t==="es"?ooe():t==="hi"?coe():roe()}),uoe=()=>"Sub-agent started",_oe=()=>"子智能体已启动",foe=()=>"عامل فرعی آغاز شد",doe=()=>"بدأ الوكيل الفرعي",hoe=()=>"Subagente iniciado",poe=()=>"सब-एजेंट शुरू हुआ",moe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_oe():t==="fa"?foe():t==="ar"?doe():t==="es"?hoe():t==="hi"?poe():uoe()}),goe=()=>"Updated experiment notes",voe=()=>"已更新实验笔记",boe=()=>"یادداشت‌های آزمایش به‌روز شد",yoe=()=>"حدّث ملاحظات التجربة",xoe=()=>"Actualizó las notas del experimento",woe=()=>"प्रयोग के नोट्स अपडेट किए",koe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?voe():t==="fa"?boe():t==="ar"?yoe():t==="es"?xoe():t==="hi"?woe():goe()}),Soe=()=>"Waiting on an agent",Coe=()=>"正在等待智能体",Eoe=()=>"در انتظار عامل",Noe=()=>"في انتظار وكيل",zoe=()=>"Esperando a un agente",joe=()=>"एजेंट का इंतज़ार है",Toe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Coe():t==="fa"?Eoe():t==="ar"?Noe():t==="es"?zoe():t==="hi"?joe():Soe()}),Aoe=e=>`Approval required: ${e==null?void 0:e.label}`,Roe=e=>`需要批准:${e==null?void 0:e.label}`,Moe=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Ooe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Doe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Loe=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,UE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Roe(e):t==="fa"?Moe(e):t==="ar"?Ooe(e):t==="es"?Doe(e):t==="hi"?Loe(e):Aoe(e)}),Ioe=()=>"The CLI is retrying the turn.",$oe=()=>"CLI 正在重试本轮。",Boe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Poe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Foe=()=>"La CLI está reintentando el turno.",Hoe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",qoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$oe():t==="fa"?Boe():t==="ar"?Poe():t==="es"?Foe():t==="hi"?Hoe():Ioe()}),Uoe=()=>"Continue is available.",Goe=()=>"可以继续。",Voe=()=>"ادامه در دسترس است.",Koe=()=>"المتابعة متاحة.",Woe=()=>"Puedes continuar.",Qoe=()=>"जारी रखना उपलब्ध है।",Xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Goe():t==="fa"?Voe():t==="ar"?Koe():t==="es"?Woe():t==="hi"?Qoe():Uoe()}),Yoe=()=>"Retry is available.",Zoe=()=>"可以重试。",Joe=()=>"تلاش دوباره در دسترس است.",ece=()=>"إعادة المحاولة متاحة.",tce=()=>"Puedes reintentarlo.",nce=()=>"फिर से कोशिश करना उपलब्ध है।",rce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zoe():t==="fa"?Joe():t==="ar"?ece():t==="es"?tce():t==="hi"?nce():Yoe()}),sce=()=>"Running a tool",ice=()=>"正在运行工具",ace=()=>"در حال اجرای ابزار",oce=()=>"جارٍ تشغيل أداة",cce=()=>"Ejecutando una herramienta",lce=()=>"एक टूल चल रहा है",uce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ice():t==="fa"?ace():t==="ar"?oce():t==="es"?cce():t==="hi"?lce():sce()}),_ce=()=>"Tool activity completed",fce=()=>"工具活动已完成",dce=()=>"فعالیت ابزار کامل شد",hce=()=>"اكتمل نشاط الأداة",pce=()=>"Actividad de la herramienta completada",mce=()=>"टूल गतिविधि पूरी हुई",gce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fce():t==="fa"?dce():t==="ar"?hce():t==="es"?pce():t==="hi"?mce():_ce()}),vce=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,bce=e=>`工具活动失败:${e==null?void 0:e.labels}`,yce=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,xce=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,wce=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,kce=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,Sce=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bce(e):t==="fa"?yce(e):t==="ar"?xce(e):t==="es"?wce(e):t==="hi"?kce(e):vce(e)}),Cce=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Ece=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,Nce=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,zce=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,jce=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Tce=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,Ace=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ece(e):t==="fa"?Nce(e):t==="ar"?zce(e):t==="es"?jce(e):t==="hi"?Tce(e):Cce(e)}),Rce=()=>"Turn did not finish.",Mce=()=>"本轮未完成。",Oce=()=>"این نوبت کامل نشد.",Dce=()=>"لم تكتمل الجولة.",Lce=()=>"El turno no terminó.",Ice=()=>"यह टर्न पूरा नहीं हुआ।",$ce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mce():t==="fa"?Oce():t==="ar"?Dce():t==="es"?Lce():t==="hi"?Ice():Rce()}),Bce=()=>"Artifacts",Pce=()=>"产物",Fce=()=>"خروجی‌ها",Hce=()=>"المُخرَجات",qce=()=>"Artefactos",Uce=()=>"आर्टिफ़ैक्ट",vD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pce():t==="fa"?Fce():t==="ar"?Hce():t==="es"?qce():t==="hi"?Uce():Bce()}),Gce=()=>"Close panel",Vce=()=>"关闭面板",Kce=()=>"بستن پنل",Wce=()=>"إغلاق اللوحة",Qce=()=>"Cerrar panel",Xce=()=>"पैनल बंद करें",z0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vce():t==="fa"?Kce():t==="ar"?Wce():t==="es"?Qce():t==="hi"?Xce():Gce()}),Yce=()=>"Current task",Zce=()=>"当前任务",Jce=()=>"وظیفهٔ فعلی",ele=()=>"المهمة الحالية",tle=()=>"Tarea actual",nle=()=>"मौजूदा टास्क",GE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zce():t==="fa"?Jce():t==="ar"?ele():t==="es"?tle():t==="hi"?nle():Yce()}),rle=()=>"Drag to resize panel",sle=()=>"拖动以调整面板大小",ile=()=>"برای تغییر اندازهٔ پنل بکشید",ale=()=>"اسحب لتغيير حجم اللوحة",ole=()=>"Arrastra para cambiar el tamaño del panel",cle=()=>"पैनल का आकार बदलने के लिए खींचें",lle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sle():t==="fa"?ile():t==="ar"?ale():t==="es"?ole():t==="hi"?cle():rle()}),ule=()=>"Drag toward the center to restore panel",_le=()=>"向中央拖动以恢复面板",fle=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",dle=()=>"اسحب نحو المنتصف لاستعادة اللوحة",hle=()=>"Arrastra hacia el centro para restaurar el panel",ple=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",mle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_le():t==="fa"?fle():t==="ar"?dle():t==="es"?hle():t==="hi"?ple():ule()}),gle=()=>"Entire project",vle=()=>"整个项目",ble=()=>"کل پروژه",yle=()=>"المشروع بالكامل",xle=()=>"Todo el proyecto",wle=()=>"पूरा प्रोजेक्ट",VE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vle():t==="fa"?ble():t==="ar"?yle():t==="es"?xle():t==="hi"?wle():gle()}),kle=()=>"Expand panel",Sle=()=>"展开面板",Cle=()=>"گسترش پنل",Ele=()=>"توسيع اللوحة",Nle=()=>"Expandir panel",zle=()=>"पैनल फैलाएं",KE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sle():t==="fa"?Cle():t==="ar"?Ele():t==="es"?Nle():t==="hi"?zle():kle()}),jle=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Tle=e=>`实验筛选:${e==null?void 0:e.scope}`,Ale=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Rle=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,Mle=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Ole=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Dle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tle(e):t==="fa"?Ale(e):t==="ar"?Rle(e):t==="es"?Mle(e):t==="hi"?Ole(e):jle(e)}),Lle=()=>"Experiment view",Ile=()=>"实验视图",$le=()=>"نمای آزمایش",Ble=()=>"عرض التجربة",Ple=()=>"Vista de experimento",Fle=()=>"प्रयोग व्यू",Hle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ile():t==="fa"?$le():t==="ar"?Ble():t==="es"?Ple():t==="hi"?Fle():Lle()}),qle=()=>"Experiments",Ule=()=>"实验",Gle=()=>"آزمایش‌ها",Vle=()=>"التجارب",Kle=()=>"Experimentos",Wle=()=>"प्रयोग",bD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ule():t==="fa"?Gle():t==="ar"?Vle():t==="es"?Kle():t==="hi"?Wle():qle()}),Qle=()=>"Files",Xle=()=>"文件",Yle=()=>"فایل‌ها",Zle=()=>"الملفات",Jle=()=>"Archivos",eue=()=>"फ़ाइलें",s3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xle():t==="fa"?Yle():t==="ar"?Zle():t==="es"?Jle():t==="hi"?eue():Qle()}),tue=()=>"Filter experiments",nue=()=>"筛选实验",rue=()=>"فیلتر آزمایش‌ها",sue=()=>"تصفية التجارب",iue=()=>"Filtrar experimentos",aue=()=>"प्रयोग फ़िल्टर करें",oue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nue():t==="fa"?rue():t==="ar"?sue():t==="es"?iue():t==="hi"?aue():tue()}),cue=()=>"Current task filtering is unavailable for unattributed experiments",lue=()=>"存在无法归属的实验时,不能按当前任务筛选",uue=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",_ue=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",fue=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",due=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",hue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lue():t==="fa"?uue():t==="ar"?_ue():t==="es"?fue():t==="hi"?due():cue()}),pue=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",mue=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",gue=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",vue=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",bue=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",yue=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",xue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mue():t==="fa"?gue():t==="ar"?vue():t==="es"?bue():t==="hi"?yue():pue()}),wue=()=>"Open a task to filter to its experiments",kue=()=>"请打开一个任务以筛选其实验",Sue=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Cue=()=>"افتح مهمة لعرض تجاربها فقط",Eue=()=>"Abre una tarea para filtrar por sus experimentos",Nue=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",zue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kue():t==="fa"?Sue():t==="ar"?Cue():t==="es"?Eue():t==="hi"?Nue():wue()}),jue=()=>"projects",Tue=()=>"项目",Aue=()=>"پروژه‌ها",Rue=()=>"المشاريع",Mue=()=>"los proyectos",Oue=()=>"प्रोजेक्ट",l0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tue():t==="fa"?Aue():t==="ar"?Rue():t==="es"?Mue():t==="hi"?Oue():jue()}),Due=()=>"Restore panel",Lue=()=>"还原面板",Iue=()=>"بازگرداندن اندازهٔ پنل",$ue=()=>"استعادة اللوحة",Bue=()=>"Restaurar panel",Pue=()=>"पैनल वापस लाएं",WE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?$ue():t==="es"?Bue():t==="hi"?Pue():Due()}),Fue=()=>"Retry",Hue=()=>"重试",que=()=>"تلاش دوباره",Uue=()=>"إعادة المحاولة",Gue=()=>"Reintentar",Vue=()=>"फिर से कोशिश करें",Vs=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hue():t==="fa"?que():t==="ar"?Uue():t==="es"?Gue():t==="hi"?Vue():Fue()}),Kue=()=>"Select a project to browse its files.",Wue=()=>"选择一个项目以浏览其文件。",Que=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Xue=()=>"اختر مشروعًا لتصفح ملفاته.",Yue=()=>"Selecciona un proyecto para explorar sus archivos.",Zue=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",Jue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wue():t==="fa"?Que():t==="ar"?Xue():t==="es"?Yue():t==="hi"?Zue():Kue()}),e_e=()=>"settings",t_e=()=>"设置",n_e=()=>"تنظیمات",r_e=()=>"الإعدادات",s_e=()=>"la configuración",i_e=()=>"सेटिंग्स",a_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t_e():t==="fa"?n_e():t==="ar"?r_e():t==="es"?s_e():t==="hi"?i_e():e_e()}),o_e=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,c_e=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,l_e=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,u_e=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,__e=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,f_e=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,d_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c_e(e):t==="fa"?l_e(e):t==="ar"?u_e(e):t==="es"?__e(e):t==="hi"?f_e(e):o_e(e)}),h_e=()=>"Sub-agent",p_e=()=>"子智能体",m_e=()=>"عامل فرعی",g_e=()=>"وكيل فرعي",v_e=()=>"Subagente",b_e=()=>"सब-एजेंट",y_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p_e():t==="fa"?m_e():t==="ar"?g_e():t==="es"?v_e():t==="hi"?b_e():h_e()}),x_e=()=>"Table",w_e=()=>"表格",k_e=()=>"جدول",S_e=()=>"جدول",C_e=()=>"Tabla",E_e=()=>"टेबल",N_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w_e():t==="fa"?k_e():t==="ar"?S_e():t==="es"?C_e():t==="hi"?E_e():x_e()}),z_e=()=>"Tree",j_e=()=>"树状图",T_e=()=>"درخت",A_e=()=>"شجرة",R_e=()=>"Árbol",M_e=()=>"ट्री",O_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j_e():t==="fa"?T_e():t==="ar"?A_e():t==="es"?R_e():t==="hi"?M_e():z_e()}),D_e=e=>`Collapse ${e==null?void 0:e.name}`,L_e=e=>`折叠 ${e==null?void 0:e.name}`,I_e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,$_e=e=>`طيّ ${e==null?void 0:e.name}`,B_e=e=>`Contraer ${e==null?void 0:e.name}`,P_e=e=>`${e==null?void 0:e.name} समेटें`,F_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L_e(e):t==="fa"?I_e(e):t==="ar"?$_e(e):t==="es"?B_e(e):t==="hi"?P_e(e):D_e(e)}),H_e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,q_e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,U_e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,G_e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,V_e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,K_e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,Pk=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e(e):t==="fa"?U_e(e):t==="ar"?G_e(e):t==="es"?V_e(e):t==="hi"?K_e(e):H_e(e)}),W_e=e=>`Delete folder ${e==null?void 0:e.name}`,Q_e=e=>`删除文件夹 ${e==null?void 0:e.name}`,X_e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,Y_e=e=>`حذف المجلد ${e==null?void 0:e.name}`,Z_e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,J_e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,efe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q_e(e):t==="fa"?X_e(e):t==="ar"?Y_e(e):t==="es"?Z_e(e):t==="hi"?J_e(e):W_e(e)}),tfe=e=>`Expand ${e==null?void 0:e.name}`,nfe=e=>`展开 ${e==null?void 0:e.name}`,rfe=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,sfe=e=>`توسيع ${e==null?void 0:e.name}`,ife=e=>`Expandir ${e==null?void 0:e.name}`,afe=e=>`${e==null?void 0:e.name} फैलाएं`,ofe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nfe(e):t==="fa"?rfe(e):t==="ar"?sfe(e):t==="es"?ife(e):t==="hi"?afe(e):tfe(e)}),cfe=()=>"Binary or unsupported file — no inline preview.",lfe=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",ufe=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",_fe=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",ffe=()=>"Archivo binario o no compatible — sin vista previa.",dfe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",hfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lfe():t==="fa"?ufe():t==="ar"?_fe():t==="es"?ffe():t==="hi"?dfe():cfe()}),pfe=()=>"Copy path",mfe=()=>"复制路径",gfe=()=>"کپی مسیر",vfe=()=>"نسخ المسار",bfe=()=>"Copiar ruta",yfe=()=>"पथ कॉपी करें",xfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mfe():t==="fa"?gfe():t==="ar"?vfe():t==="es"?bfe():t==="hi"?yfe():pfe()}),wfe=()=>"Artifact not found",kfe=()=>"找不到产物",Sfe=()=>"خروجی پیدا نشد",Cfe=()=>"لم يُعثر على المُخرَج",Efe=()=>"No se encontró el artefacto",Nfe=()=>"आर्टिफ़ैक्ट नहीं मिला",zfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kfe():t==="fa"?Sfe():t==="ar"?Cfe():t==="es"?Efe():t==="hi"?Nfe():wfe()}),jfe=()=>"Open raw",Tfe=()=>"打开原始文件",Afe=()=>"باز کردن فایل خام",Rfe=()=>"فتح الملف الخام",Mfe=()=>"Abrir sin formato",Ofe=()=>"रॉ खोलें",Dfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tfe():t==="fa"?Afe():t==="ar"?Rfe():t==="es"?Mfe():t==="hi"?Ofe():jfe()}),Lfe=()=>"Click an artifact to view it",Ife=()=>"点击产物即可查看",$fe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Bfe=()=>"انقر على مُخرَج لعرضه",Pfe=()=>"Selecciona un artefacto para verlo",Ffe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Hfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ife():t==="fa"?$fe():t==="ar"?Bfe():t==="es"?Pfe():t==="hi"?Ffe():Lfe()}),qfe=()=>"Delete artifact",Ufe=()=>"删除产物",Gfe=()=>"حذف خروجی",Vfe=()=>"حذف المُخرَج",Kfe=()=>"Eliminar artefacto",Wfe=()=>"आर्टिफ़ैक्ट हटाएं",QE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ufe():t==="fa"?Gfe():t==="ar"?Vfe():t==="es"?Kfe():t==="hi"?Wfe():qfe()}),Qfe=()=>"Delete folder",Xfe=()=>"删除文件夹",Yfe=()=>"حذف پوشه",Zfe=()=>"حذف المجلد",Jfe=()=>"Eliminar carpeta",ede=()=>"फ़ोल्डर हटाएं",tde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xfe():t==="fa"?Yfe():t==="ar"?Zfe():t==="es"?Jfe():t==="hi"?ede():Qfe()}),nde=()=>"Failed to load:",rde=()=>"加载失败:",sde=()=>"بارگیری ناموفق بود:",ide=()=>"تعذّر التحميل:",ade=()=>"Error al cargar:",ode=()=>"लोड नहीं हो सका:",cde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rde():t==="fa"?sde():t==="ar"?ide():t==="es"?ade():t==="hi"?ode():nde()}),lde=()=>"File truncated — showing the first 512 KB.",ude=()=>"文件已截断——仅显示前 512 KB。",_de=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",fde=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",dde=()=>"Archivo truncado — se muestran los primeros 512 KB.",hde=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",pde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ude():t==="fa"?_de():t==="ar"?fde():t==="es"?dde():t==="hi"?hde():lde()}),mde=()=>"Listing truncated — the folder has more artifacts.",gde=()=>"列表已截断——文件夹中还有更多产物。",vde=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",bde=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",yde=()=>"Listado truncado — la carpeta tiene más artefactos.",xde=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",wde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gde():t==="fa"?vde():t==="ar"?bde():t==="es"?yde():t==="hi"?xde():mde()}),kde=()=>"Loading…",Sde=()=>"正在加载…",Cde=()=>"در حال بارگیری…",Ede=()=>"جارٍ التحميل…",Nde=()=>"Cargando…",zde=()=>"लोड हो रहा है…",yD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sde():t==="fa"?Cde():t==="ar"?Ede():t==="es"?Nde():t==="hi"?zde():kde()}),jde=()=>"Loading artifacts…",Tde=()=>"正在加载产物…",Ade=()=>"در حال بارگیری خروجی‌ها…",Rde=()=>"جارٍ تحميل المُخرَجات…",Mde=()=>"Cargando artefactos…",Ode=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",Dde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tde():t==="fa"?Ade():t==="ar"?Rde():t==="es"?Mde():t==="hi"?Ode():jde()}),Lde=()=>"Modified",Ide=()=>"修改时间",$de=()=>"ویرایش‌شده",Bde=()=>"عُدّل",Pde=()=>"Modificado",Fde=()=>"बदला गया",Hde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ide():t==="fa"?$de():t==="ar"?Bde():t==="es"?Pde():t==="hi"?Fde():Lde()}),qde=()=>"No artifacts yet",Ude=()=>"尚无产物",Gde=()=>"هنوز خروجی‌ای وجود ندارد",Vde=()=>"لا توجد مُخرَجات بعد",Kde=()=>"Aún no hay artefactos",Wde=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",Qde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ude():t==="fa"?Gde():t==="ar"?Vde():t==="es"?Kde():t==="hi"?Wde():qde()}),Xde=()=>"Open raw in new tab",Yde=()=>"在新标签页中打开原始文件",Zde=()=>"باز کردن فایل خام در زبانهٔ جدید",Jde=()=>"فتح الملف الخام في تبويب جديد",ehe=()=>"Abrir sin formato en una pestaña nueva",the=()=>"नए टैब में रॉ खोलें",XE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yde():t==="fa"?Zde():t==="ar"?Jde():t==="es"?ehe():t==="hi"?the():Xde()}),nhe=()=>"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.",rhe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",she=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",ihe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",ahe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",ohe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",che=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rhe():t==="fa"?she():t==="ar"?ihe():t==="es"?ahe():t==="hi"?ohe():nhe()}),lhe=()=>"File too large to preview inline.",uhe=()=>"文件太大,无法内嵌预览。",_he=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",fhe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",dhe=()=>"El archivo es demasiado grande para previsualizarlo.",hhe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",phe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uhe():t==="fa"?_he():t==="ar"?fhe():t==="es"?dhe():t==="hi"?hhe():lhe()}),mhe=()=>"This is the baseline branch, so there is no parent comparison.",ghe=()=>"这是基线分支,因此没有父分支可供比较。",vhe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",bhe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",yhe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",xhe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",whe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ghe():t==="fa"?vhe():t==="ar"?bhe():t==="es"?yhe():t==="hi"?xhe():mhe()}),khe=()=>"Failed to load changes:",She=()=>"加载更改失败:",Che=()=>"بارگیری تغییرات ناموفق بود:",Ehe=()=>"تعذّر تحميل التغييرات:",Nhe=()=>"Error al cargar los cambios:",zhe=()=>"बदलाव लोड नहीं हो सके:",jhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?She():t==="fa"?Che():t==="ar"?Ehe():t==="es"?Nhe():t==="hi"?zhe():khe()}),The=()=>"Loading changes…",Ahe=()=>"正在加载更改…",Rhe=()=>"در حال بارگیری تغییرات…",Mhe=()=>"جارٍ تحميل التغييرات…",Ohe=()=>"Cargando cambios…",Dhe=()=>"बदलाव लोड हो रहे हैं…",Lhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ahe():t==="fa"?Rhe():t==="ar"?Mhe():t==="es"?Ohe():t==="hi"?Dhe():The()}),Ihe=()=>"No committed changes from the parent branch.",$he=()=>"与父分支相比没有已提交的更改。",Bhe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Phe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Fhe=()=>"No hay cambios confirmados respecto a la rama padre.",Hhe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",qhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$he():t==="fa"?Bhe():t==="ar"?Phe():t==="es"?Fhe():t==="hi"?Hhe():Ihe()}),Uhe=e=>`agent ${e==null?void 0:e.number}`,Ghe=e=>`智能体 ${e==null?void 0:e.number}`,Vhe=e=>`عامل ${e==null?void 0:e.number}`,Khe=e=>`وكيل ${e==null?void 0:e.number}`,Whe=e=>`agente ${e==null?void 0:e.number}`,Qhe=e=>`एजेंट ${e==null?void 0:e.number}`,YE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghe(e):t==="fa"?Vhe(e):t==="ar"?Khe(e):t==="es"?Whe(e):t==="hi"?Qhe(e):Uhe(e)}),Xhe=()=>"agent sessions",Yhe=()=>"智能体会话",Zhe=()=>"نشست‌های عامل‌ها",Jhe=()=>"جلسات الوكلاء",epe=()=>"sesiones de agente",tpe=()=>"एजेंट सेशन",npe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yhe():t==="fa"?Zhe():t==="ar"?Jhe():t==="es"?epe():t==="hi"?tpe():Xhe()}),rpe=()=>"All sessions",spe=()=>"所有会话",ipe=()=>"همهٔ نشست‌ها",ape=()=>"كل الجلسات",ope=()=>"Todas las sesiones",cpe=()=>"सभी सेशन",xD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?spe():t==="fa"?ipe():t==="ar"?ape():t==="es"?ope():t==="hi"?cpe():rpe()}),lpe=e=>`${e==null?void 0:e.count} annotations`,upe=e=>`${e==null?void 0:e.count} 条批注`,_pe=e=>`${e==null?void 0:e.count} یادداشت`,fpe=e=>`التعليقات: ${e==null?void 0:e.count}`,dpe=e=>`${e==null?void 0:e.count} anotaciones`,hpe=e=>`${e==null?void 0:e.count} एनोटेशन`,ppe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?upe(e):t==="fa"?_pe(e):t==="ar"?fpe(e):t==="es"?dpe(e):t==="hi"?hpe(e):lpe(e)}),mpe=()=>"Archive",gpe=()=>"归档",vpe=()=>"بایگانی",bpe=()=>"أرشفة",ype=()=>"Archivar",xpe=()=>"आर्काइव करें",wpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gpe():t==="fa"?vpe():t==="ar"?bpe():t==="es"?ype():t==="hi"?xpe():mpe()}),kpe=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Spe=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Cpe=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Epe=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",Npe=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",zpe=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",jpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Spe():t==="fa"?Cpe():t==="ar"?Epe():t==="es"?Npe():t==="hi"?zpe():kpe()}),Tpe=()=>"Asked about selected text",Ape=()=>"已询问所选文本",Rpe=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",Mpe=()=>"سأل عن النص المحدد",Ope=()=>"Preguntó sobre el texto seleccionado",Dpe=()=>"चयनित टेक्स्ट के बारे में पूछा",Lpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ape():t==="fa"?Rpe():t==="ar"?Mpe():t==="es"?Ope():t==="hi"?Dpe():Tpe()}),Ipe=()=>"Attachment",$pe=()=>"附件",Bpe=()=>"پیوست",Ppe=()=>"مرفق",Fpe=()=>"Adjunto",Hpe=()=>"अटैचमेंट",qpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$pe():t==="fa"?Bpe():t==="ar"?Ppe():t==="es"?Fpe():t==="hi"?Hpe():Ipe()}),Upe=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Gpe=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Vpe=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Kpe=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,Wpe=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,Qpe=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,Xpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpe(e):t==="fa"?Vpe(e):t==="ar"?Kpe(e):t==="es"?Wpe(e):t==="hi"?Qpe(e):Upe(e)}),Ype=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Zpe=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",Jpe=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",e0e=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",t0e=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",n0e=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",r0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpe():t==="fa"?Jpe():t==="ar"?e0e():t==="es"?t0e():t==="hi"?n0e():Ype()}),s0e=()=>"Wait for the turn to finish before running a command.",i0e=()=>"请等待本轮结束后再运行命令。",a0e=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",o0e=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",c0e=()=>"Espera a que termine el turno antes de ejecutar un comando.",l0e=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",u0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0e():t==="fa"?a0e():t==="ar"?o0e():t==="es"?c0e():t==="hi"?l0e():s0e()}),_0e=e=>`Exited with code ${e==null?void 0:e.code}`,f0e=e=>`退出码 ${e==null?void 0:e.code}`,d0e=e=>`با کد ${e==null?void 0:e.code} خارج شد`,h0e=e=>`خرج برمز ${e==null?void 0:e.code}`,p0e=e=>`Terminó con el código ${e==null?void 0:e.code}`,m0e=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,g0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f0e(e):t==="fa"?d0e(e):t==="ar"?h0e(e):t==="es"?p0e(e):t==="hi"?m0e(e):_0e(e)}),v0e=e=>`Command not run: ${e==null?void 0:e.error}`,b0e=e=>`命令未运行:${e==null?void 0:e.error}`,y0e=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,x0e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,w0e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,k0e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,ZE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b0e(e):t==="fa"?y0e(e):t==="ar"?x0e(e):t==="es"?w0e(e):t==="hi"?k0e(e):v0e(e)}),S0e=()=>"Collapse tool activity",C0e=()=>"折叠工具活动",E0e=()=>"بستن فعالیت ابزارها",N0e=()=>"طيّ نشاط الأداة",z0e=()=>"Contraer actividad de herramientas",j0e=()=>"टूल गतिविधि समेटें",T0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C0e():t==="fa"?E0e():t==="ar"?N0e():t==="es"?z0e():t==="hi"?j0e():S0e()}),A0e=()=>"Wait for the turn to finish before compacting.",R0e=()=>"请等待本轮结束后再压缩。",M0e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",O0e=()=>"انتظر انتهاء الجولة قبل الضغط.",D0e=()=>"Espera a que termine el turno antes de comprimir.",L0e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",I0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?D0e():t==="hi"?L0e():A0e()}),$0e=e=>`Compacting failed: ${e==null?void 0:e.error}`,B0e=e=>`压缩失败:${e==null?void 0:e.error}`,P0e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,F0e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,H0e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,q0e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,U0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B0e(e):t==="fa"?P0e(e):t==="ar"?F0e(e):t==="es"?H0e(e):t==="hi"?q0e(e):$0e(e)}),G0e=()=>"Continue",V0e=()=>"继续",K0e=()=>"ادامه",W0e=()=>"متابعة",Q0e=()=>"Continuar",X0e=()=>"जारी रखें",Y0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V0e():t==="fa"?K0e():t==="ar"?W0e():t==="es"?Q0e():t==="hi"?X0e():G0e()}),Z0e=()=>"Copy response",J0e=()=>"复制回复",eme=()=>"کپی پاسخ",tme=()=>"نسخ الرد",nme=()=>"Copiar respuesta",rme=()=>"जवाब कॉपी करें",JE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0e():t==="fa"?eme():t==="ar"?tme():t==="es"?nme():t==="hi"?rme():Z0e()}),sme=e=>`Delete “${e==null?void 0:e.title}”? + */var AE;function NW(){if(AE)return P2;AE=1;var e=vm(),n=EW();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return P2.useSyncExternalStoreWithSelector=function(u,h,_,p,m){var x=i(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=o(function(){function b(z){if(!w){if(w=!0,y=z,z=p(z),m!==void 0&&k.hasValue){var T=k.value;if(m(T,z))return C=T}return C=z}if(T=C,r(y,z))return T;var j=p(z);return m!==void 0&&m(T,j)?(y=z,T):(y=z,C=j)}var w=!1,y,C,N=_===void 0?null:_;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,_,p,m]);var v=s(u,x[0],x[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},P2}var RE;function zW(){return RE||(RE=1,B2.exports=NW()),B2.exports}var JO=zW();const jW=gm(JO);function TW(e,n){return e===n}function Xo(e,n,t=TW){const r=A.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=A.useCallback(()=>e==null?void 0:e.get(),[e]);return JO.useSyncExternalStoreWithSelector(r,s,s,n,t)}var ME={};function Dk(e,n){const t=A.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=w_(t.current,s):s}}function df(e){const n=fi(),t=A.useContext(e.from?vW:Sb),r=e.from??t,s=n.stores.getMatchStore(r),i=Dk(e,n),a=Xo(s,o=>o?i(o):ME);if(a!==ME)return a;(e.shouldThrow??!0)&&Ek()}function eD(e){return df({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function tD(e){const{select:n,...t}=e;return df({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function nD(e){return df({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 rD(e){return df({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Cb(e){const n=fi();return A.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function Lk(e){return df({...e,select:n=>e.select?e.select(n.context):n.context})}function q2(e){const n=A.useRef(e);return vu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function AW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function RW(e,n,t){if(e!=null&&e.external)return mv(e.href,t)?void 0:e.href;if(!BW(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),mv(n,t)?void 0:n}catch{}}function MW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!zK(e.pathname,n.pathname,r))return!1}else{const a=vv(e.pathname,r),o=vv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!vu(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 OW(e,n){const t=fi(),r=uK(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:x,viewTransition:k,children:v,target:b,disabled:w,style:y,className:C,onClick:N,onBlur:z,onFocus:T,onMouseEnter:j,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:$,search:q,hash:H,state:Q,mask:V,reloadDocument:J,unsafeRelative:Z,from:B,_fromLocation:L,...F}=e,U=QO(),K=q2(e.search),ne=q2(e.params),ce=q2(a),_e=A.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,K,ne,e.state,e.mask,e.unsafeRelative]),se=A.useCallback(pt=>{const _t=t.buildLocation({_fromLocation:pt,..._e}),Le=$W(_t.maskedLocation?_t.maskedLocation.publicHref:_t.publicHref,_t.maskedLocation?_t.maskedLocation.external:_t.external,t.history,w),me=RW(Le,o,t.protocolAllowlist);return[Le==null?void 0:Le.href,me,MW(pt,_t,ce,t.basepath,U,me!==void 0)]},[ce,w,U,_e,t,o]),[G,oe,le]=Xo(t.stores.location,se,AW),pe=le?uh(s,{})??DW:U2,be=le?U2:uh(i,{})??U2,Me=[C,pe.className,be.className].filter(Boolean).join(" "),we=(y||pe.style||be.style)&&{...y,...pe.style,...be.style},qe=A.useRef(!1),He=e.reloadDocument||oe||w?!1:c??t.options.defaultPreload,Ce=u??t.options.defaultPreloadDelay??0,ot=A.useCallback(()=>{t.preloadRoute(_e).catch(pt=>{console.warn(pt),console.warn(dW)})},[t,_e]),Qe=A.useCallback(pt=>{if(!pt){G2(r);return}if(!(pt.isIntersecting??He==="intent")){pt.isIntersecting===!1&&G2(r);return}if(!Ce){ot();return}l0.has(r)||l0.set(r,setTimeout(()=>{l0.delete(r),ot()},Ce))},[ot,r,He,Ce]);lK(r,Qe,He!=="viewport"),A.useEffect(()=>{qe.current||He==="render"&&(ot(),qe.current=!0)},[ot,He]);const it=pt=>{const _t=pt.currentTarget.getAttribute("target"),Le=b!==void 0?b:_t;!w&&!(pt.metaKey||pt.altKey||pt.ctrlKey||pt.shiftKey)&&!pt.defaultPrevented&&(!Le||Le==="_self")&&pt.button===0&&(pt.preventDefault(),t.navigate({..._e,replace:p,resetScroll:x,hashScrollIntoView:_,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...F,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...C&&{className:C},...N&&{onClick:N},...z&&{onBlur:z},...T&&{onFocus:T},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const Ct=()=>{He==="intent"&&ot()},Ht=()=>{He==="intent"&&G2(r)};return{...F,...pe,...be,href:G,ref:r,onClick:_d([N,it]),onBlur:_d([z,Ht]),onFocus:_d([T,Qe]),onMouseEnter:_d([j,Qe]),onMouseLeave:_d([M,Ht]),onTouchStart:_d([D,Ct]),disabled:!!w,target:b,...we&&{style:we},...Me&&{className:Me},...w&&LW,...le&&IW}}var U2={},DW={className:"active"},LW={role:"link","aria-disabled":!0},IW={"data-status":"active","aria-current":"page"},l0=new WeakMap,G2=e=>{clearTimeout(l0.get(e)),l0.delete(e)},_d=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function $W(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function BW(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Eb=A.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=OW(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...c}=i;return A.createElement("a",c,a)}return A.createElement(t,i,a)}),PW=class extends WO{constructor(n){super(n),this.useMatch=t=>df({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Lk({...t,from:this.id}),this.useSearch=t=>rD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>nD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>tD({...t,from:this.id}),this.useLoaderData=t=>eD({...t,from:this.id}),this.useNavigate=()=>Cb({from:this.fullPath}),this.Link=et.forwardRef((t,r)=>f.jsx(Eb,{ref:r,from:this.fullPath,...t}))}};function FW(e){return new PW(e)}function HW(){return e=>UW(e)}var qW=class extends hW{constructor(e){super(e),this.useMatch=n=>df({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Lk({...n,from:this.id}),this.useSearch=n=>rD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>nD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>tD({...n,from:this.id}),this.useLoaderData=n=>eD({...n,from:this.id}),this.useNavigate=()=>Cb({from:this.fullPath}),this.Link=et.forwardRef((n,t)=>f.jsx(Eb,{ref:t,from:this.fullPath,...n}))}};function UW(e){return new qW(e)}function tc(e){return n=>{const t=FW(n);return t.isRoot=!1,t}}function GW(e){const n=fi(),t=`not-found-${Xo(n.stores.location,r=>r.pathname)}-${Xo(n.stores.status,r=>r)}`;return f.jsx(Ok,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(_h(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(_h(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function VW(){return f.jsx("p",{children:"Not Found"})}function bd(e){return f.jsx(f.Fragment,{children:e.children})}function sD(e,n,t){return n.options.notFoundComponent?f.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(VW,{})}function Nb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var KW=(e,n)=>e[0]===n[0]&&e[1]===n[1],iD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,aD=A.memo(function({routeId:n}){const t=fi();return f.jsx(WW,{router:t,match:Xo(t.stores.getMatchStore(n),r=>r)})});function WW({router:e,match:n}){var _,p;const t=e.routesById[n.routeId],r=Nb(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",c=iD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?A.Suspense:bd,u=s?Ok:bd,h=a?GW:bd;return f.jsxs(t.isRoot?t.options.shellComponent??bd:bd,{children:[f.jsx(Sb.Provider,{value:n.routeId,children:f.jsx(c,{fallback:r,children:f.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,x)=>{if(_h(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,x)},children:f.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return A.createElement(a,m)},children:o?f.jsx(mW,{fallback:r,children:f.jsx(OE,{match:n})}):f.jsx(OE,{match:n})})})})}),null]})}var OE=A.memo(function({match:n}){const t=fi(),r=n.routeId,s=t.routesById[r],i=A.useMemo(()=>{var c;const o=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({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=A.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?f.jsx(o,{},i):f.jsx(E0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!iD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Nb(t,s)}if(n.status==="notFound")return sD(t,s,n.error);if(n.status==="error")throw n.error;return a}),E0=A.memo(function(){const n=fi(),t=A.useContext(Sb);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Xo(o,c=>[!!c._notFound,c.error],KW),i=Xo(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return sD(n,n.routesById[t],s);if(!i)return null;const a=f.jsx(aD,{routeId:i});return t===Od?f.jsx(A.Suspense,{fallback:Nb(n),children:a}):a});function oD(e,n){const t=e[1];e.length=0,t==null||t(n)}function QW({t:e}){const n=fi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{oD(t,!1),t.push(s,i),e(n),A.startTransition(r)}),TO(()=>{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(Zc(s.publicHref)!==Zc(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",...wb(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function XW(){const e=fi(),n=e.routesById[Od],t=Nb(e,n),r=e.ssr?bd:A.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(QW,{t:A.useState()[1]}),f.jsx(r,{fallback:t,children:f.jsx(YW,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function YW(){const e=fi(),n=e._rendered,t=Xo(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;TO(()=>{n[0]===t&&oD(n,!0)},[n,t]);const i=s?f.jsx(aD,{routeId:s}):null;return f.jsx(Sb.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:f.jsx(Ok,{getResetKey:()=>r,onCatch:void 0,children:i})})}var ZW=e=>({createMutableStore:zE,createReadonlyStore:zE,batch:kW}),JW=e=>new eQ(e),eQ=class extends eW{constructor(e){super(e,ZW)}};function tQ({router:e,children:n,...t}){RO(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=f.jsx(XO.Provider,{value:e,children:n});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function nQ({router:e,...n}){return f.jsx(tQ,{router:e,...n,children:f.jsx(XW,{})})}function rQ(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 sQ(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=rQ(e),a=fi(),{history:o}=a,[c,u]=A.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return A.useEffect(()=>{const h=async _=>{function p(b){const w=a.parseLocation(b),[,y,C]=a.getMatchedRoutes(w.pathname);return C===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),x=p(_.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const k=await t({action:_.action,current:m,next:x});if(!i)return k;if(!k)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:x,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function cD(e){const n=fi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Xo(t.stores.__store,Dk(e,t))}function iQ(e){const n=fi();return Xo(n.stores.location,Dk(e,n))}const wv=new WeakMap,V1=new WeakMap;function Za(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))wv.set(s,(wv.get(s)??0)+1),(r=V1.get(s))==null||r.add(t)}function ym(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(c=>[c.id,c])),i=new Set(e.map(c=>c.id)),a=n.filter(c=>t.has(c.id)&&!i.has(c.id)),o=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return r?[...a,...o]:[...o,...a]}async function Oh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?wv.get(s):void 0,a=await t();if(!s||wv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,c=>c??a);const o=new Set;V1.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{V1.get(s)===o&&V1.delete(s)}}const fh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function lD(e){const n=e.queryKey[2];if(n==="resolvedFile")return fh(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&&fh(t.ref)}function Ta(e,n=Ia(),t,r=!1){if(!An(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!lD(i)&&(!t||t(i))};r?tt.cancelQueries(s).then(()=>{An(n)&&tt.invalidateQueries(s)}):tt.invalidateQueries(s)}const uD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Ik=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],aQ=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Ik,...uD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function oQ(e,n=Ia(),t=!1){const r=tt.getQueryData([...n,"listChatSessions",e])??[],s=tt.getQueryData([...n,"listRuns",e])??[],i=tt.getQueryData([...n,"listExperiments",e])??[];Ta([...uD,...Ik,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(c=>c.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(c=>c.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function zb(e){const n=Ia();ll.add(e),Za(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"])Ck({queryKey:[...n,t,e]})}function cQ(e){const n=Ia(),t=tt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])zb(r.id);Ck({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const lQ={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:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function uQ(e,n){var a;if(!An(n))return;const t=(o,c=n,u)=>Ta(o,c,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t(lQ[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],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,c]=i;if(c.startsWith("/file")){oQ(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 _Q={},fQ="en",$k=["en","zh-CN","fa","ar","es","hi"],_D="orx:locale",Bk=["localStorage","preferredLanguage","baseLocale"],DE=[],N0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let LE=!1,E=()=>{var t;let e=Bk;!N0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=hD(window.location.href));const n=dQ(e);if(n)return LE||(LE=!0,fD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function dQ(e,n){let t;for(const r of e){if(r==="baseLocale")t=fQ;else if(r==="preferredLanguage"&&!N0)t=vQ();else if(r==="localStorage"&&!N0)t=localStorage.getItem(_D)??void 0;else if(pD(r)&&kv.has(r)){const i=kv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return mQ(a)}}const s=z0(t);if(s)return s}}const hQ=e=>{window.location.reload()};let fD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=Bk;!N0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=hD(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(_D,e);else if(pD(c)&&kv.has(c)){const u=kv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(h))}}}const a=()=>{!N0&&t.reload&&window.location&&e!==r&&hQ()};if(s.length)return Promise.all(s).then(()=>{a()});a()},pQ=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function z0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of $k)if(t.toLowerCase()===n)return t}function dD(e){return!!e&&$k.some(n=>n===e)}function mQ(e){const n=z0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${$k.join(", ")}`)}function gQ(e,n){return e.exec(n.href)}function vQ(){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=z0(t.fullTag);if(r)return r;const s=z0(t.baseTag);if(s)return s}}function bQ(e){return yQ(e)}function yQ(e){const n=typeof e=="string"?new URL(e,pQ()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&z0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let IE,$E;function xQ(e){if(DE.length===0)return;const n=typeof e=="string"?e:e.href;if(IE===n)return $E;const t=new URL(n,"http://example.com"),r=bQ(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of DE){const c=new _Q(o.match,a.href);if(gQ(c,a)){i=o;break}}if(i)break}return IE=n,$E=i,i}function hD(e){const n=xQ(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:Bk}const kv=new Map;function pD(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const wQ=e=>`Actions for ${e==null?void 0:e.name}`,kQ=e=>`${e==null?void 0:e.name} 的操作`,SQ=e=>`عملیات ${e==null?void 0:e.name}`,CQ=e=>`إجراءات ${e==null?void 0:e.name}`,EQ=e=>`Acciones para ${e==null?void 0:e.name}`,NQ=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,zQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kQ(e):t==="fa"?SQ(e):t==="ar"?CQ(e):t==="es"?EQ(e):t==="hi"?NQ(e):wQ(e)}),jQ=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,TQ=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,AQ=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,RQ=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,MQ=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,OQ=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,DQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TQ(e):t==="fa"?AQ(e):t==="ar"?RQ(e):t==="es"?MQ(e):t==="hi"?OQ(e):jQ(e)}),LQ=e=>`Branch: ${e==null?void 0:e.branch}`,IQ=e=>`分支:${e==null?void 0:e.branch}`,$Q=e=>`شاخه: ${e==null?void 0:e.branch}`,BQ=e=>`الفرع: ${e==null?void 0:e.branch}`,PQ=e=>`Rama: ${e==null?void 0:e.branch}`,FQ=e=>`ब्रांच: ${e==null?void 0:e.branch}`,HQ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IQ(e):t==="fa"?$Q(e):t==="ar"?BQ(e):t==="es"?PQ(e):t==="hi"?FQ(e):LQ(e)}),qQ=e=>`Browse code on ${e==null?void 0:e.branch}`,UQ=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,GQ=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,VQ=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,KQ=e=>`Explorar el código en ${e==null?void 0:e.branch}`,WQ=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,mD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UQ(e):t==="fa"?GQ(e):t==="ar"?VQ(e):t==="es"?KQ(e):t==="hi"?WQ(e):qQ(e)}),QQ=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,XQ=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,YQ=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,ZQ=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,JQ=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,eX=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,tX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XQ(e):t==="fa"?YQ(e):t==="ar"?ZQ(e):t==="es"?JQ(e):t==="hi"?eX(e):QQ(e)}),nX=e=>`Collapse ${e==null?void 0:e.name}`,rX=e=>`折叠 ${e==null?void 0:e.name}`,sX=e=>`بستن ${e==null?void 0:e.name}`,iX=e=>`طيّ ${e==null?void 0:e.name}`,aX=e=>`Contraer ${e==null?void 0:e.name}`,oX=e=>`${e==null?void 0:e.name} समेटें`,cX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rX(e):t==="fa"?sX(e):t==="ar"?iX(e):t==="es"?aX(e):t==="hi"?oX(e):nX(e)}),lX=e=>`Committed changes versus ${e==null?void 0:e.parent}`,uX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,_X=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,fX=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,dX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,hX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,pX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uX(e):t==="fa"?_X(e):t==="ar"?fX(e):t==="es"?dX(e):t==="hi"?hX(e):lX(e)}),mX=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,gX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,vX=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,bX=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,yX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,xX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,wX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gX(e):t==="fa"?vX(e):t==="ar"?bX(e):t==="es"?yX(e):t==="hi"?xX(e):mX(e)}),kX=e=>`Copy ${e==null?void 0:e.value}`,SX=e=>`复制 ${e==null?void 0:e.value}`,CX=e=>`کپی ${e==null?void 0:e.value}`,EX=e=>`نسخ ${e==null?void 0:e.value}`,NX=e=>`Copiar ${e==null?void 0:e.value}`,zX=e=>`${e==null?void 0:e.value} कॉपी करें`,jX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SX(e):t==="fa"?CX(e):t==="ar"?EX(e):t==="es"?NX(e):t==="hi"?zX(e):kX(e)}),TX=e=>`Delete ${e==null?void 0:e.name}`,AX=e=>`删除 ${e==null?void 0:e.name}`,RX=e=>`حذف ${e==null?void 0:e.name}`,MX=e=>`حذف ${e==null?void 0:e.name}`,OX=e=>`Eliminar ${e==null?void 0:e.name}`,DX=e=>`${e==null?void 0:e.name} हटाएं`,r3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AX(e):t==="fa"?RX(e):t==="ar"?MX(e):t==="es"?OX(e):t==="hi"?DX(e):TX(e)}),LX=e=>`Download ${e==null?void 0:e.name}`,IX=e=>`下载 ${e==null?void 0:e.name}`,$X=e=>`بارگیری ${e==null?void 0:e.name}`,BX=e=>`تنزيل ${e==null?void 0:e.name}`,PX=e=>`Descargar ${e==null?void 0:e.name}`,FX=e=>`${e==null?void 0:e.name} डाउनलोड करें`,BE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IX(e):t==="fa"?$X(e):t==="ar"?BX(e):t==="es"?PX(e):t==="hi"?FX(e):LX(e)}),HX=e=>`Expand ${e==null?void 0:e.name}`,qX=e=>`展开 ${e==null?void 0:e.name}`,UX=e=>`باز کردن ${e==null?void 0:e.name}`,GX=e=>`توسيع ${e==null?void 0:e.name}`,VX=e=>`Expandir ${e==null?void 0:e.name}`,KX=e=>`${e==null?void 0:e.name} फैलाएं`,WX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qX(e):t==="fa"?UX(e):t==="ar"?GX(e):t==="es"?VX(e):t==="hi"?KX(e):HX(e)}),QX=e=>`Hide additional ${e==null?void 0:e.target}`,XX=e=>`隐藏其余${e==null?void 0:e.target}`,YX=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,ZX=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,JX=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,eY=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,tY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XX(e):t==="fa"?YX(e):t==="ar"?ZX(e):t==="es"?JX(e):t==="hi"?eY(e):QX(e)}),nY=e=>`Hide error details for ${e==null?void 0:e.activity}`,rY=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,sY=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,iY=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,aY=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,oY=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,cY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rY(e):t==="fa"?sY(e):t==="ar"?iY(e):t==="es"?aY(e):t==="hi"?oY(e):nY(e)}),lY=e=>`${e==null?void 0:e.count} consecutive identical calls`,uY=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_Y=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fY=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dY=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hY=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uY(e):t==="fa"?_Y(e):t==="ar"?fY(e):t==="es"?dY(e):t==="hi"?hY(e):lY(e)}),mY=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,gY=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,vY=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,bY=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,yY=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,xY=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,wY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gY(e):t==="fa"?vY(e):t==="ar"?bY(e):t==="es"?yY(e):t==="hi"?xY(e):mY(e)}),kY=e=>`Open ${e==null?void 0:e.branch} on GitHub`,SY=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,CY=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,EY=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,NY=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,zY=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,gD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SY(e):t==="fa"?CY(e):t==="ar"?EY(e):t==="es"?NY(e):t==="hi"?zY(e):kY(e)}),jY=e=>`Open experiment ${e==null?void 0:e.name}`,TY=e=>`打开实验 ${e==null?void 0:e.name}`,AY=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,RY=e=>`فتح التجربة ${e==null?void 0:e.name}`,MY=e=>`Abrir el experimento ${e==null?void 0:e.name}`,OY=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,DY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TY(e):t==="fa"?AY(e):t==="ar"?RY(e):t==="es"?MY(e):t==="hi"?OY(e):jY(e)}),LY=e=>`Open ${e==null?void 0:e.path} in the right pane`,IY=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,$Y=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,BY=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,PY=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,FY=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,HY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IY(e):t==="fa"?$Y(e):t==="ar"?BY(e):t==="es"?PY(e):t==="hi"?FY(e):LY(e)}),qY=e=>`Open ${e==null?void 0:e.name}`,UY=e=>`打开 ${e==null?void 0:e.name}`,GY=e=>`باز کردن ${e==null?void 0:e.name}`,VY=e=>`فتح ${e==null?void 0:e.name}`,KY=e=>`Abrir ${e==null?void 0:e.name}`,WY=e=>`${e==null?void 0:e.name} खोलें`,QY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UY(e):t==="fa"?GY(e):t==="ar"?VY(e):t==="es"?KY(e):t==="hi"?WY(e):qY(e)}),XY=e=>`Open logs for run ${e==null?void 0:e.run}`,YY=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,ZY=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,JY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,eZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,tZ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,nZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YY(e):t==="fa"?ZY(e):t==="ar"?JY(e):t==="es"?eZ(e):t==="hi"?tZ(e):XY(e)}),rZ=e=>`Open ${e==null?void 0:e.name} on GitHub`,sZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,iZ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,aZ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,oZ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,cZ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Sv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sZ(e):t==="fa"?iZ(e):t==="ar"?aZ(e):t==="es"?oZ(e):t==="hi"?cZ(e):rZ(e)}),lZ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,uZ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,_Z=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,fZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,dZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,hZ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,pZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uZ(e):t==="fa"?_Z(e):t==="ar"?fZ(e):t==="es"?dZ(e):t==="hi"?hZ(e):lZ(e)}),mZ=e=>`Overleaf — ${e==null?void 0:e.status}`,gZ=e=>`Overleaf — ${e==null?void 0:e.status}`,vZ=e=>`Overleaf — ${e==null?void 0:e.status}`,bZ=e=>`Overleaf — ${e==null?void 0:e.status}`,yZ=e=>`Overleaf — ${e==null?void 0:e.status}`,xZ=e=>`Overleaf — ${e==null?void 0:e.status}`,wZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gZ(e):t==="fa"?vZ(e):t==="ar"?bZ(e):t==="es"?yZ(e):t==="hi"?xZ(e):mZ(e)}),kZ=e=>`Preview /${e==null?void 0:e.name} skill`,SZ=e=>`预览 /${e==null?void 0:e.name} 技能`,CZ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,EZ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,NZ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,zZ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,jZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?EZ(e):t==="es"?NZ(e):t==="hi"?zZ(e):kZ(e)}),TZ=e=>`Remove annotation ${e==null?void 0:e.number}`,AZ=e=>`移除批注 ${e==null?void 0:e.number}`,RZ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,MZ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,OZ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,DZ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,LZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AZ(e):t==="fa"?RZ(e):t==="ar"?MZ(e):t==="es"?OZ(e):t==="hi"?DZ(e):TZ(e)}),IZ=e=>`Remove ${e==null?void 0:e.name}`,$Z=e=>`移除 ${e==null?void 0:e.name}`,BZ=e=>`حذف ${e==null?void 0:e.name}`,PZ=e=>`إزالة ${e==null?void 0:e.name}`,FZ=e=>`Quitar ${e==null?void 0:e.name}`,HZ=e=>`${e==null?void 0:e.name} हटाएं`,qZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Z(e):t==="fa"?BZ(e):t==="ar"?PZ(e):t==="es"?FZ(e):t==="hi"?HZ(e):IZ(e)}),UZ=e=>`Remove queued message: ${e==null?void 0:e.text}`,GZ=e=>`移除排队消息:${e==null?void 0:e.text}`,VZ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,KZ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,WZ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,QZ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,XZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GZ(e):t==="fa"?VZ(e):t==="ar"?KZ(e):t==="es"?WZ(e):t==="hi"?QZ(e):UZ(e)}),YZ=e=>`Retry queued message: ${e==null?void 0:e.text}`,ZZ=e=>`重试排队消息:${e==null?void 0:e.text}`,JZ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,eJ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,tJ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,nJ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,rJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZZ(e):t==="fa"?JZ(e):t==="ar"?eJ(e):t==="es"?tJ(e):t==="hi"?nJ(e):YZ(e)}),sJ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,iJ=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,aJ=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,oJ=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,cJ=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,lJ=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,PE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iJ(e):t==="fa"?aJ(e):t==="ar"?oJ(e):t==="es"?cJ(e):t==="hi"?lJ(e):sJ(e)}),uJ=e=>`Run ${e==null?void 0:e.id}`,_J=e=>`运行 ${e==null?void 0:e.id}`,fJ=e=>`اجرای ${e==null?void 0:e.id}`,dJ=e=>`تشغيل ${e==null?void 0:e.id}`,hJ=e=>`Ejecución ${e==null?void 0:e.id}`,pJ=e=>`रन ${e==null?void 0:e.id}`,mJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_J(e):t==="fa"?fJ(e):t==="ar"?dJ(e):t==="es"?hJ(e):t==="hi"?pJ(e):uJ(e)}),gJ=e=>`Show error details for ${e==null?void 0:e.activity}`,vJ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,bJ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,yJ=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,xJ=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,wJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,kJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vJ(e):t==="fa"?bJ(e):t==="ar"?yJ(e):t==="es"?xJ(e):t==="hi"?wJ(e):gJ(e)}),SJ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,CJ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,EJ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,NJ=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,zJ=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,jJ=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,TJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CJ(e):t==="fa"?EJ(e):t==="ar"?NJ(e):t==="es"?zJ(e):t==="hi"?jJ(e):SJ(e)}),AJ=e=>`${e==null?void 0:e.name} skill`,RJ=e=>`${e==null?void 0:e.name} 技能`,MJ=e=>`مهارت ${e==null?void 0:e.name}`,OJ=e=>`مهارة ${e==null?void 0:e.name}`,DJ=e=>`Skill ${e==null?void 0:e.name}`,LJ=e=>`${e==null?void 0:e.name} स्किल`,IJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RJ(e):t==="fa"?MJ(e):t==="ar"?OJ(e):t==="es"?DJ(e):t==="hi"?LJ(e):AJ(e)}),$J=e=>`Value for ${e==null?void 0:e.name}`,BJ=e=>`${e==null?void 0:e.name} 的值`,PJ=e=>`مقدار ${e==null?void 0:e.name}`,FJ=e=>`قيمة ${e==null?void 0:e.name}`,HJ=e=>`Valor de ${e==null?void 0:e.name}`,qJ=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,UJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BJ(e):t==="fa"?PJ(e):t==="ar"?FJ(e):t==="es"?HJ(e):t==="hi"?qJ(e):$J(e)}),GJ=()=>"Agent reported back",VJ=()=>"智能体已返回结果",KJ=()=>"عامل نتیجه را گزارش کرد",WJ=()=>"أبلغ الوكيل بالنتيجة",QJ=()=>"El agente informó de los resultados",XJ=()=>"एजेंट ने रिपोर्ट भेजी",YJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VJ():t==="fa"?KJ():t==="ar"?WJ():t==="es"?QJ():t==="hi"?XJ():GJ()}),ZJ=()=>"Browse",JJ=()=>"浏览",eee=()=>"مرور",tee=()=>"تصفّح",nee=()=>"Navegar",ree=()=>"ब्राउज़ करें",see=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JJ():t==="fa"?eee():t==="ar"?tee():t==="es"?nee():t==="hi"?ree():ZJ()}),iee=()=>"Browsing…",aee=()=>"正在浏览…",oee=()=>"در حال مرور…",cee=()=>"جارٍ التصفّح…",lee=()=>"Navegando…",uee=()=>"ब्राउज़ कर रहा है…",_ee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aee():t==="fa"?oee():t==="ar"?cee():t==="es"?lee():t==="hi"?uee():iee()}),fee=()=>"Checked experiment status and updated notes",dee=()=>"已检查实验状态并更新笔记",hee=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",pee=()=>"فحص حالة التجربة وحدّث الملاحظات",mee=()=>"Consultó el estado del experimento y actualizó las notas",gee=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",vee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dee():t==="fa"?hee():t==="ar"?pee():t==="es"?mee():t==="hi"?gee():fee()}),bee=()=>"Closed an agent",yee=()=>"已关闭智能体",xee=()=>"عامل بسته شد",wee=()=>"أغلق وكيلًا",kee=()=>"Cerró un agente",See=()=>"एक एजेंट बंद किया",Cee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yee():t==="fa"?xee():t==="ar"?wee():t==="es"?kee():t==="hi"?See():bee()}),Eee=()=>"Context compacted",Nee=()=>"上下文已压缩",zee=()=>"زمینه فشرده شد",jee=()=>"تم ضغط السياق",Tee=()=>"Contexto comprimido",Aee=()=>"कॉन्टेक्स्ट छोटा किया गया",Ree=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nee():t==="fa"?zee():t==="ar"?jee():t==="es"?Tee():t==="hi"?Aee():Eee()}),Mee=()=>"Compacting conversation…",Oee=()=>"正在压缩对话…",Dee=()=>"در حال فشرده‌سازی گفت‌وگو…",Lee=()=>"جارٍ ضغط المحادثة…",Iee=()=>"Comprimiendo la conversación…",$ee=()=>"बातचीत छोटी की जा रही है…",FE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oee():t==="fa"?Dee():t==="ar"?Lee():t==="es"?Iee():t==="hi"?$ee():Mee()}),Bee=()=>"Compacting failed",Pee=()=>"压缩失败",Fee=()=>"فشرده‌سازی ناموفق بود",Hee=()=>"فشل الضغط",qee=()=>"Error al comprimir",Uee=()=>"छोटा करना विफल",Gee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pee():t==="fa"?Fee():t==="ar"?Hee():t==="es"?qee():t==="hi"?Uee():Bee()}),Vee=e=>`Created ${e==null?void 0:e.target}`,Kee=e=>`已创建 ${e==null?void 0:e.target}`,Wee=e=>`${e==null?void 0:e.target} ایجاد شد`,Qee=e=>`أنشأ ${e==null?void 0:e.target}`,Xee=e=>`Creó ${e==null?void 0:e.target}`,Yee=e=>`${e==null?void 0:e.target} बनाया`,Zee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kee(e):t==="fa"?Wee(e):t==="ar"?Qee(e):t==="es"?Xee(e):t==="hi"?Yee(e):Vee(e)}),Jee=()=>"Delegate",ete=()=>"委派",tte=()=>"واگذاری",nte=()=>"تفويض",rte=()=>"Delegar",ste=()=>"सौंपें",ite=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ete():t==="fa"?tte():t==="ar"?nte():t==="es"?rte():t==="hi"?ste():Jee()}),ate=()=>"Delegating…",ote=()=>"正在委派…",cte=()=>"در حال واگذاری…",lte=()=>"جارٍ التفويض…",ute=()=>"Delegando…",_te=()=>"सौंप रहा है…",fte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ote():t==="fa"?cte():t==="ar"?lte():t==="es"?ute():t==="hi"?_te():ate()}),dte=e=>`Deleted ${e==null?void 0:e.target}`,hte=e=>`已删除 ${e==null?void 0:e.target}`,pte=e=>`${e==null?void 0:e.target} حذف شد`,mte=e=>`حذف ${e==null?void 0:e.target}`,gte=e=>`Eliminó ${e==null?void 0:e.target}`,vte=e=>`${e==null?void 0:e.target} हटाया`,bte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hte(e):t==="fa"?pte(e):t==="ar"?mte(e):t==="es"?gte(e):t==="hi"?vte(e):dte(e)}),yte=()=>"Edit",xte=()=>"编辑",wte=()=>"ویرایش",kte=()=>"تعديل",Ste=()=>"Editar",Cte=()=>"संपादित करें",Ete=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xte():t==="fa"?wte():t==="ar"?kte():t==="es"?Ste():t==="hi"?Cte():yte()}),Nte=e=>`Edited ${e==null?void 0:e.target}`,zte=e=>`已编辑 ${e==null?void 0:e.target}`,jte=e=>`${e==null?void 0:e.target} ویرایش شد`,Tte=e=>`عدّل ${e==null?void 0:e.target}`,Ate=e=>`Editó ${e==null?void 0:e.target}`,Rte=e=>`${e==null?void 0:e.target} संपादित किया`,Mte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zte(e):t==="fa"?jte(e):t==="ar"?Tte(e):t==="es"?Ate(e):t==="hi"?Rte(e):Nte(e)}),Ote=()=>"Editing…",Dte=()=>"正在编辑…",Lte=()=>"در حال ویرایش…",Ite=()=>"جارٍ التعديل…",$te=()=>"Editando…",Bte=()=>"संपादित कर रहा है…",Pte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dte():t==="fa"?Lte():t==="ar"?Ite():t==="es"?$te():t==="hi"?Bte():Ote()}),Fte=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Hte=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,qte=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,Ute=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Gte=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Vte=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Kte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hte(e):t==="fa"?qte(e):t==="ar"?Ute(e):t==="es"?Gte(e):t==="hi"?Vte(e):Fte(e)}),Wte=()=>"Imported from your terminal — new turns continue in the agent's own history",Qte=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Xte=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Yte=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Zte=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",Jte=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",ene=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qte():t==="fa"?Xte():t==="ar"?Yte():t==="es"?Zte():t==="hi"?Jte():Wte()}),tne=e=>`Listed files matching ${e==null?void 0:e.pattern}`,nne=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,rne=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,sne=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,ine=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,ane=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,one=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nne(e):t==="fa"?rne(e):t==="ar"?sne(e):t==="es"?ine(e):t==="hi"?ane(e):tne(e)}),cne=()=>"Load",lne=()=>"加载",une=()=>"بارگیری",_ne=()=>"تحميل",fne=()=>"Cargar",dne=()=>"लोड करें",hne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lne():t==="fa"?une():t==="ar"?_ne():t==="es"?fne():t==="hi"?dne():cne()}),pne=()=>"Loaded a skill",mne=()=>"已加载技能",gne=()=>"یک مهارت بارگیری شد",vne=()=>"حمّل مهارة",bne=()=>"Cargó una skill",yne=()=>"एक स्किल लोड की",xne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mne():t==="fa"?gne():t==="ar"?vne():t==="es"?bne():t==="hi"?yne():pne()}),wne=e=>`Loaded ${e==null?void 0:e.name} skill`,kne=e=>`已加载技能 ${e==null?void 0:e.name}`,Sne=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Cne=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Ene=e=>`Cargó la skill ${e==null?void 0:e.name}`,Nne=e=>`${e==null?void 0:e.name} स्किल लोड की`,zne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kne(e):t==="fa"?Sne(e):t==="ar"?Cne(e):t==="es"?Ene(e):t==="hi"?Nne(e):wne(e)}),jne=()=>"Loading…",Tne=()=>"正在加载…",Ane=()=>"در حال بارگیری…",Rne=()=>"جارٍ التحميل…",Mne=()=>"Cargando…",One=()=>"लोड हो रहा है…",Dne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tne():t==="fa"?Ane():t==="ar"?Rne():t==="es"?Mne():t==="hi"?One():jne()}),Lne=e=>`Opened ${e==null?void 0:e.target}`,Ine=e=>`已打开 ${e==null?void 0:e.target}`,$ne=e=>`${e==null?void 0:e.target} باز شد`,Bne=e=>`فتح ${e==null?void 0:e.target}`,Pne=e=>`Abrió ${e==null?void 0:e.target}`,Fne=e=>`${e==null?void 0:e.target} खोला`,Hne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ine(e):t==="fa"?$ne(e):t==="ar"?Bne(e):t==="es"?Pne(e):t==="hi"?Fne(e):Lne(e)}),qne=e=>`Ran ${e==null?void 0:e.command}`,Une=e=>`已运行 ${e==null?void 0:e.command}`,Gne=e=>`${e==null?void 0:e.command} اجرا شد`,Vne=e=>`نفّذ ${e==null?void 0:e.command}`,Kne=e=>`Ejecutó ${e==null?void 0:e.command}`,Wne=e=>`${e==null?void 0:e.command} चलाया`,Qne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Une(e):t==="fa"?Gne(e):t==="ar"?Vne(e):t==="es"?Kne(e):t==="hi"?Wne(e):qne(e)}),Xne=()=>"Ran a sub-agent",Yne=()=>"已运行子智能体",Zne=()=>"یک عامل فرعی اجرا شد",Jne=()=>"شغّل وكيلًا فرعيًا",ere=()=>"Ejecutó un subagente",tre=()=>"एक सब-एजेंट चलाया",nre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yne():t==="fa"?Zne():t==="ar"?Jne():t==="es"?ere():t==="hi"?tre():Xne()}),rre=()=>"Read",sre=()=>"读取",ire=()=>"خواندن",are=()=>"قراءة",ore=()=>"Leer",cre=()=>"पढ़ें",lre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sre():t==="fa"?ire():t==="ar"?are():t==="es"?ore():t==="hi"?cre():rre()}),ure=()=>"Read experiment notes",_re=()=>"已读取实验笔记",fre=()=>"یادداشت‌های آزمایش خوانده شد",dre=()=>"قرأ ملاحظات التجربة",hre=()=>"Leyó las notas del experimento",pre=()=>"प्रयोग के नोट्स पढ़े",mre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_re():t==="fa"?fre():t==="ar"?dre():t==="es"?hre():t==="hi"?pre():ure()}),gre=()=>"Read a paper",vre=()=>"已读取论文",bre=()=>"یک مقاله خوانده شد",yre=()=>"قرأ ورقة",xre=()=>"Leyó un paper",wre=()=>"एक पेपर पढ़ा",kre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vre():t==="fa"?bre():t==="ar"?yre():t==="es"?xre():t==="hi"?wre():gre()}),Sre=e=>`Read ${e==null?void 0:e.name} skill`,Cre=e=>`已读取技能 ${e==null?void 0:e.name}`,Ere=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Nre=e=>`قرأ مهارة ${e==null?void 0:e.name}`,zre=e=>`Leyó la skill ${e==null?void 0:e.name}`,jre=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,V2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cre(e):t==="fa"?Ere(e):t==="ar"?Nre(e):t==="es"?zre(e):t==="hi"?jre(e):Sre(e)}),Tre=e=>`Read ${e==null?void 0:e.target}`,Are=e=>`已读取 ${e==null?void 0:e.target}`,Rre=e=>`${e==null?void 0:e.target} خوانده شد`,Mre=e=>`قرأ ${e==null?void 0:e.target}`,Ore=e=>`Leyó ${e==null?void 0:e.target}`,Dre=e=>`${e==null?void 0:e.target} पढ़ा`,$p=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Are(e):t==="fa"?Rre(e):t==="ar"?Mre(e):t==="es"?Ore(e):t==="hi"?Dre(e):Tre(e)}),Lre=()=>"Read a web page",Ire=()=>"已读取网页",$re=()=>"یک صفحهٔ وب خوانده شد",Bre=()=>"قرأ صفحة ويب",Pre=()=>"Leyó una página web",Fre=()=>"एक वेब पेज पढ़ा",Hre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ire():t==="fa"?$re():t==="ar"?Bre():t==="es"?Pre():t==="hi"?Fre():Lre()}),qre=()=>"Reading…",Ure=()=>"正在读取…",Gre=()=>"در حال خواندن…",Vre=()=>"جارٍ القراءة…",Kre=()=>"Leyendo…",Wre=()=>"पढ़ रहा है…",Qre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ure():t==="fa"?Gre():t==="ar"?Vre():t==="es"?Kre():t==="hi"?Wre():qre()}),Xre=()=>"Resumed an agent",Yre=()=>"已恢复智能体",Zre=()=>"عامل از سر گرفته شد",Jre=()=>"استأنف عمل وكيل",ese=()=>"Reanudó un agente",tse=()=>"एक एजेंट फिर से शुरू किया",nse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yre():t==="fa"?Zre():t==="ar"?Jre():t==="es"?ese():t==="hi"?tse():Xre()}),rse=()=>"Review",sse=()=>"查看",ise=()=>"بازبینی",ase=()=>"مراجعة",ose=()=>"Revisar",cse=()=>"समीक्षा करें",lse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sse():t==="fa"?ise():t==="ar"?ase():t==="es"?ose():t==="hi"?cse():rse()}),use=()=>"Reviewed run log",_se=()=>"已查看运行日志",fse=()=>"گزارش اجرا بازبینی شد",dse=()=>"راجع سجل التشغيل",hse=()=>"Revisó el log de la ejecución",pse=()=>"रन लॉग की समीक्षा की",mse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_se():t==="fa"?fse():t==="ar"?dse():t==="es"?hse():t==="hi"?pse():use()}),gse=()=>"Reviewed run logs",vse=()=>"已查看运行日志",bse=()=>"گزارش‌های اجرا بازبینی شد",yse=()=>"راجع سجلات التشغيل",xse=()=>"Revisó los logs de las ejecuciones",wse=()=>"रन लॉग की समीक्षा की",kse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vse():t==="fa"?bse():t==="ar"?yse():t==="es"?xse():t==="hi"?wse():gse()}),Sse=()=>"Reviewed experiment status and notes",Cse=()=>"已查看实验状态和笔记",Ese=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Nse=()=>"راجع حالة التجربة وملاحظاتها",zse=()=>"Revisó el estado y las notas del experimento",jse=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Tse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cse():t==="fa"?Ese():t==="ar"?Nse():t==="es"?zse():t==="hi"?jse():Sse()}),Ase=()=>"Reviewing…",Rse=()=>"正在查看…",Mse=()=>"در حال بازبینی…",Ose=()=>"جارٍ المراجعة…",Dse=()=>"Revisando…",Lse=()=>"समीक्षा कर रहा है…",Ise=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rse():t==="fa"?Mse():t==="ar"?Ose():t==="es"?Dse():t==="hi"?Lse():Ase()}),$se=()=>"Run",Bse=()=>"运行",Pse=()=>"اجرا",Fse=()=>"تشغيل",Hse=()=>"Ejecutar",qse=()=>"चलाएं",Use=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bse():t==="fa"?Pse():t==="ar"?Fse():t==="es"?Hse():t==="hi"?qse():$se()}),Gse=()=>"Running…",Vse=()=>"正在运行…",Kse=()=>"در حال اجرا…",Wse=()=>"جارٍ التشغيل…",Qse=()=>"Ejecutando…",Xse=()=>"चल रहा है…",vD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vse():t==="fa"?Kse():t==="ar"?Wse():t==="es"?Qse():t==="hi"?Xse():Gse()}),Yse=()=>"Search",Zse=()=>"搜索",Jse=()=>"جست‌وجو",eie=()=>"بحث",tie=()=>"Buscar",nie=()=>"खोजें",rie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zse():t==="fa"?Jse():t==="ar"?eie():t==="es"?tie():t==="hi"?nie():Yse()}),sie=()=>"Searched alphaXiv full text",iie=()=>"已搜索 alphaXiv 全文",aie=()=>"متن کامل alphaXiv جست‌وجو شد",oie=()=>"بحث في نص alphaXiv الكامل",cie=()=>"Buscó en el texto completo de alphaXiv",lie=()=>"alphaXiv का पूरा टेक्स्ट खोजा",uie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iie():t==="fa"?aie():t==="ar"?oie():t==="es"?cie():t==="hi"?lie():sie()}),_ie=()=>"Searched alphaXiv semantically",fie=()=>"已对 alphaXiv 进行语义搜索",die=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",hie=()=>"أجرى بحثًا دلاليًا في alphaXiv",pie=()=>"Hizo una búsqueda semántica en alphaXiv",mie=()=>"alphaXiv को सिमेंटिक रूप से खोजा",gie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fie():t==="fa"?die():t==="ar"?hie():t==="es"?pie():t==="hi"?mie():_ie()}),vie=()=>"Searched bioRxiv",bie=()=>"已搜索 bioRxiv",yie=()=>"bioRxiv جست‌وجو شد",xie=()=>"بحث في bioRxiv",wie=()=>"Buscó en bioRxiv",kie=()=>"bioRxiv खोजा",Sie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bie():t==="fa"?yie():t==="ar"?xie():t==="es"?wie():t==="hi"?kie():vie()}),Cie=()=>"Searched code",Eie=()=>"已搜索代码",Nie=()=>"کد جست‌وجو شد",zie=()=>"بحث في الشيفرة",jie=()=>"Buscó en el código",Tie=()=>"कोड खोजा",K2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eie():t==="fa"?Nie():t==="ar"?zie():t==="es"?jie():t==="hi"?Tie():Cie()}),Aie=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Rie=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Mie=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Oie=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Die=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Lie=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,W2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rie(e):t==="fa"?Mie(e):t==="ar"?Oie(e):t==="es"?Die(e):t==="hi"?Lie(e):Aie(e)}),Iie=e=>`Searched images for “${e==null?void 0:e.query}”`,$ie=e=>`已搜索图片“${e==null?void 0:e.query}”`,Bie=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,Pie=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Fie=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,Hie=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,qie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$ie(e):t==="fa"?Bie(e):t==="ar"?Pie(e):t==="es"?Fie(e):t==="hi"?Hie(e):Iie(e)}),Uie=()=>"Searched the literature",Gie=()=>"已搜索文献",Vie=()=>"منابع علمی جست‌وجو شد",Kie=()=>"بحث في الأدبيات",Wie=()=>"Buscó en la literatura",Qie=()=>"साहित्य खोजा",HE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gie():t==="fa"?Vie():t==="ar"?Kie():t==="es"?Wie():t==="hi"?Qie():Uie()}),Xie=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Yie=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Zie=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Jie=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,eae=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,tae=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,nae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yie(e):t==="fa"?Zie(e):t==="ar"?Jie(e):t==="es"?eae(e):t==="hi"?tae(e):Xie(e)}),rae=()=>"Searched OpenAlex",sae=()=>"已搜索 OpenAlex",iae=()=>"OpenAlex جست‌وجو شد",aae=()=>"بحث في OpenAlex",oae=()=>"Buscó en OpenAlex",cae=()=>"OpenAlex खोजा",lae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sae():t==="fa"?iae():t==="ar"?aae():t==="es"?oae():t==="hi"?cae():rae()}),uae=()=>"Searched PubMed",_ae=()=>"已搜索 PubMed",fae=()=>"PubMed جست‌وجو شد",dae=()=>"بحث في PubMed",hae=()=>"Buscó en PubMed",pae=()=>"PubMed खोजा",mae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ae():t==="fa"?fae():t==="ar"?dae():t==="es"?hae():t==="hi"?pae():uae()}),gae=e=>`Searched the web for “${e==null?void 0:e.query}”`,vae=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,bae=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,yae=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,xae=e=>`Buscó “${e==null?void 0:e.query}” en la web`,wae=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,qE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vae(e):t==="fa"?bae(e):t==="ar"?yae(e):t==="es"?xae(e):t==="hi"?wae(e):gae(e)}),kae=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Sae=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Cae=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Eae=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Nae=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,zae=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,jae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sae(e):t==="fa"?Cae(e):t==="ar"?Eae(e):t==="es"?Nae(e):t==="hi"?zae(e):kae(e)}),Tae=()=>"Searching…",Aae=()=>"正在搜索…",Rae=()=>"در حال جست‌وجو…",Mae=()=>"جارٍ البحث…",Oae=()=>"Buscando…",Dae=()=>"खोज रहा है…",Lae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aae():t==="fa"?Rae():t==="ar"?Mae():t==="es"?Oae():t==="hi"?Dae():Tae()}),Iae=()=>"Sent input to an agent",$ae=()=>"已向智能体发送输入",Bae=()=>"ورودی به عامل فرستاده شد",Pae=()=>"أرسل مدخلًا إلى وكيل",Fae=()=>"Envió información a un agente",Hae=()=>"एक एजेंट को इनपुट भेजा",qae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ae():t==="fa"?Bae():t==="ar"?Pae():t==="es"?Fae():t==="hi"?Hae():Iae()}),Uae=()=>"Spawned an agent",Gae=()=>"已创建智能体",Vae=()=>"یک عامل ساخته شد",Kae=()=>"أنشأ وكيلًا",Wae=()=>"Creó un agente",Qae=()=>"एक एजेंट शुरू किया",Xae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gae():t==="fa"?Vae():t==="ar"?Kae():t==="es"?Wae():t==="hi"?Qae():Uae()}),Yae=()=>"Sub-agent",Zae=()=>"子智能体",Jae=()=>"عامل فرعی",eoe=()=>"وكيل فرعي",toe=()=>"Subagente",noe=()=>"सब-एजेंट",roe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zae():t==="fa"?Jae():t==="ar"?eoe():t==="es"?toe():t==="hi"?noe():Yae()}),soe=()=>"Sub-agent interrupted",ioe=()=>"子智能体已中断",aoe=()=>"عامل فرعی متوقف شد",ooe=()=>"قُوطع الوكيل الفرعي",coe=()=>"Subagente interrumpido",loe=()=>"सब-एजेंट बाधित हुआ",uoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ioe():t==="fa"?aoe():t==="ar"?ooe():t==="es"?coe():t==="hi"?loe():soe()}),_oe=()=>"Sub-agent started",foe=()=>"子智能体已启动",doe=()=>"عامل فرعی آغاز شد",hoe=()=>"بدأ الوكيل الفرعي",poe=()=>"Subagente iniciado",moe=()=>"सब-एजेंट शुरू हुआ",goe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?foe():t==="fa"?doe():t==="ar"?hoe():t==="es"?poe():t==="hi"?moe():_oe()}),voe=()=>"Updated experiment notes",boe=()=>"已更新实验笔记",yoe=()=>"یادداشت‌های آزمایش به‌روز شد",xoe=()=>"حدّث ملاحظات التجربة",woe=()=>"Actualizó las notas del experimento",koe=()=>"प्रयोग के नोट्स अपडेट किए",Soe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?boe():t==="fa"?yoe():t==="ar"?xoe():t==="es"?woe():t==="hi"?koe():voe()}),Coe=()=>"Waiting on an agent",Eoe=()=>"正在等待智能体",Noe=()=>"در انتظار عامل",zoe=()=>"في انتظار وكيل",joe=()=>"Esperando a un agente",Toe=()=>"एजेंट का इंतज़ार है",Aoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eoe():t==="fa"?Noe():t==="ar"?zoe():t==="es"?joe():t==="hi"?Toe():Coe()}),Roe=e=>`Approval required: ${e==null?void 0:e.label}`,Moe=e=>`需要批准:${e==null?void 0:e.label}`,Ooe=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Doe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Loe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Ioe=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,UE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Moe(e):t==="fa"?Ooe(e):t==="ar"?Doe(e):t==="es"?Loe(e):t==="hi"?Ioe(e):Roe(e)}),$oe=()=>"The CLI is retrying the turn.",Boe=()=>"CLI 正在重试本轮。",Poe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Foe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Hoe=()=>"La CLI está reintentando el turno.",qoe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Uoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Boe():t==="fa"?Poe():t==="ar"?Foe():t==="es"?Hoe():t==="hi"?qoe():$oe()}),Goe=()=>"Continue is available.",Voe=()=>"可以继续。",Koe=()=>"ادامه در دسترس است.",Woe=()=>"المتابعة متاحة.",Qoe=()=>"Puedes continuar.",Xoe=()=>"जारी रखना उपलब्ध है।",Yoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Voe():t==="fa"?Koe():t==="ar"?Woe():t==="es"?Qoe():t==="hi"?Xoe():Goe()}),Zoe=()=>"Retry is available.",Joe=()=>"可以重试。",ece=()=>"تلاش دوباره در دسترس است.",tce=()=>"إعادة المحاولة متاحة.",nce=()=>"Puedes reintentarlo.",rce=()=>"फिर से कोशिश करना उपलब्ध है।",sce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Joe():t==="fa"?ece():t==="ar"?tce():t==="es"?nce():t==="hi"?rce():Zoe()}),ice=()=>"Running a tool",ace=()=>"正在运行工具",oce=()=>"در حال اجرای ابزار",cce=()=>"جارٍ تشغيل أداة",lce=()=>"Ejecutando una herramienta",uce=()=>"एक टूल चल रहा है",_ce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ace():t==="fa"?oce():t==="ar"?cce():t==="es"?lce():t==="hi"?uce():ice()}),fce=()=>"Tool activity completed",dce=()=>"工具活动已完成",hce=()=>"فعالیت ابزار کامل شد",pce=()=>"اكتمل نشاط الأداة",mce=()=>"Actividad de la herramienta completada",gce=()=>"टूल गतिविधि पूरी हुई",vce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dce():t==="fa"?hce():t==="ar"?pce():t==="es"?mce():t==="hi"?gce():fce()}),bce=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,yce=e=>`工具活动失败:${e==null?void 0:e.labels}`,xce=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,wce=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,kce=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,Sce=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,Cce=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yce(e):t==="fa"?xce(e):t==="ar"?wce(e):t==="es"?kce(e):t==="hi"?Sce(e):bce(e)}),Ece=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Nce=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,zce=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jce=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Tce=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Ace=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,Rce=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nce(e):t==="fa"?zce(e):t==="ar"?jce(e):t==="es"?Tce(e):t==="hi"?Ace(e):Ece(e)}),Mce=()=>"Turn did not finish.",Oce=()=>"本轮未完成。",Dce=()=>"این نوبت کامل نشد.",Lce=()=>"لم تكتمل الجولة.",Ice=()=>"El turno no terminó.",$ce=()=>"यह टर्न पूरा नहीं हुआ।",Bce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oce():t==="fa"?Dce():t==="ar"?Lce():t==="es"?Ice():t==="hi"?$ce():Mce()}),Pce=()=>"Artifacts",Fce=()=>"产物",Hce=()=>"خروجی‌ها",qce=()=>"المُخرَجات",Uce=()=>"Artefactos",Gce=()=>"आर्टिफ़ैक्ट",bD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fce():t==="fa"?Hce():t==="ar"?qce():t==="es"?Uce():t==="hi"?Gce():Pce()}),Vce=()=>"Close panel",Kce=()=>"关闭面板",Wce=()=>"بستن پنل",Qce=()=>"إغلاق اللوحة",Xce=()=>"Cerrar panel",Yce=()=>"पैनल बंद करें",j0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kce():t==="fa"?Wce():t==="ar"?Qce():t==="es"?Xce():t==="hi"?Yce():Vce()}),Zce=()=>"Current task",Jce=()=>"当前任务",ele=()=>"وظیفهٔ فعلی",tle=()=>"المهمة الحالية",nle=()=>"Tarea actual",rle=()=>"मौजूदा टास्क",GE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jce():t==="fa"?ele():t==="ar"?tle():t==="es"?nle():t==="hi"?rle():Zce()}),sle=()=>"Drag to resize panel",ile=()=>"拖动以调整面板大小",ale=()=>"برای تغییر اندازهٔ پنل بکشید",ole=()=>"اسحب لتغيير حجم اللوحة",cle=()=>"Arrastra para cambiar el tamaño del panel",lle=()=>"पैनल का आकार बदलने के लिए खींचें",ule=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ile():t==="fa"?ale():t==="ar"?ole():t==="es"?cle():t==="hi"?lle():sle()}),_le=()=>"Drag toward the center to restore panel",fle=()=>"向中央拖动以恢复面板",dle=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",hle=()=>"اسحب نحو المنتصف لاستعادة اللوحة",ple=()=>"Arrastra hacia el centro para restaurar el panel",mle=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",gle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fle():t==="fa"?dle():t==="ar"?hle():t==="es"?ple():t==="hi"?mle():_le()}),vle=()=>"Entire project",ble=()=>"整个项目",yle=()=>"کل پروژه",xle=()=>"المشروع بالكامل",wle=()=>"Todo el proyecto",kle=()=>"पूरा प्रोजेक्ट",VE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ble():t==="fa"?yle():t==="ar"?xle():t==="es"?wle():t==="hi"?kle():vle()}),Sle=()=>"Expand panel",Cle=()=>"展开面板",Ele=()=>"گسترش پنل",Nle=()=>"توسيع اللوحة",zle=()=>"Expandir panel",jle=()=>"पैनल फैलाएं",KE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cle():t==="fa"?Ele():t==="ar"?Nle():t==="es"?zle():t==="hi"?jle():Sle()}),Tle=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Ale=e=>`实验筛选:${e==null?void 0:e.scope}`,Rle=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Mle=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,Ole=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Dle=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Lle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ale(e):t==="fa"?Rle(e):t==="ar"?Mle(e):t==="es"?Ole(e):t==="hi"?Dle(e):Tle(e)}),Ile=()=>"Experiment view",$le=()=>"实验视图",Ble=()=>"نمای آزمایش",Ple=()=>"عرض التجربة",Fle=()=>"Vista de experimento",Hle=()=>"प्रयोग व्यू",qle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$le():t==="fa"?Ble():t==="ar"?Ple():t==="es"?Fle():t==="hi"?Hle():Ile()}),Ule=()=>"Experiments",Gle=()=>"实验",Vle=()=>"آزمایش‌ها",Kle=()=>"التجارب",Wle=()=>"Experimentos",Qle=()=>"प्रयोग",yD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gle():t==="fa"?Vle():t==="ar"?Kle():t==="es"?Wle():t==="hi"?Qle():Ule()}),Xle=()=>"Files",Yle=()=>"文件",Zle=()=>"فایل‌ها",Jle=()=>"الملفات",eue=()=>"Archivos",tue=()=>"फ़ाइलें",s3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yle():t==="fa"?Zle():t==="ar"?Jle():t==="es"?eue():t==="hi"?tue():Xle()}),nue=()=>"Filter experiments",rue=()=>"筛选实验",sue=()=>"فیلتر آزمایش‌ها",iue=()=>"تصفية التجارب",aue=()=>"Filtrar experimentos",oue=()=>"प्रयोग फ़िल्टर करें",cue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rue():t==="fa"?sue():t==="ar"?iue():t==="es"?aue():t==="hi"?oue():nue()}),lue=()=>"Current task filtering is unavailable for unattributed experiments",uue=()=>"存在无法归属的实验时,不能按当前任务筛选",_ue=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",fue=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",due=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",hue=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",pue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uue():t==="fa"?_ue():t==="ar"?fue():t==="es"?due():t==="hi"?hue():lue()}),mue=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",gue=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",vue=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",bue=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",yue=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",xue=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",wue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gue():t==="fa"?vue():t==="ar"?bue():t==="es"?yue():t==="hi"?xue():mue()}),kue=()=>"Open a task to filter to its experiments",Sue=()=>"请打开一个任务以筛选其实验",Cue=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Eue=()=>"افتح مهمة لعرض تجاربها فقط",Nue=()=>"Abre una tarea para filtrar por sus experimentos",zue=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",jue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sue():t==="fa"?Cue():t==="ar"?Eue():t==="es"?Nue():t==="hi"?zue():kue()}),Tue=()=>"projects",Aue=()=>"项目",Rue=()=>"پروژه‌ها",Mue=()=>"المشاريع",Oue=()=>"los proyectos",Due=()=>"प्रोजेक्ट",u0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aue():t==="fa"?Rue():t==="ar"?Mue():t==="es"?Oue():t==="hi"?Due():Tue()}),Lue=()=>"Restore panel",Iue=()=>"还原面板",$ue=()=>"بازگرداندن اندازهٔ پنل",Bue=()=>"استعادة اللوحة",Pue=()=>"Restaurar panel",Fue=()=>"पैनल वापस लाएं",WE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iue():t==="fa"?$ue():t==="ar"?Bue():t==="es"?Pue():t==="hi"?Fue():Lue()}),Hue=()=>"Retry",que=()=>"重试",Uue=()=>"تلاش دوباره",Gue=()=>"إعادة المحاولة",Vue=()=>"Reintentar",Kue=()=>"फिर से कोशिश करें",Ws=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?que():t==="fa"?Uue():t==="ar"?Gue():t==="es"?Vue():t==="hi"?Kue():Hue()}),Wue=()=>"Select a project to browse its files.",Que=()=>"选择一个项目以浏览其文件。",Xue=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Yue=()=>"اختر مشروعًا لتصفح ملفاته.",Zue=()=>"Selecciona un proyecto para explorar sus archivos.",Jue=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",e_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Que():t==="fa"?Xue():t==="ar"?Yue():t==="es"?Zue():t==="hi"?Jue():Wue()}),t_e=()=>"settings",n_e=()=>"设置",r_e=()=>"تنظیمات",s_e=()=>"الإعدادات",i_e=()=>"la configuración",a_e=()=>"सेटिंग्स",o_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n_e():t==="fa"?r_e():t==="ar"?s_e():t==="es"?i_e():t==="hi"?a_e():t_e()}),c_e=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,l_e=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,u_e=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,__e=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,f_e=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,d_e=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,h_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l_e(e):t==="fa"?u_e(e):t==="ar"?__e(e):t==="es"?f_e(e):t==="hi"?d_e(e):c_e(e)}),p_e=()=>"Sub-agent",m_e=()=>"子智能体",g_e=()=>"عامل فرعی",v_e=()=>"وكيل فرعي",b_e=()=>"Subagente",y_e=()=>"सब-एजेंट",x_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m_e():t==="fa"?g_e():t==="ar"?v_e():t==="es"?b_e():t==="hi"?y_e():p_e()}),w_e=()=>"Table",k_e=()=>"表格",S_e=()=>"جدول",C_e=()=>"جدول",E_e=()=>"Tabla",N_e=()=>"टेबल",z_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k_e():t==="fa"?S_e():t==="ar"?C_e():t==="es"?E_e():t==="hi"?N_e():w_e()}),j_e=()=>"Tree",T_e=()=>"树状图",A_e=()=>"درخت",R_e=()=>"شجرة",M_e=()=>"Árbol",O_e=()=>"ट्री",D_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T_e():t==="fa"?A_e():t==="ar"?R_e():t==="es"?M_e():t==="hi"?O_e():j_e()}),L_e=e=>`Collapse ${e==null?void 0:e.name}`,I_e=e=>`折叠 ${e==null?void 0:e.name}`,$_e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,B_e=e=>`طيّ ${e==null?void 0:e.name}`,P_e=e=>`Contraer ${e==null?void 0:e.name}`,F_e=e=>`${e==null?void 0:e.name} समेटें`,H_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?I_e(e):t==="fa"?$_e(e):t==="ar"?B_e(e):t==="es"?P_e(e):t==="hi"?F_e(e):L_e(e)}),q_e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,U_e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,G_e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,V_e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,K_e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,W_e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,Pk=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?U_e(e):t==="fa"?G_e(e):t==="ar"?V_e(e):t==="es"?K_e(e):t==="hi"?W_e(e):q_e(e)}),Q_e=e=>`Delete folder ${e==null?void 0:e.name}`,X_e=e=>`删除文件夹 ${e==null?void 0:e.name}`,Y_e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,Z_e=e=>`حذف المجلد ${e==null?void 0:e.name}`,J_e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,efe=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,tfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X_e(e):t==="fa"?Y_e(e):t==="ar"?Z_e(e):t==="es"?J_e(e):t==="hi"?efe(e):Q_e(e)}),nfe=e=>`Expand ${e==null?void 0:e.name}`,rfe=e=>`展开 ${e==null?void 0:e.name}`,sfe=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,ife=e=>`توسيع ${e==null?void 0:e.name}`,afe=e=>`Expandir ${e==null?void 0:e.name}`,ofe=e=>`${e==null?void 0:e.name} फैलाएं`,cfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rfe(e):t==="fa"?sfe(e):t==="ar"?ife(e):t==="es"?afe(e):t==="hi"?ofe(e):nfe(e)}),lfe=()=>"Binary or unsupported file — no inline preview.",ufe=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",_fe=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",ffe=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",dfe=()=>"Archivo binario o no compatible — sin vista previa.",hfe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",pfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ufe():t==="fa"?_fe():t==="ar"?ffe():t==="es"?dfe():t==="hi"?hfe():lfe()}),mfe=()=>"Copy path",gfe=()=>"复制路径",vfe=()=>"کپی مسیر",bfe=()=>"نسخ المسار",yfe=()=>"Copiar ruta",xfe=()=>"पथ कॉपी करें",wfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gfe():t==="fa"?vfe():t==="ar"?bfe():t==="es"?yfe():t==="hi"?xfe():mfe()}),kfe=()=>"Artifact not found",Sfe=()=>"找不到产物",Cfe=()=>"خروجی پیدا نشد",Efe=()=>"لم يُعثر على المُخرَج",Nfe=()=>"No se encontró el artefacto",zfe=()=>"आर्टिफ़ैक्ट नहीं मिला",jfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sfe():t==="fa"?Cfe():t==="ar"?Efe():t==="es"?Nfe():t==="hi"?zfe():kfe()}),Tfe=()=>"Open raw",Afe=()=>"打开原始文件",Rfe=()=>"باز کردن فایل خام",Mfe=()=>"فتح الملف الخام",Ofe=()=>"Abrir sin formato",Dfe=()=>"रॉ खोलें",Lfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Afe():t==="fa"?Rfe():t==="ar"?Mfe():t==="es"?Ofe():t==="hi"?Dfe():Tfe()}),Ife=()=>"Click an artifact to view it",$fe=()=>"点击产物即可查看",Bfe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Pfe=()=>"انقر على مُخرَج لعرضه",Ffe=()=>"Selecciona un artefacto para verlo",Hfe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",qfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$fe():t==="fa"?Bfe():t==="ar"?Pfe():t==="es"?Ffe():t==="hi"?Hfe():Ife()}),Ufe=()=>"Delete artifact",Gfe=()=>"删除产物",Vfe=()=>"حذف خروجی",Kfe=()=>"حذف المُخرَج",Wfe=()=>"Eliminar artefacto",Qfe=()=>"आर्टिफ़ैक्ट हटाएं",QE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gfe():t==="fa"?Vfe():t==="ar"?Kfe():t==="es"?Wfe():t==="hi"?Qfe():Ufe()}),Xfe=()=>"Delete folder",Yfe=()=>"删除文件夹",Zfe=()=>"حذف پوشه",Jfe=()=>"حذف المجلد",ede=()=>"Eliminar carpeta",tde=()=>"फ़ोल्डर हटाएं",nde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yfe():t==="fa"?Zfe():t==="ar"?Jfe():t==="es"?ede():t==="hi"?tde():Xfe()}),rde=()=>"Failed to load:",sde=()=>"加载失败:",ide=()=>"بارگیری ناموفق بود:",ade=()=>"تعذّر التحميل:",ode=()=>"Error al cargar:",cde=()=>"लोड नहीं हो सका:",lde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sde():t==="fa"?ide():t==="ar"?ade():t==="es"?ode():t==="hi"?cde():rde()}),ude=()=>"File truncated — showing the first 512 KB.",_de=()=>"文件已截断——仅显示前 512 KB。",fde=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",dde=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",hde=()=>"Archivo truncado — se muestran los primeros 512 KB.",pde=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",mde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_de():t==="fa"?fde():t==="ar"?dde():t==="es"?hde():t==="hi"?pde():ude()}),gde=()=>"Listing truncated — the folder has more artifacts.",vde=()=>"列表已截断——文件夹中还有更多产物。",bde=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",yde=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",xde=()=>"Listado truncado — la carpeta tiene más artefactos.",wde=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",kde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vde():t==="fa"?bde():t==="ar"?yde():t==="es"?xde():t==="hi"?wde():gde()}),Sde=()=>"Loading…",Cde=()=>"正在加载…",Ede=()=>"در حال بارگیری…",Nde=()=>"جارٍ التحميل…",zde=()=>"Cargando…",jde=()=>"लोड हो रहा है…",xD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cde():t==="fa"?Ede():t==="ar"?Nde():t==="es"?zde():t==="hi"?jde():Sde()}),Tde=()=>"Loading artifacts…",Ade=()=>"正在加载产物…",Rde=()=>"در حال بارگیری خروجی‌ها…",Mde=()=>"جارٍ تحميل المُخرَجات…",Ode=()=>"Cargando artefactos…",Dde=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",Lde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ade():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?Dde():Tde()}),Ide=()=>"Modified",$de=()=>"修改时间",Bde=()=>"ویرایش‌شده",Pde=()=>"عُدّل",Fde=()=>"Modificado",Hde=()=>"बदला गया",qde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$de():t==="fa"?Bde():t==="ar"?Pde():t==="es"?Fde():t==="hi"?Hde():Ide()}),Ude=()=>"No artifacts yet",Gde=()=>"尚无产物",Vde=()=>"هنوز خروجی‌ای وجود ندارد",Kde=()=>"لا توجد مُخرَجات بعد",Wde=()=>"Aún no hay artefactos",Qde=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",Xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gde():t==="fa"?Vde():t==="ar"?Kde():t==="es"?Wde():t==="hi"?Qde():Ude()}),Yde=()=>"Open raw in new tab",Zde=()=>"在新标签页中打开原始文件",Jde=()=>"باز کردن فایل خام در زبانهٔ جدید",ehe=()=>"فتح الملف الخام في تبويب جديد",the=()=>"Abrir sin formato en una pestaña nueva",nhe=()=>"नए टैब में रॉ खोलें",XE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zde():t==="fa"?Jde():t==="ar"?ehe():t==="es"?the():t==="hi"?nhe():Yde()}),rhe=()=>"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.",she=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",ihe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",ahe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",ohe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",che=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",lhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?she():t==="fa"?ihe():t==="ar"?ahe():t==="es"?ohe():t==="hi"?che():rhe()}),uhe=()=>"File too large to preview inline.",_he=()=>"文件太大,无法内嵌预览。",fhe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",dhe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",hhe=()=>"El archivo es demasiado grande para previsualizarlo.",phe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",mhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_he():t==="fa"?fhe():t==="ar"?dhe():t==="es"?hhe():t==="hi"?phe():uhe()}),ghe=()=>"This is the baseline branch, so there is no parent comparison.",vhe=()=>"这是基线分支,因此没有父分支可供比较。",bhe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",yhe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",xhe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",whe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",khe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vhe():t==="fa"?bhe():t==="ar"?yhe():t==="es"?xhe():t==="hi"?whe():ghe()}),She=()=>"Failed to load changes:",Che=()=>"加载更改失败:",Ehe=()=>"بارگیری تغییرات ناموفق بود:",Nhe=()=>"تعذّر تحميل التغييرات:",zhe=()=>"Error al cargar los cambios:",jhe=()=>"बदलाव लोड नहीं हो सके:",The=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Che():t==="fa"?Ehe():t==="ar"?Nhe():t==="es"?zhe():t==="hi"?jhe():She()}),Ahe=()=>"Loading changes…",Rhe=()=>"正在加载更改…",Mhe=()=>"در حال بارگیری تغییرات…",Ohe=()=>"جارٍ تحميل التغييرات…",Dhe=()=>"Cargando cambios…",Lhe=()=>"बदलाव लोड हो रहे हैं…",Ihe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rhe():t==="fa"?Mhe():t==="ar"?Ohe():t==="es"?Dhe():t==="hi"?Lhe():Ahe()}),$he=()=>"No committed changes from the parent branch.",Bhe=()=>"与父分支相比没有已提交的更改。",Phe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Fhe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Hhe=()=>"No hay cambios confirmados respecto a la rama padre.",qhe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Uhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bhe():t==="fa"?Phe():t==="ar"?Fhe():t==="es"?Hhe():t==="hi"?qhe():$he()}),Ghe=e=>`agent ${e==null?void 0:e.number}`,Vhe=e=>`智能体 ${e==null?void 0:e.number}`,Khe=e=>`عامل ${e==null?void 0:e.number}`,Whe=e=>`وكيل ${e==null?void 0:e.number}`,Qhe=e=>`agente ${e==null?void 0:e.number}`,Xhe=e=>`एजेंट ${e==null?void 0:e.number}`,YE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vhe(e):t==="fa"?Khe(e):t==="ar"?Whe(e):t==="es"?Qhe(e):t==="hi"?Xhe(e):Ghe(e)}),Yhe=()=>"agent sessions",Zhe=()=>"智能体会话",Jhe=()=>"نشست‌های عامل‌ها",epe=()=>"جلسات الوكلاء",tpe=()=>"sesiones de agente",npe=()=>"एजेंट सेशन",rpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zhe():t==="fa"?Jhe():t==="ar"?epe():t==="es"?tpe():t==="hi"?npe():Yhe()}),spe=()=>"All sessions",ipe=()=>"所有会话",ape=()=>"همهٔ نشست‌ها",ope=()=>"كل الجلسات",cpe=()=>"Todas las sesiones",lpe=()=>"सभी सेशन",wD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ipe():t==="fa"?ape():t==="ar"?ope():t==="es"?cpe():t==="hi"?lpe():spe()}),upe=e=>`${e==null?void 0:e.count} annotations`,_pe=e=>`${e==null?void 0:e.count} 条批注`,fpe=e=>`${e==null?void 0:e.count} یادداشت`,dpe=e=>`التعليقات: ${e==null?void 0:e.count}`,hpe=e=>`${e==null?void 0:e.count} anotaciones`,ppe=e=>`${e==null?void 0:e.count} एनोटेशन`,mpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_pe(e):t==="fa"?fpe(e):t==="ar"?dpe(e):t==="es"?hpe(e):t==="hi"?ppe(e):upe(e)}),gpe=()=>"Archive",vpe=()=>"归档",bpe=()=>"بایگانی",ype=()=>"أرشفة",xpe=()=>"Archivar",wpe=()=>"आर्काइव करें",kpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpe():t==="fa"?bpe():t==="ar"?ype():t==="es"?xpe():t==="hi"?wpe():gpe()}),Spe=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Cpe=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Epe=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Npe=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",zpe=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",jpe=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",Tpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cpe():t==="fa"?Epe():t==="ar"?Npe():t==="es"?zpe():t==="hi"?jpe():Spe()}),Ape=()=>"Asked about selected text",Rpe=()=>"已询问所选文本",Mpe=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",Ope=()=>"سأل عن النص المحدد",Dpe=()=>"Preguntó sobre el texto seleccionado",Lpe=()=>"चयनित टेक्स्ट के बारे में पूछा",Ipe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?Dpe():t==="hi"?Lpe():Ape()}),$pe=()=>"Attachment",Bpe=()=>"附件",Ppe=()=>"پیوست",Fpe=()=>"مرفق",Hpe=()=>"Adjunto",qpe=()=>"अटैचमेंट",Upe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bpe():t==="fa"?Ppe():t==="ar"?Fpe():t==="es"?Hpe():t==="hi"?qpe():$pe()}),Gpe=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Vpe=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Kpe=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Wpe=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,Qpe=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,Xpe=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,Ype=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpe(e):t==="fa"?Kpe(e):t==="ar"?Wpe(e):t==="es"?Qpe(e):t==="hi"?Xpe(e):Gpe(e)}),Zpe=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Jpe=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",e0e=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",t0e=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",n0e=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",r0e=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",s0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jpe():t==="fa"?e0e():t==="ar"?t0e():t==="es"?n0e():t==="hi"?r0e():Zpe()}),i0e=()=>"Wait for the turn to finish before running a command.",a0e=()=>"请等待本轮结束后再运行命令。",o0e=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",c0e=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",l0e=()=>"Espera a que termine el turno antes de ejecutar un comando.",u0e=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",_0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a0e():t==="fa"?o0e():t==="ar"?c0e():t==="es"?l0e():t==="hi"?u0e():i0e()}),f0e=e=>`Exited with code ${e==null?void 0:e.code}`,d0e=e=>`退出码 ${e==null?void 0:e.code}`,h0e=e=>`با کد ${e==null?void 0:e.code} خارج شد`,p0e=e=>`خرج برمز ${e==null?void 0:e.code}`,m0e=e=>`Terminó con el código ${e==null?void 0:e.code}`,g0e=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,v0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?d0e(e):t==="fa"?h0e(e):t==="ar"?p0e(e):t==="es"?m0e(e):t==="hi"?g0e(e):f0e(e)}),b0e=e=>`Command not run: ${e==null?void 0:e.error}`,y0e=e=>`命令未运行:${e==null?void 0:e.error}`,x0e=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,w0e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,k0e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,S0e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,ZE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?y0e(e):t==="fa"?x0e(e):t==="ar"?w0e(e):t==="es"?k0e(e):t==="hi"?S0e(e):b0e(e)}),C0e=()=>"Collapse tool activity",E0e=()=>"折叠工具活动",N0e=()=>"بستن فعالیت ابزارها",z0e=()=>"طيّ نشاط الأداة",j0e=()=>"Contraer actividad de herramientas",T0e=()=>"टूल गतिविधि समेटें",A0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0e():t==="fa"?N0e():t==="ar"?z0e():t==="es"?j0e():t==="hi"?T0e():C0e()}),R0e=()=>"Wait for the turn to finish before compacting.",M0e=()=>"请等待本轮结束后再压缩。",O0e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",D0e=()=>"انتظر انتهاء الجولة قبل الضغط.",L0e=()=>"Espera a que termine el turno antes de comprimir.",I0e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",$0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M0e():t==="fa"?O0e():t==="ar"?D0e():t==="es"?L0e():t==="hi"?I0e():R0e()}),B0e=e=>`Compacting failed: ${e==null?void 0:e.error}`,P0e=e=>`压缩失败:${e==null?void 0:e.error}`,F0e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,H0e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,q0e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,U0e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,G0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P0e(e):t==="fa"?F0e(e):t==="ar"?H0e(e):t==="es"?q0e(e):t==="hi"?U0e(e):B0e(e)}),V0e=()=>"Continue",K0e=()=>"继续",W0e=()=>"ادامه",Q0e=()=>"متابعة",X0e=()=>"Continuar",Y0e=()=>"जारी रखें",Z0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K0e():t==="fa"?W0e():t==="ar"?Q0e():t==="es"?X0e():t==="hi"?Y0e():V0e()}),J0e=()=>"Copy response",eme=()=>"复制回复",tme=()=>"کپی پاسخ",nme=()=>"نسخ الرد",rme=()=>"Copiar respuesta",sme=()=>"जवाब कॉपी करें",JE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eme():t==="fa"?tme():t==="ar"?nme():t==="es"?rme():t==="hi"?sme():J0e()}),ime=e=>`Delete “${e==null?void 0:e.title}”? -Its transcript will be permanently removed.`,ime=e=>`删除“${e==null?void 0:e.title}”? +Its transcript will be permanently removed.`,ame=e=>`删除“${e==null?void 0:e.title}”? -其对话记录将被永久移除。`,ame=e=>`«${e==null?void 0:e.title}» حذف شود؟ +其对话记录将被永久移除。`,ome=e=>`«${e==null?void 0:e.title}» حذف شود؟ -رونوشت آن برای همیشه حذف خواهد شد.`,ome=e=>`حذف «${e==null?void 0:e.title}»؟ +رونوشت آن برای همیشه حذف خواهد شد.`,cme=e=>`حذف «${e==null?void 0:e.title}»؟ -سيُحذف سجل المحادثة نهائيًا.`,cme=e=>`¿Eliminar “${e==null?void 0:e.title}”? +سيُحذف سجل المحادثة نهائيًا.`,lme=e=>`¿Eliminar “${e==null?void 0:e.title}”? -Su transcripción se eliminará de forma permanente.`,lme=e=>`“${e==null?void 0:e.title}” हटाएं? +Su transcripción se eliminará de forma permanente.`,ume=e=>`“${e==null?void 0:e.title}” हटाएं? -इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,ume=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ime(e):t==="fa"?ame(e):t==="ar"?ome(e):t==="es"?cme(e):t==="hi"?lme(e):sme(e)}),_me=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,fme=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,dme=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,hme=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,pme=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,mme=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,gme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fme(e):t==="fa"?dme(e):t==="ar"?hme(e):t==="es"?pme(e):t==="hi"?mme(e):_me(e)}),vme=()=>"Could not exit Plan mode. Try again.",bme=()=>"无法退出计划模式。请重试。",yme=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",xme=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",wme=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",kme=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",Sme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bme():t==="fa"?yme():t==="ar"?xme():t==="es"?wme():t==="hi"?kme():vme()}),Cme=()=>"Expand tool activity",Eme=()=>"展开工具活动",Nme=()=>"باز کردن فعالیت ابزارها",zme=()=>"توسيع نشاط الأداة",jme=()=>"Expandir actividad de herramientas",Tme=()=>"टूल गतिविधि फैलाएं",Ame=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eme():t==="fa"?Nme():t==="ar"?zme():t==="es"?jme():t==="hi"?Tme():Cme()}),Rme=()=>"experiments",Mme=()=>"实验",Ome=()=>"آزمایش‌ها",Dme=()=>"التجارب",Lme=()=>"experimentos",Ime=()=>"प्रयोग",$me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mme():t==="fa"?Ome():t==="ar"?Dme():t==="es"?Lme():t==="hi"?Ime():Rme()}),Bme=()=>"You",Pme=()=>"你",Fme=()=>"شما",Hme=()=>"أنت",qme=()=>"Tú",Ume=()=>"आप",Gme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pme():t==="fa"?Fme():t==="ar"?Hme():t==="es"?qme():t==="hi"?Ume():Bme()}),Vme=()=>"Goal cleared",Kme=()=>"已清除目标",Wme=()=>"هدف پاک شد",Qme=()=>"تم مسح الهدف",Xme=()=>"Objetivo borrado",Yme=()=>"लक्ष्य हटाया गया",Zme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kme():t==="fa"?Wme():t==="ar"?Qme():t==="es"?Xme():t==="hi"?Yme():Vme()}),Jme=e=>`Current goal: ${e==null?void 0:e.goal}`,ege=e=>`当前目标:${e==null?void 0:e.goal}`,tge=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,nge=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,rge=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,sge=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,ige=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ege(e):t==="fa"?tge(e):t==="ar"?nge(e):t==="es"?rge(e):t==="hi"?sge(e):Jme(e)}),age=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,oge=e=>`设置目标失败:${e==null?void 0:e.error}`,cge=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,lge=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,uge=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,_ge=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,eN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oge(e):t==="fa"?cge(e):t==="ar"?lge(e):t==="es"?uge(e):t==="hi"?_ge(e):age(e)}),fge=()=>"No goal set — add one after /goal",dge=()=>"尚未设置目标 — 在 /goal 后面写一个",hge=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",pge=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",mge=()=>"Sin objetivo — añade uno después de /goal",gge=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",vge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dge():t==="fa"?hge():t==="ar"?pge():t==="es"?mge():t==="hi"?gge():fge()}),bge=()=>"Goal set",yge=()=>"已设置目标",xge=()=>"هدف تنظیم شد",wge=()=>"تم تعيين الهدف",kge=()=>"Objetivo definido",Sge=()=>"लक्ष्य सेट किया गया",Cge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yge():t==="fa"?xge():t==="ar"?wge():t==="es"?kge():t==="hi"?Sge():bge()}),Ege=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,Nge=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,zge=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,jge=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,Tge=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,Age=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,Rge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nge(e):t==="fa"?zge(e):t==="ar"?jge(e):t==="es"?Tge(e):t==="hi"?Age(e):Ege(e)}),Mge=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,Oge=e=>`导入该聊天失败:${e==null?void 0:e.error}`,Dge=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,Lge=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,Ige=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,$ge=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,Bge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oge(e):t==="fa"?Dge(e):t==="ar"?Lge(e):t==="es"?Ige(e):t==="hi"?$ge(e):Mge(e)}),Pge=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Fge=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,Hge=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,qge=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Uge=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,Gge=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,Vge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fge(e):t==="fa"?Hge(e):t==="ar"?qge(e):t==="es"?Uge(e):t==="hi"?Gge(e):Pge(e)}),Kge=e=>`Message not sent: ${e==null?void 0:e.error}`,Wge=e=>`消息未发送:${e==null?void 0:e.error}`,Qge=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,Xge=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,Yge=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,Zge=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,Jge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wge(e):t==="fa"?Qge(e):t==="ar"?Xge(e):t==="es"?Yge(e):t==="hi"?Zge(e):Kge(e)}),e1e=()=>"Model unavailable",t1e=()=>"模型不可用",n1e=()=>"مدل در دسترس نیست",r1e=()=>"النموذج غير متاح",s1e=()=>"Modelo no disponible",i1e=()=>"मॉडल उपलब्ध नहीं",a1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t1e():t==="fa"?n1e():t==="ar"?r1e():t==="es"?s1e():t==="hi"?i1e():e1e()}),o1e=()=>"New session",c1e=()=>"新会话",l1e=()=>"نشست جدید",u1e=()=>"جلسة جديدة",_1e=()=>"Nueva sesión",f1e=()=>"नया सेशन",tN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c1e():t==="fa"?l1e():t==="ar"?u1e():t==="es"?_1e():t==="hi"?f1e():o1e()}),d1e=()=>"No active sessions",h1e=()=>"没有活跃会话",p1e=()=>"نشست فعالی وجود ندارد",m1e=()=>"لا توجد جلسات نشطة",g1e=()=>"No hay sesiones activas",v1e=()=>"कोई सक्रिय सेशन नहीं",b1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h1e():t==="fa"?p1e():t==="ar"?m1e():t==="es"?g1e():t==="hi"?v1e():d1e()}),y1e=()=>"No activity",x1e=()=>"无活动",w1e=()=>"بدون فعالیت",k1e=()=>"لا يوجد نشاط",S1e=()=>"Sin actividad",C1e=()=>"कोई गतिविधि नहीं",E1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x1e():t==="fa"?w1e():t==="ar"?k1e():t==="es"?S1e():t==="hi"?C1e():y1e()}),N1e=()=>"No archived sessions",z1e=()=>"没有已归档的会话",j1e=()=>"نشست بایگانی‌شده‌ای وجود ندارد",T1e=()=>"لا توجد جلسات مؤرشفة",A1e=()=>"No hay sesiones archivadas",R1e=()=>"कोई आर्काइव किया गया सेशन नहीं",M1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z1e():t==="fa"?j1e():t==="ar"?T1e():t==="es"?A1e():t==="hi"?R1e():N1e()}),O1e=()=>"No sessions yet",D1e=()=>"还没有会话",L1e=()=>"هنوز نشستی وجود ندارد",I1e=()=>"لا توجد جلسات بعد",$1e=()=>"Aún no hay sesiones",B1e=()=>"अभी तक कोई सेशन नहीं",P1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D1e():t==="fa"?L1e():t==="ar"?I1e():t==="es"?$1e():t==="hi"?B1e():O1e()}),F1e=()=>"There is nothing to compact yet",H1e=()=>"还没有可压缩的内容",q1e=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",U1e=()=>"لا يوجد شيء لضغطه بعد",G1e=()=>"Aún no hay nada que comprimir",V1e=()=>"छोटा करने के लिए अभी कुछ नहीं है",K1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H1e():t==="fa"?q1e():t==="ar"?U1e():t==="es"?G1e():t==="hi"?V1e():F1e()}),W1e=()=>"No response to copy yet",Q1e=()=>"还没有可复制的回复",X1e=()=>"هنوز پاسخی برای کپی وجود ندارد",Y1e=()=>"لا يوجد رد لنسخه بعد",Z1e=()=>"Aún no hay ninguna respuesta que copiar",J1e=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",eve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q1e():t==="fa"?X1e():t==="ar"?Y1e():t==="es"?Z1e():t==="hi"?J1e():W1e()}),tve=()=>"Nothing to export yet",nve=()=>"还没有可导出的内容",rve=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",sve=()=>"لا يوجد شيء لتصديره بعد",ive=()=>"Aún no hay nada que exportar",ave=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",ove=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nve():t==="fa"?rve():t==="ar"?sve():t==="es"?ive():t==="hi"?ave():tve()}),cve=()=>"1 annotation",lve=()=>"1 条批注",uve=()=>"۱ یادداشت",_ve=()=>"تعليق واحد",fve=()=>"1 anotación",dve=()=>"1 एनोटेशन",hve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lve():t==="fa"?uve():t==="ar"?_ve():t==="es"?fve():t==="hi"?dve():cve()}),pve=()=>"Open sub-agent transcript",mve=()=>"打开子智能体记录",gve=()=>"باز کردن متن گفت‌وگوی عامل فرعی",vve=()=>"فتح سجل محادثة الوكيل الفرعي",bve=()=>"Abrir la transcripción del subagente",yve=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",xve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():pve()}),wve=()=>"About this demo",kve=()=>"关于此演示",Sve=()=>"دربارهٔ این نسخهٔ نمایشی",Cve=()=>"حول هذا العرض التوضيحي",Eve=()=>"Acerca de esta demo",Nve=()=>"इस डेमो के बारे में",nN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kve():t==="fa"?Sve():t==="ar"?Cve():t==="es"?Eve():t==="hi"?Nve():wve()}),zve=()=>"Accept and auto mode",jve=()=>"接受并使用自动模式",Tve=()=>"پذیرش و حالت خودکار",Ave=()=>"قبول وتفعيل الوضع التلقائي",Rve=()=>"Aceptar en modo automático",Mve=()=>"स्वीकार करें और ऑटो मोड",Ove=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jve():t==="fa"?Tve():t==="ar"?Ave():t==="es"?Rve():t==="hi"?Mve():zve()}),Dve=()=>"Accept and bypass all",Lve=()=>"接受并跳过所有审批",Ive=()=>"پذیرش و عبور از همهٔ تأییدها",$ve=()=>"القبول وتجاوز الكل",Bve=()=>"Aceptar y omitir permisos",Pve=()=>"स्वीकार करें और सब बायपास करें",Fve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lve():t==="fa"?Ive():t==="ar"?$ve():t==="es"?Bve():t==="hi"?Pve():Dve()}),Hve=()=>"Active",qve=()=>"活跃",Uve=()=>"فعال",Gve=()=>"نشط",Vve=()=>"Activas",Kve=()=>"सक्रिय",Wve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qve():t==="fa"?Uve():t==="ar"?Gve():t==="es"?Vve():t==="hi"?Kve():Hve()}),Qve=()=>"All",Xve=()=>"全部",Yve=()=>"همه",Zve=()=>"الكل",Jve=()=>"Todas",ebe=()=>"सभी",tbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xve():t==="fa"?Yve():t==="ar"?Zve():t==="es"?Jve():t==="hi"?ebe():Qve()}),nbe=()=>"Allow",rbe=()=>"允许",sbe=()=>"اجازه دادن",ibe=()=>"السماح",abe=()=>"Permitir",obe=()=>"अनुमति दें",cbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rbe():t==="fa"?sbe():t==="ar"?ibe():t==="es"?abe():t==="hi"?obe():nbe()}),lbe=()=>"Approval required",ube=()=>"需要批准",_be=()=>"نیازمند تأیید",fbe=()=>"الموافقة مطلوبة",dbe=()=>"Aprobación necesaria",hbe=()=>"स्वीकृति ज़रूरी है",pbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ube():t==="fa"?_be():t==="ar"?fbe():t==="es"?dbe():t==="hi"?hbe():lbe()}),mbe=()=>"Archived",gbe=()=>"已归档",vbe=()=>"بایگانی‌شده",bbe=()=>"مؤرشف",ybe=()=>"Archivadas",xbe=()=>"आर्काइव किया गया",rN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gbe():t==="fa"?vbe():t==="ar"?bbe():t==="es"?ybe():t==="hi"?xbe():mbe()}),wbe=()=>"Ask about this",kbe=()=>"询问此内容",Sbe=()=>"دربارهٔ این بپرسید",Cbe=()=>"اسأل عن هذا",Ebe=()=>"Preguntar sobre esto",Nbe=()=>"इसके बारे में पूछें",zbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kbe():t==="fa"?Sbe():t==="ar"?Cbe():t==="es"?Ebe():t==="hi"?Nbe():wbe()}),jbe=()=>"Attach a PDF or image",Tbe=()=>"附加 PDF 或图片",Abe=()=>"پیوست PDF یا تصویر",Rbe=()=>"إرفاق ملف PDF أو صورة",Mbe=()=>"Adjuntar un PDF o una imagen",Obe=()=>"PDF या इमेज अटैच करें",sN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tbe():t==="fa"?Abe():t==="ar"?Rbe():t==="es"?Mbe():t==="hi"?Obe():jbe()}),Dbe=()=>"Bash",Lbe=()=>"Bash",Ibe=()=>"Bash",$be=()=>"Bash",Bbe=()=>"Bash",Pbe=()=>"Bash",wD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lbe():t==="fa"?Ibe():t==="ar"?$be():t==="es"?Bbe():t==="hi"?Pbe():Dbe()}),Fbe=()=>"Browsed the web",Hbe=()=>"已浏览网页",qbe=()=>"وب مرور شد",Ube=()=>"تصفّح الويب",Gbe=()=>"Navegó por la web",Vbe=()=>"वेब ब्राउज़ किया",iN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hbe():t==="fa"?qbe():t==="ar"?Ube():t==="es"?Gbe():t==="hi"?Vbe():Fbe()}),Kbe=()=>"Built the project",Wbe=()=>"已构建项目",Qbe=()=>"پروژه ساخته شد",Xbe=()=>"بنى المشروع",Ybe=()=>"Compiló el proyecto",Zbe=()=>"प्रोजेक्ट बिल्ड किया",Jbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wbe():t==="fa"?Qbe():t==="ar"?Xbe():t==="es"?Ybe():t==="hi"?Zbe():Kbe()}),eye=()=>"Cancel",tye=()=>"取消",nye=()=>"لغو",rye=()=>"إلغاء",sye=()=>"Cancelar",iye=()=>"रद्द करें",aye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tye():t==="fa"?nye():t==="ar"?rye():t==="es"?sye():t==="hi"?iye():eye()}),oye=()=>"Cancelled an experiment run",cye=()=>"已取消实验运行",lye=()=>"اجرای آزمایش لغو شد",uye=()=>"ألغى تشغيل تجربة",_ye=()=>"Canceló una ejecución de experimento",fye=()=>"एक प्रयोग रन रद्द किया",dye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cye():t==="fa"?lye():t==="ar"?uye():t==="es"?_ye():t==="hi"?fye():oye()}),hye=()=>"Checked code style",pye=()=>"已检查代码风格",mye=()=>"سبک کد بررسی شد",gye=()=>"فحص نمط الشيفرة",vye=()=>"Revisó el estilo del código",bye=()=>"कोड स्टाइल जाँची",yye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pye():t==="fa"?mye():t==="ar"?gye():t==="es"?vye():t==="hi"?bye():hye()}),xye=()=>"Checked compute options",wye=()=>"已检查算力选项",kye=()=>"گزینه‌های رایانشی بررسی شد",Sye=()=>"فحص خيارات الحوسبة",Cye=()=>"Consultó las opciones de cómputo",Eye=()=>"कंप्यूट विकल्प जाँचे",Nye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wye():t==="fa"?kye():t==="ar"?Sye():t==="es"?Cye():t==="hi"?Eye():xye()}),zye=()=>"Checked experiment status",jye=()=>"已检查实验状态",Tye=()=>"وضعیت آزمایش بررسی شد",Aye=()=>"فحص حالة التجربة",Rye=()=>"Consultó el estado del experimento",Mye=()=>"प्रयोग की स्थिति जाँची",aN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jye():t==="fa"?Tye():t==="ar"?Aye():t==="es"?Rye():t==="hi"?Mye():zye()}),Oye=()=>"Checked Git status",Dye=()=>"已检查 Git 状态",Lye=()=>"وضعیت Git بررسی شد",Iye=()=>"فحص حالة Git",$ye=()=>"Consultó el estado de Git",Bye=()=>"Git स्थिति जाँची",Pye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dye():t==="fa"?Lye():t==="ar"?Iye():t==="es"?$ye():t==="hi"?Bye():Oye()}),Fye=()=>"Checked local times",Hye=()=>"已查询当地时间",qye=()=>"زمان‌های محلی بررسی شد",Uye=()=>"فحص التوقيتات المحلية",Gye=()=>"Consultó horas locales",Vye=()=>"स्थानीय समय जाँचे",Kye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hye():t==="fa"?qye():t==="ar"?Uye():t==="es"?Gye():t==="hi"?Vye():Fye()}),Wye=()=>"Checked market data",Qye=()=>"已查询市场数据",Xye=()=>"داده‌های بازار بررسی شد",Yye=()=>"فحص بيانات السوق",Zye=()=>"Consultó datos de mercado",Jye=()=>"बाज़ार डेटा जाँचा",exe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qye():t==="fa"?Xye():t==="ar"?Yye():t==="es"?Zye():t==="hi"?Jye():Wye()}),txe=()=>"Checked sports data",nxe=()=>"已查询体育数据",rxe=()=>"داده‌های ورزشی بررسی شد",sxe=()=>"فحص البيانات الرياضية",ixe=()=>"Consultó datos deportivos",axe=()=>"खेल डेटा जाँचा",oxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nxe():t==="fa"?rxe():t==="ar"?sxe():t==="es"?ixe():t==="hi"?axe():txe()}),cxe=()=>"Checked the weather",lxe=()=>"已查询天气",uxe=()=>"آب‌وهوا بررسی شد",_xe=()=>"فحص حالة الطقس",fxe=()=>"Consultó el tiempo",dxe=()=>"मौसम जाँचा",hxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lxe():t==="fa"?uxe():t==="ar"?_xe():t==="es"?fxe():t==="hi"?dxe():cxe()}),pxe=()=>"Checked types",mxe=()=>"已检查类型",gxe=()=>"نوع‌ها بررسی شد",vxe=()=>"فحص الأنواع",bxe=()=>"Comprobó los tipos",yxe=()=>"टाइप जाँचे",xxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mxe():t==="fa"?gxe():t==="ar"?vxe():t==="es"?bxe():t==="hi"?yxe():pxe()}),wxe=()=>"Clear annotations",kxe=()=>"清除批注",Sxe=()=>"پاک کردن یادداشت‌ها",Cxe=()=>"مسح التعليقات",Exe=()=>"Borrar anotaciones",Nxe=()=>"एनोटेशन साफ़ करें",oN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kxe():t==="fa"?Sxe():t==="ar"?Cxe():t==="es"?Exe():t==="hi"?Nxe():wxe()}),zxe=e=>`Clear the goal: ${e==null?void 0:e.goal}`,jxe=e=>`清除目标:${e==null?void 0:e.goal}`,Txe=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,Axe=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,Rxe=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,Mxe=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,cN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jxe(e):t==="fa"?Txe(e):t==="ar"?Axe(e):t==="es"?Rxe(e):t==="hi"?Mxe(e):zxe(e)}),Oxe=()=>"Customize",Dxe=()=>"自定义",Lxe=()=>"سفارشی‌سازی",Ixe=()=>"تخصيص",$xe=()=>"Personalizar",Bxe=()=>"कस्टमाइज़ करें",Pxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dxe():t==="fa"?Lxe():t==="ar"?Ixe():t==="es"?$xe():t==="hi"?Bxe():Oxe()}),Fxe=()=>"Data sources",Hxe=()=>"数据源",qxe=()=>"منابع داده",Uxe=()=>"مصادر البيانات",Gxe=()=>"Fuentes de datos",Vxe=()=>"डेटा स्रोत",Q2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hxe():t==="fa"?qxe():t==="ar"?Uxe():t==="es"?Gxe():t==="hi"?Vxe():Fxe()}),Kxe=()=>"Delegated a task to a new agent",Wxe=()=>"已将任务委派给新智能体",Qxe=()=>"وظیفه به عامل جدید واگذار شد",Xxe=()=>"فوّض مهمة إلى وكيل جديد",Yxe=()=>"Delegó una tarea a un nuevo agente",Zxe=()=>"एक नए एजेंट को टास्क सौंपा",Jxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wxe():t==="fa"?Qxe():t==="ar"?Xxe():t==="es"?Yxe():t==="hi"?Zxe():Kxe()}),e2e=()=>"Delete",t2e=()=>"删除",n2e=()=>"حذف",r2e=()=>"حذف",s2e=()=>"Eliminar",i2e=()=>"हटाएं",kD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t2e():t==="fa"?n2e():t==="ar"?r2e():t==="es"?s2e():t==="hi"?i2e():e2e()}),a2e=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",o2e=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",c2e=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",l2e=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",u2e=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",_2e=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",f2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o2e():t==="fa"?c2e():t==="ar"?l2e():t==="es"?u2e():t==="hi"?_2e():a2e()}),d2e=()=>"to monitor it.",h2e=()=>"以查看进度。",p2e=()=>"بزنید.",m2e=()=>"لمتابعتها.",g2e=()=>"para seguirlo.",v2e=()=>"इस पर नज़र रखने के लिए।",lN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h2e():t==="fa"?p2e():t==="ar"?m2e():t==="es"?g2e():t==="hi"?v2e():d2e()}),b2e=()=>"The experiment is now running. Tap",y2e=()=>"实验正在运行。点按",x2e=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",w2e=()=>"التجربة قيد التشغيل الآن. اضغط على",k2e=()=>"El experimento ya se está ejecutando. Pulsa",S2e=()=>"प्रयोग अब चल रहा है। टैप करें",uN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y2e():t==="fa"?x2e():t==="ar"?w2e():t==="es"?k2e():t==="hi"?S2e():b2e()}),C2e=()=>"Deny",E2e=()=>"拒绝",N2e=()=>"رد کردن",z2e=()=>"رفض",j2e=()=>"Denegar",T2e=()=>"अस्वीकार करें",A2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E2e():t==="fa"?N2e():t==="ar"?z2e():t==="es"?j2e():t==="hi"?T2e():C2e()}),R2e=()=>"Dismiss",M2e=()=>"关闭",O2e=()=>"بستن",D2e=()=>"إغلاق",L2e=()=>"Cerrar",I2e=()=>"खारिज करें",Xg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M2e():t==="fa"?O2e():t==="ar"?D2e():t==="es"?L2e():t==="hi"?I2e():R2e()}),$2e=()=>"Edit and re-send",B2e=()=>"编辑并重新发送",P2e=()=>"ویرایش و ارسال دوباره",F2e=()=>"تعديل وإعادة الإرسال",H2e=()=>"Editar y reenviar",q2e=()=>"संपादित करें और फिर भेजें",_N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B2e():t==="fa"?P2e():t==="ar"?F2e():t==="es"?H2e():t==="hi"?q2e():$2e()}),U2e=()=>"Edit message",G2e=()=>"编辑消息",V2e=()=>"ویرایش پیام",K2e=()=>"تعديل الرسالة",W2e=()=>"Editar mensaje",Q2e=()=>"संदेश संपादित करें",X2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G2e():t==="fa"?V2e():t==="ar"?K2e():t==="es"?W2e():t==="hi"?Q2e():U2e()}),Y2e=()=>"Edited a file",Z2e=()=>"已编辑文件",J2e=()=>"فایل ویرایش شد",ewe=()=>"عدّل ملفًا",twe=()=>"Editó un archivo",nwe=()=>"एक फ़ाइल संपादित की",fN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z2e():t==="fa"?J2e():t==="ar"?ewe():t==="es"?twe():t==="hi"?nwe():Y2e()}),rwe=()=>"Exit Bash mode",swe=()=>"退出 Bash 模式",iwe=()=>"خروج از حالت Bash",awe=()=>"الخروج من وضع Bash",owe=()=>"Salir del modo Bash",cwe=()=>"Bash मोड से बाहर निकलें",dN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?swe():t==="fa"?iwe():t==="ar"?awe():t==="es"?owe():t==="hi"?cwe():rwe()}),lwe=()=>"Exit Plan mode",uwe=()=>"退出计划模式",_we=()=>"خروج از حالت طرح",fwe=()=>"الخروج من وضع التخطيط",dwe=()=>"Salir del modo Plan",hwe=()=>"प्लान मोड से बाहर निकलें",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uwe():t==="fa"?_we():t==="ar"?fwe():t==="es"?dwe():t==="hi"?hwe():lwe()}),pwe=()=>"Failed:",mwe=()=>"失败:",gwe=()=>"ناموفق:",vwe=()=>"فشل:",bwe=()=>"Error:",ywe=()=>"विफल:",Fk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mwe():t==="fa"?gwe():t==="ar"?vwe():t==="es"?bwe():t==="hi"?ywe():pwe()}),xwe=()=>"Filter sessions",wwe=()=>"筛选会话",kwe=()=>"فیلتر نشست‌ها",Swe=()=>"تصفية الجلسات",Cwe=()=>"Filtrar sesiones",Ewe=()=>"सेशन फ़िल्टर करें",pN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wwe():t==="fa"?kwe():t==="ar"?Swe():t==="es"?Cwe():t==="hi"?Ewe():xwe()}),Nwe=()=>"Goal",zwe=()=>"目标",jwe=()=>"هدف",Twe=()=>"الهدف",Awe=()=>"Objetivo",Rwe=()=>"लक्ष्य",Mwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwe():t==="fa"?jwe():t==="ar"?Twe():t==="es"?Awe():t==="hi"?Rwe():Nwe()}),Owe=()=>"is unavailable.",Dwe=()=>"不可用。",Lwe=()=>"در دسترس نیست.",Iwe=()=>"غير متاح.",$we=()=>"no está disponible.",Bwe=()=>"उपलब्ध नहीं है।",Pwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwe():t==="fa"?Lwe():t==="ar"?Iwe():t==="es"?$we():t==="hi"?Bwe():Owe()}),Fwe=()=>"Later queued messages will wait until this is retried or removed.",Hwe=()=>"后续排队的消息会等待此消息重试或移除。",qwe=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",Uwe=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",Gwe=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",Vwe=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",Kwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwe():t==="fa"?qwe():t==="ar"?Uwe():t==="es"?Gwe():t==="hi"?Vwe():Fwe()}),Wwe=()=>"Listed files",Qwe=()=>"已列出文件",Xwe=()=>"فایل‌ها فهرست شد",Ywe=()=>"سرد الملفات",Zwe=()=>"Listó archivos",Jwe=()=>"फ़ाइलों की सूची बनाई",mN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qwe():t==="fa"?Xwe():t==="ar"?Ywe():t==="es"?Zwe():t==="hi"?Jwe():Wwe()}),e4e=()=>"Listed project runs",t4e=()=>"已列出项目运行",n4e=()=>"اجراهای پروژه فهرست شد",r4e=()=>"سرد عمليات تشغيل المشروع",s4e=()=>"Listó las ejecuciones del proyecto",i4e=()=>"प्रोजेक्ट रन की सूची बनाई",a4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t4e():t==="fa"?n4e():t==="ar"?r4e():t==="es"?s4e():t==="hi"?i4e():e4e()}),o4e=()=>"Listed projects",c4e=()=>"已列出项目",l4e=()=>"پروژه‌ها فهرست شد",u4e=()=>"سرد المشاريع",_4e=()=>"Listó proyectos",f4e=()=>"प्रोजेक्ट की सूची बनाई",d4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c4e():t==="fa"?l4e():t==="ar"?u4e():t==="es"?_4e():t==="hi"?f4e():o4e()}),h4e=()=>"Loading conversation…",p4e=()=>"正在加载对话…",m4e=()=>"در حال بارگیری گفتگو…",g4e=()=>"جارٍ تحميل المحادثة…",v4e=()=>"Cargando conversación…",b4e=()=>"बातचीत लोड हो रही है…",y4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p4e():t==="fa"?m4e():t==="ar"?g4e():t==="es"?v4e():t==="hi"?b4e():h4e()}),x4e=()=>"New Chat",w4e=()=>"新对话",k4e=()=>"گفتگوی جدید",S4e=()=>"محادثة جديدة",C4e=()=>"Nuevo chat",E4e=()=>"नई चैट",N4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w4e():t==="fa"?k4e():t==="ar"?S4e():t==="es"?C4e():t==="hi"?E4e():x4e()}),z4e=()=>"Next version",j4e=()=>"下一版本",T4e=()=>"نسخهٔ بعدی",A4e=()=>"النسخة التالية",R4e=()=>"Siguiente versión",M4e=()=>"अगला वर्शन",gN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j4e():t==="fa"?T4e():t==="ar"?A4e():t==="es"?R4e():t==="hi"?M4e():z4e()}),O4e=()=>"Open the session this agent spawned",D4e=()=>"打开此智能体创建的会话",L4e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",I4e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",$4e=()=>"Abrir la sesión que creó este agente",B4e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",P4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D4e():t==="fa"?L4e():t==="ar"?I4e():t==="es"?$4e():t==="hi"?B4e():O4e()}),F4e=()=>"Opened web pages",H4e=()=>"已打开网页",q4e=()=>"صفحه‌های وب باز شد",U4e=()=>"فتح صفحات ويب",G4e=()=>"Abrió páginas web",V4e=()=>"वेब पेज खोले",K4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H4e():t==="fa"?q4e():t==="ar"?U4e():t==="es"?G4e():t==="hi"?V4e():F4e()}),W4e=()=>"Plan",Q4e=()=>"计划",X4e=()=>"طرح",Y4e=()=>"خطة",Z4e=()=>"Plan",J4e=()=>"प्लान",e3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q4e():t==="fa"?X4e():t==="ar"?Y4e():t==="es"?Z4e():t==="hi"?J4e():W4e()}),t3e=()=>"Plan approved",n3e=()=>"计划已批准",r3e=()=>"طرح تأیید شد",s3e=()=>"تمت الموافقة على الخطة",i3e=()=>"Plan aprobado",a3e=()=>"प्लान स्वीकृत",o3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n3e():t==="fa"?r3e():t==="ar"?s3e():t==="es"?i3e():t==="hi"?a3e():t3e()}),c3e=()=>"Plan rejected",l3e=()=>"计划已拒绝",u3e=()=>"طرح رد شد",_3e=()=>"رُفضت الخطة",f3e=()=>"Plan rechazado",d3e=()=>"प्लान अस्वीकृत",h3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l3e():t==="fa"?u3e():t==="ar"?_3e():t==="es"?f3e():t==="hi"?d3e():c3e()}),p3e=()=>"Plan resolved",m3e=()=>"计划已处理",g3e=()=>"طرح تعیین تکلیف شد",v3e=()=>"تمت معالجة الخطة",b3e=()=>"Plan resuelto",y3e=()=>"प्लान सुलझाया गया",x3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m3e():t==="fa"?g3e():t==="ar"?v3e():t==="es"?b3e():t==="hi"?y3e():p3e()}),w3e=()=>"Plan revision requested",k3e=()=>"已请求修改计划",S3e=()=>"درخواست بازنگری طرح ثبت شد",C3e=()=>"طُلب تعديل الخطة",E3e=()=>"Cambios en el plan solicitados",N3e=()=>"प्लान में बदलाव का अनुरोध",z3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k3e():t==="fa"?S3e():t==="ar"?C3e():t==="es"?E3e():t==="hi"?N3e():w3e()}),j3e=()=>"Previous version",T3e=()=>"上一版本",A3e=()=>"نسخهٔ قبلی",R3e=()=>"النسخة السابقة",M3e=()=>"Versión anterior",O3e=()=>"पिछला वर्शन",vN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T3e():t==="fa"?A3e():t==="ar"?R3e():t==="es"?M3e():t==="hi"?O3e():j3e()}),D3e=()=>"Ran a command",L3e=()=>"已运行命令",I3e=()=>"فرمان اجرا شد",$3e=()=>"نفّذ أمرًا",B3e=()=>"Ejecutó un comando",P3e=()=>"एक कमांड चलाई",F3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L3e():t==="fa"?I3e():t==="ar"?$3e():t==="es"?B3e():t==="hi"?P3e():D3e()}),H3e=()=>"Ran tests",q3e=()=>"已运行测试",U3e=()=>"آزمون‌ها اجرا شد",G3e=()=>"شغّل الاختبارات",V3e=()=>"Ejecutó tests",K3e=()=>"टेस्ट चलाए",W3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q3e():t==="fa"?U3e():t==="ar"?G3e():t==="es"?V3e():t==="hi"?K3e():H3e()}),Q3e=()=>"Read a file",X3e=()=>"已读取文件",Y3e=()=>"فایل خوانده شد",Z3e=()=>"قرأ ملفًا",J3e=()=>"Leyó un archivo",e5e=()=>"एक फ़ाइल पढ़ी",t5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X3e():t==="fa"?Y3e():t==="ar"?Z3e():t==="es"?J3e():t==="hi"?e5e():Q3e()}),n5e=()=>"Read Git history",r5e=()=>"已读取 Git 历史",s5e=()=>"تاریخچهٔ Git خوانده شد",i5e=()=>"قرأ سجل Git",a5e=()=>"Leyó el historial de Git",o5e=()=>"Git इतिहास पढ़ा",c5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r5e():t==="fa"?s5e():t==="ar"?i5e():t==="es"?a5e():t==="hi"?o5e():n5e()}),l5e=()=>"Read project details",u5e=()=>"已读取项目详情",_5e=()=>"جزئیات پروژه خوانده شد",f5e=()=>"قرأ تفاصيل المشروع",d5e=()=>"Leyó los detalles del proyecto",h5e=()=>"प्रोजेक्ट विवरण पढ़ा",p5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u5e():t==="fa"?_5e():t==="ar"?f5e():t==="es"?d5e():t==="hi"?h5e():l5e()}),m5e=()=>"Reject",g5e=()=>"拒绝",v5e=()=>"رد کردن",b5e=()=>"رفض",y5e=()=>"Rechazar",x5e=()=>"अस्वीकार करें",w5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g5e():t==="fa"?v5e():t==="ar"?b5e():t==="es"?y5e():t==="hi"?x5e():m5e()}),k5e=()=>"Remove",S5e=()=>"移除",C5e=()=>"حذف",E5e=()=>"إزالة",N5e=()=>"Quitar",z5e=()=>"हटाएं",j5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S5e():t==="fa"?C5e():t==="ar"?E5e():t==="es"?N5e():t==="hi"?z5e():k5e()}),T5e=()=>"Remove annotation",A5e=()=>"移除批注",R5e=()=>"حذف یادداشت",M5e=()=>"إزالة التعليق",O5e=()=>"Quitar anotación",D5e=()=>"एनोटेशन हटाएं",L5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A5e():t==="fa"?R5e():t==="ar"?M5e():t==="es"?O5e():t==="hi"?D5e():T5e()}),I5e=()=>"Remove file",$5e=()=>"移除文件",B5e=()=>"حذف فایل",P5e=()=>"إزالة الملف",F5e=()=>"Quitar archivo",H5e=()=>"फ़ाइल हटाएं",bN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$5e():t==="fa"?B5e():t==="ar"?P5e():t==="es"?F5e():t==="hi"?H5e():I5e()}),q5e=()=>"Remove image",U5e=()=>"移除图片",G5e=()=>"حذف تصویر",V5e=()=>"إزالة الصورة",K5e=()=>"Quitar imagen",W5e=()=>"इमेज हटाएं",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U5e():t==="fa"?G5e():t==="ar"?V5e():t==="es"?K5e():t==="hi"?W5e():q5e()}),Q5e=()=>"Remove queued message",X5e=()=>"移除排队消息",Y5e=()=>"حذف پیام صف",Z5e=()=>"إزالة الرسالة من قائمة الانتظار",J5e=()=>"Quitar mensaje en cola",eke=()=>"कतार में लगा संदेश हटाएं",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X5e():t==="fa"?Y5e():t==="ar"?Z5e():t==="es"?J5e():t==="hi"?eke():Q5e()}),tke=()=>"Rename",nke=()=>"重命名",rke=()=>"تغییر نام",ske=()=>"إعادة تسمية",ike=()=>"Renombrar",ake=()=>"नाम बदलें",SD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nke():t==="fa"?rke():t==="ar"?ske():t==="es"?ike():t==="hi"?ake():tke()}),oke=()=>"Reviewed code changes",cke=()=>"已审查代码更改",lke=()=>"تغییرات کد بازبینی شد",uke=()=>"راجع تغييرات الشيفرة",_ke=()=>"Revisó cambios en el código",fke=()=>"कोड में बदलावों की समीक्षा की",dke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cke():t==="fa"?lke():t==="ar"?uke():t==="es"?_ke():t==="hi"?fke():oke()}),hke=()=>"Run",pke=()=>"运行",mke=()=>"اجرا",gke=()=>"تشغيل",vke=()=>"Ejecutar",bke=()=>"रन",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pke():t==="fa"?mke():t==="ar"?gke():t==="es"?vke():t==="hi"?bke():hke()}),yke=()=>"Selected chat text",xke=()=>"已选聊天文本",wke=()=>"متن انتخاب‌شدهٔ گفتگو",kke=()=>"النص المحدد من المحادثة",Ske=()=>"Texto seleccionado del chat",Cke=()=>"चयनित चैट टेक्स्ट",Eke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xke():t==="fa"?wke():t==="ar"?kke():t==="es"?Ske():t==="hi"?Cke():yke()}),Nke=()=>"Selected text:",zke=()=>"已选文本:",jke=()=>"متن انتخاب‌شده:",Tke=()=>"النص المحدد:",Ake=()=>"Texto seleccionado:",Rke=()=>"चयनित टेक्स्ट:",Mke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zke():t==="fa"?jke():t==="ar"?Tke():t==="es"?Ake():t==="hi"?Rke():Nke()}),Oke=()=>"Send",Dke=()=>"发送",Lke=()=>"ارسال",Ike=()=>"إرسال رسالة",$ke=()=>"Enviar",Bke=()=>"भेजें",i3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dke():t==="fa"?Lke():t==="ar"?Ike():t==="es"?$ke():t==="hi"?Bke():Oke()}),Pke=()=>"Session options",Fke=()=>"会话选项",Hke=()=>"گزینه‌های نشست",qke=()=>"خيارات الجلسة",Uke=()=>"Opciones de la sesión",Gke=()=>"सेशन विकल्प",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fke():t==="fa"?Hke():t==="ar"?qke():t==="es"?Uke():t==="hi"?Gke():Pke()}),Vke=()=>"Session title",Kke=()=>"会话标题",Wke=()=>"عنوان نشست",Qke=()=>"عنوان الجلسة",Xke=()=>"Título de la sesión",Yke=()=>"सेशन शीर्षक",Zke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kke():t==="fa"?Wke():t==="ar"?Qke():t==="es"?Xke():t==="hi"?Yke():Vke()}),Jke=()=>"Show sidebar",eSe=()=>"显示侧边栏",tSe=()=>"نمایش نوار کناری",nSe=()=>"إظهار الشريط الجانبي",rSe=()=>"Mostrar barra lateral",sSe=()=>"साइडबार दिखाएं",SN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eSe():t==="fa"?tSe():t==="ar"?nSe():t==="es"?rSe():t==="hi"?sSe():Jke()}),iSe=()=>"Started an experiment run",aSe=()=>"已启动实验运行",oSe=()=>"اجرای آزمایش آغاز شد",cSe=()=>"بدأ تشغيل تجربة",lSe=()=>"Inició una ejecución de experimento",uSe=()=>"एक प्रयोग रन शुरू किया",_Se=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aSe():t==="fa"?oSe():t==="ar"?cSe():t==="es"?lSe():t==="hi"?uSe():iSe()}),fSe=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",dSe=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",hSe=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",pSe=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",mSe=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",gSe=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",vSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dSe():t==="fa"?hSe():t==="ar"?pSe():t==="es"?mSe():t==="hi"?gSe():fSe()}),bSe=()=>"Shape a research question",ySe=()=>"明确研究问题",xSe=()=>"شکل دادن به پرسش پژوهشی",wSe=()=>"صياغة سؤال بحثي",kSe=()=>"Definir una pregunta de investigación",SSe=()=>"एक शोध प्रश्न तैयार करें",CSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ySe():t==="fa"?xSe():t==="ar"?wSe():t==="es"?kSe():t==="hi"?SSe():bSe()}),ESe=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",NSe=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",zSe=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",jSe=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",TSe=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",ASe=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",RSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NSe():t==="fa"?zSe():t==="ar"?jSe():t==="es"?TSe():t==="hi"?ASe():ESe()}),MSe=()=>"Survey related work",OSe=()=>"调研相关工作",DSe=()=>"مرور کارهای مرتبط",LSe=()=>"استعراض الأعمال ذات الصلة",ISe=()=>"Revisar trabajos relacionados",$Se=()=>"संबंधित कार्य का सर्वेक्षण करें",BSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OSe():t==="fa"?DSe():t==="ar"?LSe():t==="es"?ISe():t==="hi"?$Se():MSe()}),PSe=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",FSe=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",HSe=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",qSe=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",USe=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",GSe=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",VSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FSe():t==="fa"?HSe():t==="ar"?qSe():t==="es"?USe():t==="hi"?GSe():PSe()}),KSe=()=>"Scaffold a baseline",WSe=()=>"搭建基线",QSe=()=>"ساخت خط مبنا",XSe=()=>"بناء خط أساس",YSe=()=>"Crear un modelo de referencia",ZSe=()=>"एक बेसलाइन तैयार करें",JSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WSe():t==="fa"?QSe():t==="ar"?XSe():t==="es"?YSe():t==="hi"?ZSe():KSe()}),e6e=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",t6e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",n6e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",r6e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",s6e=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",i6e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",a6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t6e():t==="fa"?n6e():t==="ar"?r6e():t==="es"?s6e():t==="hi"?i6e():e6e()}),o6e=()=>"Run a first experiment",c6e=()=>"运行第一个实验",l6e=()=>"اجرای اولین آزمایش",u6e=()=>"تشغيل التجربة الأولى",_6e=()=>"Ejecutar un primer experimento",f6e=()=>"पहला प्रयोग चलाएं",d6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c6e():t==="fa"?l6e():t==="ar"?u6e():t==="es"?_6e():t==="hi"?f6e():o6e()}),h6e=()=>"Reading the project to suggest where to start…",p6e=()=>"正在阅读项目以建议从哪里开始…",m6e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",g6e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",v6e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",b6e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",y6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p6e():t==="fa"?m6e():t==="ar"?g6e():t==="es"?v6e():t==="hi"?b6e():h6e()}),x6e=()=>"Starter prompts",w6e=()=>"入门提示",k6e=()=>"پیشنهادهای شروع",S6e=()=>"اقتراحات للبدء",C6e=()=>"Prompts para empezar",E6e=()=>"शुरुआती प्रॉम्प्ट",N6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w6e():t==="fa"?k6e():t==="ar"?S6e():t==="es"?C6e():t==="hi"?E6e():x6e()}),z6e=()=>"Stop",j6e=()=>"停止",T6e=()=>"توقف",A6e=()=>"إيقاف",R6e=()=>"Detener",M6e=()=>"रोकें",CN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j6e():t==="fa"?T6e():t==="ar"?A6e():t==="es"?R6e():t==="hi"?M6e():z6e()}),O6e=()=>"Submit",D6e=()=>"提交",L6e=()=>"ارسال",I6e=()=>"إرسال",$6e=()=>"Enviar",B6e=()=>"सबमिट करें",P6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D6e():t==="fa"?L6e():t==="ar"?I6e():t==="es"?$6e():t==="hi"?B6e():O6e()}),F6e=()=>"Tool failed",H6e=()=>"工具失败",q6e=()=>"ابزار ناموفق بود",U6e=()=>"فشلت الأداة",G6e=()=>"Error en la herramienta",V6e=()=>"टूल विफल",K6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H6e():t==="fa"?q6e():t==="ar"?U6e():t==="es"?G6e():t==="hi"?V6e():F6e()}),W6e=()=>"Used tools",Q6e=()=>"已使用工具",X6e=()=>"ابزارها استفاده شد",Y6e=()=>"استخدم الأدوات",Z6e=()=>"Usó herramientas",J6e=()=>"टूल इस्तेमाल किए",CD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q6e():t==="fa"?X6e():t==="ar"?Y6e():t==="es"?Z6e():t==="hi"?J6e():W6e()}),eCe=()=>"View full plan",tCe=()=>"查看完整计划",nCe=()=>"مشاهدهٔ طرح کامل",rCe=()=>"عرض الخطة كاملة",sCe=()=>"Ver plan completo",iCe=()=>"पूरा प्लान देखें",aCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tCe():t==="fa"?nCe():t==="ar"?rCe():t==="es"?sCe():t==="hi"?iCe():eCe()}),oCe=()=>"Waited for an experiment run",cCe=()=>"已等待实验运行",lCe=()=>"برای اجرای آزمایش صبر شد",uCe=()=>"انتظر تشغيل تجربة",_Ce=()=>"Esperó a una ejecución de experimento",fCe=()=>"एक प्रयोग रन का इंतज़ार किया",dCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cCe():t==="fa"?lCe():t==="ar"?uCe():t==="es"?_Ce():t==="hi"?fCe():oCe()}),hCe=()=>"Waiting for your input…",pCe=()=>"正在等待你的输入…",mCe=()=>"منتظر ورودی شما…",gCe=()=>"في انتظار إدخالك…",vCe=()=>"Esperando tu respuesta…",bCe=()=>"आपके इनपुट का इंतज़ार है…",yCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pCe():t==="fa"?mCe():t==="ar"?gCe():t==="es"?vCe():t==="hi"?bCe():hCe()}),xCe=()=>"What should we research?",wCe=()=>"我们应该研究什么?",kCe=()=>"چه چیزی را پژوهش کنیم؟",SCe=()=>"ما الذي نبحثه؟",CCe=()=>"¿Qué investigamos?",ECe=()=>"हमें क्या शोध करना चाहिए?",NCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wCe():t==="fa"?kCe():t==="ar"?SCe():t==="es"?CCe():t==="hi"?ECe():xCe()}),zCe=()=>"You, mid-task",jCe=()=>"你(任务进行中)",TCe=()=>"شما، هنگام انجام وظیفه",ACe=()=>"أنت، أثناء المهمة",RCe=()=>"Tú, durante la tarea",MCe=()=>"आप, टास्क के बीच में",OCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jCe():t==="fa"?TCe():t==="ar"?ACe():t==="es"?RCe():t==="hi"?MCe():zCe()}),DCe=()=>"Pasted image",LCe=()=>"粘贴的图片",ICe=()=>"تصویر جای‌گذاری‌شده",$Ce=()=>"صورة ملصقة",BCe=()=>"Imagen pegada",PCe=()=>"पेस्ट की गई इमेज",ED=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LCe():t==="fa"?ICe():t==="ar"?$Ce():t==="es"?BCe():t==="hi"?PCe():DCe()}),FCe=()=>"Plan",HCe=()=>"计划",qCe=()=>"طرح",UCe=()=>"خطة",GCe=()=>"Plan",VCe=()=>"प्लान",ND=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HCe():t==="fa"?qCe():t==="ar"?UCe():t==="es"?GCe():t==="hi"?VCe():FCe()}),KCe=()=>"Plan mode — ready to proceed?",WCe=()=>"计划模式 — 准备好继续了吗?",QCe=()=>"حالت طرح — آماده‌اید ادامه دهید؟",XCe=()=>"وضع التخطيط — جاهز للمتابعة؟",YCe=()=>"Modo Plan — ¿listo para continuar?",ZCe=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",JCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WCe():t==="fa"?QCe():t==="ar"?XCe():t==="es"?YCe():t==="hi"?ZCe():KCe()}),e7e=()=>"Proposed plan",t7e=()=>"提议的计划",n7e=()=>"طرح پیشنهادی",r7e=()=>"خطة مقترحة",s7e=()=>"Plan propuesto",i7e=()=>"प्रस्तावित प्लान",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t7e():t==="fa"?n7e():t==="ar"?r7e():t==="es"?s7e():t==="hi"?i7e():e7e()}),a7e=()=>"Question",o7e=()=>"问题",c7e=()=>"پرسش",l7e=()=>"سؤال",u7e=()=>"Pregunta",_7e=()=>"प्रश्न",f7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o7e():t==="fa"?c7e():t==="ar"?l7e():t==="es"?u7e():t==="hi"?_7e():a7e()}),d7e=()=>"Queued",h7e=()=>"已排队",p7e=()=>"در صف",m7e=()=>"في قائمة الانتظار",g7e=()=>"En cola",v7e=()=>"कतार में",b7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h7e():t==="fa"?p7e():t==="ar"?m7e():t==="es"?g7e():t==="hi"?v7e():d7e()}),y7e=()=>"Recents",x7e=()=>"最近",w7e=()=>"اخیر",k7e=()=>"الأخيرة",S7e=()=>"Recientes",C7e=()=>"हाल की",zD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x7e():t==="fa"?w7e():t==="ar"?k7e():t==="es"?S7e():t==="hi"?C7e():y7e()}),E7e=()=>"Re-check its setup.",N7e=()=>"请重新检查其设置。",z7e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",j7e=()=>"أعد فحص إعداده.",T7e=()=>"Vuelve a comprobar su configuración.",A7e=()=>"इसका सेटअप फिर से जाँचें।",R7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N7e():t==="fa"?z7e():t==="ar"?j7e():t==="es"?T7e():t==="hi"?A7e():E7e()}),M7e=()=>"Could not recover this turn. Try again.",O7e=()=>"无法恢复本轮。请重试。",D7e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",L7e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",I7e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",$7e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",B7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O7e():t==="fa"?D7e():t==="ar"?L7e():t==="es"?I7e():t==="hi"?$7e():M7e()}),P7e=()=>"Could not remove the queued message. Try again.",F7e=()=>"无法移除排队消息。请重试。",H7e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",q7e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",U7e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",G7e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",V7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F7e():t==="fa"?H7e():t==="ar"?q7e():t==="es"?U7e():t==="hi"?G7e():P7e()}),K7e=e=>`Could not re-send: ${e==null?void 0:e.error}`,W7e=e=>`无法重新发送:${e==null?void 0:e.error}`,Q7e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,X7e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,Y7e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,Z7e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,J7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?W7e(e):t==="fa"?Q7e(e):t==="ar"?X7e(e):t==="es"?Y7e(e):t==="hi"?Z7e(e):K7e(e)}),e8e=()=>"Resolved",t8e=()=>"已处理",n8e=()=>"رسیدگی شد",r8e=()=>"مُعالَج",s8e=()=>"Resuelto",i8e=()=>"सुलझाया गया",a8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t8e():t==="fa"?n8e():t==="ar"?r8e():t==="es"?s8e():t==="hi"?i8e():e8e()}),o8e=()=>"Could not retry the queued message. Try again.",c8e=()=>"无法重试排队消息。请重试。",l8e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",u8e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",_8e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",f8e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",d8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c8e():t==="fa"?l8e():t==="ar"?u8e():t==="es"?_8e():t==="hi"?f8e():o8e()}),h8e=()=>"run logs",p8e=()=>"运行日志",m8e=()=>"گزارش‌های اجرا",g8e=()=>"سجلات التشغيل",v8e=()=>"logs de ejecución",b8e=()=>"रन लॉग",y8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p8e():t==="fa"?m8e():t==="ar"?g8e():t==="es"?v8e():t==="hi"?b8e():h8e()}),x8e=()=>"Scroll to bottom",w8e=()=>"滚动到底部",k8e=()=>"رفتن به پایین گفتگو",S8e=()=>"التمرير إلى الأسفل",C8e=()=>"Ir al final",E8e=()=>"नीचे तक स्क्रॉल करें",NN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w8e():t==="fa"?k8e():t==="ar"?S8e():t==="es"?C8e():t==="hi"?E8e():x8e()}),N8e=()=>"The selected harness is unavailable",z8e=()=>"所选智能体工具不可用",j8e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",T8e=()=>"أداة البرمجة المحددة غير متاحة",A8e=()=>"El agente seleccionado no está disponible",R8e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",Yg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z8e():t==="fa"?j8e():t==="ar"?T8e():t==="es"?A8e():t==="hi"?R8e():N8e()}),M8e=()=>"Session limit reached",O8e=()=>"已达到会话使用限额",D8e=()=>"به سقف مصرف نشست رسیده‌اید",L8e=()=>"تم بلوغ حد الاستخدام",I8e=()=>"Límite de la sesión alcanzado",$8e=()=>"सेशन सीमा पूरी हो गई",B8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O8e():t==="fa"?D8e():t==="ar"?L8e():t==="es"?I8e():t==="hi"?$8e():M8e()}),P8e=()=>"The chat session was not created",F8e=()=>"未能创建聊天会话",H8e=()=>"نشست گفت‌وگو ایجاد نشد",q8e=()=>"لم تُنشأ جلسة المحادثة",U8e=()=>"No se creó la sesión de chat",G8e=()=>"चैट सेशन नहीं बनाया गया",V8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F8e():t==="fa"?H8e():t==="ar"?q8e():t==="es"?U8e():t==="hi"?G8e():P8e()}),K8e=()=>"Show full conversation",W8e=()=>"显示完整对话",Q8e=()=>"نمایش کامل گفتگو",X8e=()=>"عرض المحادثة كاملة",Y8e=()=>"Mostrar la conversación completa",Z8e=()=>"पूरी बातचीत दिखाएं",J8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W8e():t==="fa"?Q8e():t==="ar"?X8e():t==="es"?Y8e():t==="hi"?Z8e():K8e()}),e9e=()=>" · Spawned by another agent",t9e=()=>" · 由另一个智能体创建",n9e=()=>" · ساخته‌شده به‌دست عامل دیگر",r9e=()=>" · أنشأه وكيل آخر",s9e=()=>" · Creada por otro agente",i9e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",a9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t9e():t==="fa"?n9e():t==="ar"?r9e():t==="es"?s9e():t==="hi"?i9e():e9e()}),o9e=()=>"Starting…",c9e=()=>"正在启动…",l9e=()=>"در حال شروع…",u9e=()=>"جارٍ البدء…",_9e=()=>"Iniciando…",f9e=()=>"शुरू हो रहा है…",d9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c9e():t==="fa"?l9e():t==="ar"?u9e():t==="es"?_9e():t==="hi"?f9e():o9e()}),h9e=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,p9e=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,m9e=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,g9e=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,v9e=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,b9e=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,y9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?p9e(e):t==="fa"?m9e(e):t==="ar"?g9e(e):t==="es"?v9e(e):t==="hi"?b9e(e):h9e(e)}),x9e=()=>"Could not stop the turn. Try again.",w9e=()=>"无法停止本轮。请重试。",k9e=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",S9e=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",C9e=()=>"No se pudo detener el turno. Inténtalo de nuevo.",E9e=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",N9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w9e():t==="fa"?k9e():t==="ar"?S9e():t==="es"?C9e():t==="hi"?E9e():x9e()}),z9e=e=>`Could not switch fork: ${e==null?void 0:e.error}`,j9e=e=>`无法切换分支:${e==null?void 0:e.error}`,T9e=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,A9e=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,R9e=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,M9e=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,O9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j9e(e):t==="fa"?T9e(e):t==="ar"?A9e(e):t==="es"?R9e(e):t==="hi"?M9e(e):z9e(e)}),D9e=()=>"The agent",L9e=()=>"智能体",I9e=()=>"عامل",$9e=()=>"الوكيل",B9e=()=>"El agente",P9e=()=>"एजेंट",F9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L9e():t==="fa"?I9e():t==="ar"?$9e():t==="es"?B9e():t==="hi"?P9e():D9e()}),H9e=()=>"Thinking",q9e=()=>"正在思考",U9e=()=>"در حال فکر کردن",G9e=()=>"جارٍ التفكير",V9e=()=>"Pensando",K9e=()=>"सोच रहा है",W9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q9e():t==="fa"?U9e():t==="ar"?G9e():t==="es"?V9e():t==="hi"?K9e():H9e()}),Q9e=()=>"Could not toggle Plan mode. Try again.",X9e=()=>"无法切换计划模式。请重试。",Y9e=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",Z9e=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",J9e=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",eEe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X9e():t==="fa"?Y9e():t==="ar"?Z9e():t==="es"?J9e():t==="hi"?eEe():Q9e()}),tEe=()=>"This turn did not finish.",nEe=()=>"本轮未完成。",rEe=()=>"این نوبت کامل نشد.",sEe=()=>"لم تكتمل هذه الجولة.",iEe=()=>"Este turno no terminó.",aEe=()=>"यह टर्न पूरा नहीं हुआ।",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nEe():t==="fa"?rEe():t==="ar"?sEe():t==="es"?iEe():t==="hi"?aEe():tEe()}),oEe=()=>"Type a custom answer…",cEe=()=>"输入自定义回答…",lEe=()=>"پاسخ دلخواه را بنویسید…",uEe=()=>"اكتب إجابة مخصصة…",_Ee=()=>"Escribe una respuesta personalizada…",fEe=()=>"अपना जवाब टाइप करें…",dEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cEe():t==="fa"?lEe():t==="ar"?uEe():t==="es"?_Ee():t==="hi"?fEe():oEe()}),hEe=()=>"Unarchive",pEe=()=>"取消归档",mEe=()=>"خارج کردن از بایگانی",gEe=()=>"إلغاء الأرشفة",vEe=()=>"Desarchivar",bEe=()=>"आर्काइव से निकालें",yEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pEe():t==="fa"?mEe():t==="ar"?gEe():t==="es"?vEe():t==="hi"?bEe():hEe()}),xEe=()=>"Untitled",wEe=()=>"未命名",kEe=()=>"بدون عنوان",SEe=()=>"بدون عنوان",CEe=()=>"Sin título",EEe=()=>"बिना शीर्षक",vd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wEe():t==="fa"?kEe():t==="ar"?SEe():t==="es"?CEe():t==="hi"?EEe():xEe()}),NEe=()=>"Could not update permissions. Try again.",zEe=()=>"无法更新权限。请重试。",jEe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",TEe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",AEe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",REe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",MEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zEe():t==="fa"?jEe():t==="ar"?TEe():t==="es"?AEe():t==="hi"?REe():NEe()}),OEe=()=>"Work details",DEe=()=>"工作详情",LEe=()=>"جزئیات کار",IEe=()=>"تفاصيل العمل",$Ee=()=>"Detalles del trabajo",BEe=()=>"काम का विवरण",PEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DEe():t==="fa"?LEe():t==="ar"?IEe():t==="es"?$Ee():t==="hi"?BEe():OEe()}),FEe=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,HEe=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,qEe=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,UEe=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,GEe=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,VEe=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,KEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HEe(e):t==="fa"?qEe(e):t==="ar"?UEe(e):t==="es"?GEe(e):t==="hi"?VEe(e):FEe(e)}),WEe=e=>`Worked for ${e==null?void 0:e.duration}`,QEe=e=>`已工作 ${e==null?void 0:e.duration}`,XEe=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,YEe=e=>`عمل لمدة ${e==null?void 0:e.duration}`,ZEe=e=>`Trabajó durante ${e==null?void 0:e.duration}`,JEe=e=>`${e==null?void 0:e.duration} तक काम किया`,eNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QEe(e):t==="fa"?XEe(e):t==="ar"?YEe(e):t==="es"?ZEe(e):t==="hi"?JEe(e):WEe(e)}),tNe=()=>"Working…",nNe=()=>"正在工作…",rNe=()=>"در حال کار…",sNe=()=>"جارٍ العمل…",iNe=()=>"Trabajando…",aNe=()=>"काम हो रहा है…",Hk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nNe():t==="fa"?rNe():t==="ar"?sNe():t==="es"?iNe():t==="hi"?aNe():tNe()}),oNe=()=>"Close tab",cNe=()=>"关闭标签页",lNe=()=>"بستن زبانه",uNe=()=>"إغلاق التبويب",_Ne=()=>"Cerrar pestaña",fNe=()=>"टैब बंद करें",dNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cNe():t==="fa"?lNe():t==="ar"?uNe():t==="es"?_Ne():t==="hi"?fNe():oNe()}),hNe=()=>"Changes",pNe=()=>"更改",mNe=()=>"تغییرات",gNe=()=>"التغييرات",vNe=()=>"Cambios",bNe=()=>"बदलाव",jD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pNe():t==="fa"?mNe():t==="ar"?gNe():t==="es"?vNe():t==="hi"?bNe():hNe()}),yNe=()=>"Code browser view",xNe=()=>"代码浏览器视图",wNe=()=>"نمای مرورگر کد",kNe=()=>"عرض متصفح الشيفرة",SNe=()=>"Vista del explorador de código",CNe=()=>"कोड ब्राउज़र व्यू",ENe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xNe():t==="fa"?wNe():t==="ar"?kNe():t==="es"?SNe():t==="hi"?CNe():yNe()}),NNe=()=>"Files",zNe=()=>"文件",jNe=()=>"فایل‌ها",TNe=()=>"الملفات",ANe=()=>"Archivos",RNe=()=>"फ़ाइलें",MNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zNe():t==="fa"?jNe():t==="ar"?TNe():t==="es"?ANe():t==="hi"?RNe():NNe()}),ONe=()=>"Refresh",DNe=()=>"刷新",LNe=()=>"تازه‌سازی",INe=()=>"تحديث",$Ne=()=>"Actualizar",BNe=()=>"रीफ़्रेश करें",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DNe():t==="fa"?LNe():t==="ar"?INe():t==="es"?$Ne():t==="hi"?BNe():ONe()}),PNe=()=>"listing truncated",FNe=()=>"列表已截断",HNe=()=>"فهرست کوتاه شده است",qNe=()=>"القائمة مقتطعة",UNe=()=>"listado truncado",GNe=()=>"सूची छोटी की गई",VNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FNe():t==="fa"?HNe():t==="ar"?qNe():t==="es"?UNe():t==="hi"?GNe():PNe()}),KNe=()=>"No files.",WNe=()=>"没有文件。",QNe=()=>"فایلی وجود ندارد.",XNe=()=>"لا توجد ملفات.",YNe=()=>"No hay archivos.",ZNe=()=>"कोई फ़ाइल नहीं।",JNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WNe():t==="fa"?QNe():t==="ar"?XNe():t==="es"?YNe():t==="hi"?ZNe():KNe()}),eze=()=>"Refresh failed:",tze=()=>"刷新失败:",nze=()=>"تازه‌سازی ناموفق بود:",rze=()=>"فشل التحديث:",sze=()=>"Error al actualizar:",ize=()=>"रीफ़्रेश विफल:",aze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tze():t==="fa"?nze():t==="ar"?rze():t==="es"?sze():t==="hi"?ize():eze()}),oze=()=>"Cancelling…",cze=()=>"正在取消…",lze=()=>"در حال لغو…",uze=()=>"جارٍ الإلغاء…",_ze=()=>"Cancelando…",fze=()=>"रद्द हो रहा है…",dze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cze():t==="fa"?lze():t==="ar"?uze():t==="es"?_ze():t==="hi"?fze():oze()}),hze=()=>"Checking…",pze=()=>"正在检查…",mze=()=>"در حال بررسی…",gze=()=>"جارٍ التحقق…",vze=()=>"Comprobando…",bze=()=>"जाँचा जा रहा है…",ta=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pze():t==="fa"?mze():t==="ar"?gze():t==="es"?vze():t==="hi"?bze():hze()}),yze=()=>"Copied",xze=()=>"已复制",wze=()=>"کپی شد",kze=()=>"تم النسخ",Sze=()=>"Copiado",Cze=()=>"कॉपी हो गया",j0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xze():t==="fa"?wze():t==="ar"?kze():t==="es"?Sze():t==="hi"?Cze():yze()}),Eze=e=>`Failed to load: ${e==null?void 0:e.error}`,Nze=e=>`加载失败:${e==null?void 0:e.error}`,zze=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,jze=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,Tze=e=>`Error al cargar: ${e==null?void 0:e.error}`,Aze=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,qk=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nze(e):t==="fa"?zze(e):t==="ar"?jze(e):t==="es"?Tze(e):t==="hi"?Aze(e):Eze(e)}),Rze=()=>"Loading…",Mze=()=>"正在加载…",Oze=()=>"در حال بارگیری…",Dze=()=>"جارٍ التحميل…",Lze=()=>"Cargando…",Ize=()=>"लोड हो रहा है…",Uk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mze():t==="fa"?Oze():t==="ar"?Dze():t==="es"?Lze():t==="hi"?Ize():Rze()}),$ze=e=>`+ ${e==null?void 0:e.count} more`,Bze=e=>`另有 ${e==null?void 0:e.count} 项`,Pze=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Fze=e=>`المزيد (+${e==null?void 0:e.count})`,Hze=e=>`+ ${e==null?void 0:e.count} más`,qze=e=>`+ ${e==null?void 0:e.count} और`,Uze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bze(e):t==="fa"?Pze(e):t==="ar"?Fze(e):t==="es"?Hze(e):t==="hi"?qze(e):$ze(e)}),Gze=()=>"Rendered view",Vze=()=>"渲染视图",Kze=()=>"نمای رندرشده",Wze=()=>"العرض المُنسَّق",Qze=()=>"Vista renderizada",Xze=()=>"रेंडर किया गया व्यू",Cv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vze():t==="fa"?Kze():t==="ar"?Wze():t==="es"?Qze():t==="hi"?Xze():Gze()}),Yze=()=>"Save",Zze=()=>"保存",Jze=()=>"ذخیره",eje=()=>"حفظ",tje=()=>"Guardar",nje=()=>"सेव करें",nc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zze():t==="fa"?Jze():t==="ar"?eje():t==="es"?tje():t==="hi"?nje():Yze()}),rje=()=>"Saving…",sje=()=>"正在保存…",ije=()=>"در حال ذخیره…",aje=()=>"جارٍ الحفظ…",oje=()=>"Guardando…",cje=()=>"सेव हो रहा है…",ia=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sje():t==="fa"?ije():t==="ar"?aje():t==="es"?oje():t==="hi"?cje():rje()}),lje=()=>"Show less",uje=()=>"收起",_je=()=>"نمایش کمتر",fje=()=>"عرض أقل",dje=()=>"Mostrar menos",hje=()=>"कम दिखाएं",TD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uje():t==="fa"?_je():t==="ar"?fje():t==="es"?dje():t==="hi"?hje():lje()}),pje=()=>"Show more",mje=()=>"展开",gje=()=>"نمایش بیشتر",vje=()=>"عرض المزيد",bje=()=>"Mostrar más",yje=()=>"और दिखाएं",xje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mje():t==="fa"?gje():t==="ar"?vje():t==="es"?bje():t==="hi"?yje():pje()}),wje=()=>"Stop",kje=()=>"停止",Sje=()=>"توقف",Cje=()=>"إيقاف",Eje=()=>"Detener",Nje=()=>"रोकें",AD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kje():t==="fa"?Sje():t==="ar"?Cje():t==="es"?Eje():t==="hi"?Nje():wje()}),zje=()=>"Stopping…",jje=()=>"正在停止…",Tje=()=>"در حال توقف…",Aje=()=>"جارٍ الإيقاف…",Rje=()=>"Deteniendo…",Mje=()=>"रोका जा रहा है…",Oje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jje():t==="fa"?Tje():t==="ar"?Aje():t==="es"?Rje():t==="hi"?Mje():zje()}),Dje=()=>"View source",Lje=()=>"查看源代码",Ije=()=>"نمایش متن منبع",$je=()=>"عرض المصدر",Bje=()=>"Ver código fuente",Pje=()=>"स्रोत देखें",Cd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lje():t==="fa"?Ije():t==="ar"?$je():t==="es"?Bje():t==="hi"?Pje():Dje()}),Fje=()=>"Shorten this chat's context",Hje=()=>"压缩此聊天的上下文",qje=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",Uje=()=>"اختصار سياق هذه المحادثة",Gje=()=>"Comprime el contexto de este chat",Vje=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",Kje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hje():t==="fa"?qje():t==="ar"?Uje():t==="es"?Gje():t==="hi"?Vje():Fje()}),Wje=()=>"Runs as a remote Hugging Face Job",Qje=()=>"作为远程 Hugging Face Job 运行",Xje=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",Yje=()=>"يعمل كمهمة Hugging Face بعيدة",Zje=()=>"Se ejecuta como un Job remoto de Hugging Face",Jje=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",eTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qje():t==="fa"?Xje():t==="ar"?Yje():t==="es"?Zje():t==="hi"?Jje():Wje()}),tTe=()=>"Runs as a Job on your Kubernetes cluster",nTe=()=>"作为 Kubernetes 集群上的 Job 运行",rTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",sTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",iTe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",aTe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",oTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nTe():t==="fa"?rTe():t==="ar"?sTe():t==="es"?iTe():t==="hi"?aTe():tTe()}),cTe=()=>"Runs directly on this computer",lTe=()=>"直接在此计算机上运行",uTe=()=>"مستقیماً روی این رایانه اجرا می‌شود",_Te=()=>"يعمل مباشرة على هذا الحاسوب",fTe=()=>"Se ejecuta directamente en este equipo",dTe=()=>"सीधे इस कंप्यूटर पर चलता है",hTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lTe():t==="fa"?uTe():t==="ar"?_Te():t==="es"?fTe():t==="hi"?dTe():cTe()}),pTe=()=>"Runs in a remote Modal sandbox",mTe=()=>"在远程 Modal 沙箱中运行",gTe=()=>"در sandbox دوردست Modal اجرا می‌شود",vTe=()=>"يعمل في بيئة Modal معزولة عن بُعد",bTe=()=>"Se ejecuta en un sandbox remoto de Modal",yTe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",xTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mTe():t==="fa"?gTe():t==="ar"?vTe():t==="es"?bTe():t==="hi"?yTe():pTe()}),wTe=()=>"Runs on an ephemeral OpenResearch box",kTe=()=>"在临时 OpenResearch 主机上运行",STe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",CTe=()=>"يعمل على صندوق OpenResearch مؤقت",ETe=()=>"Se ejecuta en una máquina efímera de OpenResearch",NTe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",zTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kTe():t==="fa"?STe():t==="ar"?CTe():t==="es"?ETe():t==="hi"?NTe():wTe()}),jTe=()=>"Runs on the connected Ray cluster",TTe=()=>"在已连接的 Ray 集群上运行",ATe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",RTe=()=>"يعمل على عنقود Ray المتصل",MTe=()=>"Se ejecuta en el clúster de Ray conectado",OTe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",DTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TTe():t==="fa"?ATe():t==="ar"?RTe():t==="es"?MTe():t==="hi"?OTe():jTe()}),LTe=()=>"Runs as a scheduled job on your Slurm cluster",ITe=()=>"作为 Slurm 集群上的调度作业运行",$Te=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",BTe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",PTe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",FTe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",HTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ITe():t==="fa"?$Te():t==="ar"?BTe():t==="es"?PTe():t==="hi"?FTe():LTe()}),qTe=()=>"Runs on a host from your SSH config",UTe=()=>"在 SSH 配置中的主机上运行",GTe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",VTe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",KTe=()=>"Se ejecuta en un host de tu configuración SSH",WTe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",QTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UTe():t==="fa"?GTe():t==="ar"?VTe():t==="es"?KTe():t==="hi"?WTe():qTe()}),XTe=()=>"Runs through Tinker’s remote compute",YTe=()=>"通过 Tinker 远程算力运行",ZTe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",JTe=()=>"يعمل عبر حوسبة Tinker البعيدة",eAe=()=>"Se ejecuta en el cómputo remoto de Tinker",tAe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",nAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTe():t==="fa"?ZTe():t==="ar"?JTe():t==="es"?eAe():t==="hi"?tAe():XTe()}),rAe=()=>"HF Jobs",sAe=()=>"HF Jobs",iAe=()=>"HF Jobs",aAe=()=>"HF Jobs",oAe=()=>"HF Jobs",cAe=()=>"HF Jobs",lAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sAe():t==="fa"?iAe():t==="ar"?aAe():t==="es"?oAe():t==="hi"?cAe():rAe()}),uAe=()=>"Kubernetes",_Ae=()=>"Kubernetes",fAe=()=>"Kubernetes",dAe=()=>"Kubernetes",hAe=()=>"Kubernetes",pAe=()=>"Kubernetes",mAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ae():t==="fa"?fAe():t==="ar"?dAe():t==="es"?hAe():t==="hi"?pAe():uAe()}),gAe=()=>"This machine",vAe=()=>"此计算机",bAe=()=>"این رایانه",yAe=()=>"هذا الجهاز",xAe=()=>"Este equipo",wAe=()=>"यह मशीन",RD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vAe():t==="fa"?bAe():t==="ar"?yAe():t==="es"?xAe():t==="hi"?wAe():gAe()}),kAe=()=>"Modal",SAe=()=>"Modal",CAe=()=>"Modal",EAe=()=>"Modal",NAe=()=>"Modal",zAe=()=>"Modal",jAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SAe():t==="fa"?CAe():t==="ar"?EAe():t==="es"?NAe():t==="hi"?zAe():kAe()}),TAe=()=>"OpenResearch",AAe=()=>"OpenResearch",RAe=()=>"OpenResearch",MAe=()=>"OpenResearch",OAe=()=>"OpenResearch",DAe=()=>"OpenResearch",LAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AAe():t==="fa"?RAe():t==="ar"?MAe():t==="es"?OAe():t==="hi"?DAe():TAe()}),IAe=()=>"Ray",$Ae=()=>"Ray",BAe=()=>"Ray",PAe=()=>"Ray",FAe=()=>"Ray",HAe=()=>"Ray",qAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ae():t==="fa"?BAe():t==="ar"?PAe():t==="es"?FAe():t==="hi"?HAe():IAe()}),UAe=()=>"Slurm",GAe=()=>"Slurm",VAe=()=>"Slurm",KAe=()=>"Slurm",WAe=()=>"Slurm",QAe=()=>"Slurm",XAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GAe():t==="fa"?VAe():t==="ar"?KAe():t==="es"?WAe():t==="hi"?QAe():UAe()}),YAe=()=>"SSH",ZAe=()=>"SSH",JAe=()=>"SSH",eRe=()=>"SSH",tRe=()=>"SSH",nRe=()=>"SSH",rRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZAe():t==="fa"?JAe():t==="ar"?eRe():t==="es"?tRe():t==="hi"?nRe():YAe()}),sRe=()=>"Tinker",iRe=()=>"Tinker",aRe=()=>"Tinker",oRe=()=>"Tinker",cRe=()=>"Tinker",lRe=()=>"Tinker",uRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iRe():t==="fa"?aRe():t==="ar"?oRe():t==="es"?cRe():t==="hi"?lRe():sRe()}),_Re=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",fRe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",dRe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",hRe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",pRe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",mRe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",gRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fRe():t==="fa"?dRe():t==="ar"?hRe():t==="es"?pRe():t==="hi"?mRe():_Re()}),vRe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",bRe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",yRe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",xRe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",wRe=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",kRe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",SRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bRe():t==="fa"?yRe():t==="ar"?xRe():t==="es"?wRe():t==="hi"?kRe():vRe()}),CRe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",ERe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",NRe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",zRe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",jRe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",TRe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",ARe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ERe():t==="fa"?NRe():t==="ar"?zRe():t==="es"?jRe():t==="hi"?TRe():CRe()}),RRe=()=>"This computer must stay awake and online while Tinker runs.",MRe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",ORe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",DRe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",LRe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",IRe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",$Re=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MRe():t==="fa"?ORe():t==="ar"?DRe():t==="es"?LRe():t==="hi"?IRe():RRe()}),BRe=()=>"Context window",PRe=()=>"上下文窗口",FRe=()=>"پنجرهٔ زمینه",HRe=()=>"نافذة السياق",qRe=()=>"Ventana de contexto",URe=()=>"कॉन्टेक्स्ट विंडो",GRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PRe():t==="fa"?FRe():t==="ar"?HRe():t==="es"?qRe():t==="hi"?URe():BRe()}),VRe=()=>"Context window used",KRe=()=>"已使用的上下文窗口",WRe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",QRe=()=>"المستخدَم من نافذة السياق",XRe=()=>"Ventana de contexto usada",YRe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",ZRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KRe():t==="fa"?WRe():t==="ar"?QRe():t==="es"?XRe():t==="hi"?YRe():VRe()}),JRe=e=>`${e==null?void 0:e.value} tokens`,eMe=e=>`${e==null?void 0:e.value} 个 token`,tMe=e=>`${e==null?void 0:e.value} توکن`,nMe=e=>`${e==null?void 0:e.value} رمز`,rMe=e=>`${e==null?void 0:e.value} tokens`,sMe=e=>`${e==null?void 0:e.value} टोकन`,iMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eMe(e):t==="fa"?tMe(e):t==="ar"?nMe(e):t==="es"?rMe(e):t==="hi"?sMe(e):JRe(e)}),aMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,oMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,cMe=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})`,uMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,_Me=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,fMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oMe(e):t==="fa"?cMe(e):t==="ar"?lMe(e):t==="es"?uMe(e):t==="hi"?_Me(e):aMe(e)}),dMe=()=>"Copy the last response",hMe=()=>"复制最新回复",pMe=()=>"کپی آخرین پاسخ",mMe=()=>"نسخ آخر رد",gMe=()=>"Copia la última respuesta",vMe=()=>"आखिरी जवाब कॉपी करें",bMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hMe():t==="fa"?pMe():t==="ar"?mMe():t==="es"?gMe():t==="hi"?vMe():dMe()}),yMe=()=>"No runs yet — ask the agent to launch one.",xMe=()=>"尚无运行——让智能体启动一个。",wMe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",kMe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",SMe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",CMe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",EMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xMe():t==="fa"?wMe():t==="ar"?kMe():t==="es"?SMe():t==="hi"?CMe():yMe()}),NMe=()=>"Run",zMe=()=>"运行",jMe=()=>"اجرا",TMe=()=>"تشغيل",AMe=()=>"Ejecución",RMe=()=>"रन",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zMe():t==="fa"?jMe():t==="ar"?TMe():t==="es"?AMe():t==="hi"?RMe():NMe()}),MMe=()=>"Switch run",OMe=()=>"切换运行",DMe=()=>"تغییر اجرا",LMe=()=>"تبديل التشغيل",IMe=()=>"Cambiar de ejecución",$Me=()=>"रन बदलें",BMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OMe():t==="fa"?DMe():t==="ar"?LMe():t==="es"?IMe():t==="hi"?$Me():MMe()}),PMe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,FMe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,HMe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,qMe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,UMe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,GMe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,VMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FMe(e):t==="fa"?HMe(e):t==="ar"?qMe(e):t==="es"?UMe(e):t==="hi"?GMe(e):PMe(e)}),KMe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,WMe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,QMe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,XMe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,YMe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,ZMe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,JMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WMe(e):t==="fa"?QMe(e):t==="ar"?XMe(e):t==="es"?YMe(e):t==="hi"?ZMe(e):KMe(e)}),eOe=e=>`${e==null?void 0:e.value}m`,tOe=e=>`${e==null?void 0:e.value} 分钟`,nOe=e=>`${e==null?void 0:e.value} دقیقه`,rOe=e=>`${e==null?void 0:e.value}د`,sOe=e=>`${e==null?void 0:e.value} min`,iOe=e=>`${e==null?void 0:e.value}मि`,aOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tOe(e):t==="fa"?nOe(e):t==="ar"?rOe(e):t==="es"?sOe(e):t==="hi"?iOe(e):eOe(e)}),oOe=e=>`${e==null?void 0:e.value}s`,cOe=e=>`${e==null?void 0:e.value} 秒`,lOe=e=>`${e==null?void 0:e.value} ثانیه`,uOe=e=>`${e==null?void 0:e.value}ث`,_Oe=e=>`${e==null?void 0:e.value} s`,fOe=e=>`${e==null?void 0:e.value}से`,dOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cOe(e):t==="fa"?lOe(e):t==="ar"?uOe(e):t==="es"?_Oe(e):t==="hi"?fOe(e):oOe(e)}),hOe=()=>"Code",pOe=()=>"代码",mOe=()=>"کد",gOe=()=>"الشيفرة",vOe=()=>"Código",bOe=()=>"कोड",yOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pOe():t==="fa"?mOe():t==="ar"?gOe():t==="es"?vOe():t==="hi"?bOe():hOe()}),xOe=()=>"created",wOe=()=>"创建于",kOe=()=>"ایجادشده",SOe=()=>"أُنشئ",COe=()=>"creado",EOe=()=>"बनाया गया",NOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wOe():t==="fa"?kOe():t==="ar"?SOe():t==="es"?COe():t==="hi"?EOe():xOe()}),zOe=()=>"from",jOe=()=>"来自",TOe=()=>"از",AOe=()=>"من",ROe=()=>"desde",MOe=()=>"से",OOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jOe():t==="fa"?TOe():t==="ar"?AOe():t==="es"?ROe():t==="hi"?MOe():zOe()}),DOe=()=>"Logs",LOe=()=>"日志",IOe=()=>"گزارش‌ها",$Oe=()=>"السجلات",BOe=()=>"Logs",POe=()=>"लॉग",FOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LOe():t==="fa"?IOe():t==="ar"?$Oe():t==="es"?BOe():t==="hi"?POe():DOe()}),HOe=()=>"Latest run",qOe=()=>"最新运行",UOe=()=>"آخرین اجرا",GOe=()=>"أحدث تشغيل",VOe=()=>"Última ejecución",KOe=()=>"नवीनतम रन",WOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qOe():t==="fa"?UOe():t==="ar"?GOe():t==="es"?VOe():t==="hi"?KOe():HOe()}),QOe=()=>"Code",XOe=()=>"代码",YOe=()=>"کد",ZOe=()=>"الشيفرة",JOe=()=>"Código",eDe=()=>"कोड",tDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XOe():t==="fa"?YOe():t==="ar"?ZOe():t==="es"?JOe():t==="hi"?eDe():QOe()}),nDe=()=>"Commit",rDe=()=>"提交",sDe=()=>"کامیت",iDe=()=>"إيداع",aDe=()=>"Commit",oDe=()=>"कमिट",cDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rDe():t==="fa"?sDe():t==="ar"?iDe():t==="es"?aDe():t==="hi"?oDe():nDe()}),lDe=()=>"created",uDe=()=>"创建于",_De=()=>"ایجادشده",fDe=()=>"أُنشئ",dDe=()=>"creado",hDe=()=>"बनाया गया",pDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uDe():t==="fa"?_De():t==="ar"?fDe():t==="es"?dDe():t==="hi"?hDe():lDe()}),mDe=()=>"Description",gDe=()=>"说明",vDe=()=>"توضیحات",bDe=()=>"الوصف",yDe=()=>"Descripción",xDe=()=>"विवरण",wDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gDe():t==="fa"?vDe():t==="ar"?bDe():t==="es"?yDe():t==="hi"?xDe():mDe()}),kDe=()=>"Duration",SDe=()=>"时长",CDe=()=>"مدت",EDe=()=>"المدة",NDe=()=>"Duración",zDe=()=>"अवधि",jDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SDe():t==="fa"?CDe():t==="ar"?EDe():t==="es"?NDe():t==="hi"?zDe():kDe()}),TDe=()=>"exit",ADe=()=>"退出码",RDe=()=>"خروج",MDe=()=>"رمز الخروج",ODe=()=>"salida",DDe=()=>"एग्ज़िट",LDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ADe():t==="fa"?RDe():t==="ar"?MDe():t==="es"?ODe():t==="hi"?DDe():TDe()}),IDe=()=>"from",$De=()=>"来自",BDe=()=>"از",PDe=()=>"من",FDe=()=>"desde",HDe=()=>"से",qDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$De():t==="fa"?BDe():t==="ar"?PDe():t==="es"?FDe():t==="hi"?HDe():IDe()}),UDe=()=>"Logs",GDe=()=>"日志",VDe=()=>"گزارش‌ها",KDe=()=>"السجلات",WDe=()=>"Logs",QDe=()=>"लॉग",XDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GDe():t==="fa"?VDe():t==="ar"?KDe():t==="es"?WDe():t==="hi"?QDe():UDe()}),YDe=()=>"Run",ZDe=()=>"运行",JDe=()=>"اجرا",eLe=()=>"تشغيل",tLe=()=>"Ejecución",nLe=()=>"रन",rLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZDe():t==="fa"?JDe():t==="ar"?eLe():t==="es"?tLe():t==="hi"?nLe():YDe()}),sLe=()=>"Run history",iLe=()=>"运行历史",aLe=()=>"تاریخچهٔ اجرا",oLe=()=>"سجل التشغيل",cLe=()=>"Historial de ejecuciones",lLe=()=>"रन इतिहास",uLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iLe():t==="fa"?aLe():t==="ar"?oLe():t==="es"?cLe():t==="hi"?lLe():sLe()}),_Le=()=>"Started",fLe=()=>"开始时间",dLe=()=>"آغاز",hLe=()=>"بدأ",pLe=()=>"Inicio",mLe=()=>"शुरू हुआ",gLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fLe():t==="fa"?dLe():t==="ar"?hLe():t==="es"?pLe():t==="hi"?mLe():_Le()}),vLe=()=>"Runs",bLe=()=>"运行",yLe=()=>"اجراها",xLe=()=>"عمليات التشغيل",wLe=()=>"Ejecuciones",kLe=()=>"रन",SLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bLe():t==="fa"?yLe():t==="ar"?xLe():t==="es"?wLe():t==="hi"?kLe():vLe()}),CLe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",ELe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",NLe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",zLe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",jLe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",TLe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",ALe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ELe():t==="fa"?NLe():t==="ar"?zLe():t==="es"?jLe():t==="hi"?TLe():CLe()}),RLe=()=>"No runs yet",MLe=()=>"还没有运行",OLe=()=>"هنوز اجرایی وجود ندارد",DLe=()=>"لا عمليات تشغيل بعد",LLe=()=>"Aún no hay ejecuciones",ILe=()=>"अभी तक कोई रन नहीं",$Le=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MLe():t==="fa"?OLe():t==="ar"?DLe():t==="es"?LLe():t==="hi"?ILe():RLe()}),BLe=()=>"No experiments yet.",PLe=()=>"还没有实验。",FLe=()=>"هنوز آزمایشی وجود ندارد.",HLe=()=>"لا توجد تجارب بعد.",qLe=()=>"Aún no hay experimentos.",ULe=()=>"अभी तक कोई प्रयोग नहीं।",GLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PLe():t==="fa"?FLe():t==="ar"?HLe():t==="es"?qLe():t==="hi"?ULe():BLe()}),VLe=()=>"Not run yet",KLe=()=>"尚未运行",WLe=()=>"هنوز اجرا نشده",QLe=()=>"لم تُشغَّل بعد",XLe=()=>"Aún sin ejecutar",YLe=()=>"अभी तक नहीं चलाया गया",ZLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KLe():t==="fa"?WLe():t==="ar"?QLe():t==="es"?XLe():t==="hi"?YLe():VLe()}),JLe=()=>"1 run",eIe=()=>"1 次运行",tIe=()=>"۱ اجرا",nIe=()=>"تشغيل واحد",rIe=()=>"1 ejecución",sIe=()=>"1 रन",iIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eIe():t==="fa"?tIe():t==="ar"?nIe():t==="es"?rIe():t==="hi"?sIe():JLe()}),aIe=()=>"Open logs",oIe=()=>"打开日志",cIe=()=>"باز کردن گزارش‌ها",lIe=()=>"فتح السجلات",uIe=()=>"Abrir logs",_Ie=()=>"लॉग खोलें",fIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oIe():t==="fa"?cIe():t==="ar"?lIe():t==="es"?uIe():t==="hi"?_Ie():aIe()}),dIe=e=>`${e==null?void 0:e.count} runs`,hIe=e=>`${e==null?void 0:e.count} 次运行`,pIe=e=>`${e==null?void 0:e.count} اجرا`,mIe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,gIe=e=>`${e==null?void 0:e.count} ejecuciones`,vIe=e=>`${e==null?void 0:e.count} रन`,bIe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hIe(e):t==="fa"?pIe(e):t==="ar"?mIe(e):t==="es"?gIe(e):t==="hi"?vIe(e):dIe(e)}),yIe=()=>"Stop requested",xIe=()=>"已请求停止",wIe=()=>"درخواست توقف ثبت شد",kIe=()=>"طُلب الإيقاف",SIe=()=>"Detención solicitada",CIe=()=>"रोकने का अनुरोध किया गया",EIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xIe():t==="fa"?wIe():t==="ar"?kIe():t==="es"?SIe():t==="hi"?CIe():yIe()}),NIe=()=>"Stop run",zIe=()=>"停止运行",jIe=()=>"توقف اجرا",TIe=()=>"إيقاف التشغيل",AIe=()=>"Detener ejecución",RIe=()=>"रन रोकें",MIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zIe():t==="fa"?jIe():t==="ar"?TIe():t==="es"?AIe():t==="hi"?RIe():NIe()}),OIe=()=>"Code",DIe=()=>"代码",LIe=()=>"کد",IIe=()=>"الشيفرة",$Ie=()=>"Código",BIe=()=>"कोड",PIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DIe():t==="fa"?LIe():t==="ar"?IIe():t==="es"?$Ie():t==="hi"?BIe():OIe()}),FIe=()=>"Experiments",HIe=()=>"实验",qIe=()=>"آزمایش‌ها",UIe=()=>"التجارب",GIe=()=>"Experimentos",VIe=()=>"प्रयोग",KIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HIe():t==="fa"?qIe():t==="ar"?UIe():t==="es"?GIe():t==="hi"?VIe():FIe()}),WIe=()=>"Logs",QIe=()=>"日志",XIe=()=>"گزارش‌ها",YIe=()=>"السجلات",ZIe=()=>"Logs",JIe=()=>"लॉग",a3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QIe():t==="fa"?XIe():t==="ar"?YIe():t==="es"?ZIe():t==="hi"?JIe():WIe()}),e$e=()=>"Stop failed:",t$e=()=>"停止失败:",n$e=()=>"توقف ناموفق بود:",r$e=()=>"فشل الإيقاف:",s$e=()=>"Error al detener:",i$e=()=>"रोकना विफल:",a$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t$e():t==="fa"?n$e():t==="ar"?r$e():t==="es"?s$e():t==="hi"?i$e():e$e()}),o$e=()=>"Download this chat as Markdown",c$e=()=>"将此聊天下载为 Markdown",l$e=()=>"دانلود این گفت‌وگو به‌صورت Markdown",u$e=()=>"تنزيل هذه المحادثة بتنسيق Markdown",_$e=()=>"Descarga este chat en Markdown",f$e=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",d$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c$e():t==="fa"?l$e():t==="ar"?u$e():t==="es"?_$e():t==="hi"?f$e():o$e()}),h$e=()=>"Clipboard access is unavailable.",p$e=()=>"无法访问剪贴板。",m$e=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",g$e=()=>"الوصول إلى الحافظة غير متاح.",v$e=()=>"El acceso al portapapeles no está disponible.",b$e=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",MD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p$e():t==="fa"?m$e():t==="ar"?g$e():t==="es"?v$e():t==="hi"?b$e():h$e()}),y$e=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,x$e=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,w$e=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,k$e=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,S$e=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,C$e=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,E$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?x$e(e):t==="fa"?w$e(e):t==="ar"?k$e(e):t==="es"?S$e(e):t==="hi"?C$e(e):y$e(e)}),N$e=()=>"Duplicate",z$e=()=>"创建副本",j$e=()=>"ایجاد نسخهٔ تکراری",T$e=()=>"تكرار",A$e=()=>"Duplicar",R$e=()=>"डुप्लिकेट करें",M$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z$e():t==="fa"?j$e():t==="ar"?T$e():t==="es"?A$e():t==="hi"?R$e():N$e()}),O$e=e=>`File actions for ${e==null?void 0:e.path}`,D$e=e=>`${e==null?void 0:e.path} 的文件操作`,L$e=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,I$e=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,$$e=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,B$e=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,P$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D$e(e):t==="fa"?L$e(e):t==="ar"?I$e(e):t==="es"?$$e(e):t==="hi"?B$e(e):O$e(e)}),F$e=()=>"Open",H$e=()=>"打开",q$e=()=>"باز کردن",U$e=()=>"فتح",G$e=()=>"Abrir",V$e=()=>"खोलें",K$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H$e():t==="fa"?q$e():t==="ar"?U$e():t==="es"?G$e():t==="hi"?V$e():F$e()}),W$e=e=>`Rename ${e==null?void 0:e.path}`,Q$e=e=>`重命名 ${e==null?void 0:e.path}`,X$e=e=>`تغییر نام ${e==null?void 0:e.path}`,Y$e=e=>`إعادة تسمية ${e==null?void 0:e.path}`,Z$e=e=>`Renombrar ${e==null?void 0:e.path}`,J$e=e=>`${e==null?void 0:e.path} का नाम बदलें`,eBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q$e(e):t==="fa"?X$e(e):t==="ar"?Y$e(e):t==="es"?Z$e(e):t==="hi"?J$e(e):W$e(e)}),tBe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,nBe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,rBe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,sBe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,iBe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,aBe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,oBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nBe(e):t==="fa"?rBe(e):t==="ar"?sBe(e):t==="es"?iBe(e):t==="hi"?aBe(e):tBe(e)}),cBe=()=>"Binary file — no inline preview.",lBe=()=>"二进制文件——无法内嵌预览。",uBe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",_Be=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",fBe=()=>"Archivo binario — sin vista previa.",dBe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",hBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lBe():t==="fa"?uBe():t==="ar"?_Be():t==="es"?fBe():t==="hi"?dBe():cBe()}),pBe=()=>"This file changed on disk. Your edits have not been overwritten.",mBe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",gBe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",vBe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",bBe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",yBe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",RN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mBe():t==="fa"?gBe():t==="ar"?vBe():t==="es"?bBe():t==="hi"?yBe():pBe()}),xBe=()=>"Compile failed",wBe=()=>"编译失败",kBe=()=>"کامپایل ناموفق بود",SBe=()=>"فشل التجميع",CBe=()=>"Error al compilar",EBe=()=>"कंपाइल विफल",NBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wBe():t==="fa"?kBe():t==="ar"?SBe():t==="es"?CBe():t==="hi"?EBe():xBe()}),zBe=()=>"Compile PDF",jBe=()=>"编译 PDF",TBe=()=>"کامپایل PDF",ABe=()=>"تجميع PDF",RBe=()=>"Compilar PDF",MBe=()=>"PDF कंपाइल करें",MN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jBe():t==="fa"?TBe():t==="ar"?ABe():t==="es"?RBe():t==="hi"?MBe():zBe()}),OBe=()=>"Compiled, but the engine reported errors — check the output below.",DBe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",LBe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",IBe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",$Be=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",BBe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",PBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBe():t==="fa"?LBe():t==="ar"?IBe():t==="es"?$Be():t==="hi"?BBe():OBe()}),FBe=()=>"Copy command",HBe=()=>"复制命令",qBe=()=>"کپی فرمان",UBe=()=>"نسخ الأمر",GBe=()=>"Copiar comando",VBe=()=>"कमांड कॉपी करें",KBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBe():t==="fa"?qBe():t==="ar"?UBe():t==="es"?GBe():t==="hi"?VBe():FBe()}),WBe=()=>"Copy install command",QBe=()=>"复制安装命令",XBe=()=>"کپی فرمان نصب",YBe=()=>"نسخ أمر التثبيت",ZBe=()=>"Copiar comando de instalación",JBe=()=>"इंस्टॉल कमांड कॉपी करें",ePe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QBe():t==="fa"?XBe():t==="ar"?YBe():t==="es"?ZBe():t==="hi"?JBe():WBe()}),tPe=()=>"This file was deleted on disk. Your edits have not been discarded.",nPe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",rPe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",sPe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",iPe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",aPe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",ON=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nPe():t==="fa"?rPe():t==="ar"?sPe():t==="es"?iPe():t==="hi"?aPe():tPe()}),oPe=()=>"Discard my edits and reload",cPe=()=>"放弃我的编辑并重新加载",lPe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",uPe=()=>"تجاهل تعديلاتي وإعادة التحميل",_Pe=()=>"Descartar mis cambios y recargar",fPe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",dPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cPe():t==="fa"?lPe():t==="ar"?uPe():t==="es"?_Pe():t==="hi"?fPe():oPe()}),hPe=()=>"Discard unsaved changes and close this file?",pPe=()=>"要丢弃未保存的更改并关闭此文件吗?",mPe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",gPe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",vPe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",bPe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pPe():t==="fa"?mPe():t==="ar"?gPe():t==="es"?vPe():t==="hi"?bPe():hPe()}),yPe=()=>"Dismiss",xPe=()=>"关闭",wPe=()=>"بستن",kPe=()=>"تجاهل",SPe=()=>"Cerrar",CPe=()=>"खारिज करें",EPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xPe():t==="fa"?wPe():t==="ar"?kPe():t==="es"?SPe():t==="hi"?CPe():yPe()}),NPe=()=>"Dismiss compile message",zPe=()=>"关闭编译消息",jPe=()=>"بستن پیام کامپایل",TPe=()=>"تجاهل رسالة التجميع",APe=()=>"Cerrar mensaje de compilación",RPe=()=>"कंपाइल संदेश खारिज करें",MPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zPe():t==="fa"?jPe():t==="ar"?TPe():t==="es"?APe():t==="hi"?RPe():NPe()}),OPe=()=>"Dismiss Overleaf message",DPe=()=>"关闭 Overleaf 消息",LPe=()=>"بستن پیام Overleaf",IPe=()=>"تجاهل رسالة Overleaf",$Pe=()=>"Cerrar mensaje de Overleaf",BPe=()=>"Overleaf संदेश खारिज करें",PPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPe():t==="fa"?LPe():t==="ar"?IPe():t==="es"?$Pe():t==="hi"?BPe():OPe()}),FPe=()=>"Download",HPe=()=>"下载",qPe=()=>"بارگیری",UPe=()=>"تنزيل",GPe=()=>"Descargar",VPe=()=>"डाउनलोड करें",OD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HPe():t==="fa"?qPe():t==="ar"?UPe():t==="es"?GPe():t==="hi"?VPe():FPe()}),KPe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,WPe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,QPe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,XPe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,YPe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,ZPe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,JPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WPe(e):t==="fa"?QPe(e):t==="ar"?XPe(e):t==="es"?YPe(e):t==="hi"?ZPe(e):KPe(e)}),eFe=()=>"Failed to load file:",tFe=()=>"加载文件失败:",nFe=()=>"بارگیری فایل ناموفق بود:",rFe=()=>"تعذّر تحميل الملف:",sFe=()=>"Error al cargar el archivo:",iFe=()=>"फ़ाइल लोड नहीं हो सकी:",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tFe():t==="fa"?nFe():t==="ar"?rFe():t==="es"?sFe():t==="hi"?iFe():eFe()}),aFe=()=>"File truncated — showing the first 512 KB.",oFe=()=>"文件已截断——仅显示前 512 KB。",cFe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",lFe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",uFe=()=>"Archivo truncado — se muestran los primeros 512 KB.",_Fe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",fFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oFe():t==="fa"?cFe():t==="ar"?lFe():t==="es"?uFe():t==="hi"?_Fe():aFe()}),dFe=()=>"The page below stops partway — the full file could not be loaded.",hFe=()=>"下方页面在中途结束——无法加载完整文件。",pFe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",mFe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",gFe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",vFe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",bFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hFe():t==="fa"?pFe():t==="ar"?mFe():t==="es"?gFe():t==="hi"?vFe():dFe()}),yFe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,xFe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,wFe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,kFe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,SFe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,CFe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,EFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xFe(e):t==="fa"?wFe(e):t==="ar"?kFe(e):t==="es"?SFe(e):t==="hi"?CFe(e):yFe(e)}),NFe=()=>"Loading…",zFe=()=>"正在加载…",jFe=()=>"در حال بارگیری…",TFe=()=>"جارٍ التحميل…",AFe=()=>"Cargando…",RFe=()=>"लोड हो रहा है…",DD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFe():t==="fa"?jFe():t==="ar"?TFe():t==="es"?AFe():t==="hi"?RFe():NFe()}),MFe=()=>"File not found.",OFe=()=>"找不到文件。",DFe=()=>"فایل پیدا نشد.",LFe=()=>"لم يُعثر على الملف.",IFe=()=>"No se encontró el archivo.",$Fe=()=>"फ़ाइल नहीं मिली।",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OFe():t==="fa"?DFe():t==="ar"?LFe():t==="es"?IFe():t==="hi"?$Fe():MFe()}),BFe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,PFe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,FFe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,HFe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,qFe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,UFe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,GFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PFe(e):t==="fa"?FFe(e):t==="ar"?HFe(e):t==="es"?qFe(e):t==="hi"?UFe(e):BFe(e)}),VFe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,KFe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,WFe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,QFe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,XFe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,YFe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,ZFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KFe(e):t==="fa"?WFe(e):t==="ar"?QFe(e):t==="es"?XFe(e):t==="hi"?YFe(e):VFe(e)}),JFe=()=>"File not found on disk.",eHe=()=>"磁盘上找不到此文件。",tHe=()=>"فایل روی دیسک پیدا نشد.",nHe=()=>"لم يُعثر على الملف على القرص.",rHe=()=>"No se encontró el archivo en disco.",sHe=()=>"फ़ाइल डिस्क पर नहीं मिली।",iHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eHe():t==="fa"?tHe():t==="ar"?nHe():t==="es"?rHe():t==="hi"?sHe():JFe()}),aHe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,oHe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,cHe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,lHe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,uHe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,_He=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,fHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe(e):t==="fa"?cHe(e):t==="ar"?lHe(e):t==="es"?uHe(e):t==="hi"?_He(e):aHe(e)}),dHe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,hHe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,pHe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,mHe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,gHe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,vHe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,bHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hHe(e):t==="fa"?pHe(e):t==="ar"?mHe(e):t==="es"?gHe(e):t==="hi"?vHe(e):dHe(e)}),yHe=()=>"Open in default editor",xHe=()=>"在默认编辑器中打开",wHe=()=>"باز کردن در ویرایشگر پیش‌فرض",kHe=()=>"فتح في المحرر الافتراضي",SHe=()=>"Abrir en el editor predeterminado",CHe=()=>"डिफ़ॉल्ट एडिटर में खोलें",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xHe():t==="fa"?wHe():t==="ar"?kHe():t==="es"?SHe():t==="hi"?CHe():yHe()}),EHe=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,NHe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,zHe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,jHe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,THe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,AHe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,RHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NHe(e):t==="fa"?zHe(e):t==="ar"?jHe(e):t==="es"?THe(e):t==="hi"?AHe(e):EHe(e)}),MHe=()=>"Only for projects on this computer",OHe=()=>"仅适用于此电脑上的项目",DHe=()=>"فقط برای پروژه‌های این رایانه",LHe=()=>"فقط للمشاريع على هذا الكمبيوتر",IHe=()=>"Solo para proyectos en este equipo",$He=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",BHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OHe():t==="fa"?DHe():t==="ar"?LHe():t==="es"?IHe():t==="hi"?$He():MHe()}),PHe=()=>"Only for files in the project folder",FHe=()=>"仅适用于项目文件夹中的文件",HHe=()=>"فقط برای فایل‌های پوشهٔ پروژه",qHe=()=>"فقط لملفات مجلد المشروع",UHe=()=>"Solo para archivos de la carpeta del proyecto",GHe=()=>"केवल प्रोजेक्ट फ़ोल्डर की फ़ाइलों के लिए",VHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FHe():t==="fa"?HHe():t==="ar"?qHe():t==="es"?UHe():t==="hi"?GHe():PHe()}),KHe=()=>"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.",WHe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",QHe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",XHe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",YHe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",ZHe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",JHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WHe():t==="fa"?QHe():t==="ar"?XHe():t==="es"?YHe():t==="hi"?ZHe():KHe()}),eqe=()=>"Overwrite disk file",tqe=()=>"覆盖磁盘文件",nqe=()=>"بازنویسی فایل روی دیسک",rqe=()=>"استبدال الملف على القرص",sqe=()=>"Sobrescribir el archivo en disco",iqe=()=>"डिस्क फ़ाइल अधिलेखित करें",aqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tqe():t==="fa"?nqe():t==="ar"?rqe():t==="es"?sqe():t==="hi"?iqe():eqe()}),oqe=()=>"Compiled PDF is out of date",cqe=()=>"已编译的 PDF 不是最新版本",lqe=()=>"PDF کامپایل‌شده به‌روز نیست",uqe=()=>"ملف PDF المُجمَّع غير محدَّث",_qe=()=>"El PDF compilado está desactualizado",fqe=()=>"कंपाइल की गई PDF पुरानी है",dqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cqe():t==="fa"?lqe():t==="ar"?uqe():t==="es"?_qe():t==="hi"?fqe():oqe()}),hqe=()=>"project clone",pqe=()=>"项目克隆",mqe=()=>"کلون پروژه",gqe=()=>"نسخة المشروع المستنسخة",vqe=()=>"el clon del proyecto",bqe=()=>"प्रोजेक्ट क्लोन",Zg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pqe():t==="fa"?mqe():t==="ar"?gqe():t==="es"?vqe():t==="hi"?bqe():hqe()}),yqe=()=>"Recompile PDF",xqe=()=>"重新编译 PDF",wqe=()=>"کامپایل دوبارهٔ PDF",kqe=()=>"إعادة تجميع PDF",Sqe=()=>"Volver a compilar el PDF",Cqe=()=>"PDF फिर से कंपाइल करें",BN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xqe():t==="fa"?wqe():t==="ar"?kqe():t==="es"?Sqe():t==="hi"?Cqe():yqe()}),Eqe=()=>"Reload from disk",Nqe=()=>"从磁盘重新加载",zqe=()=>"بارگذاری مجدد از دیسک",jqe=()=>"إعادة التحميل من القرص",Tqe=()=>"Recargar desde el disco",Aqe=()=>"डिस्क से फिर से लोड करें",Rqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nqe():t==="fa"?zqe():t==="ar"?jqe():t==="es"?Tqe():t==="hi"?Aqe():Eqe()}),Mqe=()=>"Reveal in file manager",Oqe=()=>"在文件管理器中显示",Dqe=()=>"نمایش در مدیر فایل",Lqe=()=>"إظهار في مدير الملفات",Iqe=()=>"Mostrar en el administrador de archivos",$qe=()=>"फ़ाइल मैनेजर में दिखाएँ",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oqe():t==="fa"?Dqe():t==="ar"?Lqe():t==="es"?Iqe():t==="hi"?$qe():Mqe()}),Bqe=()=>"Save failed",Pqe=()=>"保存失败",Fqe=()=>"ذخیره ناموفق بود",Hqe=()=>"فشل الحفظ",qqe=()=>"Error al guardar",Uqe=()=>"सेव विफल",Gqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqe():t==="fa"?Fqe():t==="ar"?Hqe():t==="es"?qqe():t==="hi"?Uqe():Bqe()}),Vqe=()=>"Saving…",Kqe=()=>"正在保存…",Wqe=()=>"در حال ذخیره…",Qqe=()=>"جارٍ الحفظ…",Xqe=()=>"Guardando…",Yqe=()=>"सेव हो रहा है…",Zqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqe():t==="fa"?Wqe():t==="ar"?Qqe():t==="es"?Xqe():t==="hi"?Yqe():Vqe()}),Jqe=()=>"Selected — press ⌘C",eUe=()=>"已选中 — 按 ⌘C 复制",tUe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",nUe=()=>"محدد — اضغط ⌘C",rUe=()=>"Seleccionado — pulsa ⌘C",sUe=()=>"चयनित — ⌘C दबाएं",iUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe():t==="fa"?tUe():t==="ar"?nUe():t==="es"?rUe():t==="hi"?sUe():Jqe()}),aUe=()=>"session’s worktree",oUe=()=>"会话工作树",cUe=()=>"درخت کاری نشست",lUe=()=>"شجرة عمل الجلسة",uUe=()=>"el árbol de trabajo de la sesión",_Ue=()=>"सेशन की वर्कट्री",Jg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUe():t==="fa"?cUe():t==="ar"?lUe():t==="es"?uUe():t==="hi"?_Ue():aUe()}),fUe=()=>"Show compiled PDF",dUe=()=>"显示已编译的 PDF",hUe=()=>"نمایش PDF کامپایل‌شده",pUe=()=>"عرض ملف PDF المُجمَّع",mUe=()=>"Mostrar el PDF compilado",gUe=()=>"कंपाइल की गई PDF दिखाएं",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUe():t==="fa"?hUe():t==="ar"?pUe():t==="es"?mUe():t==="hi"?gUe():fUe()}),vUe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",bUe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",yUe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",xUe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",wUe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",kUe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",SUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bUe():t==="fa"?yUe():t==="ar"?xUe():t==="es"?wUe():t==="hi"?kUe():vUe()}),CUe=()=>"This session's worktree isn't available — showing the project clone's copy.",EUe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",NUe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",zUe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",jUe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",TUe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",AUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EUe():t==="fa"?NUe():t==="ar"?zUe():t==="es"?jUe():t==="hi"?TUe():CUe()}),RUe=()=>"Unsaved",MUe=()=>"未保存",OUe=()=>"ذخیره نشده",DUe=()=>"غير محفوظ",LUe=()=>"Sin guardar",IUe=()=>"सेव नहीं हुआ",LD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUe():t==="fa"?OUe():t==="ar"?DUe():t==="es"?LUe():t==="hi"?IUe():RUe()}),$Ue=()=>"Unsaved — ⌘S to save",BUe=()=>"未保存 — 按 ⌘S 保存",PUe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",FUe=()=>"غير محفوظ — ⌘S للحفظ",HUe=()=>"Sin guardar — ⌘S para guardar",qUe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",UUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BUe():t==="fa"?PUe():t==="ar"?FUe():t==="es"?HUe():t==="hi"?qUe():$Ue()}),GUe=()=>"Update orx on the remote machine to edit this file safely.",VUe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",KUe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",WUe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",QUe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",XUe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",YUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VUe():t==="fa"?KUe():t==="ar"?WUe():t==="es"?QUe():t==="hi"?XUe():GUe()}),ZUe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",JUe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",eGe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",tGe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",nGe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",rGe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",sGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JUe():t==="fa"?eGe():t==="ar"?tGe():t==="es"?nGe():t==="hi"?rGe():ZUe()}),iGe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",aGe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",oGe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",cGe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",lGe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",uGe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",_Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe():t==="fa"?oGe():t==="ar"?cGe():t==="es"?lGe():t==="hi"?uGe():iGe()}),fGe=()=>"Back to preview",dGe=()=>"返回预览",hGe=()=>"بازگشت به پیش‌نمایش",pGe=()=>"العودة إلى المعاينة",mGe=()=>"Volver a la vista previa",gGe=()=>"प्रीव्यू पर वापस जाएं",vGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dGe():t==="fa"?hGe():t==="ar"?pGe():t==="es"?mGe():t==="hi"?gGe():fGe()}),bGe=e=>`${e==null?void 0:e.count} changed files`,yGe=e=>`${e==null?void 0:e.count} 个已更改文件`,xGe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,wGe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,kGe=e=>`${e==null?void 0:e.count} archivos modificados`,SGe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,ID=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yGe(e):t==="fa"?xGe(e):t==="ar"?wGe(e):t==="es"?kGe(e):t==="hi"?SGe(e):bGe(e)}),CGe=()=>"Changed files",EGe=()=>"已更改文件",NGe=()=>"فایل‌های تغییرکرده",zGe=()=>"الملفات المتغيّرة",jGe=()=>"Archivos modificados",TGe=()=>"बदली गई फ़ाइलें",AGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EGe():t==="fa"?NGe():t==="ar"?zGe():t==="es"?jGe():t==="hi"?TGe():CGe()}),RGe=()=>"Diff preview truncated",MGe=()=>"差异预览已截断",OGe=()=>"پیش‌نمایش تفاوت کوتاه شده است",DGe=()=>"معاينة الفروق مقتطعة",LGe=()=>"Vista previa del diff truncada",IGe=()=>"डिफ़ प्रीव्यू छोटा किया गया",$Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MGe():t==="fa"?OGe():t==="ar"?DGe():t==="es"?LGe():t==="hi"?IGe():RGe()}),BGe=e=>`${e==null?void 0:e.count} files shown (partial)`,PGe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,FGe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,HGe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,qGe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,UGe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,GGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PGe(e):t==="fa"?FGe(e):t==="ar"?HGe(e):t==="es"?qGe(e):t==="hi"?UGe(e):BGe(e)}),VGe=()=>"No changes.",KGe=()=>"没有更改。",WGe=()=>"تغییری وجود ندارد.",QGe=()=>"لا توجد تغييرات.",XGe=()=>"No hay cambios.",YGe=()=>"कोई बदलाव नहीं।",ZGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KGe():t==="fa"?WGe():t==="ar"?QGe():t==="es"?XGe():t==="hi"?YGe():VGe()}),JGe=()=>"No complete file preview was available before the cutoff.",eVe=()=>"在截断位置之前没有完整的文件预览。",tVe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",nVe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",rVe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",sVe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",iVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eVe():t==="fa"?tVe():t==="ar"?nVe():t==="es"?rVe():t==="hi"?sVe():JGe()}),aVe=()=>"No textual diff for this file.",oVe=()=>"此文件没有文本差异。",cVe=()=>"برای این فایل تفاوت متنی وجود ندارد.",lVe=()=>"لا يوجد فرق نصّي لهذا الملف.",uVe=()=>"No hay diff de texto para este archivo.",_Ve=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",fVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oVe():t==="fa"?cVe():t==="ar"?lVe():t==="es"?uVe():t==="hi"?_Ve():aVe()}),dVe=()=>"1 changed file",hVe=()=>"1 个已更改文件",pVe=()=>"۱ فایل تغییرکرده",mVe=()=>"ملف واحد معدَّل",gVe=()=>"1 archivo modificado",vVe=()=>"1 बदली गई फ़ाइल",$D=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hVe():t==="fa"?pVe():t==="ar"?mVe():t==="es"?gVe():t==="hi"?vVe():dVe()}),bVe=()=>"1 file shown (partial)",yVe=()=>"显示 1 个文件(部分)",xVe=()=>"۱ فایل نمایش داده شده (ناقص)",wVe=()=>"عُرض ملف واحد (جزئيًا)",kVe=()=>"1 archivo mostrado (parcial)",SVe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",CVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yVe():t==="fa"?xVe():t==="ar"?wVe():t==="es"?kVe():t==="hi"?SVe():bVe()}),EVe=()=>"Unable to parse this diff.",NVe=()=>"无法解析此差异。",zVe=()=>"خواندن این تفاوت ممکن نبود.",jVe=()=>"تعذّر تحليل هذا الفرق.",TVe=()=>"No se pudo interpretar este diff.",AVe=()=>"यह डिफ़ पार्स नहीं हो सका।",RVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NVe():t==="fa"?zVe():t==="ar"?jVe():t==="es"?TVe():t==="hi"?AVe():EVe()}),MVe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,OVe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,DVe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,LVe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,IVe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,$Ve=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,BVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OVe(e):t==="fa"?DVe(e):t==="ar"?LVe(e):t==="es"?IVe(e):t==="hi"?$Ve(e):MVe(e)}),PVe=()=>"View full diff",FVe=()=>"查看完整差异",HVe=()=>"نمایش تفاوت کامل",qVe=()=>"عرض الفرق الكامل",UVe=()=>"Ver diff completo",GVe=()=>"पूरा डिफ़ देखें",VVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FVe():t==="fa"?HVe():t==="ar"?qVe():t==="es"?UVe():t==="hi"?GVe():PVe()}),KVe=()=>"Create a token ↗",WVe=()=>"创建令牌 ↗",QVe=()=>"ساخت توکن ↗",XVe=()=>"إنشاء رمز ↗",YVe=()=>"Crear un token ↗",ZVe=()=>"एक टोकन बनाएं ↗",JVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WVe():t==="fa"?QVe():t==="ar"?XVe():t==="es"?YVe():t==="hi"?ZVe():KVe()}),eKe=()=>"Keep the agent working toward a goal",tKe=()=>"让智能体持续朝目标推进",nKe=()=>"عامل را در مسیر یک هدف نگه دارید",rKe=()=>"اجعل الوكيل يعمل نحو هدف",sKe=()=>"Mantén al agente trabajando hacia un objetivo",iKe=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",aKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tKe():t==="fa"?nKe():t==="ar"?rKe():t==="es"?sKe():t==="hi"?iKe():eKe()}),oKe=()=>"Approve and run",cKe=()=>"批准并运行",lKe=()=>"تأیید و اجرا",uKe=()=>"الموافقة والتشغيل",_Ke=()=>"Aprobar y ejecutar",fKe=()=>"स्वीकार करें और चलाएं",dKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cKe():t==="fa"?lKe():t==="ar"?uKe():t==="es"?_Ke():t==="hi"?fKe():oKe()}),hKe=()=>"Cancel setup",pKe=()=>"取消设置",mKe=()=>"لغو راه‌اندازی",gKe=()=>"إلغاء الإعداد",vKe=()=>"Cancelar configuración",bKe=()=>"सेटअप रद्द करें",yKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pKe():t==="fa"?mKe():t==="ar"?gKe():t==="es"?vKe():t==="hi"?bKe():hKe()}),xKe=()=>"Checking connection…",wKe=()=>"正在检查连接…",kKe=()=>"در حال بررسی اتصال…",SKe=()=>"جارٍ التحقق من الإعداد…",CKe=()=>"Comprobando conexión…",EKe=()=>"कनेक्शन जाँचा जा रहा है…",NKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wKe():t==="fa"?kKe():t==="ar"?SKe():t==="es"?CKe():t==="hi"?EKe():xKe()}),zKe=e=>`${e==null?void 0:e.agent} is connected.`,jKe=e=>`${e==null?void 0:e.agent} 已连接。`,TKe=e=>`${e==null?void 0:e.agent} متصل است.`,AKe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,RKe=e=>`${e==null?void 0:e.agent} está conectado.`,MKe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,OKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jKe(e):t==="fa"?TKe(e):t==="ar"?AKe(e):t==="es"?RKe(e):t==="hi"?MKe(e):zKe(e)}),DKe=()=>"Setup needs attention.",LKe=()=>"设置需要处理。",IKe=()=>"راه‌اندازی نیاز به بررسی دارد.",$Ke=()=>"تعذّر إكمال الإعداد.",BKe=()=>"La configuración requiere atención.",PKe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",BD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LKe():t==="fa"?IKe():t==="ar"?$Ke():t==="es"?BKe():t==="hi"?PKe():DKe()}),FKe=()=>"Install",HKe=()=>"安装",qKe=()=>"نصب",UKe=()=>"تثبيت",GKe=()=>"Instalar",VKe=()=>"इंस्टॉल करें",KKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HKe():t==="fa"?qKe():t==="ar"?UKe():t==="es"?GKe():t==="hi"?VKe():FKe()}),WKe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,QKe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,XKe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,YKe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,ZKe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,JKe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,eWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QKe(e):t==="fa"?XKe(e):t==="ar"?YKe(e):t==="es"?ZKe(e):t==="hi"?JKe(e):WKe(e)}),tWe=()=>"Could not load setup commands.",nWe=()=>"无法加载设置命令。",rWe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",sWe=()=>"تعذّر تحميل أوامر الإعداد.",iWe=()=>"No se pudieron cargar los comandos de configuración.",aWe=()=>"सेटअप कमांड लोड नहीं हो सके।",oWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nWe():t==="fa"?rWe():t==="ar"?sWe():t==="es"?iWe():t==="hi"?aWe():tWe()}),cWe=()=>"Sign in",lWe=()=>"登录",uWe=()=>"ورود",_We=()=>"تسجيل الدخول",fWe=()=>"Iniciar sesión",dWe=()=>"साइन इन करें",PD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lWe():t==="fa"?uWe():t==="ar"?_We():t==="es"?fWe():t==="hi"?dWe():cWe()}),hWe=()=>"The agent is not ready yet. Re-check or retry sign-in.",pWe=()=>"代理尚未就绪。请重新检查或重试登录。",mWe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",gWe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",vWe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",bWe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",FD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pWe():t==="fa"?mWe():t==="ar"?gWe():t==="es"?vWe():t==="hi"?bWe():hWe()}),yWe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",xWe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",wWe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",kWe=()=>"يفتح طرفية هنا",SWe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",CWe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",EWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xWe():t==="fa"?wWe():t==="ar"?kWe():t==="es"?SWe():t==="hi"?CWe():yWe()}),NWe=()=>"This install command requires Node.js and npm.",zWe=()=>"此安装命令需要 Node.js 和 npm。",jWe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",TWe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",AWe=()=>"Este comando de instalación requiere Node.js y npm.",RWe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",MWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zWe():t==="fa"?jWe():t==="ar"?TWe():t==="es"?AWe():t==="hi"?RWe():NWe()}),OWe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,DWe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,LWe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,IWe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,$We=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,BWe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,PWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DWe(e):t==="fa"?LWe(e):t==="ar"?IWe(e):t==="es"?$We(e):t==="hi"?BWe(e):OWe(e)}),FWe=e=>`Set up ${e==null?void 0:e.agent}`,HWe=e=>`设置 ${e==null?void 0:e.agent}`,qWe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,UWe=e=>`إعداد ${e==null?void 0:e.agent}`,GWe=e=>`Configurar ${e==null?void 0:e.agent}`,VWe=e=>`${e==null?void 0:e.agent} सेट अप करें`,HN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HWe(e):t==="fa"?qWe(e):t==="ar"?UWe(e):t==="es"?GWe(e):t==="hi"?VWe(e):FWe(e)}),KWe=()=>"Update",WWe=()=>"更新",QWe=()=>"به‌روزرسانی",XWe=()=>"تحديث",YWe=()=>"Actualizar",ZWe=()=>"अपडेट करें",JWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WWe():t==="fa"?QWe():t==="ar"?XWe():t==="es"?YWe():t==="hi"?ZWe():KWe()}),eQe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,tQe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,nQe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,rQe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,sQe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,iQe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,aQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tQe(e):t==="fa"?nQe(e):t==="ar"?rQe(e):t==="es"?sQe(e):t==="hi"?iQe(e):eQe(e)}),oQe=()=>"All projects",cQe=()=>"所有项目",lQe=()=>"همهٔ پروژه‌ها",uQe=()=>"كل المشاريع",_Qe=()=>"Todos los proyectos",fQe=()=>"सभी प्रोजेक्ट",qN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cQe():t==="fa"?lQe():t==="ar"?uQe():t==="es"?_Qe():t==="hi"?fQe():oQe()}),dQe=()=>"Configure Repository",hQe=()=>"配置仓库",pQe=()=>"پیکربندی مخزن",mQe=()=>"إعداد المستودع",gQe=()=>"Configurar repositorio",vQe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",bQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hQe():t==="fa"?pQe():t==="ar"?mQe():t==="es"?gQe():t==="hi"?vQe():dQe()}),yQe=()=>"Create a new project",xQe=()=>"新建项目",wQe=()=>"ایجاد پروژهٔ جدید",kQe=()=>"إنشاء مشروع جديد",SQe=()=>"Crear un proyecto nuevo",CQe=()=>"नया प्रोजेक्ट बनाएं",EQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xQe():t==="fa"?wQe():t==="ar"?kQe():t==="es"?SQe():t==="hi"?CQe():yQe()}),NQe=()=>"Hide sidebar",zQe=()=>"隐藏侧边栏",jQe=()=>"پنهان کردن نوار کناری",TQe=()=>"إخفاء الشريط الجانبي",AQe=()=>"Ocultar barra lateral",RQe=()=>"साइडबार छिपाएं",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zQe():t==="fa"?jQe():t==="ar"?TQe():t==="es"?AQe():t==="hi"?RQe():NQe()}),MQe=()=>"Project",OQe=()=>"项目",DQe=()=>"پروژه",LQe=()=>"المشروع",IQe=()=>"Proyecto",$Qe=()=>"प्रोजेक्ट",BQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OQe():t==="fa"?DQe():t==="ar"?LQe():t==="es"?IQe():t==="hi"?$Qe():MQe()}),PQe=e=>`${e==null?void 0:e.count} cancelled`,FQe=e=>`${e==null?void 0:e.count} 次取消`,HQe=e=>`${e==null?void 0:e.count} لغوشده`,qQe=e=>`الملغاة: ${e==null?void 0:e.count}`,UQe=e=>`${e==null?void 0:e.count} canceladas`,GQe=e=>`${e==null?void 0:e.count} रद्द`,VQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FQe(e):t==="fa"?HQe(e):t==="ar"?qQe(e):t==="es"?UQe(e):t==="hi"?GQe(e):PQe(e)}),KQe=e=>`${e==null?void 0:e.count} done`,WQe=e=>`${e==null?void 0:e.count} 次完成`,QQe=e=>`${e==null?void 0:e.count} تمام‌شده`,XQe=e=>`المكتملة: ${e==null?void 0:e.count}`,YQe=e=>`${e==null?void 0:e.count} completadas`,ZQe=e=>`${e==null?void 0:e.count} पूरे`,JQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WQe(e):t==="fa"?QQe(e):t==="ar"?XQe(e):t==="es"?YQe(e):t==="hi"?ZQe(e):KQe(e)}),eXe=e=>`${e==null?void 0:e.count} failed`,tXe=e=>`${e==null?void 0:e.count} 次失败`,nXe=e=>`${e==null?void 0:e.count} ناموفق`,rXe=e=>`الفاشلة: ${e==null?void 0:e.count}`,sXe=e=>`${e==null?void 0:e.count} con error`,iXe=e=>`${e==null?void 0:e.count} विफल`,aXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tXe(e):t==="fa"?nXe(e):t==="ar"?rXe(e):t==="es"?sXe(e):t==="hi"?iXe(e):eXe(e)}),oXe=e=>`${e==null?void 0:e.count} files`,cXe=e=>`${e==null?void 0:e.count} 个文件`,lXe=e=>`${e==null?void 0:e.count} فایل`,uXe=e=>`الملفات: ${e==null?void 0:e.count}`,_Xe=e=>`${e==null?void 0:e.count} archivos`,fXe=e=>`${e==null?void 0:e.count} फ़ाइलें`,dXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cXe(e):t==="fa"?lXe(e):t==="ar"?uXe(e):t==="es"?_Xe(e):t==="hi"?fXe(e):oXe(e)}),hXe=e=>`${e==null?void 0:e.count}+ files`,pXe=e=>`至少 ${e==null?void 0:e.count} 个文件`,mXe=e=>`بیش از ${e==null?void 0:e.count} فایل`,gXe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,vXe=e=>`${e==null?void 0:e.count}+ archivos`,bXe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,yXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pXe(e):t==="fa"?mXe(e):t==="ar"?gXe(e):t==="es"?vXe(e):t==="hi"?bXe(e):hXe(e)}),xXe=e=>`${e==null?void 0:e.count} live`,wXe=e=>`${e==null?void 0:e.count} 次进行中`,kXe=e=>`${e==null?void 0:e.count} فعال`,SXe=e=>`النشطة: ${e==null?void 0:e.count}`,CXe=e=>`${e==null?void 0:e.count} en curso`,EXe=e=>`${e==null?void 0:e.count} लाइव`,NXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wXe(e):t==="fa"?kXe(e):t==="ar"?SXe(e):t==="es"?CXe(e):t==="hi"?EXe(e):xXe(e)}),zXe=()=>"1 file",jXe=()=>"1 个文件",TXe=()=>"۱ فایل",AXe=()=>"ملف واحد",RXe=()=>"1 archivo",MXe=()=>"1 फ़ाइल",OXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jXe():t==="fa"?TXe():t==="ar"?AXe():t==="es"?RXe():t==="hi"?MXe():zXe()}),DXe=()=>"1 run",LXe=()=>"1 次运行",IXe=()=>"۱ اجرا",$Xe=()=>"تشغيل واحد",BXe=()=>"1 ejecución",PXe=()=>"1 रन",FXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LXe():t==="fa"?IXe():t==="ar"?$Xe():t==="es"?BXe():t==="hi"?PXe():DXe()}),HXe=e=>`${e==null?void 0:e.count} runs`,qXe=e=>`${e==null?void 0:e.count} 次运行`,UXe=e=>`${e==null?void 0:e.count} اجرا`,GXe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,VXe=e=>`${e==null?void 0:e.count} ejecuciones`,KXe=e=>`${e==null?void 0:e.count} रन`,WXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qXe(e):t==="fa"?UXe(e):t==="ar"?GXe(e):t==="es"?VXe(e):t==="hi"?KXe(e):HXe(e)}),QXe=()=>"Zoom in",XXe=()=>"放大",YXe=()=>"بزرگ‌نمایی",ZXe=()=>"تكبير",JXe=()=>"Acercar",eYe=()=>"ज़ूम इन",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XXe():t==="fa"?YXe():t==="ar"?ZXe():t==="es"?JXe():t==="hi"?eYe():QXe()}),tYe=()=>"Zoom out",nYe=()=>"缩小",rYe=()=>"کوچک‌نمایی",sYe=()=>"تصغير",iYe=()=>"Alejar",aYe=()=>"ज़ूम आउट",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nYe():t==="fa"?rYe():t==="ar"?sYe():t==="es"?iYe():t==="hi"?aYe():tYe()}),oYe=()=>"Reset zoom to fit",cYe=()=>"重置为适合窗口",lYe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",uYe=()=>"إعادة ضبط التكبير للملاءمة",_Ye=()=>"Restablecer zoom para ajustar",fYe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cYe():t==="fa"?lYe():t==="ar"?uYe():t==="es"?_Ye():t==="hi"?fYe():oYe()}),dYe=()=>"No instances yet.",hYe=()=>"还没有实例。",pYe=()=>"هنوز نمونه‌ای وجود ندارد.",mYe=()=>"لا توجد مثيلات بعد.",gYe=()=>"Aún no hay instancias.",vYe=()=>"अभी तक कोई इंस्टेंस नहीं।",bYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hYe():t==="fa"?pYe():t==="ar"?mYe():t==="es"?gYe():t==="hi"?vYe():dYe()}),yYe=()=>"Nothing running right now.",xYe=()=>"当前没有运行中的实例。",wYe=()=>"اکنون چیزی در حال اجرا نیست.",kYe=()=>"لا شيء قيد التشغيل الآن.",SYe=()=>"No hay nada en ejecución ahora mismo.",CYe=()=>"अभी कुछ नहीं चल रहा।",EYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xYe():t==="fa"?wYe():t==="ar"?kYe():t==="es"?SYe():t==="hi"?CYe():yYe()}),NYe=()=>"Select a project to see its history.",zYe=()=>"请选择一个项目以查看其历史记录。",jYe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",TYe=()=>"اختر مشروعًا لرؤية سجله.",AYe=()=>"Selecciona un proyecto para ver su historial.",RYe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",MYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zYe():t==="fa"?jYe():t==="ar"?TYe():t==="es"?AYe():t==="hi"?RYe():NYe()}),OYe=()=>"Select a project to see its runs.",DYe=()=>"请选择一个项目以查看其运行。",LYe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",IYe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",$Ye=()=>"Selecciona un proyecto para ver sus ejecuciones.",BYe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",PYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DYe():t==="fa"?LYe():t==="ar"?IYe():t==="es"?$Ye():t==="hi"?BYe():OYe()}),FYe=()=>"View history",HYe=()=>"查看历史记录",qYe=()=>"مشاهدهٔ تاریخچه",UYe=()=>"عرض السجل",GYe=()=>"Ver historial",VYe=()=>"इतिहास देखें",KYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HYe():t==="fa"?qYe():t==="ar"?UYe():t==="es"?GYe():t==="hi"?VYe():FYe()}),WYe=e=>`View history (${e==null?void 0:e.count})`,QYe=e=>`查看历史记录(${e==null?void 0:e.count})`,XYe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,YYe=e=>`عرض السجل (${e==null?void 0:e.count})`,ZYe=e=>`Ver historial (${e==null?void 0:e.count})`,JYe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,eZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QYe(e):t==="fa"?XYe(e):t==="ar"?YYe(e):t==="es"?ZYe(e):t==="hi"?JYe(e):WYe(e)}),tZe=()=>"The engine exited without producing a PDF or a log.",nZe=()=>"引擎已退出,但没有生成 PDF 或日志。",rZe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",sZe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",iZe=()=>"El motor terminó sin generar un PDF ni un log.",aZe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",oZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nZe():t==="fa"?rZe():t==="ar"?sZe():t==="es"?iZe():t==="hi"?aZe():tZe()}),cZe=()=>"Loading…",lZe=()=>"正在加载…",uZe=()=>"در حال بارگیری…",_Ze=()=>"جارٍ التحميل…",fZe=()=>"Cargando…",dZe=()=>"लोड हो रहा है…",hZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lZe():t==="fa"?uZe():t==="ar"?_Ze():t==="es"?fZe():t==="hi"?dZe():cZe()}),pZe=()=>"Add local model",mZe=()=>"添加本地模型",gZe=()=>"افزودن مدل محلی",vZe=()=>"إضافة نموذج محلي",bZe=()=>"Añadir modelo local",yZe=()=>"लोकल मॉडल जोड़ें",HD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mZe():t==="fa"?gZe():t==="ar"?vZe():t==="es"?bZe():t==="hi"?yZe():pZe()}),xZe=()=>"Local server address",wZe=()=>"本地服务器地址",kZe=()=>"نشانی سرور محلی",SZe=()=>"عنوان الخادم المحلي",CZe=()=>"Dirección del servidor local",EZe=()=>"लोकल सर्वर पता",NZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wZe():t==="fa"?kZe():t==="ar"?SZe():t==="es"?CZe():t==="hi"?EZe():xZe()}),zZe=()=>"Find models",jZe=()=>"查找模型",TZe=()=>"یافتن مدل‌ها",AZe=()=>"العثور على النماذج",RZe=()=>"Buscar modelos",MZe=()=>"मॉडल खोजें",OZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jZe():t==="fa"?TZe():t==="ar"?AZe():t==="es"?RZe():t==="hi"?MZe():zZe()}),DZe=()=>"(OpenAI compatible)",LZe=()=>"(兼容 OpenAI)",IZe=()=>"(سازگار با OpenAI)",$Ze=()=>"(متوافق مع OpenAI)",BZe=()=>"(compatible con OpenAI)",PZe=()=>"(OpenAI संगत)",qD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LZe():t==="fa"?IZe():t==="ar"?$Ze():t==="es"?BZe():t==="hi"?PZe():DZe()}),FZe=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",HZe=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",qZe=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",UZe=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",GZe=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",VZe=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",KZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HZe():t==="fa"?qZe():t==="ar"?UZe():t==="es"?GZe():t==="hi"?VZe():FZe()}),WZe=()=>"Connected",QZe=()=>"已连接",XZe=()=>"متصل شد",YZe=()=>"متصل",ZZe=()=>"Conectado",JZe=()=>"कनेक्टेड",eJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QZe():t==="fa"?XZe():t==="ar"?YZe():t==="es"?ZZe():t==="hi"?JZe():WZe()}),tJe=()=>"Context window",nJe=()=>"上下文窗口",rJe=()=>"پنجرهٔ زمینه",sJe=()=>"نافذة السياق",iJe=()=>"Ventana de contexto",aJe=()=>"कॉन्टेक्स्ट विंडो",oJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nJe():t==="fa"?rJe():t==="ar"?sJe():t==="es"?iJe():t==="hi"?aJe():tJe()}),cJe=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",lJe=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",uJe=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",_Je=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",fJe=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",dJe=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",hJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lJe():t==="fa"?uJe():t==="ar"?_Je():t==="es"?fJe():t==="hi"?dJe():cJe()}),pJe=()=>"Custom Endpoint",mJe=()=>"自定义端点",gJe=()=>"نقطهٔ اتصال سفارشی",vJe=()=>"نقطة نهاية مخصصة",bJe=()=>"Endpoint personalizado",yJe=()=>"कस्टम एंडपॉइंट",Gk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mJe():t==="fa"?gJe():t==="ar"?vJe():t==="es"?bJe():t==="hi"?yJe():pJe()}),xJe=e=>`Disconnect ${e==null?void 0:e.name}`,wJe=e=>`断开 ${e==null?void 0:e.name}`,kJe=e=>`قطع اتصال ${e==null?void 0:e.name}`,SJe=e=>`قطع اتصال ${e==null?void 0:e.name}`,CJe=e=>`Desconectar ${e==null?void 0:e.name}`,EJe=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,NJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wJe(e):t==="fa"?kJe(e):t==="ar"?SJe(e):t==="es"?CJe(e):t==="hi"?EJe(e):xJe(e)}),zJe=()=>"Get OpenCode",jJe=()=>"获取 OpenCode",TJe=()=>"دریافت OpenCode",AJe=()=>"الحصول على OpenCode",RJe=()=>"Obtener OpenCode",MJe=()=>"OpenCode लें",OJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jJe():t==="fa"?TJe():t==="ar"?AJe():t==="es"?RJe():t==="hi"?MJe():zJe()}),DJe=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",LJe=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",IJe=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",$Je=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",BJe=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",PJe=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",FJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LJe():t==="fa"?IJe():t==="ar"?$Je():t==="es"?BJe():t==="hi"?PJe():DJe()}),HJe=()=>"API key (optional)",qJe=()=>"API 密钥(可选)",UJe=()=>"کلید API (اختیاری)",GJe=()=>"مفتاح API (اختياري)",VJe=()=>"Clave de API (opcional)",KJe=()=>"API की (वैकल्पिक)",WJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qJe():t==="fa"?UJe():t==="ar"?GJe():t==="es"?VJe():t==="hi"?KJe():HJe()}),QJe=()=>"Save model",XJe=()=>"保存模型",YJe=()=>"ذخیرهٔ مدل",ZJe=()=>"حفظ النموذج",JJe=()=>"Guardar modelo",eet=()=>"मॉडल सेव करें",tet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XJe():t==="fa"?YJe():t==="ar"?ZJe():t==="es"?JJe():t==="hi"?eet():QJe()}),net=()=>"Model server",ret=()=>"模型服务器",set=()=>"سرور مدل",iet=()=>"خادم النموذج",aet=()=>"Servidor del modelo",oet=()=>"मॉडल सर्वर",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ret():t==="fa"?set():t==="ar"?iet():t==="es"?aet():t==="hi"?oet():net()}),cet=()=>"Local models",uet=()=>"本地模型",_et=()=>"مدل‌های محلی",fet=()=>"النماذج المحلية",det=()=>"Modelos locales",het=()=>"लोकल मॉडल",QN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uet():t==="fa"?_et():t==="ar"?fet():t==="es"?det():t==="hi"?het():cet()}),pet=()=>"API token (optional)",met=()=>"API 令牌(可选)",get=()=>"توکن API (اختیاری)",vet=()=>"رمز API (اختياري)",bet=()=>"Token de API (opcional)",yet=()=>"API टोकन (वैकल्पिक)",xet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?met():t==="fa"?get():t==="ar"?vet():t==="es"?bet():t==="hi"?yet():pet()}),wet=()=>"Copy",ket=()=>"复制",Cet=()=>"کپی",Eet=()=>"نسخ",Net=()=>"Copiar",zet=()=>"कॉपी करें",Vk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ket():t==="fa"?Cet():t==="ar"?Eet():t==="es"?Net():t==="hi"?zet():wet()}),jet=()=>"Copy code",Tet=()=>"复制代码",Aet=()=>"کپی کد",Ret=()=>"نسخ الشيفرة",Met=()=>"Copiar código",Oet=()=>"कोड कॉपी करें",Det=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tet():t==="fa"?Aet():t==="ar"?Ret():t==="es"?Met():t==="hi"?Oet():jet()}),Let=()=>"Download",Iet=()=>"下载",$et=()=>"بارگیری",Bet=()=>"تنزيل",Pet=()=>"Descargar",Fet=()=>"डाउनलोड करें",Ev=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iet():t==="fa"?$et():t==="ar"?Bet():t==="es"?Pet():t==="hi"?Fet():Let()}),Het=()=>"This browser can’t preview this media format.",qet=()=>"此浏览器无法预览该媒体格式。",Uet=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",Get=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",Vet=()=>"Este navegador no puede mostrar este formato multimedia.",Ket=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",Wet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qet():t==="fa"?Uet():t==="ar"?Get():t==="es"?Vet():t==="hi"?Ket():Het()}),Qet=()=>"Choose the model for this chat",Xet=()=>"选择此聊天的模型",Yet=()=>"انتخاب مدل این گفت‌وگو",Zet=()=>"اختيار نموذج هذه المحادثة",Jet=()=>"Elige el modelo de este chat",ett=()=>"इस चैट के लिए मॉडल चुनें",ttt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xet():t==="fa"?Yet():t==="ar"?Zet():t==="es"?Jet():t==="hi"?ett():Qet()}),ntt=()=>"Add Local Model",rtt=()=>"添加本地模型",stt=()=>"افزودن مدل محلی",itt=()=>"إضافة نموذج محلي",att=()=>"Añadir modelo local",ott=()=>"लोकल मॉडल जोड़ें",ctt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rtt():t==="fa"?stt():t==="ar"?itt():t==="es"?att():t==="hi"?ott():ntt()}),ltt=()=>" · CLI configuration",utt=()=>" · CLI 配置",_tt=()=>" · پیکربندی CLI",ftt=()=>" · إعداد واجهة سطر الأوامر",dtt=()=>" · Configuración de la CLI",htt=()=>" · CLI कॉन्फ़िगरेशन",UD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?utt():t==="fa"?_tt():t==="ar"?ftt():t==="es"?dtt():t==="hi"?htt():ltt()}),ptt=()=>"· Default",mtt=()=>"· 默认",gtt=()=>"· پیش‌فرض",vtt=()=>"· الافتراضي",btt=()=>"· Predeterminado",ytt=()=>"· डिफ़ॉल्ट",GD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mtt():t==="fa"?gtt():t==="ar"?vtt():t==="es"?btt():t==="hi"?ytt():ptt()}),xtt=()=>"Default model",wtt=()=>"默认模型",ktt=()=>"مدل پیش‌فرض",Stt=()=>"النموذج الافتراضي",Ctt=()=>"Modelo predeterminado",Ett=()=>"डिफ़ॉल्ट मॉडल",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wtt():t==="fa"?ktt():t==="ar"?Stt():t==="es"?Ctt():t==="hi"?Ett():xtt()}),Ntt=()=>"Detecting harnesses…",ztt=()=>"正在检测智能体工具…",jtt=()=>"در حال شناسایی ابزارهای عامل…",Ttt=()=>"جارٍ اكتشاف أدوات البرمجة…",Att=()=>"Detectando agentes…",Rtt=()=>"हार्नेस पहचाने जा रहे हैं…",Mtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ztt():t==="fa"?jtt():t==="ar"?Ttt():t==="es"?Att():t==="hi"?Rtt():Ntt()}),Ott=()=>"Effort",Dtt=()=>"推理强度",Ltt=()=>"میزان استدلال",Itt=()=>"الجهد",$tt=()=>"Esfuerzo",Btt=()=>"प्रयास स्तर",Ptt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dtt():t==="fa"?Ltt():t==="ar"?Itt():t==="es"?$tt():t==="hi"?Btt():Ott()}),Ftt=()=>"Fast speed ·",Htt=()=>"快速 ·",qtt=()=>"سرعت بالا ·",Utt=()=>"سرعة عالية ·",Gtt=()=>"Modo rápido ·",Vtt=()=>"तेज़ गति ·",Ktt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Htt():t==="fa"?qtt():t==="ar"?Utt():t==="es"?Gtt():t==="hi"?Vtt():Ftt()}),Wtt=()=>"Mode",Qtt=()=>"模式",Xtt=()=>"حالت",Ytt=()=>"الوضع",Ztt=()=>"Modo",Jtt=()=>"मोड",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qtt():t==="fa"?Xtt():t==="ar"?Ytt():t==="es"?Ztt():t==="hi"?Jtt():Wtt()}),ent=()=>"Model",tnt=()=>"模型",nnt=()=>"مدل",rnt=()=>"النموذج",snt=()=>"Modelo",int=()=>"मॉडल",u0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tnt():t==="fa"?nnt():t==="ar"?rnt():t==="es"?snt():t==="hi"?int():ent()}),ant=e=>`${e==null?void 0:e.count} more — search to find`,ont=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,cnt=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,lnt=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,unt=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,_nt=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,fnt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ont(e):t==="fa"?cnt(e):t==="ar"?lnt(e):t==="es"?unt(e):t==="hi"?_nt(e):ant(e)}),dnt=()=>"Not available",hnt=()=>"不可用",pnt=()=>"در دسترس نیست",mnt=()=>"غير متاح",gnt=()=>"No disponible",vnt=()=>"उपलब्ध नहीं",bnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hnt():t==="fa"?pnt():t==="ar"?mnt():t==="es"?gnt():t==="hi"?vnt():dnt()}),ynt=()=>"Search models…",xnt=()=>"搜索模型…",wnt=()=>"جست‌وجوی مدل‌ها…",knt=()=>"البحث في النماذج…",Snt=()=>"Buscar modelos…",Cnt=()=>"मॉडल खोजें…",VD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xnt():t==="fa"?wnt():t==="ar"?knt():t==="es"?Snt():t==="hi"?Cnt():ynt()}),Ent=()=>"Sessions keep their harness. Start a new chat to switch.",Nnt=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",znt=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",jnt=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Tnt=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Ant=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Rnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nnt():t==="fa"?znt():t==="ar"?jnt():t==="es"?Tnt():t==="hi"?Ant():Ent()}),Mnt=()=>"Speed",Ont=()=>"速度",Dnt=()=>"سرعت",Lnt=()=>"السرعة",Int=()=>"Velocidad",$nt=()=>"गति",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ont():t==="fa"?Dnt():t==="ar"?Lnt():t==="es"?Int():t==="hi"?$nt():Mnt()}),Bnt=()=>"Unavailable",Pnt=()=>"不可用",Fnt=()=>"در دسترس نیست",Hnt=()=>"غير متاح",qnt=()=>"No disponible",Unt=()=>"उपलब्ध नहीं",ro=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pnt():t==="fa"?Fnt():t==="ar"?Hnt():t==="es"?qnt():t==="hi"?Unt():Bnt()}),Gnt=e=>`Use “${e==null?void 0:e.id}” as the model ID`,Vnt=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,Knt=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,Wnt=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,Qnt=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,Xnt=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,Ynt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vnt(e):t==="fa"?Knt(e):t==="ar"?Wnt(e):t==="es"?Qnt(e):t==="hi"?Xnt(e):Gnt(e)}),Znt=()=>"Variant",Jnt=()=>"变体",ert=()=>"گونه",trt=()=>"الصنف",nrt=()=>"Variante",rrt=()=>"वेरिएंट",srt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jnt():t==="fa"?ert():t==="ar"?trt():t==="es"?nrt():t==="hi"?rrt():Znt()}),irt=()=>"Start a new chat",art=()=>"开始新聊天",ort=()=>"شروع گفت‌وگوی جدید",crt=()=>"بدء محادثة جديدة",lrt=()=>"Inicia un chat nuevo",urt=()=>"नई चैट शुरू करें",_rt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?art():t==="fa"?ort():t==="ar"?crt():t==="es"?lrt():t==="hi"?urt():irt()}),frt=()=>"Advanced",drt=()=>"高级",hrt=()=>"پیشرفته",prt=()=>"متقدم",mrt=()=>"Avanzado",grt=()=>"उन्नत",KD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?drt():t==="fa"?hrt():t==="ar"?prt():t==="es"?mrt():t==="hi"?grt():frt()}),vrt=()=>"Advanced · Connect GitHub",brt=()=>"高级 · 连接 GitHub",yrt=()=>"پیشرفته · اتصال GitHub",xrt=()=>"متقدم · ربط GitHub",wrt=()=>"Avanzado · Conectar GitHub",krt=()=>"उन्नत · GitHub कनेक्ट करें",Srt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?brt():t==="fa"?yrt():t==="ar"?xrt():t==="es"?wrt():t==="hi"?krt():vrt()}),Crt=()=>"Advanced · GitHub sync on",Ert=()=>"高级 · GitHub 同步已开启",Nrt=()=>"پیشرفته · همگام‌سازی GitHub روشن است",zrt=()=>"متقدم · مزامنة GitHub مفعّلة",jrt=()=>"Avanzado · Sincronización con GitHub activada",Trt=()=>"उन्नत · GitHub सिंक चालू",Art=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ert():t==="fa"?Nrt():t==="ar"?zrt():t==="es"?jrt():t==="hi"?Trt():Crt()}),Rrt=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Mrt=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Ort=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Drt=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",Lrt=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",Irt=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",$rt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mrt():t==="fa"?Ort():t==="ar"?Drt():t==="es"?Lrt():t==="hi"?Irt():Rrt()}),Brt=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Prt=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Frt=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Hrt=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,qrt=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,Urt=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,Grt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Prt(e):t==="fa"?Frt(e):t==="ar"?Hrt(e):t==="es"?qrt(e):t==="hi"?Urt(e):Brt(e)}),Vrt=()=>"Choose an existing project folder",Krt=()=>"选择现有项目文件夹",Wrt=()=>"انتخاب پوشهٔ موجود پروژه",Qrt=()=>"اختر مجلد مشروع موجود",Xrt=()=>"Elige una carpeta de proyecto existente",Yrt=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Krt():t==="fa"?Wrt():t==="ar"?Qrt():t==="es"?Xrt():t==="hi"?Yrt():Vrt()}),Zrt=()=>"Choosing…",Jrt=()=>"正在选择…",est=()=>"در حال انتخاب…",tst=()=>"جارٍ الاختيار…",nst=()=>"Eligiendo…",rst=()=>"चुना जा रहा है…",sst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jrt():t==="fa"?est():t==="ar"?tst():t==="es"?nst():t==="hi"?rst():Zrt()}),ist=()=>"Clone destination",ast=()=>"克隆位置",ost=()=>"مقصد کلون",cst=()=>"وجهة الاستنساخ",lst=()=>"Destino del clon",ust=()=>"क्लोन गंतव्य",_st=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ast():t==="fa"?ost():t==="ar"?cst():t==="es"?lst():t==="hi"?ust():ist()}),fst=()=>"Clone paper project",dst=()=>"克隆论文项目",hst=()=>"کلون پروژهٔ مقاله",pst=()=>"استنساخ مشروع الورقة",mst=()=>"Clonar proyecto del paper",gst=()=>"पेपर प्रोजेक्ट क्लोन करें",vst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dst():t==="fa"?hst():t==="ar"?pst():t==="es"?mst():t==="hi"?gst():fst()}),bst=()=>"Create project",yst=()=>"创建项目",xst=()=>"ایجاد پروژه",wst=()=>"إنشاء المشروع",kst=()=>"Crear proyecto",Sst=()=>"प्रोजेक्ट बनाएं",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yst():t==="fa"?xst():t==="ar"?wst():t==="es"?kst():t==="hi"?Sst():bst()}),Cst=()=>"Creating…",Est=()=>"正在创建…",Nst=()=>"در حال ایجاد…",zst=()=>"جارٍ الإنشاء…",jst=()=>"Creando…",Tst=()=>"बनाया जा रहा है…",Ast=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Est():t==="fa"?Nst():t==="ar"?zst():t==="es"?jst():t==="hi"?Tst():Cst()}),Rst=()=>"Choose a different destination. This path is a file, not a folder.",Mst=()=>"请选择其他位置。此路径是文件,不是文件夹。",Ost=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Dst=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",Lst=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Ist=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",X2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mst():t==="fa"?Ost():t==="ar"?Dst():t==="es"?Lst():t==="hi"?Ist():Rst()}),$st=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Bst=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Pst=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Fst=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",Hst=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",qst=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bst():t==="fa"?Pst():t==="ar"?Fst():t==="es"?Hst():t==="hi"?qst():$st()}),Ust=()=>"Blank project",Gst=()=>"空白项目",Vst=()=>"پروژهٔ خالی",Kst=()=>"مشروع فارغ",Wst=()=>"Proyecto en blanco",Qst=()=>"खाली प्रोजेक्ट",Xst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gst():t==="fa"?Vst():t==="ar"?Kst():t==="es"?Wst():t==="hi"?Qst():Ust()}),Yst=()=>"Cancel",Zst=()=>"取消",Jst=()=>"لغو",eit=()=>"إلغاء",tit=()=>"Cancelar",nit=()=>"रद्द करें",rit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zst():t==="fa"?Jst():t==="ar"?eit():t==="es"?tit():t==="hi"?nit():Yst()}),sit=()=>"Change",iit=()=>"更改",ait=()=>"تغییر",oit=()=>"تغيير",cit=()=>"Cambiar",lit=()=>"बदलें",uit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iit():t==="fa"?ait():t==="ar"?oit():t==="es"?cit():t==="hi"?lit():sit()}),_it=()=>"Change selected paper",fit=()=>"更改所选论文",dit=()=>"تغییر مقالهٔ انتخاب‌شده",hit=()=>"تغيير الورقة المحددة",pit=()=>"Cambiar el paper seleccionado",mit=()=>"चयनित पेपर बदलें",git=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fit():t==="fa"?dit():t==="ar"?hit():t==="es"?pit():t==="hi"?mit():_it()}),vit=()=>"Check out a Git branch before using this folder.",bit=()=>"使用此文件夹前,请先检出一个 Git 分支。",yit=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",xit=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",wit=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",kit=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Sit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bit():t==="fa"?yit():t==="ar"?xit():t==="es"?wit():t==="hi"?kit():vit()}),Cit=()=>"Checking project location.",Eit=()=>"正在检查项目位置。",Nit=()=>"در حال بررسی محل پروژه.",zit=()=>"جارٍ التحقق من موقع المشروع.",jit=()=>"Comprobando la ubicación del proyecto.",Tit=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eit():t==="fa"?Nit():t==="ar"?zit():t==="es"?jit():t==="hi"?Tit():Cit()}),Ait=()=>"Existing folder",Rit=()=>"现有文件夹",Mit=()=>"پوشهٔ موجود",Oit=()=>"مجلد موجود",Dit=()=>"Carpeta existente",Lit=()=>"मौजूदा फ़ोल्डर",Iit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rit():t==="fa"?Mit():t==="ar"?Oit():t==="es"?Dit():t==="hi"?Lit():Ait()}),$it=()=>"Experiment branches will be pushed to the remote GitHub repository.",Bit=()=>"实验分支将推送到远程 GitHub 仓库。",Pit=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Fit=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",Hit=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",qit=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",Uit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bit():t==="fa"?Pit():t==="ar"?Fit():t==="es"?Hit():t==="hi"?qit():$it()}),Git=()=>"From a paper",Vit=()=>"从论文创建",Kit=()=>"از یک مقاله",Wit=()=>"من ورقة بحثية",Qit=()=>"A partir de un paper",Xit=()=>"एक पेपर से",Yit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vit():t==="fa"?Kit():t==="ar"?Wit():t==="es"?Qit():t==="hi"?Xit():Git()}),Zit=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",Jit=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",eat=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",tat=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",nat=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",rat=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",sat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jit():t==="fa"?eat():t==="ar"?tat():t==="es"?nat():t==="hi"?rat():Zit()}),iat=()=>"my-research",aat=()=>"my-research",oat=()=>"my-research",cat=()=>"my-research",lat=()=>"mi-investigacion",uat=()=>"मेरा-शोध",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aat():t==="fa"?oat():t==="ar"?cat():t==="es"?lat():t==="hi"?uat():iat()}),_at=()=>"No papers found. Try an arXiv ID, URL, or a different title.",fat=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",dat=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",hat=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",pat=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",mat=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",gat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fat():t==="fa"?dat():t==="ar"?hat():t==="es"?pat():t==="hi"?mat():_at()}),vat=()=>"No public repository found on alphaXiv",bat=()=>"在 alphaXiv 上未找到公开仓库",yat=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",xat=()=>"لم يُعثر على مستودع عام على alphaXiv",wat=()=>"No se encontró ningún repositorio público en alphaXiv",kat=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Sat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bat():t==="fa"?yat():t==="ar"?xat():t==="es"?wat():t==="hi"?kat():vat()}),Cat=()=>"OpenResearch will start a blank project with this paper's PDF.",Eat=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Nat=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",zat=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",jat=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Tat=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Aat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eat():t==="fa"?Nat():t==="ar"?zat():t==="es"?jat():t==="hi"?Tat():Cat()}),Rat=()=>"Paper",Mat=()=>"论文",Oat=()=>"مقاله",Dat=()=>"ورقة بحثية",Lat=()=>"Paper",Iat=()=>"पेपर",$at=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mat():t==="fa"?Oat():t==="ar"?Dat():t==="es"?Lat():t==="hi"?Iat():Rat()}),Bat=()=>"Project location",Pat=()=>"项目位置",Fat=()=>"محل پروژه",Hat=()=>"موقع المشروع",qat=()=>"Ubicación del proyecto",Uat=()=>"प्रोजेक्ट स्थान",Y2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pat():t==="fa"?Fat():t==="ar"?Hat():t==="es"?qat():t==="hi"?Uat():Bat()}),Gat=()=>"Project name",Vat=()=>"项目名称",Kat=()=>"نام پروژه",Wat=()=>"اسم المشروع",Qat=()=>"Nombre del proyecto",Xat=()=>"प्रोजेक्ट नाम",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vat():t==="fa"?Kat():t==="ar"?Wat():t==="es"?Qat():t==="hi"?Xat():Gat()}),Yat=()=>"Search for a paper by arXiv ID, URL, or title",Zat=()=>"按 arXiv ID、网址或标题搜索论文",Jat=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",eot=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",tot=()=>"Busca un paper por ID de arXiv, URL o título",not=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",rot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zat():t==="fa"?Jat():t==="ar"?eot():t==="es"?tot():t==="hi"?not():Yat()}),sot=()=>"Sync experiments to GitHub",iot=()=>"将实验同步到 GitHub",aot=()=>"همگام‌سازی آزمایش‌ها با GitHub",oot=()=>"مزامنة التجارب مع GitHub",cot=()=>"Sincronizar experimentos con GitHub",lot=()=>"प्रयोग GitHub पर सिंक करें",uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iot():t==="fa"?aot():t==="ar"?oot():t==="es"?cot():t==="hi"?lot():sot()}),_ot=()=>"That folder no longer exists. Choose it again.",fot=()=>"该文件夹已不存在。请重新选择。",dot=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",hot=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",pot=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",mot=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",got=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fot():t==="fa"?dot():t==="ar"?hot():t==="es"?pot():t==="hi"?mot():_ot()}),vot=()=>"The selected folder contains an invalid Git repository.",bot=()=>"所选文件夹包含无效的 Git 仓库。",yot=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",xot=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",wot=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",kot=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Sot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bot():t==="fa"?yot():t==="ar"?xot():t==="es"?wot():t==="hi"?kot():vot()}),Cot=()=>"The selected path is not a folder.",Eot=()=>"所选路径不是文件夹。",Not=()=>"مسیر انتخاب‌شده پوشه نیست.",zot=()=>"المسار المحدد ليس مجلدًا.",jot=()=>"La ruta seleccionada no es una carpeta.",Tot=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Aot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eot():t==="fa"?Not():t==="ar"?zot():t==="es"?jot():t==="hi"?Tot():Cot()}),Rot=e=>`Checking ${e==null?void 0:e.repository}.`,Mot=e=>`正在检查 ${e==null?void 0:e.repository}。`,Oot=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Dot=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,Lot=e=>`Comprobando ${e==null?void 0:e.repository}.`,Iot=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,$ot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mot(e):t==="fa"?Oot(e):t==="ar"?Dot(e):t==="es"?Lot(e):t==="hi"?Iot(e):Rot(e)}),Bot=e=>`Creates ${e==null?void 0:e.repository}.`,Pot=e=>`将创建 ${e==null?void 0:e.repository}。`,Fot=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,Hot=e=>`ينشئ ${e==null?void 0:e.repository}.`,qot=e=>`Crea ${e==null?void 0:e.repository}.`,Uot=e=>`${e==null?void 0:e.repository} बनाता है।`,Got=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pot(e):t==="fa"?Fot(e):t==="ar"?Hot(e):t==="es"?qot(e):t==="hi"?Uot(e):Bot(e)}),Vot=e=>`Pushes to ${e==null?void 0:e.repository}.`,Kot=e=>`将推送到 ${e==null?void 0:e.repository}。`,Wot=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,Qot=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,Xot=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,Yot=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,Zot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kot(e):t==="fa"?Wot(e):t==="ar"?Qot(e):t==="es"?Xot(e):t==="hi"?Yot(e):Vot(e)}),Jot=()=>"Project location is required.",ect=()=>"必须填写项目位置。",tct=()=>"محل پروژه الزامی است.",nct=()=>"موقع المشروع مطلوب.",rct=()=>"La ubicación del proyecto es obligatoria.",sct=()=>"प्रोजेक्ट स्थान ज़रूरी है।",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ect():t==="fa"?tct():t==="ar"?nct():t==="es"?rct():t==="hi"?sct():Jot()}),ict=()=>"Choose a different destination. The paper repository needs a new or empty folder.",act=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",oct=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",cct=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",lct=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",uct=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?act():t==="fa"?oct():t==="ar"?cct():t==="es"?lct():t==="hi"?uct():ict()}),_ct=()=>"A linked public code repository is cloned without credentials.",fct=()=>"关联的公开代码仓库无需凭据即可克隆。",dct=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",hct=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",pct=()=>"El repositorio de código público vinculado se clona sin credenciales.",mct=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",gct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fct():t==="fa"?dct():t==="ar"?hct():t==="es"?pct():t==="hi"?mct():_ct()}),vct=e=>`Run ${e==null?void 0:e.command} before creating the project.`,bct=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,yct=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,xct=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,wct=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,kct=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Sct=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bct(e):t==="fa"?yct(e):t==="ar"?xct(e):t==="es"?wct(e):t==="hi"?kct(e):vct(e)}),Cct=()=>"Searching alphaXiv…",Ect=()=>"正在搜索 alphaXiv…",Nct=()=>"در حال جست‌وجوی alphaXiv…",zct=()=>"جارٍ البحث في alphaXiv…",jct=()=>"Buscando en alphaXiv…",Tct=()=>"alphaXiv खोजा जा रहा है…",Act=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ect():t==="fa"?Nct():t==="ar"?zct():t==="es"?jct():t==="hi"?Tct():Cct()}),Rct=()=>"Use folder",Mct=()=>"使用文件夹",Oct=()=>"استفاده از پوشه",Dct=()=>"استخدام المجلد",Lct=()=>"Usar carpeta",Ict=()=>"फ़ोल्डर इस्तेमाल करें",$ct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mct():t==="fa"?Oct():t==="ar"?Dct():t==="es"?Lct():t==="hi"?Ict():Rct()}),Bct=()=>"Can’t reach OpenResearch. This page is no longer live.",Pct=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Fct=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Hct=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",qct=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",Uct=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",o3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pct():t==="fa"?Fct():t==="ar"?Hct():t==="es"?qct():t==="hi"?Uct():Bct()}),Gct=()=>"A workspace for your research agents",Vct=()=>"面向研究智能体的工作空间",Kct=()=>"فضای کاری برای عامل‌های پژوهشی شما",Wct=()=>"مساحة عمل لوكلاء بحثك",Qct=()=>"Un espacio de trabajo para tus agentes de investigación",Xct=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",Yct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vct():t==="fa"?Kct():t==="ar"?Wct():t==="es"?Qct():t==="hi"?Xct():Gct()}),Zct=()=>"Add papers that represent your research interests, including papers by other authors.",Jct=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",elt=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",tlt=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",nlt=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",rlt=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",slt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jct():t==="fa"?elt():t==="ar"?tlt():t==="es"?nlt():t==="hi"?rlt():Zct()}),ilt=()=>"API key",alt=()=>"API 密钥",olt=()=>"کلید API",clt=()=>"مفتاح API",llt=()=>"Clave de API",ult=()=>"API की",Kk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?alt():t==="fa"?olt():t==="ar"?clt():t==="es"?llt():t==="hi"?ult():ilt()}),_lt=()=>"AI/ML",flt=()=>"人工智能与机器学习",dlt=()=>"هوش مصنوعی و یادگیری ماشین",hlt=()=>"الذكاء الاصطناعي/تعلّم الآلة",plt=()=>"IA/ML",mlt=()=>"AI/ML",glt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?flt():t==="fa"?dlt():t==="ar"?hlt():t==="es"?plt():t==="hi"?mlt():_lt()}),vlt=()=>"Biology",blt=()=>"生物学",ylt=()=>"زیست‌شناسی",xlt=()=>"الأحياء",wlt=()=>"Biología",klt=()=>"जीव विज्ञान",Slt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?blt():t==="fa"?ylt():t==="ar"?xlt():t==="es"?wlt():t==="hi"?klt():vlt()}),Clt=()=>"Other",Elt=()=>"其他",Nlt=()=>"سایر",zlt=()=>"أخرى",jlt=()=>"Otra",Tlt=()=>"अन्य",Alt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Elt():t==="fa"?Nlt():t==="ar"?zlt():t==="es"?jlt():t==="hi"?Tlt():Clt()}),Rlt=()=>"Physics",Mlt=()=>"物理学",Olt=()=>"فیزیک",Dlt=()=>"الفيزياء",Llt=()=>"Física",Ilt=()=>"भौतिकी",$lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mlt():t==="fa"?Olt():t==="ar"?Dlt():t==="es"?Llt():t==="hi"?Ilt():Rlt()}),Blt=()=>"Back",Plt=()=>"返回",Flt=()=>"بازگشت",Hlt=()=>"رجوع",qlt=()=>"Atrás",Ult=()=>"वापस",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Plt():t==="fa"?Flt():t==="ar"?Hlt():t==="es"?qlt():t==="hi"?Ult():Blt()}),Glt=()=>"Check failed",Vlt=()=>"检查失败",Klt=()=>"بررسی ناموفق بود",Wlt=()=>"فشل الفحص",Qlt=()=>"Error en la comprobación",Xlt=()=>"जाँच विफल",Ylt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vlt():t==="fa"?Klt():t==="ar"?Wlt():t==="es"?Qlt():t==="hi"?Xlt():Glt()}),Zlt=()=>"Checking",Jlt=()=>"正在检查",eut=()=>"در حال بررسی",tut=()=>"جارٍ الفحص",nut=()=>"Comprobando",rut=()=>"जाँचा जा रहा है",K_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jlt():t==="fa"?eut():t==="ar"?tut():t==="es"?nut():t==="hi"?rut():Zlt()}),sut=()=>"Checking Git…",iut=()=>"正在检查 Git…",aut=()=>"در حال بررسی Git…",out=()=>"جارٍ فحص Git…",cut=()=>"Comprobando Git…",lut=()=>"Git जाँचा जा रहा है…",uut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iut():t==="fa"?aut():t==="ar"?out():t==="es"?cut():t==="hi"?lut():sut()}),_ut=()=>"Choose a coding agent",fut=()=>"选择编程智能体",dut=()=>"یک عامل کدنویسی انتخاب کنید",hut=()=>"اختر وكيل برمجة",put=()=>"Elige un agente de programación",mut=()=>"एक कोडिंग एजेंट चुनें",gut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fut():t==="fa"?dut():t==="ar"?hut():t==="es"?put():t==="hi"?mut():_ut()}),vut=()=>"Choose a coding agent to continue.",but=()=>"选择一个编程智能体以继续。",yut=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",xut=()=>"اختر وكيل برمجة للمتابعة.",wut=()=>"Elige un agente de programación para continuar.",kut=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Sut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?but():t==="fa"?yut():t==="ar"?xut():t==="es"?wut():t==="hi"?kut():vut()}),Cut=()=>"Choose another coding agent",Eut=()=>"选择其他编程智能体",Nut=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",zut=()=>"اختيار وكيل برمجة آخر",jut=()=>"Elegir otro agente de programación",Tut=()=>"दूसरा कोडिंग एजेंट चुनें",Aut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eut():t==="fa"?Nut():t==="ar"?zut():t==="es"?jut():t==="hi"?Tut():Cut()}),Rut=()=>"Choose at least one research area to continue.",Mut=()=>"请至少选择一个研究领域后再继续。",Out=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Dut=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",Lut=()=>"Elige al menos un área de investigación para continuar.",Iut=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",$ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mut():t==="fa"?Out():t==="ar"?Dut():t==="es"?Lut():t==="hi"?Iut():Rut()}),But=()=>"Choose one or more.",Put=()=>"请选择一项或多项。",Fut=()=>"یک یا چند مورد را انتخاب کنید.",Hut=()=>"اختر واحدًا أو أكثر.",qut=()=>"Elige una o varias.",Uut=()=>"एक या अधिक चुनें।",Gut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Put():t==="fa"?Fut():t==="ar"?Hut():t==="es"?qut():t==="hi"?Uut():But()}),Vut=()=>"Choose your preferred coding agent",Kut=()=>"请选择首选编程智能体",Wut=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",Qut=()=>"اختر وكيل البرمجة المفضّل لديك",Xut=()=>"Elige tu agente de programación preferido",Yut=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",Zut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kut():t==="fa"?Wut():t==="ar"?Qut():t==="es"?Xut():t==="hi"?Yut():Vut()}),Jut=()=>"Consolidate your research",e_t=()=>"集中管理研究",t_t=()=>"پژوهش خود را یکپارچه کنید",n_t=()=>"وحّد أبحاثك",r_t=()=>"Consolida tu investigación",s_t=()=>"अपने शोध को एक जगह लाएं",i_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e_t():t==="fa"?t_t():t==="ar"?n_t():t==="es"?r_t():t==="hi"?s_t():Jut()}),a_t=()=>"Continue",o_t=()=>"继续",c_t=()=>"ادامه",l_t=()=>"متابعة",u_t=()=>"Continuar",__t=()=>"जारी रखें",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o_t():t==="fa"?c_t():t==="ar"?l_t():t==="es"?u_t():t==="hi"?__t():a_t()}),f_t=()=>"Describe your research area to continue.",d_t=()=>"请描述你的研究领域后再继续。",h_t=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",p_t=()=>"صِف مجالك البحثي للمتابعة.",m_t=()=>"Describe tu área de investigación para continuar.",g_t=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",v_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d_t():t==="fa"?h_t():t==="ar"?p_t():t==="es"?m_t():t==="hi"?g_t():f_t()}),b_t=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",y_t=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",x_t=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",w_t=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",k_t=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",S_t=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",C_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y_t():t==="fa"?x_t():t==="ar"?w_t():t==="es"?k_t():t==="hi"?S_t():b_t()}),E_t=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",N_t=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",z_t=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",j_t=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",T_t=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",A_t=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",R_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N_t():t==="fa"?z_t():t==="ar"?j_t():t==="es"?T_t():t==="hi"?A_t():E_t()}),M_t=()=>"Error details",O_t=()=>"错误详情",D_t=()=>"جزئیات خطا",L_t=()=>"تفاصيل الخطأ",I_t=()=>"Detalles del error",$_t=()=>"त्रुटि विवरण",B_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_t():t==="fa"?D_t():t==="ar"?L_t():t==="es"?I_t():t==="hi"?$_t():M_t()}),P_t=()=>"Everything stays local",F_t=()=>"一切都保留在本地",H_t=()=>"همه‌چیز محلی می‌ماند",q_t=()=>"كل شيء يبقى محليًا",U_t=()=>"Todo se queda en local",G_t=()=>"सब कुछ लोकल ही रहता है",V_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F_t():t==="fa"?H_t():t==="ar"?q_t():t==="es"?U_t():t==="hi"?G_t():P_t()}),K_t=()=>"Get started",W_t=()=>"开始使用",Q_t=()=>"شروع",X_t=()=>"ابدأ الآن",Y_t=()=>"Empezar",Z_t=()=>"शुरू करें",J_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W_t():t==="fa"?Q_t():t==="ar"?X_t():t==="es"?Y_t():t==="hi"?Z_t():K_t()}),eft=()=>"Git is required for local experiments. Install Git, then re-check.",tft=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",nft=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",rft=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",sft=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",ift=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tft():t==="fa"?nft():t==="ar"?rft():t==="es"?sft():t==="hi"?ift():eft()}),aft=()=>"Ground your agents",oft=()=>"为智能体提供可靠依据",cft=()=>"عامل‌هایتان را به منابع متصل کنید",lft=()=>"زوّد وكلاءك بأساس بحثي",uft=()=>"Dale contexto a tus agentes",_ft=()=>"अपने एजेंटों को आधार दें",fft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oft():t==="fa"?cft():t==="ar"?lft():t==="es"?uft():t==="hi"?_ft():aft()}),dft=()=>"Install broken",hft=()=>"安装损坏",pft=()=>"نصب خراب است",mft=()=>"التثبيت معطوب",gft=()=>"Instalación dañada",vft=()=>"इंस्टॉल खराब है",bft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hft():t==="fa"?pft():t==="ar"?mft():t==="es"?gft():t==="hi"?vft():dft()}),yft=()=>"Install Git to continue",xft=()=>"请安装 Git 后再继续",wft=()=>"برای ادامه Git را نصب کنید",kft=()=>"ثبّت Git للمتابعة",Sft=()=>"Instala Git para continuar",Cft=()=>"जारी रखने के लिए Git इंस्टॉल करें",Eft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xft():t==="fa"?wft():t==="ar"?kft():t==="es"?Sft():t==="hi"?Cft():yft()}),Nft=()=>"Loading account details…",zft=()=>"正在加载账户信息…",jft=()=>"در حال بارگذاری اطلاعات حساب…",Tft=()=>"جارٍ تحميل تفاصيل الحساب…",Aft=()=>"Cargando los datos de la cuenta…",Rft=()=>"खाता विवरण लोड हो रहा है…",Mft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zft():t==="fa"?jft():t==="ar"?Tft():t==="es"?Aft():t==="hi"?Rft():Nft()}),Oft=()=>"Local Git",Dft=()=>"本地 Git",Lft=()=>"Git محلی",Ift=()=>"Git محلي",$ft=()=>"Git local",Bft=()=>"लोकल Git",Pft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dft():t==="fa"?Lft():t==="ar"?Ift():t==="es"?$ft():t==="hi"?Bft():Oft()}),Fft=()=>"Install needed",Hft=()=>"需要安装",qft=()=>"نیاز به نصب",Uft=()=>"التثبيت مطلوب",Gft=()=>"No detectado",Vft=()=>"इंस्टॉल ज़रूरी है",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hft():t==="fa"?qft():t==="ar"?Uft():t==="es"?Gft():t==="hi"?Vft():Fft()}),Kft=()=>"Not found",Wft=()=>"未找到",Qft=()=>"پیدا نشد",Xft=()=>"غير موجود",Yft=()=>"No encontrado",Zft=()=>"नहीं मिला",WD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wft():t==="fa"?Qft():t==="ar"?Xft():t==="es"?Yft():t==="hi"?Zft():Kft()}),Jft=()=>"Signed out",edt=()=>"未登录",tdt=()=>"وارد نشده",ndt=()=>"غير مسجل الدخول",rdt=()=>"Sin iniciar sesión",sdt=()=>"साइन आउट",QD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?edt():t==="fa"?tdt():t==="ar"?ndt():t==="es"?rdt():t==="hi"?sdt():Jft()}),idt=()=>"OpenResearch uses a coding agent already installed on this machine.",adt=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",odt=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",cdt=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",ldt=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",udt=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",_dt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?adt():t==="fa"?odt():t==="ar"?cdt():t==="es"?ldt():t==="hi"?udt():idt()}),fdt=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",ddt=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",hdt=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",pdt=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",mdt=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",gdt=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",vdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ddt():t==="fa"?hdt():t==="ar"?pdt():t==="es"?mdt():t==="hi"?gdt():fdt()}),bdt=()=>"Other research area",ydt=()=>"其他研究领域",xdt=()=>"حوزهٔ پژوهشی دیگر",wdt=()=>"مجال بحثي آخر",kdt=()=>"Otra área de investigación",Sdt=()=>"अन्य शोध क्षेत्र",Cdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ydt():t==="fa"?xdt():t==="ar"?wdt():t==="es"?kdt():t==="hi"?Sdt():bdt()}),Edt=()=>"Re-check",Ndt=()=>"重新检查",zdt=()=>"بررسی دوباره",jdt=()=>"إعادة الفحص",Tdt=()=>"Volver a comprobar",Adt=()=>"फिर से जाँचें",Nv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ndt():t==="fa"?zdt():t==="ar"?jdt():t==="es"?Tdt():t==="hi"?Adt():Edt()}),Rdt=()=>"Ready",Mdt=()=>"已就绪",Odt=()=>"آماده",Ddt=()=>"جاهز",Ldt=()=>"Listo",Idt=()=>"तैयार",Wk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mdt():t==="fa"?Odt():t==="ar"?Ddt():t==="es"?Ldt():t==="hi"?Idt():Rdt()}),$dt=()=>"Re-check Git before continuing",Bdt=()=>"请重新检查 Git 后再继续",Pdt=()=>"پیش از ادامه Git را دوباره بررسی کنید",Fdt=()=>"أعد فحص Git قبل المتابعة",Hdt=()=>"Vuelve a comprobar Git antes de continuar",qdt=()=>"जारी रखने से पहले Git फिर से जाँचें",Udt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bdt():t==="fa"?Pdt():t==="ar"?Fdt():t==="es"?Hdt():t==="hi"?qdt():$dt()}),Gdt=()=>"Representative papers",Vdt=()=>"代表性论文",Kdt=()=>"مقاله‌های شاخص",Wdt=()=>"أوراق تمثّل اهتماماتك البحثية",Qdt=()=>"Papers representativos",Xdt=()=>"प्रतिनिधि पेपर",Ydt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vdt():t==="fa"?Kdt():t==="ar"?Wdt():t==="es"?Qdt():t==="hi"?Xdt():Gdt()}),Zdt=()=>"Research background",Jdt=()=>"研究背景",eht=()=>"پیشینهٔ پژوهشی",tht=()=>"الخلفية البحثية",nht=()=>"Trayectoria de investigación",rht=()=>"शोध पृष्ठभूमि",sht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jdt():t==="fa"?eht():t==="ar"?tht():t==="es"?nht():t==="hi"?rht():Zdt()}),iht=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",aht=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",oht=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",cht=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",lht=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",uht=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",Z2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aht():t==="fa"?oht():t==="ar"?cht():t==="es"?lht():t==="hi"?uht():iht()}),_ht=()=>"Search alphaXiv by title to link a paper…",fht=()=>"按标题搜索 alphaXiv 以关联论文…",dht=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",hht=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",pht=()=>"Busca en alphaXiv por título para vincular un paper…",mht=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",ght=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fht():t==="fa"?dht():t==="ar"?hht():t==="es"?pht():t==="hi"?mht():_ht()}),vht=()=>"Searching alphaXiv…",bht=()=>"正在搜索 alphaXiv…",yht=()=>"در حال جست‌وجوی alphaXiv…",xht=()=>"جارٍ البحث في alphaXiv…",wht=()=>"Buscando en alphaXiv…",kht=()=>"alphaXiv खोजा जा रहा है…",Sht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bht():t==="fa"?yht():t==="ar"?xht():t==="es"?wht():t==="hi"?kht():vht()}),Cht=()=>"Selected",Eht=()=>"已选择",Nht=()=>"انتخاب‌شده",zht=()=>"محدد",jht=()=>"Seleccionado",Tht=()=>"चयनित",Aht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eht():t==="fa"?Nht():t==="ar"?zht():t==="es"?jht():t==="hi"?Tht():Cht()}),Rht=()=>"Local model unavailable",Mht=()=>"本地模型不可用",Oht=()=>"مدل محلی در دسترس نیست",Dht=()=>"النموذج المحلي غير متاح",Lht=()=>"Modelo local no disponible",Iht=()=>"लोकल मॉडल उपलब्ध नहीं",XD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mht():t==="fa"?Oht():t==="ar"?Dht():t==="es"?Lht():t==="hi"?Iht():Rht()}),$ht=()=>"Setting things up…",Bht=()=>"正在设置…",Pht=()=>"در حال راه‌اندازی…",Fht=()=>"جارٍ التهيئة…",Hht=()=>"Preparando todo…",qht=()=>"सेट अप किया जा रहा है…",Uht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bht():t==="fa"?Pht():t==="ar"?Fht():t==="es"?Hht():t==="hi"?qht():$ht()}),Ght=()=>"Connect a local model or sign in to a coding agent to continue",Vht=()=>"连接本地模型或登录编码智能体以继续",Kht=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",Wht=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",Qht=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",Xht=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",Yht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vht():t==="fa"?Kht():t==="ar"?Wht():t==="es"?Qht():t==="hi"?Xht():Ght()}),Zht=()=>"Connect a local model or sign in to an agent to continue.",Jht=()=>"连接本地模型或登录一个智能体以继续。",ept=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",tpt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",npt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",rpt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",spt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jht():t==="fa"?ept():t==="ar"?tpt():t==="es"?npt():t==="hi"?rpt():Zht()}),ipt=()=>"Signed in",apt=()=>"已登录",opt=()=>"وارد شده",cpt=()=>"تم تسجيل الدخول",lpt=()=>"Sesión iniciada",upt=()=>"साइन इन",_pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?apt():t==="fa"?opt():t==="ar"?cpt():t==="es"?lpt():t==="hi"?upt():ipt()}),fpt=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",dpt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",hpt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",ppt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",mpt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",gpt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpt():t==="fa"?hpt():t==="ar"?ppt():t==="es"?mpt():t==="hi"?gpt():fpt()}),bpt=()=>"· Step 1 of 2",ypt=()=>"· 第 1 步,共 2 步",xpt=()=>"· مرحلهٔ ۱ از ۲",wpt=()=>"· الخطوة 1 من 2",kpt=()=>"· Paso 1 de 2",Spt=()=>"· चरण 1 / 2",Cpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ypt():t==="fa"?xpt():t==="ar"?wpt():t==="es"?kpt():t==="hi"?Spt():bpt()}),Ept=()=>"· Step 2 of 2",Npt=()=>"· 第 2 步,共 2 步",zpt=()=>"· مرحلهٔ ۲ از ۲",jpt=()=>"· الخطوة 2 من 2",Tpt=()=>"· Paso 2 de 2",Apt=()=>"· चरण 2 / 2",Rpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Npt():t==="fa"?zpt():t==="ar"?jpt():t==="es"?Tpt():t==="hi"?Apt():Ept()}),Mpt=()=>"Tell us about your research",Opt=()=>"介绍一下你的研究",Dpt=()=>"از پژوهش خود بگویید",Lpt=()=>"أخبرنا عن بحثك",Ipt=()=>"Cuéntanos sobre tu investigación",$pt=()=>"हमें अपने शोध के बारे में बताएं",Bpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Opt():t==="fa"?Dpt():t==="ar"?Lpt():t==="es"?Ipt():t==="hi"?$pt():Mpt()}),Ppt=()=>"Tell us your other research area",Fpt=()=>"告诉我们你的其他研究领域",Hpt=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",qpt=()=>"أخبرنا عن مجالك البحثي الآخر",Upt=()=>"Cuéntanos cuál es tu otra área de investigación",Gpt=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",Vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fpt():t==="fa"?Hpt():t==="ar"?qpt():t==="es"?Upt():t==="hi"?Gpt():Ppt()}),Kpt=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",Wpt=()=>"在一处跟踪实验、产物、算力、技能和代码。",Qpt=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Xpt=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",Ypt=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",Zpt=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",Jpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wpt():t==="fa"?Qpt():t==="ar"?Xpt():t==="es"?Ypt():t==="hi"?Zpt():Kpt()}),e0t=()=>"Unable to verify",t0t=()=>"无法验证",n0t=()=>"تأیید ممکن نیست",r0t=()=>"تعذّر التحقق",s0t=()=>"No se pudo verificar",i0t=()=>"सत्यापित नहीं हो सका",a0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t0t():t==="fa"?n0t():t==="ar"?r0t():t==="es"?s0t():t==="hi"?i0t():e0t()}),o0t=()=>"Update required",c0t=()=>"需要更新",l0t=()=>"نیازمند به‌روزرسانی",u0t=()=>"مطلوب تحديث",_0t=()=>"Actualización necesaria",f0t=()=>"अपडेट ज़रूरी है",d0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c0t():t==="fa"?l0t():t==="ar"?u0t():t==="es"?_0t():t==="hi"?f0t():o0t()}),h0t=()=>"Waiting for the Git check",p0t=()=>"正在等待 Git 检查",m0t=()=>"در انتظار بررسی Git",g0t=()=>"في انتظار فحص Git",v0t=()=>"Esperando la comprobación de Git",b0t=()=>"Git जाँच का इंतज़ार है",y0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p0t():t==="fa"?m0t():t==="ar"?g0t():t==="es"?v0t():t==="hi"?b0t():h0t()}),x0t=()=>"Waiting for the local tool checks",w0t=()=>"正在等待本地工具检查",k0t=()=>"در انتظار بررسی ابزارهای محلی",S0t=()=>"في انتظار فحوص الأدوات المحلية",C0t=()=>"Esperando las comprobaciones de las herramientas locales",E0t=()=>"लोकल टूल जाँच का इंतज़ार है",N0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w0t():t==="fa"?k0t():t==="ar"?S0t():t==="es"?C0t():t==="hi"?E0t():x0t()}),z0t=()=>"What areas are you interested in?",j0t=()=>"你对哪些领域感兴趣?",T0t=()=>"به چه حوزه‌هایی علاقه دارید؟",A0t=()=>"ما المجالات التي تهتم بها؟",R0t=()=>"¿Qué áreas te interesan?",M0t=()=>"आपकी रुचि किन क्षेत्रों में है?",O0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j0t():t==="fa"?T0t():t==="ar"?A0t():t==="es"?R0t():t==="hi"?M0t():z0t()}),D0t=()=>"Your code, data, and experiment history stay on your machine.",L0t=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",I0t=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",$0t=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",B0t=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",P0t=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",F0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L0t():t==="fa"?I0t():t==="ar"?$0t():t==="es"?B0t():t==="hi"?P0t():D0t()}),H0t=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",q0t=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",U0t=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",G0t=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",V0t=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",K0t=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",W0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q0t():t==="fa"?U0t():t==="ar"?G0t():t==="es"?V0t():t==="hi"?K0t():H0t()}),Q0t=()=>"Add cookie",X0t=()=>"添加 cookie",Y0t=()=>"افزودن کوکی",Z0t=()=>"إضافة ملف تعريف الارتباط",J0t=()=>"Añadir cookie",emt=()=>"कुकी जोड़ें",tmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X0t():t==="fa"?Y0t():t==="ar"?Z0t():t==="es"?J0t():t==="hi"?emt():Q0t()}),nmt=()=>"Changed here and on Overleaf — choose which copy to keep",rmt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",smt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",imt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",amt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",omt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",cmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rmt():t==="fa"?smt():t==="ar"?imt():t==="es"?amt():t==="hi"?omt():nmt()}),lmt=()=>"Create a token ↗",umt=()=>"创建令牌 ↗",_mt=()=>"ساخت توکن ↗",fmt=()=>"إنشاء رمز ↗",dmt=()=>"Crear un token ↗",hmt=()=>"एक टोकन बनाएं ↗",pmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?umt():t==="fa"?_mt():t==="ar"?fmt():t==="es"?dmt():t==="hi"?hmt():lmt()}),mmt=()=>"Overleaf Git token",gmt=()=>"Overleaf Git 令牌",vmt=()=>"توکن Git در Overleaf",bmt=()=>"رمز Git لـ Overleaf",ymt=()=>"Token de Git de Overleaf",xmt=()=>"Overleaf Git टोकन",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gmt():t==="fa"?vmt():t==="ar"?bmt():t==="es"?ymt():t==="hi"?xmt():mmt()}),wmt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",kmt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Smt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",Cmt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",Emt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",Nmt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",zmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kmt():t==="fa"?Smt():t==="ar"?Cmt():t==="es"?Emt():t==="hi"?Nmt():wmt()}),jmt=()=>"Import from browser",Tmt=()=>"从浏览器导入",Amt=()=>"وارد کردن از مرورگر",Rmt=()=>"الاستيراد من المتصفح",Mmt=()=>"Importar desde el navegador",Omt=()=>"ब्राउज़र से इंपोर्ट करें",Dmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tmt():t==="fa"?Amt():t==="ar"?Rmt():t==="es"?Mmt():t==="hi"?Omt():jmt()}),Lmt=()=>"In step with Overleaf",Imt=()=>"已与 Overleaf 同步",$mt=()=>"با Overleaf همگام است",Bmt=()=>"متزامن مع Overleaf",Pmt=()=>"Sincronizado con Overleaf",Fmt=()=>"Overleaf के साथ मेल में",YD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Imt():t==="fa"?$mt():t==="ar"?Bmt():t==="es"?Pmt():t==="hi"?Fmt():Lmt()}),Hmt=()=>"The last sync did not finish.",qmt=()=>"上次同步未完成。",Umt=()=>"آخرین همگام‌سازی کامل نشد.",Gmt=()=>"لم تكتمل آخر مزامنة.",Vmt=()=>"La última sincronización no terminó.",Kmt=()=>"पिछला सिंक पूरा नहीं हुआ।",Wmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qmt():t==="fa"?Umt():t==="ar"?Gmt():t==="es"?Vmt():t==="hi"?Kmt():Hmt()}),Qmt=()=>"Link and sync",Xmt=()=>"关联并同步",Ymt=()=>"پیوند و همگام‌سازی",Zmt=()=>"الربط والمزامنة",Jmt=()=>"Vincular y sincronizar",egt=()=>"लिंक करें और सिंक करें",tgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xmt():t==="fa"?Ymt():t==="ar"?Zmt():t==="es"?Jmt():t==="hi"?egt():Qmt()}),ngt=()=>"Connecting to Overleaf…",rgt=()=>"正在连接 Overleaf…",sgt=()=>"در حال اتصال به Overleaf…",igt=()=>"جارٍ الاتصال بـ Overleaf…",agt=()=>"Conectando con Overleaf…",ogt=()=>"Overleaf से कनेक्ट हो रहा है…",cgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rgt():t==="fa"?sgt():t==="ar"?igt():t==="es"?agt():t==="hi"?ogt():ngt()}),lgt=()=>"Edits are live on Overleaf",ugt=()=>"编辑已在 Overleaf 实时同步",_gt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",fgt=()=>"تظهر التعديلات فورًا على Overleaf",dgt=()=>"Los cambios se sincronizan en directo con Overleaf",hgt=()=>"बदलाव Overleaf पर लाइव हैं",pgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ugt():t==="fa"?_gt():t==="ar"?fgt():t==="es"?dgt():t==="hi"?hgt():lgt()}),mgt=()=>"Retry",ggt=()=>"重试",vgt=()=>"تلاش دوباره",bgt=()=>"إعادة المحاولة",ygt=()=>"Reintentar",xgt=()=>"फिर से कोशिश करें",wgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ggt():t==="fa"?vgt():t==="ar"?bgt():t==="es"?ygt():t==="hi"?xgt():mgt()}),kgt=()=>"Live sync stopped.",Sgt=()=>"实时同步已停止。",Cgt=()=>"همگام‌سازی زنده متوقف شد.",Egt=()=>"توقفت المزامنة المباشرة.",Ngt=()=>"Sincronización en directo detenida.",zgt=()=>"लाइव सिंक रुक गया।",jgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sgt():t==="fa"?Cgt():t==="ar"?Egt():t==="es"?Ngt():t==="hi"?zgt():kgt()}),Tgt=()=>"Live sync starts once the paper is in step with Overleaf.",Agt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Rgt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Mgt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Ogt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Dgt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",Lgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Agt():t==="fa"?Rgt():t==="ar"?Mgt():t==="es"?Ogt():t==="hi"?Dgt():Tgt()}),Igt=()=>"My projects ↗",$gt=()=>"我的项目 ↗",Bgt=()=>"پروژه‌های من ↗",Pgt=()=>"مشاريعي ↗",Fgt=()=>"Mis proyectos ↗",Hgt=()=>"मेरे प्रोजेक्ट ↗",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$gt():t==="fa"?Bgt():t==="ar"?Pgt():t==="es"?Fgt():t==="hi"?Hgt():Igt()}),qgt=()=>"Nothing could be synced.",Ugt=()=>"没有内容可以同步。",Ggt=()=>"هیچ موردی قابل همگام‌سازی نبود.",Vgt=()=>"تعذّرت مزامنة أي شيء.",Kgt=()=>"No se pudo sincronizar nada.",Wgt=()=>"कुछ भी सिंक नहीं हो सका।",Qgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ugt():t==="fa"?Ggt():t==="ar"?Vgt():t==="es"?Kgt():t==="hi"?Wgt():qgt()}),Xgt=()=>"Open Overleaf ↗",Ygt=()=>"打开 Overleaf ↗",Zgt=()=>"باز کردن Overleaf ↗",Jgt=()=>"فتح Overleaf ↗",e1t=()=>"Abrir Overleaf ↗",t1t=()=>"Overleaf खोलें ↗",n1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ygt():t==="fa"?Zgt():t==="ar"?Jgt():t==="es"?e1t():t==="hi"?t1t():Xgt()}),r1t=()=>"Cancel",s1t=()=>"取消",i1t=()=>"لغو",a1t=()=>"إلغاء",o1t=()=>"Cancelar",c1t=()=>"रद्द करें",ZD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s1t():t==="fa"?i1t():t==="ar"?a1t():t==="es"?o1t():t==="hi"?c1t():r1t()}),l1t=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",u1t=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",_1t=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",f1t=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",d1t=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",h1t=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",p1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u1t():t==="fa"?_1t():t==="ar"?f1t():t==="es"?d1t():t==="hi"?h1t():l1t()}),m1t=()=>"Keep this copy",g1t=()=>"保留此副本",v1t=()=>"نگه داشتن این نسخه",b1t=()=>"الاحتفاظ بهذه النسخة",y1t=()=>"Conservar esta copia",x1t=()=>"यह कॉपी रखें",w1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g1t():t==="fa"?v1t():t==="ar"?b1t():t==="es"?y1t():t==="hi"?x1t():m1t()}),k1t=()=>"Open in Overleaf",S1t=()=>"在 Overleaf 中打开",C1t=()=>"باز کردن در Overleaf",E1t=()=>"فتح في Overleaf",N1t=()=>"Abrir en Overleaf",z1t=()=>"Overleaf में खोलें",j1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S1t():t==="fa"?C1t():t==="ar"?E1t():t==="es"?N1t():t==="hi"?z1t():k1t()}),T1t=()=>"Replace the Overleaf token",A1t=()=>"替换 Overleaf 令牌",R1t=()=>"جایگزینی توکن Overleaf",M1t=()=>"استبدال رمز Overleaf",O1t=()=>"Reemplazar el token de Overleaf",D1t=()=>"Overleaf टोकन बदलें",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A1t():t==="fa"?R1t():t==="ar"?M1t():t==="es"?O1t():t==="hi"?D1t():T1t()}),L1t=()=>"Sync files",I1t=()=>"同步文件",$1t=()=>"همگام‌سازی فایل‌ها",B1t=()=>"مزامنة الملفات",P1t=()=>"Sincronizar archivos",F1t=()=>"फ़ाइलें सिंक करें",H1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I1t():t==="fa"?$1t():t==="ar"?B1t():t==="es"?P1t():t==="hi"?F1t():L1t()}),q1t=()=>"Unlink",U1t=()=>"取消关联",G1t=()=>"قطع پیوند",V1t=()=>"إلغاء الربط",K1t=()=>"Desvincular",W1t=()=>"लिंक हटाएं",Q1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U1t():t==="fa"?G1t():t==="ar"?V1t():t==="es"?K1t():t==="hi"?W1t():q1t()}),X1t=()=>"Upload a copy as a new project ↗",Y1t=()=>"上传副本作为新项目 ↗",Z1t=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",J1t=()=>"رفع نسخة كمشروع جديد ↗",evt=()=>"Subir una copia como proyecto nuevo ↗",tvt=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",JD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y1t():t==="fa"?Z1t():t==="ar"?J1t():t==="es"?evt():t==="hi"?tvt():X1t()}),nvt=()=>"Use Overleaf's",rvt=()=>"使用 Overleaf 的副本",svt=()=>"استفاده از نسخهٔ Overleaf",ivt=()=>"استخدام نسخة Overleaf",avt=()=>"Usar la de Overleaf",ovt=()=>"Overleaf का इस्तेमाल करें",cvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rvt():t==="fa"?svt():t==="ar"?ivt():t==="es"?avt():t==="hi"?ovt():nvt()}),lvt=()=>"This paper stays in step with Overleaf.",uvt=()=>"此论文将与 Overleaf 保持同步。",_vt=()=>"این مقاله با Overleaf همگام می‌ماند.",fvt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",dvt=()=>"Este paper se mantiene sincronizado con Overleaf.",hvt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",pvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uvt():t==="fa"?_vt():t==="ar"?fvt():t==="es"?dvt():t==="hi"?hvt():lvt()}),mvt=()=>"Paste it instead",gvt=()=>"改为粘贴",vvt=()=>"به‌جایش بچسبانید",bvt=()=>"الصقه بدلًا من ذلك",yvt=()=>"Pegarla manualmente",xvt=()=>"इसके बजाय पेस्ट करें",wvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gvt():t==="fa"?vvt():t==="ar"?bvt():t==="es"?yvt():t==="hi"?xvt():mvt()}),kvt=e=>`Pulled ${e==null?void 0:e.paths}.`,Svt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Cvt=e=>`${e==null?void 0:e.paths} دریافت شد.`,Evt=e=>`سُحب ${e==null?void 0:e.paths}.`,Nvt=e=>`Descargado: ${e==null?void 0:e.paths}.`,zvt=e=>`${e==null?void 0:e.paths} पुल किया।`,jvt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Svt(e):t==="fa"?Cvt(e):t==="ar"?Evt(e):t==="es"?Nvt(e):t==="hi"?zvt(e):kvt(e)}),Tvt=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,Avt=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,Rvt=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,Mvt=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,Ovt=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,Dvt=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,Lvt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Avt(e):t==="fa"?Rvt(e):t==="ar"?Mvt(e):t==="es"?Ovt(e):t==="hi"?Dvt(e):Tvt(e)}),Ivt=e=>`Pushed ${e==null?void 0:e.paths}.`,$vt=e=>`已推送 ${e==null?void 0:e.paths}。`,Bvt=e=>`${e==null?void 0:e.paths} ارسال شد.`,Pvt=e=>`رُفع ${e==null?void 0:e.paths}.`,Fvt=e=>`Subido: ${e==null?void 0:e.paths}.`,Hvt=e=>`${e==null?void 0:e.paths} पुश किया।`,qvt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$vt(e):t==="fa"?Bvt(e):t==="ar"?Pvt(e):t==="es"?Fvt(e):t==="hi"?Hvt(e):Ivt(e)}),Uvt=()=>"Add a fresh Overleaf session cookie to start following again.",Gvt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",Vvt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",Kvt=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",Wvt=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",Qvt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",Xvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gvt():t==="fa"?Vvt():t==="ar"?Kvt():t==="es"?Wvt():t==="hi"?Qvt():Uvt()}),Yvt=()=>"Save the file first",Zvt=()=>"请先保存文件",Jvt=()=>"ابتدا فایل را ذخیره کنید",ebt=()=>"احفظ الملف أولًا",tbt=()=>"Guarda el archivo primero",nbt=()=>"पहले फ़ाइल सेव करें",rbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zvt():t==="fa"?Jvt():t==="ar"?ebt():t==="es"?tbt():t==="hi"?nbt():Yvt()}),sbt=()=>"Save this file to sync it with Overleaf",ibt=()=>"保存此文件以与 Overleaf 同步",abt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",obt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",cbt=()=>"Guarda este archivo para sincronizarlo con Overleaf",lbt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",eL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ibt():t==="fa"?abt():t==="ar"?obt():t==="es"?cbt():t==="hi"?lbt():sbt()}),ubt=()=>"Save token",_bt=()=>"保存令牌",fbt=()=>"ذخیرهٔ توکن",dbt=()=>"حفظ الرمز",hbt=()=>"Guardar token",pbt=()=>"टोकन सेव करें",mbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_bt():t==="fa"?fbt():t==="ar"?dbt():t==="es"?hbt():t==="hi"?pbt():ubt()}),gbt=()=>"Send this paper to Overleaf",vbt=()=>"将此论文发送到 Overleaf",bbt=()=>"ارسال مقاله به Overleaf",ybt=()=>"أرسل هذه الورقة إلى Overleaf",xbt=()=>"Enviar este paper a Overleaf",wbt=()=>"यह पेपर Overleaf को भेजें",kbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vbt():t==="fa"?bbt():t==="ar"?ybt():t==="es"?xbt():t==="hi"?wbt():gbt()}),Sbt=()=>"Overleaf session cookie",Cbt=()=>"Overleaf 会话 cookie",Ebt=()=>"کوکی نشست Overleaf",Nbt=()=>"ملف تعريف ارتباط جلسة Overleaf",zbt=()=>"Cookie de sesión de Overleaf",jbt=()=>"Overleaf सेशन कुकी",c3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cbt():t==="fa"?Ebt():t==="ar"?Nbt():t==="es"?zbt():t==="hi"?jbt():Sbt()}),Tbt=()=>"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.",Abt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Rbt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Mbt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Obt=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",Dbt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",Lbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abt():t==="fa"?Rbt():t==="ar"?Mbt():t==="es"?Obt():t==="hi"?Dbt():Tbt()}),Ibt=()=>"Overleaf sync failed",$bt=()=>"Overleaf 同步失败",Bbt=()=>"همگام‌سازی با Overleaf ناموفق بود",Pbt=()=>"فشلت مزامنة Overleaf",Fbt=()=>"Error al sincronizar con Overleaf",Hbt=()=>"Overleaf सिंक विफल",l3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$bt():t==="fa"?Bbt():t==="ar"?Pbt():t==="es"?Fbt():t==="hi"?Hbt():Ibt()}),qbt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",Ubt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",Gbt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",Vbt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",Kbt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",Wbt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",Qbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ubt():t==="fa"?Gbt():t==="ar"?Vbt():t==="es"?Kbt():t==="hi"?Wbt():qbt()}),Xbt=()=>"Syncing with Overleaf…",Ybt=()=>"正在与 Overleaf 同步…",Zbt=()=>"در حال همگام‌سازی با Overleaf…",Jbt=()=>"جارٍ المزامنة مع Overleaf…",eyt=()=>"Sincronizando con Overleaf…",tyt=()=>"Overleaf के साथ सिंक हो रहा है…",tL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ybt():t==="fa"?Zbt():t==="ar"?Jbt():t==="es"?eyt():t==="hi"?tyt():Xbt()}),nyt=()=>"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.",ryt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",syt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",iyt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",ayt=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",oyt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",cyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ryt():t==="fa"?syt():t==="ar"?iyt():t==="es"?ayt():t==="hi"?oyt():nyt()}),lyt=()=>"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.",uyt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",_yt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",fyt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",dyt=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",hyt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",pyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uyt():t==="fa"?_yt():t==="ar"?fyt():t==="es"?dyt():t==="hi"?hyt():lyt()}),myt=()=>"Toggle Plan mode for this chat",gyt=()=>"切换此聊天的计划模式",vyt=()=>"تغییر حالت طرح این گفت‌وگو",byt=()=>"تبديل وضع التخطيط لهذه المحادثة",yyt=()=>"Activa o desactiva el modo Plan en este chat",xyt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",wyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gyt():t==="fa"?vyt():t==="ar"?byt():t==="es"?yyt():t==="hi"?xyt():myt()}),kyt=()=>"Accept and auto mode",Syt=()=>"接受并使用自动模式",Cyt=()=>"پذیرش و حالت خودکار",Eyt=()=>"قبول وتفعيل الوضع التلقائي",Nyt=()=>"Aceptar en modo automático",zyt=()=>"स्वीकार करें और ऑटो मोड",jyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Syt():t==="fa"?Cyt():t==="ar"?Eyt():t==="es"?Nyt():t==="hi"?zyt():kyt()}),Tyt=()=>"Accept and bypass all",Ayt=()=>"接受并跳过所有审批",Ryt=()=>"پذیرش و عبور از همهٔ تأییدها",Myt=()=>"القبول وتجاوز الكل",Oyt=()=>"Aceptar y omitir permisos",Dyt=()=>"स्वीकार करें और सब बायपास करें",Lyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ayt():t==="fa"?Ryt():t==="ar"?Myt():t==="es"?Oyt():t==="hi"?Dyt():Tyt()}),Iyt=()=>"Accept plan",$yt=()=>"接受计划",Byt=()=>"پذیرش طرح",Pyt=()=>"قبول الخطة",Fyt=()=>"Aceptar plan",Hyt=()=>"प्लान स्वीकार करें",qyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$yt():t==="fa"?Byt():t==="ar"?Pyt():t==="es"?Fyt():t==="hi"?Hyt():Iyt()}),Uyt=e=>`${e==null?void 0:e.agent} proposed a plan`,Gyt=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Vyt=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Kyt=e=>`${e==null?void 0:e.agent} اقترح خطة`,Wyt=e=>`${e==null?void 0:e.agent} propuso un plan`,Qyt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,Xyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gyt(e):t==="fa"?Vyt(e):t==="ar"?Kyt(e):t==="es"?Wyt(e):t==="hi"?Qyt(e):Uyt(e)}),Yyt=e=>`${e==null?void 0:e.agent} is ready to proceed`,Zyt=e=>`${e==null?void 0:e.agent} 已准备好继续`,Jyt=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,ext=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,txt=e=>`${e==null?void 0:e.agent} está listo para continuar`,nxt=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,rxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zyt(e):t==="fa"?Jyt(e):t==="ar"?ext(e):t==="es"?txt(e):t==="hi"?nxt(e):Yyt(e)}),sxt=()=>"Back",ixt=()=>"返回",axt=()=>"بازگشت",oxt=()=>"رجوع",cxt=()=>"Atrás",lxt=()=>"वापस",nL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ixt():t==="fa"?axt():t==="ar"?oxt():t==="es"?cxt():t==="hi"?lxt():sxt()}),uxt=()=>"More approval options",_xt=()=>"更多批准选项",fxt=()=>"گزینه‌های تأیید بیشتر",dxt=()=>"خيارات موافقة إضافية",hxt=()=>"Más opciones de aprobación",pxt=()=>"और स्वीकृति विकल्प",mxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_xt():t==="fa"?fxt():t==="ar"?dxt():t==="es"?hxt():t==="hi"?pxt():uxt()}),gxt=()=>"Open plan",vxt=()=>"打开计划",bxt=()=>"باز کردن طرح",yxt=()=>"فتح الخطة",xxt=()=>"Abrir plan",wxt=()=>"प्लान खोलें",kxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vxt():t==="fa"?bxt():t==="ar"?yxt():t==="es"?xxt():t==="hi"?wxt():gxt()}),Sxt=()=>"Reject",Cxt=()=>"拒绝",Ext=()=>"رد کردن",Nxt=()=>"رفض",zxt=()=>"Rechazar",jxt=()=>"अस्वीकार करें",Txt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cxt():t==="fa"?Ext():t==="ar"?Nxt():t==="es"?zxt():t==="hi"?jxt():Sxt()}),Axt=()=>"Revise",Rxt=()=>"修改",Mxt=()=>"بازنگری",Oxt=()=>"طلب تعديل",Dxt=()=>"Pedir cambios",Lxt=()=>"संशोधित करें",Ixt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rxt():t==="fa"?Mxt():t==="ar"?Oxt():t==="es"?Dxt():t==="hi"?Lxt():Axt()}),$xt=()=>"Revise…",Bxt=()=>"修改…",Pxt=()=>"بازنگری…",Fxt=()=>"طلب تعديل…",Hxt=()=>"Pedir cambios…",qxt=()=>"संशोधित करें…",Uxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bxt():t==="fa"?Pxt():t==="ar"?Fxt():t==="es"?Hxt():t==="hi"?qxt():$xt()}),Gxt=()=>"What should change? (optional)",Vxt=()=>"需要更改什么?(可选)",Kxt=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",Wxt=()=>"ما الذي ينبغي تغييره؟ (اختياري)",Qxt=()=>"¿Qué debería cambiar? (opcional)",Xxt=()=>"क्या बदलना चाहिए? (वैकल्पिक)",Yxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vxt():t==="fa"?Kxt():t==="ar"?Wxt():t==="es"?Qxt():t==="hi"?Xxt():Gxt()}),Zxt=e=>`${e==null?void 0:e.count} active`,Jxt=e=>`${e==null?void 0:e.count} 个活跃`,e2t=e=>`${e==null?void 0:e.count} فعال`,t2t=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,n2t=e=>`${e==null?void 0:e.count} activos`,r2t=e=>`${e==null?void 0:e.count} सक्रिय`,s2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jxt(e):t==="fa"?e2t(e):t==="ar"?t2t(e):t==="es"?n2t(e):t==="hi"?r2t(e):Zxt(e)}),i2t=e=>`${e==null?void 0:e.count} total agents`,a2t=e=>`共 ${e==null?void 0:e.count} 个智能体`,o2t=e=>`در مجموع ${e==null?void 0:e.count} عامل`,c2t=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,l2t=e=>`${e==null?void 0:e.count} agentes en total`,u2t=e=>`${e==null?void 0:e.count} कुल एजेंट`,_2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a2t(e):t==="fa"?o2t(e):t==="ar"?c2t(e):t==="es"?l2t(e):t==="hi"?u2t(e):i2t(e)}),f2t=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,d2t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,h2t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,p2t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,m2t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,g2t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,v2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?d2t(e):t==="fa"?h2t(e):t==="ar"?p2t(e):t==="es"?m2t(e):t==="hi"?g2t(e):f2t(e)}),b2t=()=>"Agents",y2t=()=>"智能体",x2t=()=>"عامل‌ها",w2t=()=>"الوكلاء",k2t=()=>"Agentes",S2t=()=>"एजेंट",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y2t():t==="fa"?x2t():t==="ar"?w2t():t==="es"?k2t():t==="hi"?S2t():b2t()}),C2t=()=>"arXiv paper ID:",E2t=()=>"arXiv 论文 ID:",N2t=()=>"شناسهٔ مقالهٔ arXiv:",z2t=()=>"معرّف ورقة arXiv:",j2t=()=>"ID del paper en arXiv:",T2t=()=>"arXiv पेपर ID:",A2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E2t():t==="fa"?N2t():t==="ar"?z2t():t==="es"?j2t():t==="hi"?T2t():C2t()}),R2t=()=>"Cancel",M2t=()=>"取消",O2t=()=>"لغو",D2t=()=>"إلغاء",L2t=()=>"Cancelar",I2t=()=>"रद्द करें",$2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M2t():t==="fa"?O2t():t==="ar"?D2t():t==="es"?L2t():t==="hi"?I2t():R2t()}),B2t=()=>"Created",P2t=()=>"创建时间",F2t=()=>"ایجادشده",H2t=()=>"أُنشئ",q2t=()=>"Creado",U2t=()=>"बनाया गया",G2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P2t():t==="fa"?F2t():t==="ar"?H2t():t==="es"?q2t():t==="hi"?U2t():B2t()}),V2t=()=>"Delete project?",K2t=()=>"删除项目?",W2t=()=>"پروژه حذف شود؟",Q2t=()=>"حذف المشروع؟",X2t=()=>"¿Eliminar el proyecto?",Y2t=()=>"प्रोजेक्ट हटाएं?",Z2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K2t():t==="fa"?W2t():t==="ar"?Q2t():t==="es"?X2t():t==="hi"?Y2t():V2t()}),J2t=()=>"Delete project",ewt=()=>"删除项目",twt=()=>"حذف پروژه",nwt=()=>"حذف المشروع",rwt=()=>"Eliminar proyecto",swt=()=>"प्रोजेक्ट हटाएं",iwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ewt():t==="fa"?twt():t==="ar"?nwt():t==="es"?rwt():t==="hi"?swt():J2t()}),awt=()=>"Deleting…",owt=()=>"正在删除…",cwt=()=>"در حال حذف…",lwt=()=>"جارٍ الحذف…",uwt=()=>"Eliminando…",_wt=()=>"हटाया जा रहा है…",fwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?owt():t==="fa"?cwt():t==="ar"?lwt():t==="es"?uwt():t==="hi"?_wt():awt()}),dwt=()=>"Experiments",hwt=()=>"实验",pwt=()=>"آزمایش‌ها",mwt=()=>"التجارب",gwt=()=>"Experimentos",vwt=()=>"प्रयोग",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hwt():t==="fa"?pwt():t==="ar"?mwt():t==="es"?gwt():t==="hi"?vwt():dwt()}),bwt=()=>"The local folder and linked GitHub repository are kept.",ywt=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",xwt=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",wwt=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",kwt=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Swt=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",Cwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ywt():t==="fa"?xwt():t==="ar"?wwt():t==="es"?kwt():t==="hi"?Swt():bwt()}),Ewt=()=>"The local folder is kept.",Nwt=()=>"本地文件夹会保留。",zwt=()=>"پوشهٔ محلی نگه داشته می‌شود.",jwt=()=>"يُحتفظ بالمجلد المحلي.",Twt=()=>"La carpeta local se conserva.",Awt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",Rwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nwt():t==="fa"?zwt():t==="ar"?jwt():t==="es"?Twt():t==="hi"?Awt():Ewt()}),Mwt=()=>"New project",Owt=()=>"新建项目",Dwt=()=>"پروژهٔ جدید",Lwt=()=>"مشروع جديد",Iwt=()=>"Nuevo proyecto",$wt=()=>"नया प्रोजेक्ट",rL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Owt():t==="fa"?Dwt():t==="ar"?Lwt():t==="es"?Iwt():t==="hi"?$wt():Mwt()}),Bwt=()=>"No projects yet — create one to get started.",Pwt=()=>"尚无项目——新建一个即可开始。",Fwt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",Hwt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",qwt=()=>"Aún no hay proyectos — crea uno para empezar.",Uwt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",Gwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pwt():t==="fa"?Fwt():t==="ar"?Hwt():t==="es"?qwt():t==="hi"?Uwt():Bwt()}),Vwt=()=>"Project",Kwt=()=>"项目",Wwt=()=>"پروژه",Qwt=()=>"المشروع",Xwt=()=>"Proyecto",Ywt=()=>"प्रोजेक्ट",Zwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kwt():t==="fa"?Wwt():t==="ar"?Qwt():t==="es"?Xwt():t==="hi"?Ywt():Vwt()}),Jwt=()=>"Projects",e4t=()=>"项目",t4t=()=>"پروژه‌ها",n4t=()=>"المشاريع",r4t=()=>"Proyectos",s4t=()=>"प्रोजेक्ट",i4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e4t():t==="fa"?t4t():t==="ar"?n4t():t==="es"?r4t():t==="hi"?s4t():Jwt()}),a4t=()=>"Repository",o4t=()=>"仓库",c4t=()=>"مخزن",l4t=()=>"المستودع",u4t=()=>"Repositorio",_4t=()=>"रिपॉज़िटरी",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o4t():t==="fa"?c4t():t==="ar"?l4t():t==="es"?u4t():t==="hi"?_4t():a4t()}),f4t=()=>"Idle",d4t=()=>"空闲",h4t=()=>"بیکار",p4t=()=>"خامل",m4t=()=>"Inactivo",g4t=()=>"निष्क्रिय",v4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d4t():t==="fa"?h4t():t==="ar"?p4t():t==="es"?m4t():t==="hi"?g4t():f4t()}),b4t=()=>"Local",y4t=()=>"本地",x4t=()=>"محلی",w4t=()=>"محلي",k4t=()=>"Local",S4t=()=>"लोकल",zv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y4t():t==="fa"?x4t():t==="ar"?w4t():t==="es"?k4t():t==="hi"?S4t():b4t()}),C4t=()=>"1 total agent",E4t=()=>"共 1 个智能体",N4t=()=>"در مجموع ۱ عامل",z4t=()=>"وكيل واحد إجمالًا",j4t=()=>"1 agente en total",T4t=()=>"1 कुल एजेंट",A4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E4t():t==="fa"?N4t():t==="ar"?z4t():t==="es"?j4t():t==="hi"?T4t():C4t()}),R4t=e=>`${e==null?void 0:e.count} running`,M4t=e=>`${e==null?void 0:e.count} 个运行中`,O4t=e=>`${e==null?void 0:e.count} در حال اجرا`,D4t=e=>`${e==null?void 0:e.count} قيد التشغيل`,L4t=e=>`${e==null?void 0:e.count} en ejecución`,I4t=e=>`${e==null?void 0:e.count} चल रहे`,$4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M4t(e):t==="fa"?O4t(e):t==="ar"?D4t(e):t==="es"?L4t(e):t==="hi"?I4t(e):R4t(e)}),B4t=e=>`${e==null?void 0:e.count} total`,P4t=e=>`共 ${e==null?void 0:e.count} 个`,F4t=e=>`در مجموع ${e==null?void 0:e.count}`,H4t=e=>`${e==null?void 0:e.count} إجمالًا`,q4t=e=>`${e==null?void 0:e.count} en total`,U4t=e=>`${e==null?void 0:e.count} कुल`,gz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P4t(e):t==="fa"?F4t(e):t==="ar"?H4t(e):t==="es"?q4t(e):t==="hi"?U4t(e):B4t(e)}),G4t=()=>"Installing the compatible binary. This may take a few minutes.",V4t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",K4t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",W4t=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",Q4t=()=>"Instalando el binario compatible. Puede tardar unos minutos.",X4t=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",Y4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V4t():t==="fa"?K4t():t==="ar"?W4t():t==="es"?Q4t():t==="hi"?X4t():G4t()}),Z4t=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,J4t=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,e3t=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,t3t=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,n3t=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,r3t=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,s3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J4t(e):t==="fa"?e3t(e):t==="ar"?t3t(e):t==="es"?n3t(e):t==="hi"?r3t(e):Z4t(e)}),i3t=()=>"Check again",a3t=()=>"再次检查",o3t=()=>"بررسی دوباره",c3t=()=>"تحقق مجددًا",l3t=()=>"Volver a comprobar",u3t=()=>"फिर से जाँचें",vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a3t():t==="fa"?o3t():t==="ar"?c3t():t==="es"?l3t():t==="hi"?u3t():i3t()}),_3t=()=>"Closing…",f3t=()=>"正在关闭…",d3t=()=>"در حال بستن…",h3t=()=>"جارٍ الإغلاق…",p3t=()=>"Cerrando…",m3t=()=>"बंद हो रहा है…",g3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f3t():t==="fa"?d3t():t==="ar"?h3t():t==="es"?p3t():t==="hi"?m3t():_3t()}),v3t=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,b3t=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,y3t=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,x3t=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,w3t=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,k3t=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,S3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b3t(e):t==="fa"?y3t(e):t==="ar"?x3t(e):t==="es"?w3t(e):t==="hi"?k3t(e):v3t(e)}),C3t=()=>"Preparing your remote workspace…",E3t=()=>"正在准备远程工作区…",N3t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",z3t=()=>"جارٍ تحضير مساحة عملك البعيدة…",j3t=()=>"Preparando tu espacio de trabajo remoto…",T3t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",A3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E3t():t==="fa"?N3t():t==="ar"?z3t():t==="es"?j3t():t==="hi"?T3t():C3t()}),R3t=e=>`Connecting to ${e==null?void 0:e.host}`,M3t=e=>`正在连接到 ${e==null?void 0:e.host}`,O3t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,D3t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,L3t=e=>`Conectando a ${e==null?void 0:e.host}`,I3t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,$3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M3t(e):t==="fa"?O3t(e):t==="ar"?D3t(e):t==="es"?L3t(e):t==="hi"?I3t(e):R3t(e)}),B3t=()=>"Close remote host picker",P3t=()=>"关闭远程主机选择器",F3t=()=>"بستن انتخاب‌گر میزبان راه‌دور",H3t=()=>"إغلاق مُنتقي المضيف البعيد",q3t=()=>"Cerrar el selector de hosts remotos",U3t=()=>"रिमोट होस्ट पिकर बंद करें",G3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P3t():t==="fa"?F3t():t==="ar"?H3t():t==="es"?q3t():t==="hi"?U3t():B3t()}),V3t=()=>"Choose a configured SSH host.",K3t=()=>"选择已配置的 SSH 主机。",W3t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",Q3t=()=>"اختر مضيف SSH مُعدًّا.",X3t=()=>"Elige un host SSH configurado.",Y3t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",Z3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K3t():t==="fa"?W3t():t==="ar"?Q3t():t==="es"?X3t():t==="hi"?Y3t():V3t()}),J3t=()=>"Connect to remote",e5t=()=>"连接到远程主机",t5t=()=>"اتصال به میزبان راه‌دور",n5t=()=>"الاتصال بجهاز بعيد",r5t=()=>"Conectar a un host remoto",s5t=()=>"रिमोट से कनेक्ट करें",u3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e5t():t==="fa"?t5t():t==="ar"?n5t():t==="es"?r5t():t==="hi"?s5t():J3t()}),i5t=()=>"Disconnect",a5t=()=>"断开连接",o5t=()=>"قطع اتصال",c5t=()=>"قطع الاتصال",l5t=()=>"Desconectar",u5t=()=>"डिस्कनेक्ट करें",_3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a5t():t==="fa"?o5t():t==="ar"?c5t():t==="es"?l5t():t==="hi"?u5t():i5t()}),_5t=()=>"Your remote work is still running. Reconnect when you’re ready.",f5t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",d5t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",h5t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",p5t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",m5t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",g5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f5t():t==="fa"?d5t():t==="ar"?h5t():t==="es"?p5t():t==="hi"?m5t():_5t()}),v5t=e=>`Disconnected from ${e==null?void 0:e.host}`,b5t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,y5t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,x5t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,w5t=e=>`Desconectado de ${e==null?void 0:e.host}`,k5t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,sL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b5t(e):t==="fa"?y5t(e):t==="ar"?x5t(e):t==="es"?w5t(e):t==="hi"?k5t(e):v5t(e)}),S5t=e=>`Could not connect to ${e==null?void 0:e.host}`,C5t=e=>`无法连接到 ${e==null?void 0:e.host}`,E5t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,N5t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,z5t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,j5t=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,T5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?C5t(e):t==="fa"?E5t(e):t==="ar"?N5t(e):t==="es"?z5t(e):t==="hi"?j5t(e):S5t(e)}),A5t=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",R5t=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",M5t=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",O5t=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",D5t=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",L5t=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",I5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R5t():t==="fa"?M5t():t==="ar"?O5t():t==="es"?D5t():t==="hi"?L5t():A5t()}),$5t=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",B5t=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",P5t=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",F5t=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",H5t=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",q5t=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",U5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B5t():t==="fa"?P5t():t==="ar"?F5t():t==="es"?H5t():t==="hi"?q5t():$5t()}),G5t=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,V5t=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,K5t=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,W5t=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,Q5t=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,X5t=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,Y5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V5t(e):t==="fa"?K5t(e):t==="ar"?W5t(e):t==="es"?Q5t(e):t==="hi"?X5t(e):G5t(e)}),Z5t=()=>"OpenResearch binary",J5t=()=>"OpenResearch 二进制文件",ekt=()=>"فایل اجرایی OpenResearch",tkt=()=>"الملف التنفيذي لـ OpenResearch",nkt=()=>"Binario de OpenResearch",rkt=()=>"OpenResearch बाइनरी",skt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J5t():t==="fa"?ekt():t==="ar"?tkt():t==="es"?nkt():t==="hi"?rkt():Z5t()}),ikt=()=>"OpenResearch Database",akt=()=>"OpenResearch 数据库",okt=()=>"پایگاه دادهٔ OpenResearch",ckt=()=>"قاعدة بيانات OpenResearch",lkt=()=>"Base de datos de OpenResearch",ukt=()=>"OpenResearch डेटाबेस",_kt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?akt():t==="fa"?okt():t==="ar"?ckt():t==="es"?lkt():t==="hi"?ukt():ikt()}),fkt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",dkt=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",hkt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",pkt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",mkt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",gkt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",vkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dkt():t==="fa"?hkt():t==="ar"?pkt():t==="es"?mkt():t==="hi"?gkt():fkt()}),bkt=()=>"Install OpenResearch?",ykt=()=>"安装 OpenResearch?",xkt=()=>"OpenResearch نصب شود؟",wkt=()=>"تثبيت OpenResearch؟",kkt=()=>"¿Instalar OpenResearch?",Skt=()=>"OpenResearch इंस्टॉल करें?",Ckt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ykt():t==="fa"?xkt():t==="ar"?wkt():t==="es"?kkt():t==="hi"?Skt():bkt()}),Ekt=()=>"Installing…",Nkt=()=>"正在安装…",zkt=()=>"در حال نصب…",jkt=()=>"جارٍ التثبيت…",Tkt=()=>"Instalando…",Akt=()=>"इंस्टॉल हो रहा है…",Rkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nkt():t==="fa"?zkt():t==="ar"?jkt():t==="es"?Tkt():t==="hi"?Akt():Ekt()}),Mkt=()=>"No matching SSH hosts",Okt=()=>"没有匹配的 SSH 主机",Dkt=()=>"میزبان SSH منطبقی پیدا نشد",Lkt=()=>"لا توجد مضيفات SSH مطابقة",Ikt=()=>"No hay hosts SSH que coincidan",$kt=()=>"कोई मेल खाता SSH होस्ट नहीं",Bkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Okt():t==="fa"?Dkt():t==="ar"?Lkt():t==="es"?Ikt():t==="hi"?$kt():Mkt()}),Pkt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,Fkt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,Hkt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,qkt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,Ukt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,Gkt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,Vkt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fkt(e):t==="fa"?Hkt(e):t==="ar"?qkt(e):t==="es"?Ukt(e):t==="hi"?Gkt(e):Pkt(e)}),Kkt=()=>"Open remote",Wkt=()=>"打开远程工作区",Qkt=()=>"باز کردن راه‌دور",Xkt=()=>"فتح مساحة العمل البعيدة",Ykt=()=>"Abrir remoto",Zkt=()=>"रिमोट खोलें",Jkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wkt():t==="fa"?Qkt():t==="ar"?Xkt():t==="es"?Ykt():t==="hi"?Zkt():Kkt()}),eSt=()=>"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.",tSt=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",nSt=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",rSt=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",sSt=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",iSt=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",aSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tSt():t==="fa"?nSt():t==="ar"?rSt():t==="es"?sSt():t==="hi"?iSt():eSt()}),oSt=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",cSt=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",lSt=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",uSt=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",_St=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",fSt=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",dSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cSt():t==="fa"?lSt():t==="ar"?uSt():t==="es"?_St():t==="hi"?fSt():oSt()}),hSt=()=>"Preparing remote workspace…",pSt=()=>"正在准备远程工作区…",mSt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",gSt=()=>"جارٍ تحضير مساحة العمل البعيدة…",vSt=()=>"Preparando el espacio de trabajo remoto…",bSt=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",ySt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pSt():t==="fa"?mSt():t==="ar"?gSt():t==="es"?vSt():t==="hi"?bSt():hSt()}),xSt=()=>"Reconnect",wSt=()=>"重新连接",kSt=()=>"اتصال دوباره",SSt=()=>"إعادة الاتصال",CSt=()=>"Reconectar",ESt=()=>"फिर से कनेक्ट करें",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wSt():t==="fa"?kSt():t==="ar"?SSt():t==="es"?CSt():t==="hi"?ESt():xSt()}),NSt=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",zSt=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",jSt=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",TSt=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",ASt=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",RSt=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",MSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zSt():t==="fa"?jSt():t==="ar"?TSt():t==="es"?ASt():t==="hi"?RSt():NSt()}),OSt=e=>`Reconnecting to ${e==null?void 0:e.host}`,DSt=e=>`正在重新连接到 ${e==null?void 0:e.host}`,LSt=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,ISt=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,$St=e=>`Reconectando a ${e==null?void 0:e.host}`,BSt=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,PSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DSt(e):t==="fa"?LSt(e):t==="ar"?ISt(e):t==="es"?$St(e):t==="hi"?BSt(e):OSt(e)}),FSt=()=>"Search SSH hosts",HSt=()=>"搜索 SSH 主机",qSt=()=>"جستجوی میزبان‌های SSH",USt=()=>"البحث في مضيفات SSH",GSt=()=>"Buscar hosts SSH",VSt=()=>"SSH होस्ट खोजें",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HSt():t==="fa"?qSt():t==="ar"?USt():t==="es"?GSt():t==="hi"?VSt():FSt()}),KSt=e=>`SSH: ${e==null?void 0:e.host}`,WSt=e=>`SSH:${e==null?void 0:e.host}`,QSt=e=>`SSH: ${e==null?void 0:e.host}`,XSt=e=>`SSH: ${e==null?void 0:e.host}`,YSt=e=>`SSH: ${e==null?void 0:e.host}`,ZSt=e=>`SSH: ${e==null?void 0:e.host}`,J2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WSt(e):t==="fa"?QSt(e):t==="ar"?XSt(e):t==="es"?YSt(e):t==="hi"?ZSt(e):KSt(e)}),JSt=()=>"Start a new OpenResearch host",e6t=()=>"启动新的 OpenResearch 主机",t6t=()=>"راه‌اندازی میزبان جدید OpenResearch",n6t=()=>"بدء مضيف OpenResearch جديد",r6t=()=>"Iniciar un nuevo host de OpenResearch",s6t=()=>"एक नया OpenResearch होस्ट शुरू करें",i6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e6t():t==="fa"?t6t():t==="ar"?n6t():t==="es"?r6t():t==="hi"?s6t():JSt()}),a6t=e=>`End ${e==null?void 0:e.count} pending approvals.`,o6t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,c6t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,l6t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,u6t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,_6t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,f6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?o6t(e):t==="fa"?c6t(e):t==="ar"?l6t(e):t==="es"?u6t(e):t==="hi"?_6t(e):a6t(e)}),d6t=()=>"Stop OpenResearch",h6t=()=>"停止 OpenResearch",p6t=()=>"توقف OpenResearch",m6t=()=>"إيقاف OpenResearch",g6t=()=>"Detener OpenResearch",v6t=()=>"OpenResearch रोकें",b6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h6t():t==="fa"?p6t():t==="ar"?m6t():t==="es"?g6t():t==="hi"?v6t():d6t()}),y6t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,x6t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,w6t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,k6t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,S6t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,C6t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,E6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?x6t(e):t==="fa"?w6t(e):t==="ar"?k6t(e):t==="es"?S6t(e):t==="hi"?C6t(e):y6t(e)}),N6t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,z6t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,j6t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,T6t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,A6t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,R6t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,M6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?z6t(e):t==="fa"?j6t(e):t==="ar"?T6t(e):t==="es"?A6t(e):t==="hi"?R6t(e):N6t(e)}),O6t=()=>"Stop OpenResearch on host",D6t=()=>"停止主机上的 OpenResearch",L6t=()=>"توقف OpenResearch روی میزبان",I6t=()=>"إيقاف OpenResearch على المضيف",$6t=()=>"Detener OpenResearch en el host",B6t=()=>"होस्ट पर OpenResearch रोकें",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D6t():t==="fa"?L6t():t==="ar"?I6t():t==="es"?$6t():t==="hi"?B6t():O6t()}),P6t=()=>"This will also:",F6t=()=>"这还将:",H6t=()=>"این کار همچنین:",q6t=()=>"سيؤدي هذا أيضًا إلى:",U6t=()=>"Esto también:",G6t=()=>"इससे यह भी होगा:",V6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F6t():t==="fa"?H6t():t==="ar"?q6t():t==="es"?U6t():t==="hi"?G6t():P6t()}),K6t=()=>"End 1 pending approval.",W6t=()=>"结束 1 个待审批请求。",Q6t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",X6t=()=>"إنهاء طلب موافقة معلّق واحد.",Y6t=()=>"Cancelará 1 aprobación pendiente.",Z6t=()=>"1 लंबित स्वीकृति खत्म होगी।",J6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W6t():t==="fa"?Q6t():t==="ar"?X6t():t==="es"?Y6t():t==="hi"?Z6t():K6t()}),eCt=()=>"Leave 1 submitted experiment running.",tCt=()=>"让 1 个已提交实验继续运行。",nCt=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",rCt=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",sCt=()=>"Dejará 1 experimento enviado en ejecución.",iCt=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",aCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tCt():t==="fa"?nCt():t==="ar"?rCt():t==="es"?sCt():t==="hi"?iCt():eCt()}),oCt=()=>"Disconnect 1 other client.",cCt=()=>"断开 1 个其他客户端。",lCt=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",uCt=()=>"قطع اتصال عميل آخر واحد.",_Ct=()=>"Desconectará a otro cliente.",fCt=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",dCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cCt():t==="fa"?lCt():t==="ar"?uCt():t==="es"?_Ct():t==="hi"?fCt():oCt()}),hCt=()=>"Keep 1 queued message saved.",pCt=()=>"保留 1 条排队消息。",mCt=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",gCt=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",vCt=()=>"Conservará 1 mensaje en cola.",bCt=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",yCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pCt():t==="fa"?mCt():t==="ar"?gCt():t==="es"?vCt():t==="hi"?bCt():hCt()}),xCt=()=>"Interrupt 1 active agent turn.",wCt=()=>"中断 1 个活动代理任务。",kCt=()=>"۱ نوبت فعال عامل را قطع می‌کند.",SCt=()=>"مقاطعة جولة وكيل نشطة واحدة.",CCt=()=>"Interrumpirá 1 turno activo de un agente.",ECt=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",NCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wCt():t==="fa"?kCt():t==="ar"?SCt():t==="es"?CCt():t==="hi"?ECt():xCt()}),zCt=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,jCt=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,TCt=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,ACt=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,RCt=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,MCt=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,OCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jCt(e):t==="fa"?TCt(e):t==="ar"?ACt(e):t==="es"?RCt(e):t==="hi"?MCt(e):zCt(e)}),DCt=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,LCt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,ICt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,$Ct=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,BCt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,PCt=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,FCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LCt(e):t==="fa"?ICt(e):t==="ar"?$Ct(e):t==="es"?BCt(e):t==="hi"?PCt(e):DCt(e)}),HCt=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,qCt=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,UCt=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,GCt=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,VCt=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,KCt=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,WCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qCt(e):t==="fa"?UCt(e):t==="ar"?GCt(e):t==="es"?VCt(e):t==="hi"?KCt(e):HCt(e)}),QCt=()=>"Stopping host…",XCt=()=>"正在停止主机…",YCt=()=>"در حال توقف میزبان…",ZCt=()=>"جارٍ إيقاف المضيف…",JCt=()=>"Deteniendo el host…",e7t=()=>"होस्ट रोका जा रहा है…",t7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XCt():t==="fa"?YCt():t==="ar"?ZCt():t==="es"?JCt():t==="hi"?e7t():QCt()}),n7t=()=>"Update",r7t=()=>"更新",s7t=()=>"به‌روزرسانی",i7t=()=>"تحديث",a7t=()=>"Actualizar",o7t=()=>"अपडेट करें",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r7t():t==="fa"?s7t():t==="ar"?i7t():t==="es"?a7t():t==="hi"?o7t():n7t()}),c7t=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,l7t=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,u7t=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,_7t=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,f7t=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,d7t=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,h7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l7t(e):t==="fa"?u7t(e):t==="ar"?_7t(e):t==="es"?f7t(e):t==="hi"?d7t(e):c7t(e)}),p7t=()=>"Update OpenResearch?",m7t=()=>"更新 OpenResearch?",g7t=()=>"OpenResearch به‌روزرسانی شود؟",v7t=()=>"تحديث OpenResearch؟",b7t=()=>"¿Actualizar OpenResearch?",y7t=()=>"OpenResearch अपडेट करें?",x7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m7t():t==="fa"?g7t():t==="ar"?v7t():t==="es"?b7t():t==="hi"?y7t():p7t()}),w7t=()=>"Updating…",k7t=()=>"正在更新…",S7t=()=>"در حال به‌روزرسانی…",C7t=()=>"جارٍ التحديث…",E7t=()=>"Actualizando…",N7t=()=>"अपडेट हो रहा है…",z7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k7t():t==="fa"?S7t():t==="ar"?C7t():t==="es"?E7t():t==="hi"?N7t():w7t()}),j7t=()=>"Disable syncing",T7t=()=>"关闭同步",A7t=()=>"غیرفعال کردن همگام‌سازی",R7t=()=>"تعطيل المزامنة",M7t=()=>"Desactivar sincronización",O7t=()=>"सिंकिंग बंद करें",D7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T7t():t==="fa"?A7t():t==="ar"?R7t():t==="es"?M7t():t==="hi"?O7t():j7t()}),L7t=()=>"Enable GitHub syncing",I7t=()=>"启用 GitHub 同步",$7t=()=>"فعال‌سازی همگام‌سازی GitHub",B7t=()=>"تفعيل مزامنة GitHub",P7t=()=>"Activar sincronización con GitHub",F7t=()=>"GitHub सिंकिंग चालू करें",H7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I7t():t==="fa"?$7t():t==="ar"?B7t():t==="es"?P7t():t==="hi"?F7t():L7t()}),q7t=()=>"Enabling…",U7t=()=>"正在启用…",G7t=()=>"در حال فعال‌سازی…",V7t=()=>"جارٍ التفعيل…",K7t=()=>"Activando…",W7t=()=>"चालू हो रहा है…",Q7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U7t():t==="fa"?G7t():t==="ar"?V7t():t==="es"?K7t():t==="hi"?W7t():q7t()}),X7t=()=>"Updating…",Y7t=()=>"正在更新…",Z7t=()=>"در حال به‌روزرسانی…",J7t=()=>"جارٍ التحديث…",e8t=()=>"Actualizando…",t8t=()=>"अपडेट हो रहा है…",n8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y7t():t==="fa"?Z7t():t==="ar"?J7t():t==="es"?e8t():t==="hi"?t8t():X7t()}),r8t=()=>"Reopen a previous chat",s8t=()=>"重新打开之前的聊天",i8t=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",a8t=()=>"إعادة فتح محادثة سابقة",o8t=()=>"Vuelve a abrir un chat anterior",c8t=()=>"पिछली चैट फिर से खोलें",l8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s8t():t==="fa"?i8t():t==="ar"?a8t():t==="es"?o8t():t==="hi"?c8t():r8t()}),u8t=()=>"No chats to resume",_8t=()=>"没有可恢复的聊天",f8t=()=>"گفت‌وگویی برای ادامه وجود ندارد",d8t=()=>"لا توجد محادثات لاستئنافها",h8t=()=>"No hay chats que reanudar",p8t=()=>"फिर से शुरू करने के लिए कोई चैट नहीं है",m8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_8t():t==="fa"?f8t():t==="ar"?d8t():t==="es"?h8t():t==="hi"?p8t():u8t()}),g8t=()=>"From your terminal — adopting copies the transcript, and new turns continue there",v8t=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",b8t=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",y8t=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",x8t=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",w8t=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v8t():t==="fa"?b8t():t==="ar"?y8t():t==="es"?x8t():t==="hi"?w8t():g8t()}),k8t=()=>"Search chats",S8t=()=>"搜索聊天",C8t=()=>"جست‌وجوی گفت‌وگوها",E8t=()=>"البحث في المحادثات",N8t=()=>"Buscar chats",z8t=()=>"चैट खोजें",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S8t():t==="fa"?C8t():t==="ar"?E8t():t==="es"?N8t():t==="hi"?z8t():k8t()}),j8t=()=>"Resume a chat",T8t=()=>"恢复聊天",A8t=()=>"ادامهٔ یک گفت‌وگو",R8t=()=>"استئناف محادثة",M8t=()=>"Reanudar un chat",O8t=()=>"चैट फिर से शुरू करें",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T8t():t==="fa"?A8t():t==="ar"?R8t():t==="es"?M8t():t==="hi"?O8t():j8t()}),D8t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,L8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,I8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,$8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,B8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,P8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,F8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L8t(e):t==="fa"?I8t(e):t==="ar"?$8t(e):t==="es"?B8t(e):t==="hi"?P8t(e):D8t(e)}),H8t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,q8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,U8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,G8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,V8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,K8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,W8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q8t(e):t==="fa"?U8t(e):t==="ar"?G8t(e):t==="es"?V8t(e):t==="hi"?K8t(e):H8t(e)}),Q8t=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`,X8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,Y8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Z8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,J8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,e9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,t9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X8t(e):t==="fa"?Y8t(e):t==="ar"?Z8t(e):t==="es"?J8t(e):t==="hi"?e9t(e):Q8t(e)}),n9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,r9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,s9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,i9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,a9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,o9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,c9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?r9t(e):t==="fa"?s9t(e):t==="ar"?i9t(e):t==="es"?a9t(e):t==="hi"?o9t(e):n9t(e)}),l9t=()=>"CLI is retrying…",u9t=()=>"CLI 正在重试…",_9t=()=>"CLI در حال تلاش دوباره است…",f9t=()=>"تعيد واجهة سطر الأوامر المحاولة…",d9t=()=>"La CLI está reintentando…",h9t=()=>"CLI फिर से कोशिश कर रहा है…",p9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u9t():t==="fa"?_9t():t==="ar"?f9t():t==="es"?d9t():t==="hi"?h9t():l9t()}),m9t=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,g9t=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,v9t=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,b9t=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,y9t=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,x9t=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,w9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g9t(e):t==="fa"?v9t(e):t==="ar"?b9t(e):t==="es"?y9t(e):t==="hi"?x9t(e):m9t(e)}),k9t=()=>"Sending again…",S9t=()=>"正在重新发送…",C9t=()=>"در حال ارسال دوباره…",E9t=()=>"جارٍ إعادة الإرسال…",N9t=()=>"Reenviando…",z9t=()=>"फिर से भेजा जा रहा है…",j9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S9t():t==="fa"?C9t():t==="ar"?E9t():t==="es"?N9t():t==="hi"?z9t():k9t()}),T9t=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,A9t=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,R9t=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,M9t=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,O9t=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,D9t=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,L9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?A9t(e):t==="fa"?R9t(e):t==="ar"?M9t(e):t==="es"?O9t(e):t==="hi"?D9t(e):T9t(e)}),I9t=()=>"Retrying…",$9t=()=>"正在重试…",B9t=()=>"در حال تلاش دوباره…",P9t=()=>"جارٍ إعادة المحاولة…",F9t=()=>"Reintentando…",H9t=()=>"फिर से कोशिश हो रही है…",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$9t():t==="fa"?B9t():t==="ar"?P9t():t==="es"?F9t():t==="hi"?H9t():I9t()}),q9t=()=>"Default speed",U9t=()=>"默认速度",G9t=()=>"سرعت پیش‌فرض",V9t=()=>"السرعة الافتراضية",K9t=()=>"Velocidad predeterminada",W9t=()=>"डिफ़ॉल्ट गति",Q9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U9t():t==="fa"?G9t():t==="ar"?V9t():t==="es"?K9t():t==="hi"?W9t():q9t()}),X9t=()=>"Standard",Y9t=()=>"标准",Z9t=()=>"استاندارد",J9t=()=>"قياسي",eEt=()=>"Estándar",tEt=()=>"स्टैंडर्ड",nEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y9t():t==="fa"?Z9t():t==="ar"?J9t():t==="es"?eEt():t==="hi"?tEt():X9t()}),rEt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,sEt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,iEt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,aEt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,oEt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,cEt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,lEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sEt(e):t==="fa"?iEt(e):t==="ar"?aEt(e):t==="es"?oEt(e):t==="hi"?cEt(e):rEt(e)}),uEt=()=>"Appearance",_Et=()=>"外观",fEt=()=>"ظاهر",dEt=()=>"المظهر",hEt=()=>"Apariencia",pEt=()=>"रूप-रंग",mEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Et():t==="fa"?fEt():t==="ar"?dEt():t==="es"?hEt():t==="hi"?pEt():uEt()}),gEt=()=>"Check",vEt=()=>"检查",bEt=()=>"بررسی",yEt=()=>"فحص",xEt=()=>"Comprobar",wEt=()=>"जाँचें",kEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vEt():t==="fa"?bEt():t==="ar"?yEt():t==="es"?xEt():t==="hi"?wEt():gEt()}),SEt=()=>"Check again",CEt=()=>"再次检查",EEt=()=>"بررسی دوباره",NEt=()=>"تحقق مجددًا",zEt=()=>"Volver a comprobar",jEt=()=>"फिर से जाँचें",xm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CEt():t==="fa"?EEt():t==="ar"?NEt():t==="es"?zEt():t==="hi"?jEt():SEt()}),TEt=()=>"Check for updates",AEt=()=>"检查更新",REt=()=>"بررسی به‌روزرسانی",MEt=()=>"التحقق من التحديثات",OEt=()=>"Buscar actualizaciones",DEt=()=>"अपडेट के लिए जाँचें",LEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AEt():t==="fa"?REt():t==="ar"?MEt():t==="es"?OEt():t==="hi"?DEt():TEt()}),IEt=()=>"Check now",$Et=()=>"立即检查",BEt=()=>"اکنون بررسی کن",PEt=()=>"التحقق الآن",FEt=()=>"Comprobar ahora",HEt=()=>"अभी जाँचें",qEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Et():t==="fa"?BEt():t==="ar"?PEt():t==="es"?FEt():t==="hi"?HEt():IEt()}),UEt=()=>"Check setup",GEt=()=>"检查设置",VEt=()=>"بررسی راه‌اندازی",KEt=()=>"فحص الإعداد",WEt=()=>"Comprobar configuración",QEt=()=>"सेटअप जाँचें",XEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GEt():t==="fa"?VEt():t==="ar"?KEt():t==="es"?WEt():t==="hi"?QEt():UEt()}),YEt=()=>"orx checks a few times a day on its own.",ZEt=()=>"orx 每天会自动检查几次。",JEt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",eNt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",tNt=()=>"orx lo comprueba por sí solo varias veces al día.",nNt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",rNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZEt():t==="fa"?JEt():t==="ar"?eNt():t==="es"?tNt():t==="hi"?nNt():YEt()}),sNt=()=>"Choose a flavor",iNt=()=>"选择配置",aNt=()=>"انتخاب پیکربندی",oNt=()=>"اختر تكوين الموارد",cNt=()=>"Elige una opción",lNt=()=>"एक फ़्लेवर चुनें",uNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iNt():t==="fa"?aNt():t==="ar"?oNt():t==="es"?cNt():t==="hi"?lNt():sNt()}),_Nt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,fNt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,dNt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,hNt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,pNt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,mNt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,gNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fNt(e):t==="fa"?dNt(e):t==="ar"?hNt(e):t==="es"?pNt(e):t==="hi"?mNt(e):_Nt(e)}),vNt=()=>"clean",bNt=()=>"无更改",yNt=()=>"بدون تغییر",xNt=()=>"نظيف",wNt=()=>"sin cambios",kNt=()=>"साफ़",SNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bNt():t==="fa"?yNt():t==="ar"?xNt():t==="es"?wNt():t==="hi"?kNt():vNt()}),CNt=e=>`Already linked at ${e==null?void 0:e.link}.`,ENt=e=>`已链接到 ${e==null?void 0:e.link}。`,NNt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,zNt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,jNt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,TNt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,ANt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ENt(e):t==="fa"?NNt(e):t==="ar"?zNt(e):t==="es"?jNt(e):t==="hi"?TNt(e):CNt(e)}),RNt=e=>`Linked ${e==null?void 0:e.link}.`,MNt=e=>`已链接 ${e==null?void 0:e.link}。`,ONt=e=>`${e==null?void 0:e.link} پیوند شد.`,DNt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,LNt=e=>`Enlazado en ${e==null?void 0:e.link}.`,INt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,$Nt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MNt(e):t==="fa"?ONt(e):t==="ar"?DNt(e):t==="es"?LNt(e):t==="hi"?INt(e):RNt(e)}),BNt=()=>"Close terminal",PNt=()=>"关闭终端",FNt=()=>"بستن ترمینال",HNt=()=>"إغلاق الطرفية",qNt=()=>"Cerrar la terminal",UNt=()=>"टर्मिनल बंद करें",Cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PNt():t==="fa"?FNt():t==="ar"?HNt():t==="es"?qNt():t==="hi"?UNt():BNt()}),GNt=()=>"Terminal closed",VNt=()=>"终端已关闭",KNt=()=>"ترمینال بسته شد",WNt=()=>"أُغلقت الطرفية",QNt=()=>"Terminal cerrada",XNt=()=>"टर्मिनल बंद हो गया",YNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VNt():t==="fa"?KNt():t==="ar"?WNt():t==="es"?QNt():t==="hi"?XNt():GNt()}),ZNt=()=>"Finished",JNt=()=>"已完成",ezt=()=>"انجام شد",tzt=()=>"اكتمل",nzt=()=>"Finalizado",rzt=()=>"पूर्ण",szt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JNt():t==="fa"?ezt():t==="ar"?tzt():t==="es"?nzt():t==="hi"?rzt():ZNt()}),izt=()=>"Command failed",azt=()=>"命令失败",ozt=()=>"دستور ناموفق بود",czt=()=>"فشل الأمر",lzt=()=>"El comando falló",uzt=()=>"कमांड विफल रही",_zt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?azt():t==="fa"?ozt():t==="ar"?czt():t==="es"?lzt():t==="hi"?uzt():izt()}),fzt=()=>"Running…",dzt=()=>"运行中…",hzt=()=>"در حال اجرا…",pzt=()=>"قيد التشغيل…",mzt=()=>"Ejecutando…",gzt=()=>"चल रहा है…",vzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dzt():t==="fa"?hzt():t==="ar"?pzt():t==="es"?mzt():t==="hi"?gzt():fzt()}),bzt=()=>"Connect",yzt=()=>"连接",xzt=()=>"اتصال",wzt=()=>"اتصال",kzt=()=>"Conectar",Szt=()=>"कनेक्ट करें",Qk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yzt():t==="fa"?xzt():t==="ar"?wzt():t==="es"?kzt():t==="hi"?Szt():bzt()}),Czt=()=>"Connected via GitHub CLI",Ezt=()=>"已通过 GitHub CLI 连接",Nzt=()=>"از طریق GitHub CLI متصل است",zzt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",jzt=()=>"Conectado mediante GitHub CLI",Tzt=()=>"GitHub CLI के ज़रिए कनेक्टेड",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ezt():t==="fa"?Nzt():t==="ar"?zzt():t==="es"?jzt():t==="hi"?Tzt():Czt()}),Azt=()=>"Connecting…",Rzt=()=>"正在连接…",Mzt=()=>"در حال اتصال…",Ozt=()=>"جارٍ الاتصال…",Dzt=()=>"Conectando…",Lzt=()=>"कनेक्ट हो रहा है…",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rzt():t==="fa"?Mzt():t==="ar"?Ozt():t==="es"?Dzt():t==="hi"?Lzt():Azt()}),Izt=e=>`CPU cores: ${e==null?void 0:e.count}`,$zt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,Bzt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,Pzt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,Fzt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,Hzt=e=>`CPU कोर: ${e==null?void 0:e.count}`,qzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$zt(e):t==="fa"?Bzt(e):t==="ar"?Pzt(e):t==="es"?Fzt(e):t==="hi"?Hzt(e):Izt(e)}),Uzt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",Gzt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",Vzt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",Kzt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",Wzt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",Qzt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",Xzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gzt():t==="fa"?Vzt():t==="ar"?Kzt():t==="es"?Wzt():t==="hi"?Qzt():Uzt()}),Yzt=()=>"the current project",Zzt=()=>"当前项目",Jzt=()=>"پروژهٔ فعلی",ejt=()=>"المشروع الحالي",tjt=()=>"el proyecto actual",njt=()=>"मौजूदा प्रोजेक्ट",rjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zzt():t==="fa"?Jzt():t==="ar"?ejt():t==="es"?tjt():t==="hi"?njt():Yzt()}),sjt=e=>`${e==null?void 0:e.value} (custom)`,ijt=e=>`${e==null?void 0:e.value}(自定义)`,ajt=e=>`${e==null?void 0:e.value} (سفارشی)`,ojt=e=>`${e==null?void 0:e.value} (مخصص)`,cjt=e=>`${e==null?void 0:e.value} (personalizado)`,ljt=e=>`${e==null?void 0:e.value} (कस्टम)`,ujt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ijt(e):t==="fa"?ajt(e):t==="ar"?ojt(e):t==="es"?cjt(e):t==="hi"?ljt(e):sjt(e)}),_jt=()=>"detached",fjt=()=>"分离头指针",djt=()=>"جدا از شاخه",hjt=()=>"منفصل",pjt=()=>"desacoplado",mjt=()=>"डिटैच्ड",Xk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fjt():t==="fa"?djt():t==="ar"?hjt():t==="es"?pjt():t==="hi"?mjt():_jt()}),gjt=()=>"Disconnected",vjt=()=>"已断开连接",bjt=()=>"قطع اتصال",yjt=()=>"غير متصل",xjt=()=>"Desconectado",wjt=()=>"डिस्कनेक्ट हो गया",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vjt():t==="fa"?bjt():t==="ar"?yjt():t==="es"?xjt():t==="hi"?wjt():gjt()}),kjt=()=>"Environment tab",Sjt=()=>"环境标签页",Cjt=()=>"زبانهٔ محیط",Ejt=()=>"تبويب البيئة",Njt=()=>"pestaña Entorno",zjt=()=>"एनवायरनमेंट टैब",jjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sjt():t==="fa"?Cjt():t==="ar"?Ejt():t==="es"?Njt():t==="hi"?zjt():kjt()}),Tjt=()=>"Free models · No sign-in required",Ajt=()=>"免费模型 · 无需登录",Rjt=()=>"مدل‌های رایگان · بدون نیاز به ورود",Mjt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",Ojt=()=>"Modelos gratuitos · No es necesario iniciar sesión",Djt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",Ljt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ajt():t==="fa"?Rjt():t==="ar"?Mjt():t==="es"?Ojt():t==="hi"?Djt():Tjt()}),Ijt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,$jt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Bjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Pjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Fjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Hjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,qjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$jt(e):t==="fa"?Bjt(e):t==="ar"?Pjt(e):t==="es"?Fjt(e):t==="hi"?Hjt(e):Ijt(e)}),Ujt=()=>"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.",Gjt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",Vjt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",Kjt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",Wjt=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",Qjt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",Xjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gjt():t==="fa"?Vjt():t==="ar"?Kjt():t==="es"?Wjt():t==="hi"?Qjt():Ujt()}),Yjt=()=>"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.",Zjt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",Jjt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",eTt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",tTt=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",nTt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",rTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zjt():t==="fa"?Jjt():t==="ar"?eTt():t==="es"?tTt():t==="hi"?nTt():Yjt()}),sTt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",iTt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",aTt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",oTt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",cTt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",lTt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",uTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iTt():t==="fa"?aTt():t==="ar"?oTt():t==="es"?cTt():t==="hi"?lTt():sTt()}),_Tt=e=>`GPU × ${e==null?void 0:e.count}`,fTt=e=>`${e==null?void 0:e.count} 个 GPU`,dTt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,hTt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,pTt=e=>`GPU × ${e==null?void 0:e.count}`,mTt=e=>`GPU × ${e==null?void 0:e.count}`,gTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fTt(e):t==="fa"?dTt(e):t==="ar"?hTt(e):t==="es"?pTt(e):t==="hi"?mTt(e):_Tt(e)}),vTt=()=>"has changes",bTt=()=>"有更改",yTt=()=>"دارای تغییر",xTt=()=>"به تغييرات",wTt=()=>"con cambios",kTt=()=>"बदलाव हैं",STt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bTt():t==="fa"?yTt():t==="ar"?xTt():t==="es"?wTt():t==="hi"?kTt():vTt()}),CTt=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}.`,ETt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,NTt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,zTt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,jTt=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,TTt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,ATt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ETt(e):t==="fa"?NTt(e):t==="ar"?zTt(e):t==="es"?jTt(e):t==="hi"?TTt(e):CTt(e)}),RTt=()=>"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.",MTt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",OTt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",DTt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",LTt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",ITt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",$Tt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MTt():t==="fa"?OTt():t==="ar"?DTt():t==="es"?LTt():t==="hi"?ITt():RTt()}),BTt=()=>"Install",PTt=()=>"安装",FTt=()=>"نصب",HTt=()=>"تثبيت",qTt=()=>"Instalar",UTt=()=>"इंस्टॉल करें",GTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PTt():t==="fa"?FTt():t==="ar"?HTt():t==="es"?qTt():t==="hi"?UTt():BTt()}),VTt=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.`,KTt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,WTt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,QTt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,XTt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,YTt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,ZTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KTt(e):t==="fa"?WTt(e):t==="ar"?QTt(e):t==="es"?XTt(e):t==="hi"?YTt(e):VTt(e)}),JTt=e=>`Install the ${e==null?void 0:e.command} command`,eAt=e=>`安装 ${e==null?void 0:e.command} 命令`,tAt=e=>`نصب فرمان ${e==null?void 0:e.command}`,nAt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,rAt=e=>`Instalar el comando ${e==null?void 0:e.command}`,sAt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,iAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eAt(e):t==="fa"?tAt(e):t==="ar"?nAt(e):t==="es"?rAt(e):t==="hi"?sAt(e):JTt(e)}),aAt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",oAt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",cAt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",lAt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",uAt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",_At=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",fAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oAt():t==="fa"?cAt():t==="ar"?lAt():t==="es"?uAt():t==="hi"?_At():aAt()}),dAt=()=>"Install the new release now instead of waiting for the background update.",hAt=()=>"立即安装新版本,无需等待后台更新。",pAt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",mAt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",gAt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",vAt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",bAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hAt():t==="fa"?pAt():t==="ar"?mAt():t==="es"?gAt():t==="hi"?vAt():dAt()}),yAt=()=>"Discard your unsaved Kubernetes changes?",xAt=()=>"要放弃未保存的 Kubernetes 更改吗?",wAt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",kAt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",SAt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",CAt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",EAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xAt():t==="fa"?wAt():t==="ar"?kAt():t==="es"?SAt():t==="hi"?CAt():yAt()}),NAt=()=>"Key from",zAt=()=>"密钥来自",jAt=()=>"کلید از",TAt=()=>"المفتاح من",AAt=()=>"Clave tomada de la",RAt=()=>"की स्रोत",MAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zAt():t==="fa"?jAt():t==="ar"?TAt():t==="es"?AAt():t==="hi"?RAt():NAt()}),OAt=()=>"Use current kubectl context",DAt=()=>"使用当前 kubectl 上下文",LAt=()=>"استفاده از کانتکست فعلی kubectl",IAt=()=>"استخدام سياق kubectl الحالي",$At=()=>"Usar el contexto actual de kubectl",BAt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",PAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DAt():t==="fa"?LAt():t==="ar"?IAt():t==="es"?$At():t==="hi"?BAt():OAt()}),FAt=e=>`Use current context (${e==null?void 0:e.context})`,HAt=e=>`使用当前上下文(${e==null?void 0:e.context})`,qAt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,UAt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,GAt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,VAt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,KAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HAt(e):t==="fa"?qAt(e):t==="ar"?UAt(e):t==="es"?GAt(e):t==="hi"?VAt(e):FAt(e)}),WAt=()=>"Language",QAt=()=>"语言",XAt=()=>"زبان",YAt=()=>"اللغة",ZAt=()=>"Idioma",JAt=()=>"भाषा",eRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QAt():t==="fa"?XAt():t==="ar"?YAt():t==="es"?ZAt():t==="hi"?JAt():WAt()}),tRt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,nRt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,rRt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,sRt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,iRt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,aRt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,oRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nRt(e):t==="fa"?rRt(e):t==="ar"?sRt(e):t==="es"?iRt(e):t==="hi"?aRt(e):tRt(e)}),cRt=()=>"Make default",lRt=()=>"设为默认值",uRt=()=>"پیش‌فرض شود",_Rt=()=>"جعله افتراضيًا",fRt=()=>"Establecer como predeterminado",dRt=()=>"डिफ़ॉल्ट बनाएं",hRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lRt():t==="fa"?uRt():t==="ar"?_Rt():t==="es"?fRt():t==="hi"?dRt():cRt()}),pRt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",mRt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",gRt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",vRt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",bRt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",yRt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",xRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mRt():t==="fa"?gRt():t==="ar"?vRt():t==="es"?bRt():t==="hi"?yRt():pRt()}),wRt=()=>"Replace token ID",kRt=()=>"替换令牌 ID",SRt=()=>"جایگزینی شناسهٔ توکن",CRt=()=>"استبدال معرّف الرمز",ERt=()=>"Reemplazar ID del token",NRt=()=>"टोकन ID बदलें",zRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRt():t==="fa"?SRt():t==="ar"?CRt():t==="es"?ERt():t==="hi"?NRt():wRt()}),jRt=()=>"Replace token secret",TRt=()=>"替换令牌密钥",ARt=()=>"جایگزینی رمز توکن",RRt=()=>"استبدال سرّ الرمز",MRt=()=>"Reemplazar secreto del token",ORt=()=>"टोकन सीक्रेट बदलें",DRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TRt():t==="fa"?ARt():t==="ar"?RRt():t==="es"?MRt():t==="hi"?ORt():jRt()}),LRt=()=>"How to get a Modal token",IRt=()=>"如何获取 Modal 令牌",$Rt=()=>"روش دریافت توکن Modal",BRt=()=>"كيفية الحصول على رمز Modal",PRt=()=>"Cómo obtener un token de Modal",FRt=()=>"Modal टोकन कैसे लें",HRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRt():t==="fa"?$Rt():t==="ar"?BRt():t==="es"?PRt():t==="hi"?FRt():LRt()}),qRt=()=>"Token ID",URt=()=>"令牌 ID",GRt=()=>"شناسهٔ توکن",VRt=()=>"معرّف الرمز",KRt=()=>"ID del token",WRt=()=>"टोकन ID",QRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?URt():t==="fa"?GRt():t==="ar"?VRt():t==="es"?KRt():t==="hi"?WRt():qRt()}),XRt=()=>"Token secret",YRt=()=>"令牌密钥",ZRt=()=>"رمز توکن",JRt=()=>"سرّ الرمز",eMt=()=>"Secreto del token",tMt=()=>"टोकन सीक्रेट",nMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YRt():t==="fa"?ZRt():t==="ar"?JRt():t==="es"?eMt():t==="hi"?tMt():XRt()}),rMt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,sMt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,iMt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,aMt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,oMt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,cMt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,lMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sMt(e):t==="fa"?iMt(e):t==="ar"?aMt(e):t==="es"?oMt(e):t==="hi"?cMt(e):rMt(e)}),uMt=e=>`Needs ${e==null?void 0:e.tool}`,_Mt=e=>`需要 ${e==null?void 0:e.tool}`,fMt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,dMt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,hMt=e=>`Requiere ${e==null?void 0:e.tool}`,pMt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,mMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Mt(e):t==="fa"?fMt(e):t==="ar"?dMt(e):t==="es"?hMt(e):t==="hi"?pMt(e):uMt(e)}),gMt=()=>"Needs tools",vMt=()=>"缺少工具",bMt=()=>"به ابزارها نیاز دارد",yMt=()=>"يحتاج إلى أدوات",xMt=()=>"Requiere herramientas",wMt=()=>"टूल की ज़रूरत है",kMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vMt():t==="fa"?bMt():t==="ar"?yMt():t==="es"?xMt():t==="hi"?wMt():gMt()}),SMt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,CMt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,EMt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,NMt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,zMt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,jMt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,TMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CMt(e):t==="fa"?EMt(e):t==="ar"?NMt(e):t==="es"?zMt(e):t==="hi"?jMt(e):SMt(e)}),AMt=()=>"New runs use SSH; choose a host when launching.",RMt=()=>"新运行将使用 SSH;启动时请选择主机。",MMt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",OMt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",DMt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",LMt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",IMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RMt():t==="fa"?MMt():t==="ar"?OMt():t==="es"?DMt():t==="hi"?LMt():AMt()}),$Mt=()=>"New token",BMt=()=>"新令牌",PMt=()=>"توکن جدید",FMt=()=>"رمز جديد",HMt=()=>"Nuevo token",qMt=()=>"नया टोकन",UMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BMt():t==="fa"?PMt():t==="ar"?FMt():t==="es"?HMt():t==="hi"?qMt():$Mt()}),GMt=()=>"No default flavor",VMt=()=>"不设默认配置",KMt=()=>"بدون پیکربندی پیش‌فرض",WMt=()=>"لا يوجد تكوين افتراضي للموارد",QMt=()=>"Sin opción predeterminada",XMt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",YMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VMt():t==="fa"?KMt():t==="ar"?WMt():t==="es"?QMt():t==="hi"?XMt():GMt()}),ZMt=()=>"none",JMt=()=>"无",eOt=()=>"هیچ‌کدام",tOt=()=>"لا شيء",nOt=()=>"ninguno",rOt=()=>"कोई नहीं",Yk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JMt():t==="fa"?eOt():t==="ar"?tOt():t==="es"?nOt():t==="hi"?rOt():ZMt()}),sOt=()=>"Not connected",iOt=()=>"未连接",aOt=()=>"متصل نیست",oOt=()=>"غير متصل",cOt=()=>"No conectado",lOt=()=>"कनेक्टेड नहीं",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iOt():t==="fa"?aOt():t==="ar"?oOt():t==="es"?cOt():t==="hi"?lOt():sOt()}),uOt=()=>"not found on PATH",_Ot=()=>"在 PATH 中未找到",fOt=()=>"در PATH پیدا نشد",dOt=()=>"غير موجود في PATH",hOt=()=>"no se encontró en el PATH",pOt=()=>"PATH पर नहीं मिला",mOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ot():t==="fa"?fOt():t==="ar"?dOt():t==="es"?hOt():t==="hi"?pOt():uOt()}),gOt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,vOt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,bOt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,yOt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,xOt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,wOt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,kOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vOt(e):t==="fa"?bOt(e):t==="ar"?yOt(e):t==="es"?xOt(e):t==="hi"?wOt(e):gOt(e)}),SOt=()=>"not initialized",COt=()=>"尚未初始化",EOt=()=>"راه‌اندازی نشده",NOt=()=>"غير مهيّأ",zOt=()=>"sin inicializar",jOt=()=>"शुरू नहीं किया गया",TOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?COt():t==="fa"?EOt():t==="ar"?NOt():t==="es"?zOt():t==="hi"?jOt():SOt()}),AOt=()=>"Not set",ROt=()=>"未设置",MOt=()=>"تنظیم نشده",OOt=()=>"غير مضبوط",DOt=()=>"Sin definir",LOt=()=>"सेट नहीं",f3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ROt():t==="fa"?MOt():t==="ar"?OOt():t==="es"?DOt():t==="hi"?LOt():AOt()}),IOt=()=>"OAuth (subscription login)",$Ot=()=>"OAuth(订阅登录)",BOt=()=>"OAuth (ورود با اشتراک)",POt=()=>"OAuth (تسجيل دخول الاشتراك)",FOt=()=>"OAuth (inicio de sesión con suscripción)",HOt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",qOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ot():t==="fa"?BOt():t==="ar"?POt():t==="es"?FOt():t==="hi"?HOt():IOt()}),UOt=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.`,GOt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,VOt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,KOt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,WOt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,QOt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,XOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GOt(e):t==="fa"?VOt(e):t==="ar"?KOt(e):t==="es"?WOt(e):t==="hi"?QOt(e):UOt(e)}),YOt=()=>"Setting up…",ZOt=()=>"正在设置…",JOt=()=>"در حال راه‌اندازی…",eDt=()=>"جارٍ الإعداد…",tDt=()=>"Configurando…",nDt=()=>"सेट अप हो रहा है…",rDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZOt():t==="fa"?JOt():t==="ar"?eDt():t==="es"?tDt():t==="hi"?nDt():YOt()}),sDt=()=>"Account",iDt=()=>"账户",aDt=()=>"حساب",oDt=()=>"الحساب",cDt=()=>"Cuenta",lDt=()=>"खाता",Zk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iDt():t==="fa"?aDt():t==="ar"?oDt():t==="es"?cDt():t==="hi"?lDt():sDt()}),uDt=()=>"Add one with",_Dt=()=>"使用以下命令添加:",fDt=()=>"یکی با این فرمان اضافه کنید:",dDt=()=>"أضِف واحدًا عبر",hDt=()=>"Añade una con",pDt=()=>"इसके साथ एक जोड़ें",mDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Dt():t==="fa"?fDt():t==="ar"?dDt():t==="es"?hDt():t==="hi"?pDt():uDt()}),gDt=()=>"Add variable",vDt=()=>"添加变量",bDt=()=>"افزودن متغیر",yDt=()=>"إضافة متغيّر",xDt=()=>"Añadir variable",wDt=()=>"वेरिएबल जोड़ें",kDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vDt():t==="fa"?bDt():t==="ar"?yDt():t==="es"?xDt():t==="hi"?wDt():gDt()}),SDt=()=>"Agent models",CDt=()=>"智能体模型",EDt=()=>"مدل‌های عامل",NDt=()=>"نماذج الوكيل",zDt=()=>"Modelos de los agentes",jDt=()=>"एजेंट मॉडल",TDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CDt():t==="fa"?EDt():t==="ar"?NDt():t==="es"?zDt():t==="hi"?jDt():SDt()}),ADt=()=>"Anonymous usage analytics",RDt=()=>"匿名使用情况分析",MDt=()=>"تحلیل ناشناس استفاده",ODt=()=>"تحليلات استخدام مجهولة الهوية",DDt=()=>"Estadísticas de uso anónimas",LDt=()=>"अनाम उपयोग एनालिटिक्स",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RDt():t==="fa"?MDt():t==="ar"?ODt():t==="es"?DDt():t==="hi"?LDt():ADt()}),IDt=()=>"Auth",$Dt=()=>"身份验证",BDt=()=>"احراز هویت",PDt=()=>"المصادقة",FDt=()=>"Autenticación",HDt=()=>"ऑथ",qDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Dt():t==="fa"?BDt():t==="ar"?PDt():t==="es"?FDt():t==="hi"?HDt():IDt()}),UDt=()=>"Authentication",GDt=()=>"身份验证",VDt=()=>"احراز هویت",KDt=()=>"المصادقة",WDt=()=>"Autenticación",QDt=()=>"प्रमाणीकरण",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GDt():t==="fa"?VDt():t==="ar"?KDt():t==="es"?WDt():t==="hi"?QDt():UDt()}),XDt=()=>"Back to Compute",YDt=()=>"返回算力设置",ZDt=()=>"بازگشت به رایانش",JDt=()=>"العودة إلى الحوسبة",eLt=()=>"Volver a Cómputo",tLt=()=>"कंप्यूट पर वापस जाएं",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YDt():t==="fa"?ZDt():t==="ar"?JDt():t==="es"?eLt():t==="hi"?tLt():XDt()}),nLt=()=>"Backend",rLt=()=>"后端",sLt=()=>"بک‌اند",iLt=()=>"بيئة التنفيذ",aLt=()=>"Backend",oLt=()=>"बैकएंड",cLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rLt():t==="fa"?sLt():t==="ar"?iLt():t==="es"?aLt():t==="hi"?oLt():nLt()}),lLt=()=>"Baseline",uLt=()=>"基线",_Lt=()=>"خط مبنا",fLt=()=>"الأساس المرجعي",dLt=()=>"Rama base",hLt=()=>"बेसलाइन",pLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uLt():t==="fa"?_Lt():t==="ar"?fLt():t==="es"?dLt():t==="hi"?hLt():lLt()}),mLt=()=>"Binary",gLt=()=>"可执行文件",vLt=()=>"فایل اجرایی",bLt=()=>"الملف التنفيذي",yLt=()=>"Binario",xLt=()=>"बाइनरी",wLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gLt():t==="fa"?vLt():t==="ar"?bLt():t==="es"?yLt():t==="hi"?xLt():mLt()}),kLt=()=>"Cancel",SLt=()=>"取消",CLt=()=>"لغو",ELt=()=>"إلغاء",NLt=()=>"Cancelar",zLt=()=>"रद्द करें",W_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLt():t==="fa"?CLt():t==="ar"?ELt():t==="es"?NLt():t==="hi"?zLt():kLt()}),jLt=()=>"Cancel new variable",TLt=()=>"取消新变量",ALt=()=>"لغو متغیر جدید",RLt=()=>"إلغاء المتغيّر الجديد",MLt=()=>"Cancelar nueva variable",OLt=()=>"नया वेरिएबल रद्द करें",DLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLt():t==="fa"?ALt():t==="ar"?RLt():t==="es"?MLt():t==="hi"?OLt():jLt()}),LLt=()=>"Checking compute targets…",ILt=()=>"正在检查算力目标…",$Lt=()=>"در حال بررسی مقصدهای رایانشی…",BLt=()=>"جارٍ التحقق من أهداف الحوسبة…",PLt=()=>"Comprobando destinos de cómputo…",FLt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",HLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ILt():t==="fa"?$Lt():t==="ar"?BLt():t==="es"?PLt():t==="hi"?FLt():LLt()}),qLt=()=>"Checking kubectl…",ULt=()=>"正在检查 kubectl…",GLt=()=>"در حال بررسی kubectl…",VLt=()=>"جارٍ التحقق من kubectl…",KLt=()=>"Comprobando kubectl…",WLt=()=>"kubectl जाँचा जा रहा है…",QLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULt():t==="fa"?GLt():t==="ar"?VLt():t==="es"?KLt():t==="hi"?WLt():qLt()}),XLt=()=>"Checking Modal…",YLt=()=>"正在检查 Modal…",ZLt=()=>"در حال بررسی Modal…",JLt=()=>"جارٍ التحقق من Modal…",eIt=()=>"Comprobando Modal…",tIt=()=>"Modal जाँचा जा रहा है…",nIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YLt():t==="fa"?ZLt():t==="ar"?JLt():t==="es"?eIt():t==="hi"?tIt():XLt()}),rIt=()=>"Choose a preset flavor",sIt=()=>"选择预设规格",iIt=()=>"یک پیکربندی آماده انتخاب کنید",aIt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",oIt=()=>"Elige una opción predefinida",cIt=()=>"एक प्रीसेट फ़्लेवर चुनें",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sIt():t==="fa"?iIt():t==="ar"?aIt():t==="es"?oIt():t==="hi"?cIt():rIt()}),lIt=()=>"cluster default",uIt=()=>"集群默认值",_It=()=>"پیش‌فرض خوشه",fIt=()=>"افتراضي العنقود",dIt=()=>"valor predeterminado del clúster",hIt=()=>"क्लस्टर डिफ़ॉल्ट",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uIt():t==="fa"?_It():t==="ar"?fIt():t==="es"?dIt():t==="hi"?hIt():lIt()}),pIt=()=>"cluster default (e.g. 4h, 30m)",mIt=()=>"集群默认值(例如 4h、30m)",gIt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",vIt=()=>"افتراضي العنقود (مثل 4h أو 30m)",bIt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",yIt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",xIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mIt():t==="fa"?gIt():t==="ar"?vIt():t==="es"?bIt():t==="hi"?yIt():pIt()}),wIt=()=>"Cluster unreachable",kIt=()=>"无法连接集群",SIt=()=>"خوشه در دسترس نیست",CIt=()=>"تعذّر الوصول إلى العنقود",EIt=()=>"Clúster inaccesible",NIt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",zIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kIt():t==="fa"?SIt():t==="ar"?CIt():t==="es"?EIt():t==="hi"?NIt():wIt()}),jIt=()=>"Compute",TIt=()=>"算力",AIt=()=>"رایانش",RIt=()=>"الحوسبة",MIt=()=>"Cómputo",OIt=()=>"कंप्यूट",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TIt():t==="fa"?AIt():t==="ar"?RIt():t==="es"?MIt():t==="hi"?OIt():jIt()}),DIt=()=>"Connect compute backends and choose where new runs execute.",LIt=()=>"连接算力后端,并选择新运行的执行位置。",IIt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",$It=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",BIt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",PIt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",FIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LIt():t==="fa"?IIt():t==="ar"?$It():t==="es"?BIt():t==="hi"?PIt():DIt()}),HIt=()=>"Connected",qIt=()=>"已连接",UIt=()=>"متصل",GIt=()=>"متصل",VIt=()=>"Conectado",KIt=()=>"कनेक्टेड",WIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qIt():t==="fa"?UIt():t==="ar"?GIt():t==="es"?VIt():t==="hi"?KIt():HIt()}),QIt=()=>"Context",XIt=()=>"上下文",YIt=()=>"زمینه",ZIt=()=>"السياق",JIt=()=>"Contexto",e$t=()=>"कॉन्टेक्स्ट",t$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XIt():t==="fa"?YIt():t==="ar"?ZIt():t==="es"?JIt():t==="hi"?e$t():QIt()}),n$t=()=>"Current",r$t=()=>"当前",s$t=()=>"فعلی",i$t=()=>"الحالي",a$t=()=>"Actual",o$t=()=>"मौजूदा",c$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r$t():t==="fa"?s$t():t==="ar"?i$t():t==="es"?a$t():t==="hi"?o$t():n$t()}),l$t=()=>"Currently off:",u$t=()=>"当前已关闭:",_$t=()=>"اکنون خاموش است:",f$t=()=>"معطّل حاليًا:",d$t=()=>"Desactivado actualmente:",h$t=()=>"फ़िलहाल बंद:",p$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u$t():t==="fa"?_$t():t==="ar"?f$t():t==="es"?d$t():t==="hi"?h$t():l$t()}),m$t=()=>"Custom flavor",g$t=()=>"自定义规格",v$t=()=>"پیکربندی سفارشی",b$t=()=>"تكوين موارد مخصّص",y$t=()=>"Opción personalizada",x$t=()=>"कस्टम फ़्लेवर",w$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g$t():t==="fa"?v$t():t==="ar"?b$t():t==="es"?y$t():t==="hi"?x$t():m$t()}),k$t=()=>"Custom flavor…",S$t=()=>"自定义规格…",C$t=()=>"پیکربندی سفارشی…",E$t=()=>"تكوين موارد مخصّص…",N$t=()=>"Opción personalizada…",z$t=()=>"कस्टम फ़्लेवर…",j$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S$t():t==="fa"?C$t():t==="ar"?E$t():t==="es"?N$t():t==="hi"?z$t():k$t()}),T$t=()=>"Data directory",A$t=()=>"数据目录",R$t=()=>"پوشهٔ داده",M$t=()=>"دليل البيانات",O$t=()=>"Directorio de datos",D$t=()=>"डेटा डायरेक्टरी",L$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A$t():t==="fa"?R$t():t==="ar"?M$t():t==="es"?O$t():t==="hi"?D$t():T$t()}),I$t=()=>"default",$$t=()=>"默认",B$t=()=>"پیش‌فرض",P$t=()=>"افتراضي",F$t=()=>"predeterminado",H$t=()=>"डिफ़ॉल्ट",q$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$$t():t==="fa"?B$t():t==="ar"?P$t():t==="es"?F$t():t==="hi"?H$t():I$t()}),U$t=()=>"Default",G$t=()=>"默认",V$t=()=>"پیش‌فرض",K$t=()=>"الافتراضي",W$t=()=>"Predeterminado",Q$t=()=>"डिफ़ॉल्ट",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G$t():t==="fa"?V$t():t==="ar"?K$t():t==="es"?W$t():t==="hi"?Q$t():U$t()}),X$t=()=>"Default destination",Y$t=()=>"默认目标",Z$t=()=>"مقصد پیش‌فرض",J$t=()=>"الوجهة الافتراضية",eBt=()=>"Destino predeterminado",tBt=()=>"डिफ़ॉल्ट गंतव्य",nBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y$t():t==="fa"?Z$t():t==="ar"?J$t():t==="es"?eBt():t==="hi"?tBt():X$t()}),rBt=()=>"Detecting hardware…",sBt=()=>"正在检测硬件…",iBt=()=>"در حال شناسایی سخت‌افزار…",aBt=()=>"جارٍ اكتشاف العتاد…",oBt=()=>"Detectando hardware…",cBt=()=>"हार्डवेयर पहचाना जा रहा है…",lBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sBt():t==="fa"?iBt():t==="ar"?aBt():t==="es"?oBt():t==="hi"?cBt():rBt()}),uBt=()=>"Detecting harnesses…",_Bt=()=>"正在检测智能体工具…",fBt=()=>"در حال شناسایی ابزارهای عامل…",dBt=()=>"جارٍ اكتشاف أدوات البرمجة…",hBt=()=>"Detectando agentes…",pBt=()=>"हार्नेस पहचाने जा रहे हैं…",mBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Bt():t==="fa"?fBt():t==="ar"?dBt():t==="es"?hBt():t==="hi"?pBt():uBt()}),gBt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",vBt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",bBt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",yBt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",xBt=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",wBt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",kBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vBt():t==="fa"?bBt():t==="ar"?yBt():t==="es"?xBt():t==="hi"?wBt():gBt()}),SBt=()=>"Effective URL",CBt=()=>"实际使用的网址",EBt=()=>"نشانی مؤثر",NBt=()=>"الرابط الفعّال",zBt=()=>"URL efectiva",jBt=()=>"प्रभावी URL",TBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CBt():t==="fa"?EBt():t==="ar"?NBt():t==="es"?zBt():t==="hi"?jBt():SBt()}),ABt=()=>"Enable GitHub syncing for new projects",RBt=()=>"为新项目启用 GitHub 同步",MBt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",OBt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",DBt=()=>"Activar la sincronización con GitHub en proyectos nuevos",LBt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RBt():t==="fa"?MBt():t==="ar"?OBt():t==="es"?DBt():t==="hi"?LBt():ABt()}),IBt=()=>"Environment",$Bt=()=>"环境",BBt=()=>"محیط",PBt=()=>"البيئة",FBt=()=>"Entorno",HBt=()=>"एनवायरनमेंट",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Bt():t==="fa"?BBt():t==="ar"?PBt():t==="es"?FBt():t==="hi"?HBt():IBt()}),qBt=()=>"Failed",UBt=()=>"失败",GBt=()=>"ناموفق",VBt=()=>"فشل",KBt=()=>"Error",WBt=()=>"विफल",Jk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBt():t==="fa"?GBt():t==="ar"?VBt():t==="es"?KBt():t==="hi"?WBt():qBt()}),QBt=()=>"General",XBt=()=>"常规",YBt=()=>"عمومی",ZBt=()=>"عام",JBt=()=>"General",ePt=()=>"सामान्य",tPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XBt():t==="fa"?YBt():t==="ar"?ZBt():t==="es"?JBt():t==="hi"?ePt():QBt()}),nPt=()=>"GitHub publishing",rPt=()=>"GitHub 发布",sPt=()=>"انتشار در GitHub",iPt=()=>"النشر على GitHub",aPt=()=>"Publicación en GitHub",oPt=()=>"GitHub प्रकाशन",cPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rPt():t==="fa"?sPt():t==="ar"?iPt():t==="es"?aPt():t==="hi"?oPt():nPt()}),lPt=()=>"Git token",uPt=()=>"Git 令牌",_Pt=()=>"توکن Git",fPt=()=>"رمز Git",dPt=()=>"Token de Git",hPt=()=>"Git टोकन",pPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uPt():t==="fa"?_Pt():t==="ar"?fPt():t==="es"?dPt():t==="hi"?hPt():lPt()}),mPt=()=>"Harnesses",gPt=()=>"智能体工具",vPt=()=>"ابزارهای عامل",bPt=()=>"أدوات البرمجة",yPt=()=>"Agentes",xPt=()=>"हार्नेस",d3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gPt():t==="fa"?vPt():t==="ar"?bPt():t==="es"?yPt():t==="hi"?xPt():mPt()}),wPt=()=>"hf_…",kPt=()=>"hf_…",SPt=()=>"hf_…",CPt=()=>"hf_…",EPt=()=>"hf_…",NPt=()=>"hf_…",zPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kPt():t==="fa"?SPt():t==="ar"?CPt():t==="es"?EPt():t==="hi"?NPt():wPt()}),jPt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",TPt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",APt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",RPt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",MPt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",OPt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",DPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TPt():t==="fa"?APt():t==="ar"?RPt():t==="es"?MPt():t==="hi"?OPt():jPt()}),LPt=()=>"Initialize Git",IPt=()=>"初始化 Git",$Pt=()=>"راه‌اندازی Git",BPt=()=>"تهيئة Git",PPt=()=>"Inicializar Git",FPt=()=>"Git शुरू करें",HPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IPt():t==="fa"?$Pt():t==="ar"?BPt():t==="es"?PPt():t==="hi"?FPt():LPt()}),qPt=()=>"Install",UPt=()=>"安装",GPt=()=>"نصب",VPt=()=>"تثبيت",KPt=()=>"Instalar",WPt=()=>"इंस्टॉल करें",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UPt():t==="fa"?GPt():t==="ar"?VPt():t==="es"?KPt():t==="hi"?WPt():qPt()}),QPt=()=>"Install broken",XPt=()=>"安装损坏",YPt=()=>"نصب خراب است",ZPt=()=>"التثبيت معطوب",JPt=()=>"Instalación dañada",eFt=()=>"इंस्टॉल खराब है",tFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XPt():t==="fa"?YPt():t==="ar"?ZPt():t==="es"?JPt():t==="hi"?eFt():QPt()}),nFt=()=>"Install GitHub CLI",rFt=()=>"安装 GitHub CLI",sFt=()=>"نصب GitHub CLI",iFt=()=>"تثبيت واجهة GitHub لسطر الأوامر",aFt=()=>"Instalar GitHub CLI",oFt=()=>"GitHub CLI इंस्टॉल करें",cFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rFt():t==="fa"?sFt():t==="ar"?iFt():t==="es"?aFt():t==="hi"?oFt():nFt()}),lFt=()=>"Install updates automatically",uFt=()=>"自动安装更新",_Ft=()=>"نصب خودکار به‌روزرسانی‌ها",fFt=()=>"تثبيت التحديثات تلقائيًا",dFt=()=>"Instalar actualizaciones automáticamente",hFt=()=>"अपडेट अपने आप इंस्टॉल करें",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uFt():t==="fa"?_Ft():t==="ar"?fFt():t==="es"?dFt():t==="hi"?hFt():lFt()}),pFt=()=>"Instance history",mFt=()=>"实例历史",gFt=()=>"تاریخچهٔ نمونه‌ها",vFt=()=>"سجل المثيلات",bFt=()=>"Historial de instancias",yFt=()=>"इंस्टेंस इतिहास",xFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mFt():t==="fa"?gFt():t==="ar"?vFt():t==="es"?bFt():t==="hi"?yFt():pFt()}),wFt=()=>"Invalid Token",kFt=()=>"令牌无效",SFt=()=>"توکن نامعتبر",CFt=()=>"رمز غير صالح",EFt=()=>"Token no válido",NFt=()=>"अमान्य टोकन",zFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kFt():t==="fa"?SFt():t==="ar"?CFt():t==="es"?EFt():t==="hi"?NFt():wFt()}),jFt=()=>"Jobs / Dashboard URL",TFt=()=>"Jobs / 控制台网址",AFt=()=>"نشانی Jobs / داشبورد",RFt=()=>"رابط المهام / لوحة التحكم",MFt=()=>"URL de jobs / dashboard",OFt=()=>"Jobs / डैशबोर्ड URL",DFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TFt():t==="fa"?AFt():t==="ar"?RFt():t==="es"?MFt():t==="hi"?OFt():jFt()}),LFt=()=>"kubectl not found",IFt=()=>"未找到 kubectl",$Ft=()=>"kubectl پیدا نشد",BFt=()=>"لم يُعثر على kubectl",PFt=()=>"No se encontró kubectl",FFt=()=>"kubectl नहीं मिला",HFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IFt():t==="fa"?$Ft():t==="ar"?BFt():t==="es"?PFt():t==="hi"?FFt():LFt()}),qFt=()=>"Latest",UFt=()=>"最新版本",GFt=()=>"جدیدترین",VFt=()=>"الأحدث",KFt=()=>"Última",WFt=()=>"नवीनतम",QFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UFt():t==="fa"?GFt():t==="ar"?VFt():t==="es"?KFt():t==="hi"?WFt():qFt()}),XFt=()=>"Loading…",YFt=()=>"正在加载…",ZFt=()=>"در حال بارگیری…",JFt=()=>"جارٍ التحميل…",eHt=()=>"Cargando…",tHt=()=>"लोड हो रहा है…",Ru=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YFt():t==="fa"?ZFt():t==="ar"?JFt():t==="es"?eHt():t==="hi"?tHt():XFt()}),nHt=()=>"Loading Ray settings…",rHt=()=>"正在加载 Ray 设置…",sHt=()=>"در حال بارگیری تنظیمات Ray…",iHt=()=>"جارٍ تحميل إعدادات Ray…",aHt=()=>"Cargando configuración de Ray…",oHt=()=>"Ray सेटिंग्स लोड हो रही हैं…",cHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rHt():t==="fa"?sHt():t==="ar"?iHt():t==="es"?aHt():t==="hi"?oHt():nHt()}),lHt=()=>"Loading slurm settings…",uHt=()=>"正在加载 Slurm 设置…",_Ht=()=>"در حال بارگیری تنظیمات Slurm…",fHt=()=>"جارٍ تحميل إعدادات slurm…",dHt=()=>"Cargando configuración de Slurm…",hHt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",pHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uHt():t==="fa"?_Ht():t==="ar"?fHt():t==="es"?dHt():t==="hi"?hHt():lHt()}),mHt=()=>"Loading status…",gHt=()=>"正在加载状态…",vHt=()=>"در حال بارگیری وضعیت…",bHt=()=>"جارٍ تحميل الحالة…",yHt=()=>"Cargando estado…",xHt=()=>"स्थिति लोड हो रही है…",wHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gHt():t==="fa"?vHt():t==="ar"?bHt():t==="es"?yHt():t==="hi"?xHt():mHt()}),kHt=()=>"Local only",SHt=()=>"仅本地",CHt=()=>"فقط محلی",EHt=()=>"محلي فقط",NHt=()=>"Solo local",zHt=()=>"केवल लोकल",jHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SHt():t==="fa"?CHt():t==="ar"?EHt():t==="es"?NHt():t==="hi"?zHt():kHt()}),THt=()=>"Local repository",AHt=()=>"本地仓库",RHt=()=>"مخزن محلی",MHt=()=>"مستودع محلي",OHt=()=>"Repositorio local",DHt=()=>"लोकल रिपॉज़िटरी",LHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AHt():t==="fa"?RHt():t==="ar"?MHt():t==="es"?OHt():t==="hi"?DHt():THt()}),IHt=()=>"Login node",$Ht=()=>"登录节点",BHt=()=>"گرهٔ ورود",PHt=()=>"عقدة الدخول",FHt=()=>"Nodo de acceso",HHt=()=>"लॉगिन नोड",qHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ht():t==="fa"?BHt():t==="ar"?PHt():t==="es"?FHt():t==="hi"?HHt():IHt()}),UHt=()=>"Make GitHub syncing the default?",GHt=()=>"将 GitHub 同步设为默认值?",VHt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",KHt=()=>"جعل مزامنة GitHub افتراضية؟",WHt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",QHt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",XHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GHt():t==="fa"?VHt():t==="ar"?KHt():t==="es"?WHt():t==="hi"?QHt():UHt()}),YHt=()=>"Missing bash/tar",ZHt=()=>"缺少 bash/tar",JHt=()=>"bash/tar موجود نیست",eqt=()=>"‏bash/tar مفقودان",tqt=()=>"Falta bash/tar",nqt=()=>"bash/tar गुम है",rqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZHt():t==="fa"?JHt():t==="ar"?eqt():t==="es"?tqt():t==="hi"?nqt():YHt()}),sqt=()=>"More compute options",iqt=()=>"更多算力选项",aqt=()=>"گزینه‌های رایانشی بیشتر",oqt=()=>"خيارات حوسبة إضافية",cqt=()=>"Más opciones de cómputo",lqt=()=>"और कंप्यूट विकल्प",uqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iqt():t==="fa"?aqt():t==="ar"?oqt():t==="es"?cqt():t==="hi"?lqt():sqt()}),_qt=()=>"Move failed:",fqt=()=>"移动失败:",dqt=()=>"انتقال ناموفق بود:",hqt=()=>"فشل النقل:",pqt=()=>"Error al mover:",mqt=()=>"स्थानांतरण विफल:",gqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fqt():t==="fa"?dqt():t==="ar"?hqt():t==="es"?pqt():t==="hi"?mqt():_qt()}),vqt=()=>"Moved. orx is now using the new location.",bqt=()=>"已移动。orx 现在使用新位置。",yqt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",xqt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",wqt=()=>"Movido. orx ya usa la nueva ubicación.",kqt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",Sqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bqt():t==="fa"?yqt():t==="ar"?xqt():t==="es"?wqt():t==="hi"?kqt():vqt()}),Cqt=()=>"Namespace",Eqt=()=>"命名空间",Nqt=()=>"فضای نام",zqt=()=>"مساحة الأسماء",jqt=()=>"Namespace",Tqt=()=>"नेमस्पेस",Aqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eqt():t==="fa"?Nqt():t==="ar"?zqt():t==="es"?jqt():t==="hi"?Tqt():Cqt()}),Rqt=()=>"New location",Mqt=()=>"新位置",Oqt=()=>"محل جدید",Dqt=()=>"الموقع الجديد",Lqt=()=>"Nueva ubicación",Iqt=()=>"नया स्थान",$qt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mqt():t==="fa"?Oqt():t==="ar"?Dqt():t==="es"?Lqt():t==="hi"?Iqt():Rqt()}),Bqt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",Pqt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",Fqt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",Hqt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",qqt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",Uqt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",Gqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqt():t==="fa"?Fqt():t==="ar"?Hqt():t==="es"?qqt():t==="hi"?Uqt():Bqt()}),Vqt=()=>"New variable key",Kqt=()=>"新变量键名",Wqt=()=>"کلید متغیر جدید",Qqt=()=>"مفتاح المتغيّر الجديد",Xqt=()=>"Nombre de la nueva variable",Yqt=()=>"नई वेरिएबल की",Zqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqt():t==="fa"?Wqt():t==="ar"?Qqt():t==="es"?Xqt():t==="hi"?Yqt():Vqt()}),Jqt=()=>"New variable value",eUt=()=>"新变量值",tUt=()=>"مقدار متغیر جدید",nUt=()=>"قيمة المتغيّر الجديد",rUt=()=>"Valor de la nueva variable",sUt=()=>"नई वेरिएबल वैल्यू",iUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUt():t==="fa"?tUt():t==="ar"?nUt():t==="es"?rUt():t==="hi"?sUt():Jqt()}),aUt=()=>"No code, prompts, file contents, or account identifiers are sent.",oUt=()=>"不会发送代码、提示词、文件内容或账户标识符。",cUt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",lUt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",uUt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",_Ut=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",fUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUt():t==="fa"?cUt():t==="ar"?lUt():t==="es"?uUt():t==="hi"?_Ut():aUt()}),dUt=()=>"No hosts found in ~/.ssh/config.",hUt=()=>"在 ~/.ssh/config 中未找到主机。",pUt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",mUt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",gUt=()=>"No se encontraron hosts en ~/.ssh/config.",vUt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",bUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hUt():t==="fa"?pUt():t==="ar"?mUt():t==="es"?gUt():t==="hi"?vUt():dUt()}),yUt=()=>"No job-create permission",xUt=()=>"没有创建 Job 的权限",wUt=()=>"مجوز ساخت Job وجود ندارد",kUt=()=>"لا صلاحية لإنشاء المهام",SUt=()=>"Sin permiso para crear jobs",CUt=()=>"जॉब बनाने की अनुमति नहीं",EUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xUt():t==="fa"?wUt():t==="ar"?kUt():t==="es"?SUt():t==="hi"?CUt():yUt()}),NUt=()=>"No Write Permissions",zUt=()=>"无写入权限",jUt=()=>"بدون مجوز نوشتن",TUt=()=>"لا صلاحيات كتابة",AUt=()=>"Sin permisos de escritura",RUt=()=>"लिखने की अनुमति नहीं",MUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zUt():t==="fa"?jUt():t==="ar"?TUt():t==="es"?AUt():t==="hi"?RUt():NUt()}),OUt=()=>"No key on this computer to register — load a registered key with",DUt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",LUt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",IUt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",$Ut=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",BUt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",PUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DUt():t==="fa"?LUt():t==="ar"?IUt():t==="es"?$Ut():t==="hi"?BUt():OUt()}),FUt=()=>"No key on this computer yet — create one with",HUt=()=>"此计算机上还没有密钥——使用以下命令创建:",qUt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",UUt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",GUt=()=>"Aún no hay ninguna clave en este equipo — crea una con",VUt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",KUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HUt():t==="fa"?qUt():t==="ar"?UUt():t==="es"?GUt():t==="hi"?VUt():FUt()}),WUt=()=>"No Slurm CLI",QUt=()=>"无 Slurm CLI",XUt=()=>"بدون CLI اسلورم",YUt=()=>"لا توجد واجهة Slurm لسطر الأوامر",ZUt=()=>"Sin CLI de Slurm",JUt=()=>"कोई Slurm CLI नहीं",eGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QUt():t==="fa"?XUt():t==="ar"?YUt():t==="es"?ZUt():t==="hi"?JUt():WUt()}),tGt=()=>"None registered",nGt=()=>"未注册任何密钥",rGt=()=>"هیچ‌کدام ثبت نشده",sGt=()=>"لا شيء مسجّل",iGt=()=>"Ninguna registrada",aGt=()=>"कोई रजिस्टर्ड नहीं",oGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nGt():t==="fa"?rGt():t==="ar"?sGt():t==="es"?iGt():t==="hi"?aGt():tGt()}),cGt=()=>"Not checked",lGt=()=>"未检查",uGt=()=>"بررسی نشده",_Gt=()=>"لم يُفحص",fGt=()=>"Sin comprobar",dGt=()=>"जाँचा नहीं गया",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lGt():t==="fa"?uGt():t==="ar"?_Gt():t==="es"?fGt():t==="hi"?dGt():cGt()}),hGt=()=>"Not configured",pGt=()=>"未配置",mGt=()=>"پیکربندی نشده",gGt=()=>"غير مُعَد",vGt=()=>"Sin configurar",bGt=()=>"कॉन्फ़िगर नहीं किया गया",jb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pGt():t==="fa"?mGt():t==="ar"?gGt():t==="es"?vGt():t==="hi"?bGt():hGt()}),yGt=()=>"Not installed",xGt=()=>"未安装",wGt=()=>"نصب نیست",kGt=()=>"غير مثبّت",SGt=()=>"No instalado",CGt=()=>"इंस्टॉल नहीं है",EGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xGt():t==="fa"?wGt():t==="ar"?kGt():t==="es"?SGt():t==="hi"?CGt():yGt()}),NGt=()=>"Not now",zGt=()=>"暂不",jGt=()=>"اکنون نه",TGt=()=>"ليس الآن",AGt=()=>"Ahora no",RGt=()=>"अभी नहीं",MGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zGt():t==="fa"?jGt():t==="ar"?TGt():t==="es"?AGt():t==="hi"?RGt():NGt()}),OGt=()=>"Not on this computer",DGt=()=>"不在此计算机上",LGt=()=>"روی این رایانه نیست",IGt=()=>"ليس على هذا الحاسوب",$Gt=()=>"No en este equipo",BGt=()=>"इस कंप्यूटर पर नहीं",PGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DGt():t==="fa"?LGt():t==="ar"?IGt():t==="es"?$Gt():t==="hi"?BGt():OGt()}),FGt=()=>"Not set (pass --host per launch)",HGt=()=>"未设置(每次启动时传入 --host)",qGt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",UGt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",GGt=()=>"Sin definir (pasa --host en cada lanzamiento)",VGt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HGt():t==="fa"?qGt():t==="ar"?UGt():t==="es"?GGt():t==="hi"?VGt():FGt()}),KGt=()=>"Not signed in",WGt=()=>"未登录",QGt=()=>"وارد نشده",XGt=()=>"لم يتم تسجيل الدخول",YGt=()=>"Sin iniciar sesión",ZGt=()=>"साइन इन नहीं है",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WGt():t==="fa"?QGt():t==="ar"?XGt():t==="es"?YGt():t==="hi"?ZGt():KGt()}),JGt=()=>"On this computer",eVt=()=>"在此计算机上",tVt=()=>"روی این رایانه",nVt=()=>"على هذا الحاسوب",rVt=()=>"En este equipo",sVt=()=>"इस कंप्यूटर पर",iVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eVt():t==="fa"?tVt():t==="ar"?nVt():t==="es"?rVt():t==="hi"?sVt():JGt()}),aVt=()=>"Open a project to inspect its repository and GitHub publication state.",oVt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",cVt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",lVt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",uVt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",_Vt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",fVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oVt():t==="fa"?cVt():t==="ar"?lVt():t==="es"?uVt():t==="hi"?_Vt():aVt()}),dVt=()=>"Open job page",hVt=()=>"打开作业页面",pVt=()=>"باز کردن صفحهٔ کار",mVt=()=>"فتح صفحة المهمة",gVt=()=>"Abrir página del job",vVt=()=>"जॉब पेज खोलें",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hVt():t==="fa"?pVt():t==="ar"?mVt():t==="es"?gVt():t==="hi"?vVt():dVt()}),bVt=()=>"Open on GitHub",yVt=()=>"在 GitHub 上打开",xVt=()=>"باز کردن در GitHub",wVt=()=>"فتح على GitHub",kVt=()=>"Abrir en GitHub",SVt=()=>"GitHub पर खोलें",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yVt():t==="fa"?xVt():t==="ar"?wVt():t==="es"?kVt():t==="hi"?SVt():bVt()}),CVt=()=>", or create one with",EVt=()=>",或使用以下命令创建:",NVt=()=>"، یا با این فرمان یکی بسازید:",zVt=()=>"، أو أنشئ واحدًا عبر",jVt=()=>", o crea una con",TVt=()=>", या इसके साथ एक बनाएं",AVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EVt():t==="fa"?NVt():t==="ar"?zVt():t==="es"?jVt():t==="hi"?TVt():CVt()}),RVt=()=>"Org",MVt=()=>"组织",OVt=()=>"سازمان",DVt=()=>"المؤسسة",LVt=()=>"Org.",IVt=()=>"संगठन",$Vt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MVt():t==="fa"?OVt():t==="ar"?DVt():t==="es"?LVt():t==="hi"?IVt():RVt()}),BVt=()=>"Orgs",PVt=()=>"组织",FVt=()=>"سازمان‌ها",HVt=()=>"المؤسسات",qVt=()=>"Orgs.",UVt=()=>"संगठन",GVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PVt():t==="fa"?FVt():t==="ar"?HVt():t==="es"?qVt():t==="hi"?UVt():BVt()}),VVt=()=>"orx can't update this install",KVt=()=>"orx 无法更新此安装",WVt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",QVt=()=>"لا يستطيع orx تحديث هذا التثبيت",XVt=()=>"orx no puede actualizar esta instalación",YVt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",ZVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KVt():t==="fa"?WVt():t==="ar"?QVt():t==="es"?XVt():t==="hi"?YVt():VVt()}),JVt=()=>"Overleaf",eKt=()=>"Overleaf",tKt=()=>"Overleaf",nKt=()=>"Overleaf",rKt=()=>"Overleaf",sKt=()=>"Overleaf",yL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eKt():t==="fa"?tKt():t==="ar"?nKt():t==="es"?rKt():t==="hi"?sKt():JVt()}),iKt=()=>"Overleaf Git authentication token",aKt=()=>"Overleaf Git 身份验证令牌",oKt=()=>"توکن احراز هویت Git در Overleaf",cKt=()=>"رمز مصادقة Git لـ Overleaf",lKt=()=>"Token de autenticación de Git de Overleaf",uKt=()=>"Overleaf Git प्रमाणीकरण टोकन",_Kt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aKt():t==="fa"?oKt():t==="ar"?cKt():t==="es"?lKt():t==="hi"?uKt():iKt()}),fKt=()=>"Overridden by env",dKt=()=>"已被环境变量覆盖",hKt=()=>"بازنویسی‌شده توسط محیط",pKt=()=>"متجاوَز عبر متغيّر البيئة",mKt=()=>"Sobrescrito por el entorno",gKt=()=>"env द्वारा ओवरराइड किया गया",vKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dKt():t==="fa"?hKt():t==="ar"?pKt():t==="es"?mKt():t==="hi"?gKt():fKt()}),bKt=()=>"Partition",yKt=()=>"分区",xKt=()=>"پارتیشن",wKt=()=>"القسم",kKt=()=>"Partición",SKt=()=>"पार्टीशन",CKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yKt():t==="fa"?xKt():t==="ar"?wKt():t==="es"?kKt():t==="hi"?SKt():bKt()}),EKt=()=>"Path",NKt=()=>"路径",zKt=()=>"مسیر",jKt=()=>"المسار",TKt=()=>"Ruta",AKt=()=>"पथ",RKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NKt():t==="fa"?zKt():t==="ar"?jKt():t==="es"?TKt():t==="hi"?AKt():EKt()}),MKt=()=>"Plan",OKt=()=>"方案",DKt=()=>"سطح اشتراک",LKt=()=>"الخطة",IKt=()=>"Plan",$Kt=()=>"प्लान",BKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OKt():t==="fa"?DKt():t==="ar"?LKt():t==="es"?IKt():t==="hi"?$Kt():MKt()}),PKt=()=>"Project",FKt=()=>"项目",HKt=()=>"پروژه",qKt=()=>"المشروع",UKt=()=>"Proyecto",GKt=()=>"प्रोजेक्ट",VKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FKt():t==="fa"?HKt():t==="ar"?qKt():t==="es"?UKt():t==="hi"?GKt():PKt()}),KKt=()=>"Ray version",WKt=()=>"Ray 版本",QKt=()=>"نسخهٔ Ray",XKt=()=>"إصدار Ray",YKt=()=>"Versión de Ray",ZKt=()=>"Ray वर्शन",JKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WKt():t==="fa"?QKt():t==="ar"?XKt():t==="es"?YKt():t==="hi"?ZKt():KKt()}),eWt=()=>"Reachable",tWt=()=>"可访问",nWt=()=>"در دسترس",rWt=()=>"يمكن الوصول إليه",sWt=()=>"Accesible",iWt=()=>"पहुँच योग्य",aWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tWt():t==="fa"?nWt():t==="ar"?rWt():t==="es"?sWt():t==="hi"?iWt():eWt()}),oWt=()=>"Reading ~/.ssh/config…",cWt=()=>"正在读取 ~/.ssh/config…",lWt=()=>"در حال خواندن ‎~/.ssh/config…",uWt=()=>"جارٍ قراءة ‎~/.ssh/config…",_Wt=()=>"Leyendo ~/.ssh/config…",fWt=()=>"~/.ssh/config पढ़ा जा रहा है…",xL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cWt():t==="fa"?lWt():t==="ar"?uWt():t==="es"?_Wt():t==="hi"?fWt():oWt()}),dWt=()=>"Ready",hWt=()=>"就绪",pWt=()=>"آماده",mWt=()=>"جاهز",gWt=()=>"Listo",vWt=()=>"तैयार",wm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hWt():t==="fa"?pWt():t==="ar"?mWt():t==="es"?gWt():t==="hi"?vWt():dWt()}),bWt=()=>"Ready to move",yWt=()=>"可以移动",xWt=()=>"آمادهٔ انتقال",wWt=()=>"جاهز للنقل",kWt=()=>"Listo para mover",SWt=()=>"स्थानांतरण के लिए तैयार",CWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yWt():t==="fa"?xWt():t==="ar"?wWt():t==="es"?kWt():t==="hi"?SWt():bWt()}),EWt=()=>"Configured",NWt=()=>"已配置",zWt=()=>"پیکربندی‌شده",jWt=()=>"مُعَد",TWt=()=>"Configurado",AWt=()=>"कॉन्फ़िगर किया गया",eS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NWt():t==="fa"?zWt():t==="ar"?jWt():t==="es"?TWt():t==="hi"?AWt():EWt()}),RWt=()=>"Refresh",MWt=()=>"刷新",OWt=()=>"تازه‌سازی",DWt=()=>"تحديث",LWt=()=>"Actualizar",IWt=()=>"रीफ़्रेश करें",km=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MWt():t==="fa"?OWt():t==="ar"?DWt():t==="es"?LWt():t==="hi"?IWt():RWt()}),$Wt=()=>"Remotes",BWt=()=>"远程仓库",PWt=()=>"مخزن‌های دوردست",FWt=()=>"المستودعات البعيدة",HWt=()=>"Remotos",qWt=()=>"रिमोट",UWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BWt():t==="fa"?PWt():t==="ar"?FWt():t==="es"?HWt():t==="hi"?qWt():$Wt()}),GWt=()=>"Repository",VWt=()=>"仓库",KWt=()=>"مخزن",WWt=()=>"المستودع",QWt=()=>"Repositorio",XWt=()=>"रिपॉज़िटरी",YWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VWt():t==="fa"?KWt():t==="ar"?WWt():t==="es"?QWt():t==="hi"?XWt():GWt()}),ZWt=()=>"Restart to finish updating",JWt=()=>"重新启动以完成更新",eQt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",tQt=()=>"أعد التشغيل لإكمال التحديث",nQt=()=>"Reinicia para terminar la actualización",rQt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",sQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JWt():t==="fa"?eQt():t==="ar"?tQt():t==="es"?nQt():t==="hi"?rQt():ZWt()}),iQt=()=>"Running instances",aQt=()=>"正在运行的实例",oQt=()=>"نمونه‌های در حال اجرا",cQt=()=>"المثيلات قيد التشغيل",lQt=()=>"Instancias en ejecución",uQt=()=>"चल रहे इंस्टेंस",_Qt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aQt():t==="fa"?oQt():t==="ar"?cQt():t==="es"?lQt():t==="hi"?uQt():iQt()}),fQt=()=>"Runtime",dQt=()=>"运行时间",hQt=()=>"زمان اجرا",pQt=()=>"مدة التشغيل",mQt=()=>"Runtime",gQt=()=>"रनटाइम",vQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dQt():t==="fa"?hQt():t==="ar"?pQt():t==="es"?mQt():t==="hi"?gQt():fQt()}),bQt=()=>". Save it under that key if it's meant for HF Jobs.",yQt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",xQt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",wQt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",kQt=()=>". Guárdalo con ese nombre si es para HF Jobs.",SQt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",CQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yQt():t==="fa"?xQt():t==="ar"?wQt():t==="es"?kQt():t==="hi"?SQt():bQt()}),EQt=()=>"Session cookie",NQt=()=>"会话 cookie",zQt=()=>"کوکی نشست",jQt=()=>"ملف تعريف ارتباط الجلسة",TQt=()=>"Cookie de sesión",AQt=()=>"सेशन कुकी",RQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NQt():t==="fa"?zQt():t==="ar"?jQt():t==="es"?TQt():t==="hi"?AQt():EQt()}),MQt=()=>"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.",OQt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",DQt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",LQt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",IQt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",$Qt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",BQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OQt():t==="fa"?DQt():t==="ar"?LQt():t==="es"?IQt():t==="hi"?$Qt():MQt()}),PQt=()=>"Settings",FQt=()=>"设置",HQt=()=>"تنظیمات",qQt=()=>"الإعدادات",UQt=()=>"Configuración",GQt=()=>"सेटिंग्स",tS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FQt():t==="fa"?HQt():t==="ar"?qQt():t==="es"?UQt():t==="hi"?GQt():PQt()}),VQt=()=>"Signed in",KQt=()=>"已登录",WQt=()=>"وارد شده",QQt=()=>"تم تسجيل الدخول",XQt=()=>"Sesión iniciada",YQt=()=>"साइन इन है",ZQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KQt():t==="fa"?WQt():t==="ar"?QQt():t==="es"?XQt():t==="hi"?YQt():VQt()}),JQt=()=>"Source",eXt=()=>"来源",tXt=()=>"منبع",nXt=()=>"المصدر",rXt=()=>"Origen",sXt=()=>"स्रोत",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eXt():t==="fa"?tXt():t==="ar"?nXt():t==="es"?rXt():t==="hi"?sXt():JQt()}),iXt=()=>"SSH Key",aXt=()=>"SSH 密钥",oXt=()=>"کلید SSH",cXt=()=>"مفتاح SSH",lXt=()=>"Clave SSH",uXt=()=>"SSH की",_Xt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aXt():t==="fa"?oXt():t==="ar"?cXt():t==="es"?lXt():t==="hi"?uXt():iXt()}),fXt=()=>"Started",dXt=()=>"开始时间",hXt=()=>"آغاز",pXt=()=>"بدأ",mXt=()=>"Inicio",gXt=()=>"शुरू हुआ",vXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dXt():t==="fa"?hXt():t==="ar"?pXt():t==="es"?mXt():t==="hi"?gXt():fXt()}),bXt=()=>"State",yXt=()=>"状态",xXt=()=>"وضعیت",wXt=()=>"الحالة",kXt=()=>"Estado",SXt=()=>"स्थिति",CXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yXt():t==="fa"?xXt():t==="ar"?wXt():t==="es"?kXt():t==="hi"?SXt():bXt()}),EXt=()=>"Status",NXt=()=>"状态",zXt=()=>"وضعیت",jXt=()=>"الحالة",TXt=()=>"Estado",AXt=()=>"स्थिति",Mh=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NXt():t==="fa"?zXt():t==="ar"?jXt():t==="es"?TXt():t==="hi"?AXt():EXt()}),RXt=()=>"Storage",MXt=()=>"存储",OXt=()=>"ذخیره‌سازی",DXt=()=>"التخزين",LXt=()=>"Almacenamiento",IXt=()=>"स्टोरेज",$Xt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MXt():t==="fa"?OXt():t==="ar"?DXt():t==="es"?LXt():t==="hi"?IXt():RXt()}),BXt=()=>"Sync",PXt=()=>"同步",FXt=()=>"همگام‌سازی",HXt=()=>"مزامنة",qXt=()=>"Sincronización",UXt=()=>"सिंक",GXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PXt():t==="fa"?FXt():t==="ar"?HXt():t==="es"?qXt():t==="hi"?UXt():BXt()}),VXt=()=>"Syncing off",KXt=()=>"同步已关闭",WXt=()=>"همگام‌سازی خاموش",QXt=()=>"المزامنة معطّلة",XXt=()=>"Sincronización desactivada",YXt=()=>"सिंकिंग बंद है",ZXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KXt():t==="fa"?WXt():t==="ar"?QXt():t==="es"?XXt():t==="hi"?YXt():VXt()}),JXt=()=>"Test connection",eYt=()=>"测试连接",tYt=()=>"آزمایش اتصال",nYt=()=>"اختبار الاتصال",rYt=()=>"Probar conexión",sYt=()=>"कनेक्शन जाँचें",iYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eYt():t==="fa"?tYt():t==="ar"?nYt():t==="es"?rYt():t==="hi"?sYt():JXt()}),aYt=()=>"Testing…",oYt=()=>"正在测试…",cYt=()=>"در حال آزمایش…",lYt=()=>"جارٍ الاختبار…",uYt=()=>"Probando…",_Yt=()=>"जाँचा जा रहा है…",fYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oYt():t==="fa"?cYt():t==="ar"?lYt():t==="es"?uYt():t==="hi"?_Yt():aYt()}),dYt=()=>", then add it with",hYt=()=>",然后使用以下命令添加:",pYt=()=>"، سپس با این فرمان اضافه‌اش کنید:",mYt=()=>"، ثم أضِفه عبر",gYt=()=>" y luego añádela con",vYt=()=>", फिर इसे इसके साथ जोड़ें",bYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hYt():t==="fa"?pYt():t==="ar"?mYt():t==="es"?gYt():t==="hi"?vYt():dYt()}),yYt=()=>"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.",xYt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",wYt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",kYt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",SYt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",CYt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",EYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xYt():t==="fa"?wYt():t==="ar"?kYt():t==="es"?SYt():t==="hi"?CYt():yYt()}),NYt=()=>"This saved destination is not configured. Set it up below or choose another backend.",zYt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",jYt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",TYt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",AYt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",RYt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",MYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zYt():t==="fa"?jYt():t==="ar"?TYt():t==="es"?AYt():t==="hi"?RYt():NYt()}),OYt=()=>"This value looks like a Hugging Face token — compute runs only read it from",DYt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",LYt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",IYt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",$Yt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",BYt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",PYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DYt():t==="fa"?LYt():t==="ar"?IYt():t==="es"?$Yt():t==="hi"?BYt():OYt()}),FYt=()=>"Time limit",HYt=()=>"时间限制",qYt=()=>"محدودیت زمانی",UYt=()=>"الحد الزمني",GYt=()=>"Límite de tiempo",VYt=()=>"समय सीमा",KYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HYt():t==="fa"?qYt():t==="ar"?UYt():t==="es"?GYt():t==="hi"?VYt():FYt()}),WYt=()=>"Unable to verify",QYt=()=>"无法验证",XYt=()=>"تأیید ممکن نیست",YYt=()=>"تعذّر التحقق",ZYt=()=>"No se pudo verificar",JYt=()=>"सत्यापित नहीं हो सका",h3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QYt():t==="fa"?XYt():t==="ar"?YYt():t==="es"?ZYt():t==="hi"?JYt():WYt()}),eZt=()=>"Unknown",tZt=()=>"未知",nZt=()=>"نامشخص",rZt=()=>"غير معروف",sZt=()=>"Desconocido",iZt=()=>"अज्ञात",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tZt():t==="fa"?nZt():t==="ar"?rZt():t==="es"?sZt():t==="hi"?iZt():eZt()}),aZt=()=>"Update required",oZt=()=>"需要更新",cZt=()=>"نیازمند به‌روزرسانی",lZt=()=>"مطلوب تحديث",uZt=()=>"Actualización necesaria",_Zt=()=>"अपडेट ज़रूरी है",fZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oZt():t==="fa"?cZt():t==="ar"?lZt():t==="es"?uZt():t==="hi"?_Zt():aZt()}),dZt=()=>"Updates",hZt=()=>"更新",pZt=()=>"به‌روزرسانی‌ها",mZt=()=>"التحديثات",gZt=()=>"Actualizaciones",vZt=()=>"अपडेट",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hZt():t==="fa"?pZt():t==="ar"?mZt():t==="es"?gZt():t==="hi"?vZt():dZt()}),bZt=()=>"Usage analytics",yZt=()=>"使用情况分析",xZt=()=>"تحلیل استفاده",wZt=()=>"تحليلات الاستخدام",kZt=()=>"Estadísticas de uso",SZt=()=>"उपयोग एनालिटिक्स",CZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yZt():t==="fa"?xZt():t==="ar"?wZt():t==="es"?kZt():t==="hi"?SZt():bZt()}),EZt=()=>"value",NZt=()=>"值",zZt=()=>"مقدار",jZt=()=>"القيمة",TZt=()=>"valor",AZt=()=>"वैल्यू",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NZt():t==="fa"?zZt():t==="ar"?jZt():t==="es"?TZt():t==="hi"?AZt():EZt()}),RZt=()=>"Variables available to runs and the research agent (API keys, tokens).",MZt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",OZt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",DZt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",LZt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",IZt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",$Zt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MZt():t==="fa"?OZt():t==="ar"?DZt():t==="es"?LZt():t==="hi"?IZt():RZt()}),BZt=()=>"Version",PZt=()=>"版本",FZt=()=>"نسخه",HZt=()=>"الإصدار",qZt=()=>"Versión",UZt=()=>"वर्शन",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PZt():t==="fa"?FZt():t==="ar"?HZt():t==="es"?qZt():t==="hi"?UZt():BZt()}),GZt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",VZt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",KZt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",WZt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",QZt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",XZt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",YZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VZt():t==="fa"?KZt():t==="ar"?WZt():t==="es"?QZt():t==="hi"?XZt():GZt()}),ZZt=()=>"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.",JZt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",eJt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",tJt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",nJt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",rJt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",sJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JZt():t==="fa"?eJt():t==="ar"?tJt():t==="es"?nJt():t==="hi"?rJt():ZZt()}),iJt=()=>"Pick a login node first",aJt=()=>"请先选择登录节点",oJt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",cJt=()=>"اختر عقدة دخول أولًا",lJt=()=>"Elige primero un nodo de acceso",uJt=()=>"पहले एक लॉगिन नोड चुनें",_Jt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aJt():t==="fa"?oJt():t==="ar"?cJt():t==="es"?lJt():t==="hi"?uJt():iJt()}),fJt=()=>"Providers",dJt=()=>"提供商",hJt=()=>"ارائه‌دهندگان",pJt=()=>"المزوّدون",mJt=()=>"Proveedores",gJt=()=>"प्रोवाइडर",vJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dJt():t==="fa"?hJt():t==="ar"?pJt():t==="es"?mJt():t==="hi"?gJt():fJt()}),bJt=()=>"Reconnect",yJt=()=>"重新连接",xJt=()=>"اتصال دوباره",wJt=()=>"إعادة الاتصال",kJt=()=>"Reconectar",SJt=()=>"फिर से कनेक्ट करें",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yJt():t==="fa"?xJt():t==="ar"?wJt():t==="es"?kJt():t==="hi"?SJt():bJt()}),CJt=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,EJt=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,NJt=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,zJt=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,jJt=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,TJt=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,AJt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EJt(e):t==="fa"?NJt(e):t==="ar"?zJt(e):t==="es"?jJt(e):t==="hi"?TJt(e):CJt(e)}),RJt=()=>"Reinstall with the orx installer to get automatic updates.",MJt=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",OJt=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",DJt=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",LJt=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",IJt=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",$Jt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MJt():t==="fa"?OJt():t==="ar"?DJt():t==="es"?LJt():t==="hi"?IJt():RJt()}),BJt=()=>"Re-link",PJt=()=>"重新链接",FJt=()=>"پیوند دوباره",HJt=()=>"إعادة الربط",qJt=()=>"Volver a enlazar",UJt=()=>"फिर से लिंक करें",GJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PJt():t==="fa"?FJt():t==="ar"?HJt():t==="es"?qJt():t==="hi"?UJt():BJt()}),VJt=()=>"Remove cookie",KJt=()=>"移除 cookie",WJt=()=>"حذف کوکی",QJt=()=>"إزالة ملف تعريف الارتباط",XJt=()=>"Quitar cookie",YJt=()=>"कुकी हटाएं",ZJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KJt():t==="fa"?WJt():t==="ar"?QJt():t==="es"?XJt():t==="hi"?YJt():VJt()}),JJt=()=>"Remove token",een=()=>"移除令牌",ten=()=>"حذف توکن",nen=()=>"إزالة الرمز",ren=()=>"Quitar token",sen=()=>"टोकन हटाएं",ien=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?een():t==="fa"?ten():t==="ar"?nen():t==="es"?ren():t==="hi"?sen():JJt()}),aen=()=>"Removing…",oen=()=>"正在移除…",cen=()=>"در حال حذف…",len=()=>"جارٍ الإزالة…",uen=()=>"Quitando…",_en=()=>"हटाया जा रहा है…",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oen():t==="fa"?cen():t==="ar"?len():t==="es"?uen():t==="hi"?_en():aen()}),fen=()=>"Replace anyway",den=()=>"仍要替换",hen=()=>"به‌هرحال جایگزین کن",pen=()=>"الاستبدال على أي حال",men=()=>"Reemplazar de todos modos",gen=()=>"फिर भी बदलें",ven=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?den():t==="fa"?hen():t==="ar"?pen():t==="es"?men():t==="hi"?gen():fen()}),ben=()=>"Replace key",yen=()=>"替换密钥",xen=()=>"جایگزینی کلید",wen=()=>"استبدال المفتاح",ken=()=>"Reemplazar clave",Sen=()=>"की बदलें",Cen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yen():t==="fa"?xen():t==="ar"?wen():t==="es"?ken():t==="hi"?Sen():ben()}),Een=()=>"Replace token",Nen=()=>"替换令牌",zen=()=>"جایگزینی توکن",jen=()=>"استبدال الرمز",Ten=()=>"Reemplazar token",Aen=()=>"टोकन बदलें",Ren=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nen():t==="fa"?zen():t==="ar"?jen():t==="es"?Ten():t==="hi"?Aen():Een()}),Men=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,Oen=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,Den=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,Len=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,Ien=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,$en=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,Ben=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oen(e):t==="fa"?Den(e):t==="ar"?Len(e):t==="es"?Ien(e):t==="hi"?$en(e):Men(e)}),Pen=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,Fen=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,Hen=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,qen=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,Uen=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,Gen=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,Ven=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fen(e):t==="fa"?Hen(e):t==="ar"?qen(e):t==="es"?Uen(e):t==="hi"?Gen(e):Pen(e)}),Ken=()=>"Run `gh auth login` in your terminal.",Wen=()=>"请在终端中运行 `gh auth login`。",Qen=()=>"در پایانه `gh auth login` را اجرا کنید.",Xen=()=>"نفّذ `gh auth login` في طرفيتك.",Yen=()=>"Ejecuta `gh auth login` en tu terminal.",Zen=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",Jen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wen():t==="fa"?Qen():t==="ar"?Xen():t==="es"?Yen():t==="hi"?Zen():Ken()}),etn=()=>"Saved",ttn=()=>"已保存",ntn=()=>"ذخیره شده",rtn=()=>"تم الحفظ",stn=()=>"Guardado",itn=()=>"सेव हो गया",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ttn():t==="fa"?ntn():t==="ar"?rtn():t==="es"?stn():t==="hi"?itn():etn()}),atn=()=>"Set up",otn=()=>"设置",ctn=()=>"راه‌اندازی",ltn=()=>"إعداد",utn=()=>"Configurar",_tn=()=>"सेट अप करें",ftn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?otn():t==="fa"?ctn():t==="ar"?ltn():t==="es"?utn():t==="hi"?_tn():atn()}),dtn=()=>"Set up SSH key",htn=()=>"设置 SSH 密钥",ptn=()=>"راه‌اندازی کلید SSH",mtn=()=>"إعداد مفتاح SSH",gtn=()=>"Configurar clave SSH",vtn=()=>"SSH की सेट अप करें",btn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?htn():t==="fa"?ptn():t==="ar"?mtn():t==="es"?gtn():t==="hi"?vtn():dtn()}),ytn=()=>"Sign in",xtn=()=>"登录",wtn=()=>"ورود",ktn=()=>"تسجيل الدخول",Stn=()=>"Iniciar sesión",Ctn=()=>"साइन इन करें",NL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xtn():t==="fa"?wtn():t==="ar"?ktn():t==="es"?Stn():t==="hi"?Ctn():ytn()}),Etn=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,Ntn=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,ztn=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,jtn=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,Ttn=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,Atn=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,zL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ntn(e):t==="fa"?ztn(e):t==="ar"?jtn(e):t==="es"?Ttn(e):t==="hi"?Atn(e):Etn(e)}),Rtn=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",Mtn=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",Otn=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",Dtn=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",Ltn=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",Itn=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",$tn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mtn():t==="fa"?Otn():t==="ar"?Dtn():t==="es"?Ltn():t==="hi"?Itn():Rtn()}),Btn=()=>"The terminal disconnected before setup completed. Try again.",Ptn=()=>"设置完成前终端连接已断开。请重试。",Ftn=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",Htn=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",qtn=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",Utn=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",jv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ptn():t==="fa"?Ftn():t==="ar"?Htn():t==="es"?qtn():t==="hi"?Utn():Btn()}),Gtn=()=>"Dark",Vtn=()=>"深色",Ktn=()=>"تیره",Wtn=()=>"داكن",Qtn=()=>"Oscuro",Xtn=()=>"डार्क",Ytn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vtn():t==="fa"?Ktn():t==="ar"?Wtn():t==="es"?Qtn():t==="hi"?Xtn():Gtn()}),Ztn=()=>"Theme",Jtn=()=>"主题",enn=()=>"پوسته",tnn=()=>"السمة",nnn=()=>"Tema",rnn=()=>"थीम",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jtn():t==="fa"?enn():t==="ar"?tnn():t==="es"?nnn():t==="hi"?rnn():Ztn()}),snn=()=>"Light",inn=()=>"浅色",ann=()=>"روشن",onn=()=>"فاتح",cnn=()=>"Claro",lnn=()=>"लाइट",unn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?inn():t==="fa"?ann():t==="ar"?onn():t==="es"?cnn():t==="hi"?lnn():snn()}),_nn=()=>"System",fnn=()=>"系统",dnn=()=>"سیستم",hnn=()=>"النظام",pnn=()=>"Sistema",mnn=()=>"सिस्टम",gnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fnn():t==="fa"?dnn():t==="ar"?hnn():t==="es"?pnn():t==="hi"?mnn():_nn()}),vnn=()=>"Set up billing in the Tinker console",bnn=()=>"在 Tinker 控制台设置账单",ynn=()=>"تنظیم پرداخت در کنسول Tinker",xnn=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",wnn=()=>"Configura la facturación en la consola de Tinker",knn=()=>"Tinker कंसोल में बिलिंग सेट अप करें",Snn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bnn():t==="fa"?ynn():t==="ar"?xnn():t==="es"?wnn():t==="hi"?knn():vnn()}),Cnn=()=>"Billing setup required",Enn=()=>"需要设置账单",Nnn=()=>"تنظیم پرداخت لازم است",znn=()=>"مطلوب إعداد الفوترة",jnn=()=>"Hay que configurar la facturación",Tnn=()=>"बिलिंग सेटअप ज़रूरी है",Ann=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Enn():t==="fa"?Nnn():t==="ar"?znn():t==="es"?jnn():t==="hi"?Tnn():Cnn()}),Rnn=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",Mnn=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",Onn=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",Dnn=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",Lnn=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",Inn=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",$nn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mnn():t==="fa"?Onn():t==="ar"?Dnn():t==="es"?Lnn():t==="hi"?Inn():Rnn()}),Bnn=()=>"Invalid Key",Pnn=()=>"密钥无效",Fnn=()=>"کلید نامعتبر",Hnn=()=>"مفتاح غير صالح",qnn=()=>"Clave no válida",Unn=()=>"अमान्य की",Gnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pnn():t==="fa"?Fnn():t==="ar"?Hnn():t==="es"?qnn():t==="hi"?Unn():Bnn()}),Vnn=()=>"Token from",Knn=()=>"令牌来自",Wnn=()=>"توکن از",Qnn=()=>"الرمز من",Xnn=()=>"Token tomado de la",Ynn=()=>"टोकन स्रोत",Znn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Knn():t==="fa"?Wnn():t==="ar"?Qnn():t==="es"?Xnn():t==="hi"?Ynn():Vnn()}),Jnn=()=>"Update now",ern=()=>"立即更新",trn=()=>"اکنون به‌روزرسانی کن",nrn=()=>"التحديث الآن",rrn=()=>"Actualizar ahora",srn=()=>"अभी अपडेट करें",irn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ern():t==="fa"?trn():t==="ar"?nrn():t==="es"?rrn():t==="hi"?srn():Jnn()}),arn=e=>`Update to ${e==null?void 0:e.version}`,orn=e=>`更新到 ${e==null?void 0:e.version}`,crn=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,lrn=e=>`التحديث إلى ${e==null?void 0:e.version}`,urn=e=>`Actualizar a ${e==null?void 0:e.version}`,_rn=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,frn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?orn(e):t==="fa"?crn(e):t==="ar"?lrn(e):t==="es"?urn(e):t==="hi"?_rn(e):arn(e)}),drn=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",hrn=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",prn=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",mrn=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",grn=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",vrn=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",brn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hrn():t==="fa"?prn():t==="ar"?mrn():t==="es"?grn():t==="hi"?vrn():drn()}),yrn=()=>"Updating default destination…",xrn=()=>"正在更新默认运行位置…",wrn=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",krn=()=>"جارٍ تحديث الوجهة الافتراضية…",Srn=()=>"Actualizando el destino predeterminado…",Crn=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",Ern=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xrn():t==="fa"?wrn():t==="ar"?krn():t==="es"?Srn():t==="hi"?Crn():yrn()}),Nrn=()=>"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.",zrn=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",jrn=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",Trn=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",Arn=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",Rrn=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",Mrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zrn():t==="fa"?jrn():t==="ar"?Trn():t==="es"?Arn():t==="hi"?Rrn():Nrn()}),Orn=()=>"Validating…",Drn=()=>"正在验证…",Lrn=()=>"در حال اعتبارسنجی…",Irn=()=>"جارٍ التحقق…",$rn=()=>"Validando…",Brn=()=>"सत्यापित हो रहा है…",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Drn():t==="fa"?Lrn():t==="ar"?Irn():t==="es"?$rn():t==="hi"?Brn():Orn()}),Prn=()=>"View settings",Frn=()=>"查看设置",Hrn=()=>"مشاهدهٔ تنظیمات",qrn=()=>"عرض الإعدادات",Urn=()=>"Ver configuración",Grn=()=>"सेटिंग्स देखें",Vrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Frn():t==="fa"?Hrn():t==="ar"?qrn():t==="es"?Urn():t==="hi"?Grn():Prn()}),Krn=()=>"Skill",Wrn=()=>"技能",Qrn=()=>"مهارت",Xrn=()=>"مهارة",Yrn=()=>"Skill",Zrn=()=>"स्किल",Jrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wrn():t==="fa"?Qrn():t==="ar"?Xrn():t==="es"?Yrn():t==="hi"?Zrn():Krn()}),esn=()=>"Loading skill…",tsn=()=>"正在加载技能…",nsn=()=>"در حال بارگیری مهارت…",rsn=()=>"جارٍ تحميل المهارة…",ssn=()=>"Cargando skill…",isn=()=>"स्किल लोड हो रही है…",asn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tsn():t==="fa"?nsn():t==="ar"?rsn():t==="es"?ssn():t==="hi"?isn():esn()}),osn=()=>"Personal",csn=()=>"个人",lsn=()=>"شخصی",usn=()=>"شخصي",_sn=()=>"Personal",fsn=()=>"व्यक्तिगत",dsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?csn():t==="fa"?lsn():t==="ar"?usn():t==="es"?_sn():t==="hi"?fsn():osn()}),hsn=()=>"Alternatively, tell your agent to save a reusable skill for you.",psn=()=>"或者,请你的智能体为你保存可重复使用的技能。",msn=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",gsn=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",vsn=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",bsn=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",ysn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?psn():t==="fa"?msn():t==="ar"?gsn():t==="es"?vsn():t==="hi"?bsn():hsn()}),xsn=e=>`Delete the “${e==null?void 0:e.name}” skill?`,wsn=e=>`删除技能“${e==null?void 0:e.name}”?`,ksn=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,Ssn=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,Csn=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Esn=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Nsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wsn(e):t==="fa"?ksn(e):t==="ar"?Ssn(e):t==="es"?Csn(e):t==="hi"?Esn(e):xsn(e)}),zsn=e=>`Delete skill ${e==null?void 0:e.name}`,jsn=e=>`删除技能 ${e==null?void 0:e.name}`,Tsn=e=>`حذف مهارت ${e==null?void 0:e.name}`,Asn=e=>`حذف المهارة ${e==null?void 0:e.name}`,Rsn=e=>`Eliminar la skill ${e==null?void 0:e.name}`,Msn=e=>`${e==null?void 0:e.name} स्किल हटाएं`,Osn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jsn(e):t==="fa"?Tsn(e):t==="ar"?Asn(e):t==="es"?Rsn(e):t==="hi"?Msn(e):zsn(e)}),Dsn=e=>`Delete the “${e==null?void 0:e.name}” template?`,Lsn=e=>`删除模板“${e==null?void 0:e.name}”?`,Isn=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,$sn=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,Bsn=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,Psn=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,Fsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lsn(e):t==="fa"?Isn(e):t==="ar"?$sn(e):t==="es"?Bsn(e):t==="hi"?Psn(e):Dsn(e)}),Hsn=e=>`Delete template ${e==null?void 0:e.name}`,qsn=e=>`删除模板 ${e==null?void 0:e.name}`,Usn=e=>`حذف قالب ${e==null?void 0:e.name}`,Gsn=e=>`حذف القالب ${e==null?void 0:e.name}`,Vsn=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,Ksn=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,Wsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qsn(e):t==="fa"?Usn(e):t==="ar"?Gsn(e):t==="es"?Vsn(e):t==="hi"?Ksn(e):Hsn(e)}),Qsn=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",Xsn=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",Ysn=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",Zsn=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",Jsn=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",ein=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",tin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xsn():t==="fa"?Ysn():t==="ar"?Zsn():t==="es"?Jsn():t==="hi"?ein():Qsn()}),nin=()=>"Drop a SKILL.md or .zip here, or click to choose",rin=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",sin=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",iin=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",ain=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",oin=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",cin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rin():t==="fa"?sin():t==="ar"?iin():t==="es"?ain():t==="hi"?oin():nin()}),lin=()=>"Drop a .tex or .zip here, or click to choose",uin=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",_in=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",fin=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",din=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",hin=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",pin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uin():t==="fa"?_in():t==="ar"?fin():t==="es"?din():t==="hi"?hin():lin()}),min=()=>"File too large (max 20 MB).",gin=()=>"文件过大(最大 20 MB)。",vin=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",bin=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",yin=()=>"Archivo demasiado grande (máx. 20 MB).",xin=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gin():t==="fa"?vin():t==="ar"?bin():t==="es"?yin():t==="hi"?xin():min()}),win=()=>" + 1 file",kin=()=>" + 1 个文件",Sin=()=>" + ۱ فایل",Cin=()=>" + ملف واحد",Ein=()=>" + 1 archivo",Nin=()=>" + 1 फ़ाइल",zin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kin():t==="fa"?Sin():t==="ar"?Cin():t==="es"?Ein():t==="hi"?Nin():win()}),jin=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",Tin=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",Ain=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",Rin=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",Min=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",Oin=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",Din=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tin():t==="fa"?Ain():t==="ar"?Rin():t==="es"?Min():t==="hi"?Oin():jin()}),Lin=()=>"Remove from OpenResearch",Iin=()=>"从 OpenResearch 移除",$in=()=>"حذف از OpenResearch",Bin=()=>"إزالة من OpenResearch",Pin=()=>"Quitar de OpenResearch",Fin=()=>"OpenResearch से हटाएं",Hin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iin():t==="fa"?$in():t==="ar"?Bin():t==="es"?Pin():t==="hi"?Fin():Lin()}),qin=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,Uin=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,Gin=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,Vin=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,Kin=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,Win=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,Qin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uin(e):t==="fa"?Gin(e):t==="ar"?Vin(e):t==="es"?Kin(e):t==="hi"?Win(e):qin(e)}),Xin=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,Yin=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,Zin=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,Jin=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,ean=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,tan=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,nan=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yin(e):t==="fa"?Zin(e):t==="ar"?Jin(e):t==="es"?ean(e):t==="hi"?tan(e):Xin(e)}),ran=e=>` + ${e==null?void 0:e.count} files`,san=e=>` + ${e==null?void 0:e.count} 个文件`,ian=e=>` + ${e==null?void 0:e.count} فایل`,aan=e=>` + ملفات (${e==null?void 0:e.count})`,oan=e=>` + ${e==null?void 0:e.count} archivos`,can=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,lan=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?san(e):t==="fa"?ian(e):t==="ar"?aan(e):t==="es"?oan(e):t==="hi"?can(e):ran(e)}),uan=()=>"Could not load skills:",_an=()=>"无法加载技能:",fan=()=>"بارگیری مهارت‌ها ممکن نشد:",dan=()=>"تعذّر تحميل المهارات:",han=()=>"No se pudieron cargar las skills:",pan=()=>"स्किल लोड नहीं हो सकीं:",man=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_an():t==="fa"?fan():t==="ar"?dan():t==="es"?han():t==="hi"?pan():uan()}),gan=()=>"Could not load templates:",van=()=>"无法加载模板:",ban=()=>"بارگیری قالب‌ها ممکن نشد:",yan=()=>"تعذّر تحميل القوالب:",xan=()=>"No se pudieron cargar las plantillas:",wan=()=>"टेम्पलेट लोड नहीं हो सके:",kan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?van():t==="fa"?ban():t==="ar"?yan():t==="es"?xan():t==="hi"?wan():gan()}),San=()=>"Customize",Can=()=>"自定义",Ean=()=>"سفارشی‌سازی",Nan=()=>"تخصيص",zan=()=>"Personalizar",jan=()=>"कस्टमाइज़ करें",Tan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Can():t==="fa"?Ean():t==="ar"?Nan():t==="es"?zan():t==="hi"?jan():San()}),Aan=()=>"Delete skill",Ran=()=>"删除技能",Man=()=>"حذف مهارت",Oan=()=>"حذف المهارة",Dan=()=>"Eliminar skill",Lan=()=>"स्किल हटाएं",Ian=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ran():t==="fa"?Man():t==="ar"?Oan():t==="es"?Dan():t==="hi"?Lan():Aan()}),$an=()=>"Delete template",Ban=()=>"删除模板",Pan=()=>"حذف قالب",Fan=()=>"حذف القالب",Han=()=>"Eliminar plantilla",qan=()=>"टेम्पलेट हटाएं",Uan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ban():t==="fa"?Pan():t==="ar"?Fan():t==="es"?Han():t==="hi"?qan():$an()}),Gan=()=>"LaTeX templates",Van=()=>"LaTeX 模板",Kan=()=>"قالب‌های LaTeX",Wan=()=>"قوالب LaTeX",Qan=()=>"Plantillas de LaTeX",Xan=()=>"LaTeX टेम्पलेट",Yan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Van():t==="fa"?Kan():t==="ar"?Wan():t==="es"?Qan():t==="hi"?Xan():Gan()}),Zan=()=>"Loading skills…",Jan=()=>"正在加载技能…",eon=()=>"در حال بارگیری مهارت‌ها…",ton=()=>"جارٍ تحميل المهارات…",non=()=>"Cargando skills…",ron=()=>"स्किल लोड हो रही हैं…",son=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jan():t==="fa"?eon():t==="ar"?ton():t==="es"?non():t==="hi"?ron():Zan()}),ion=()=>"Loading templates…",aon=()=>"正在加载模板…",oon=()=>"در حال بارگیری قالب‌ها…",con=()=>"جارٍ تحميل القوالب…",lon=()=>"Cargando plantillas…",uon=()=>"टेम्पलेट लोड हो रहे हैं…",_on=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aon():t==="fa"?oon():t==="ar"?con():t==="es"?lon():t==="hi"?uon():ion()}),fon=()=>"No skills yet.",don=()=>"尚无技能。",hon=()=>"هنوز مهارتی وجود ندارد.",pon=()=>"لا توجد مهارات بعد.",mon=()=>"Aún no hay skills.",gon=()=>"अभी तक कोई स्किल नहीं।",von=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?don():t==="fa"?hon():t==="ar"?pon():t==="es"?mon():t==="hi"?gon():fon()}),bon=()=>"No templates yet.",yon=()=>"尚无模板。",xon=()=>"هنوز قالبی وجود ندارد.",won=()=>"لا توجد قوالب بعد.",kon=()=>"Aún no hay plantillas.",Son=()=>"अभी तक कोई टेम्पलेट नहीं।",Con=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yon():t==="fa"?xon():t==="ar"?won():t==="es"?kon():t==="hi"?Son():bon()}),Eon=()=>"Skills",Non=()=>"技能",zon=()=>"مهارت‌ها",jon=()=>"المهارات",Ton=()=>"Skills",Aon=()=>"स्किल",Ron=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Non():t==="fa"?zon():t==="ar"?jon():t==="es"?Ton():t==="hi"?Aon():Eon()}),Mon=()=>"Uploading…",Oon=()=>"正在上传…",Don=()=>"در حال بارگذاری…",Lon=()=>"جارٍ الرفع…",Ion=()=>"Subiendo…",$on=()=>"अपलोड हो रहा है…",Bon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oon():t==="fa"?Don():t==="ar"?Lon():t==="es"?Ion():t==="hi"?$on():Mon()}),Pon=()=>"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. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",Fon=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",Hon=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",qon=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",Uon=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",Gon=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",Von=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fon():t==="fa"?Hon():t==="ar"?qon():t==="es"?Uon():t==="hi"?Gon():Pon()}),Kon=()=>"Upload a SKILL.md file or a .zip of a skill folder.",Won=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",Qon=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",Xon=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",Yon=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",Zon=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",Jon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Won():t==="fa"?Qon():t==="ar"?Xon():t==="es"?Yon():t==="hi"?Zon():Kon()}),ecn=()=>"Upload a .tex file or a .zip of a template folder.",tcn=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",ncn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",rcn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",scn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",icn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",acn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tcn():t==="fa"?ncn():t==="ar"?rcn():t==="es"?scn():t==="hi"?icn():ecn()}),ocn=()=>"Close SSH config",ccn=()=>"关闭 SSH 配置",lcn=()=>"بستن پیکربندی SSH",ucn=()=>"إغلاق إعداد SSH",_cn=()=>"Cerrar la configuración SSH",fcn=()=>"SSH कॉन्फ़िग बंद करें",dcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ccn():t==="fa"?lcn():t==="ar"?ucn():t==="es"?_cn():t==="hi"?fcn():ocn()}),hcn=()=>"Discard your unsaved SSH config changes?",pcn=()=>"要放弃未保存的 SSH 配置更改吗?",mcn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",gcn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",vcn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",bcn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",ycn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pcn():t==="fa"?mcn():t==="ar"?gcn():t==="es"?vcn():t==="hi"?bcn():hcn()}),xcn=()=>"Loading SSH config…",wcn=()=>"正在加载 SSH 配置…",kcn=()=>"در حال بارگیری پیکربندی SSH…",Scn=()=>"جارٍ تحميل إعداد SSH…",Ccn=()=>"Cargando la configuración SSH…",Ecn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Ncn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wcn():t==="fa"?kcn():t==="ar"?Scn():t==="es"?Ccn():t==="hi"?Ecn():xcn()}),zcn=()=>"SSH config saved",jcn=()=>"SSH 配置已保存",Tcn=()=>"پیکربندی SSH ذخیره شد",Acn=()=>"تم حفظ إعداد SSH",Rcn=()=>"Configuración SSH guardada",Mcn=()=>"SSH कॉन्फ़िग सेव हो गया",Ocn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jcn():t==="fa"?Tcn():t==="ar"?Acn():t==="es"?Rcn():t==="hi"?Mcn():zcn()}),Dcn=()=>"SSH config",Lcn=()=>"SSH 配置",Icn=()=>"پیکربندی SSH",$cn=()=>"إعداد SSH",Bcn=()=>"Configuración SSH",Pcn=()=>"SSH कॉन्फ़िग",Fcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lcn():t==="fa"?Icn():t==="ar"?$cn():t==="es"?Bcn():t==="hi"?Pcn():Dcn()}),Hcn=()=>"Configure SSH hosts…",qcn=()=>"配置 SSH 主机…",Ucn=()=>"پیکربندی میزبان‌های SSH…",Gcn=()=>"إعداد مضيفات SSH…",Vcn=()=>"Configurar hosts SSH…",Kcn=()=>"SSH होस्ट कॉन्फ़िगर करें…",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qcn():t==="fa"?Ucn():t==="ar"?Gcn():t==="es"?Vcn():t==="hi"?Kcn():Hcn()}),Wcn=()=>"Container name or ID",Qcn=()=>"容器名称或 ID",Xcn=()=>"نام یا شناسهٔ کانتینر",Ycn=()=>"اسم الحاوية أو معرّفها",Zcn=()=>"Nombre o ID del contenedor",Jcn=()=>"कंटेनर का नाम या ID",eln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qcn():t==="fa"?Xcn():t==="ar"?Ycn():t==="es"?Zcn():t==="hi"?Jcn():Wcn()}),tln=()=>"Default SSH host",nln=()=>"默认 SSH 主机",rln=()=>"میزبان پیش‌فرض SSH",sln=()=>"مضيف SSH الافتراضي",iln=()=>"Servidor SSH predeterminado",aln=()=>"डिफ़ॉल्ट SSH होस्ट",oln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nln():t==="fa"?rln():t==="ar"?sln():t==="es"?iln():t==="hi"?aln():tln()}),cln=()=>"Direct host",lln=()=>"直接在主机上",uln=()=>"مستقیماً روی میزبان",_ln=()=>"المضيف مباشرة",fln=()=>"Servidor directamente",dln=()=>"सीधे होस्ट पर",hln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lln():t==="fa"?uln():t==="ar"?_ln():t==="es"?fln():t==="hi"?dln():cln()}),pln=()=>"Existing container",mln=()=>"现有容器",gln=()=>"کانتینر موجود",vln=()=>"حاوية موجودة",bln=()=>"Contenedor existente",yln=()=>"मौजूदा कंटेनर",xln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mln():t==="fa"?gln():t==="ar"?vln():t==="es"?bln():t==="hi"?yln():pln()}),wln=()=>"Run in",kln=()=>"运行位置",Sln=()=>"اجرا در",Cln=()=>"التشغيل في",Eln=()=>"Ejecutar en",Nln=()=>"यहाँ चलाएँ",zln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kln():t==="fa"?Sln():t==="ar"?Cln():t==="es"?Eln():t==="hi"?Nln():wln()}),jln=()=>"Cancelled",Tln=()=>"已取消",Aln=()=>"لغوشده",Rln=()=>"ملغى",Mln=()=>"Cancelado",Oln=()=>"रद्द किया गया",Dln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tln():t==="fa"?Aln():t==="ar"?Rln():t==="es"?Mln():t==="hi"?Oln():jln()}),Lln=()=>"Cancelling",Iln=()=>"正在取消",$ln=()=>"در حال لغو",Bln=()=>"جارٍ الإلغاء",Pln=()=>"Cancelando",Fln=()=>"रद्द हो रहा है",Hln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iln():t==="fa"?$ln():t==="ar"?Bln():t==="es"?Pln():t==="hi"?Fln():Lln()}),qln=()=>"Done",Uln=()=>"已完成",Gln=()=>"انجام‌شده",Vln=()=>"تم",Kln=()=>"Completado",Wln=()=>"पूरा हुआ",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uln():t==="fa"?Gln():t==="ar"?Vln():t==="es"?Kln():t==="hi"?Wln():qln()}),Qln=()=>"Editing",Xln=()=>"正在编辑",Yln=()=>"در حال ویرایش",Zln=()=>"قيد التعديل",Jln=()=>"Editando",eun=()=>"संपादित हो रहा है",tun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xln():t==="fa"?Yln():t==="ar"?Zln():t==="es"?Jln():t==="hi"?eun():Qln()}),nun=()=>"Failed",run=()=>"失败",sun=()=>"ناموفق",iun=()=>"فشل",aun=()=>"Error",oun=()=>"विफल",cun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?run():t==="fa"?sun():t==="ar"?iun():t==="es"?aun():t==="hi"?oun():nun()}),lun=()=>"Idle",uun=()=>"空闲",_un=()=>"بی‌کار",fun=()=>"خامل",dun=()=>"Inactivo",hun=()=>"निष्क्रिय",pun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uun():t==="fa"?_un():t==="ar"?fun():t==="es"?dun():t==="hi"?hun():lun()}),mun=()=>"Running",gun=()=>"运行中",vun=()=>"در حال اجرا",bun=()=>"قيد التشغيل",yun=()=>"En ejecución",xun=()=>"चल रहा है",wun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gun():t==="fa"?vun():t==="ar"?bun():t==="es"?yun():t==="hi"?xun():mun()}),kun=()=>"Starting",Sun=()=>"正在启动",Cun=()=>"در حال آغاز",Eun=()=>"جارٍ البدء",Nun=()=>"Iniciando",zun=()=>"शुरू हो रहा है",jun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sun():t==="fa"?Cun():t==="ar"?Eun():t==="es"?Nun():t==="hi"?zun():kun()}),Tun=()=>"Copying…",Aun=()=>"正在复制…",Run=()=>"در حال کپی…",Mun=()=>"جارٍ النسخ…",Oun=()=>"Copiando…",Dun=()=>"कॉपी हो रहा है…",Lun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aun():t==="fa"?Run():t==="ar"?Mun():t==="es"?Oun():t==="hi"?Dun():Tun()}),Iun=()=>"Finalizing…",$un=()=>"正在完成…",Bun=()=>"در حال نهایی‌سازی…",Pun=()=>"جارٍ الإنهاء…",Fun=()=>"Finalizando…",Hun=()=>"अंतिम रूप दिया जा रहा है…",qun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$un():t==="fa"?Bun():t==="ar"?Pun():t==="es"?Fun():t==="hi"?Hun():Iun()}),Uun=e=>`${e==null?void 0:e.size} free at target`,Gun=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,Vun=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,Kun=e=>`${e==null?void 0:e.size} متاح في الوجهة`,Wun=e=>`${e==null?void 0:e.size} libres en el destino`,Qun=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,Xun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gun(e):t==="fa"?Vun(e):t==="ar"?Kun(e):t==="es"?Wun(e):t==="hi"?Qun(e):Uun(e)}),Yun=e=>`Move all orx data to: +इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,_me=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ame(e):t==="fa"?ome(e):t==="ar"?cme(e):t==="es"?lme(e):t==="hi"?ume(e):ime(e)}),fme=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,dme=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,hme=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,pme=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,mme=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,gme=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,vme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dme(e):t==="fa"?hme(e):t==="ar"?pme(e):t==="es"?mme(e):t==="hi"?gme(e):fme(e)}),bme=()=>"Could not exit Plan mode. Try again.",yme=()=>"无法退出计划模式。请重试。",xme=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",wme=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",kme=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",Sme=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",Cme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yme():t==="fa"?xme():t==="ar"?wme():t==="es"?kme():t==="hi"?Sme():bme()}),Eme=()=>"Expand tool activity",Nme=()=>"展开工具活动",zme=()=>"باز کردن فعالیت ابزارها",jme=()=>"توسيع نشاط الأداة",Tme=()=>"Expandir actividad de herramientas",Ame=()=>"टूल गतिविधि फैलाएं",Rme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nme():t==="fa"?zme():t==="ar"?jme():t==="es"?Tme():t==="hi"?Ame():Eme()}),Mme=()=>"experiments",Ome=()=>"实验",Dme=()=>"آزمایش‌ها",Lme=()=>"التجارب",Ime=()=>"experimentos",$me=()=>"प्रयोग",Bme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ome():t==="fa"?Dme():t==="ar"?Lme():t==="es"?Ime():t==="hi"?$me():Mme()}),Pme=()=>"You",Fme=()=>"你",Hme=()=>"شما",qme=()=>"أنت",Ume=()=>"Tú",Gme=()=>"आप",Vme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fme():t==="fa"?Hme():t==="ar"?qme():t==="es"?Ume():t==="hi"?Gme():Pme()}),Kme=()=>"Goal cleared",Wme=()=>"已清除目标",Qme=()=>"هدف پاک شد",Xme=()=>"تم مسح الهدف",Yme=()=>"Objetivo borrado",Zme=()=>"लक्ष्य हटाया गया",Jme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wme():t==="fa"?Qme():t==="ar"?Xme():t==="es"?Yme():t==="hi"?Zme():Kme()}),ege=e=>`Current goal: ${e==null?void 0:e.goal}`,tge=e=>`当前目标:${e==null?void 0:e.goal}`,nge=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,rge=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,sge=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,ige=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,age=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tge(e):t==="fa"?nge(e):t==="ar"?rge(e):t==="es"?sge(e):t==="hi"?ige(e):ege(e)}),oge=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,cge=e=>`设置目标失败:${e==null?void 0:e.error}`,lge=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,uge=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,_ge=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,fge=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,eN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cge(e):t==="fa"?lge(e):t==="ar"?uge(e):t==="es"?_ge(e):t==="hi"?fge(e):oge(e)}),dge=()=>"No goal set — add one after /goal",hge=()=>"尚未设置目标 — 在 /goal 后面写一个",pge=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",mge=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",gge=()=>"Sin objetivo — añade uno después de /goal",vge=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",bge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hge():t==="fa"?pge():t==="ar"?mge():t==="es"?gge():t==="hi"?vge():dge()}),yge=()=>"Goal set",xge=()=>"已设置目标",wge=()=>"هدف تنظیم شد",kge=()=>"تم تعيين الهدف",Sge=()=>"Objetivo definido",Cge=()=>"लक्ष्य सेट किया गया",Ege=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xge():t==="fa"?wge():t==="ar"?kge():t==="es"?Sge():t==="hi"?Cge():yge()}),Nge=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,zge=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,jge=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,Tge=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,Age=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,Rge=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,Mge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zge(e):t==="fa"?jge(e):t==="ar"?Tge(e):t==="es"?Age(e):t==="hi"?Rge(e):Nge(e)}),Oge=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,Dge=e=>`导入该聊天失败:${e==null?void 0:e.error}`,Lge=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,Ige=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,$ge=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,Bge=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,Pge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dge(e):t==="fa"?Lge(e):t==="ar"?Ige(e):t==="es"?$ge(e):t==="hi"?Bge(e):Oge(e)}),Fge=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Hge=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,qge=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Uge=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Gge=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,Vge=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,Kge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hge(e):t==="fa"?qge(e):t==="ar"?Uge(e):t==="es"?Gge(e):t==="hi"?Vge(e):Fge(e)}),Wge=e=>`Message not sent: ${e==null?void 0:e.error}`,Qge=e=>`消息未发送:${e==null?void 0:e.error}`,Xge=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,Yge=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,Zge=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,Jge=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,e1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qge(e):t==="fa"?Xge(e):t==="ar"?Yge(e):t==="es"?Zge(e):t==="hi"?Jge(e):Wge(e)}),t1e=()=>"Model unavailable",n1e=()=>"模型不可用",r1e=()=>"مدل در دسترس نیست",s1e=()=>"النموذج غير متاح",i1e=()=>"Modelo no disponible",a1e=()=>"मॉडल उपलब्ध नहीं",o1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n1e():t==="fa"?r1e():t==="ar"?s1e():t==="es"?i1e():t==="hi"?a1e():t1e()}),c1e=()=>"New session",l1e=()=>"新会话",u1e=()=>"نشست جدید",_1e=()=>"جلسة جديدة",f1e=()=>"Nueva sesión",d1e=()=>"नया सेशन",tN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l1e():t==="fa"?u1e():t==="ar"?_1e():t==="es"?f1e():t==="hi"?d1e():c1e()}),h1e=()=>"No active sessions",p1e=()=>"没有活跃会话",m1e=()=>"نشست فعالی وجود ندارد",g1e=()=>"لا توجد جلسات نشطة",v1e=()=>"No hay sesiones activas",b1e=()=>"कोई सक्रिय सेशन नहीं",y1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p1e():t==="fa"?m1e():t==="ar"?g1e():t==="es"?v1e():t==="hi"?b1e():h1e()}),x1e=()=>"No activity",w1e=()=>"无活动",k1e=()=>"بدون فعالیت",S1e=()=>"لا يوجد نشاط",C1e=()=>"Sin actividad",E1e=()=>"कोई गतिविधि नहीं",N1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w1e():t==="fa"?k1e():t==="ar"?S1e():t==="es"?C1e():t==="hi"?E1e():x1e()}),z1e=()=>"No archived sessions",j1e=()=>"没有已归档的会话",T1e=()=>"نشست بایگانی‌شده‌ای وجود ندارد",A1e=()=>"لا توجد جلسات مؤرشفة",R1e=()=>"No hay sesiones archivadas",M1e=()=>"कोई आर्काइव किया गया सेशन नहीं",O1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j1e():t==="fa"?T1e():t==="ar"?A1e():t==="es"?R1e():t==="hi"?M1e():z1e()}),D1e=()=>"No sessions yet",L1e=()=>"还没有会话",I1e=()=>"هنوز نشستی وجود ندارد",$1e=()=>"لا توجد جلسات بعد",B1e=()=>"Aún no hay sesiones",P1e=()=>"अभी तक कोई सेशन नहीं",F1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L1e():t==="fa"?I1e():t==="ar"?$1e():t==="es"?B1e():t==="hi"?P1e():D1e()}),H1e=()=>"There is nothing to compact yet",q1e=()=>"还没有可压缩的内容",U1e=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",G1e=()=>"لا يوجد شيء لضغطه بعد",V1e=()=>"Aún no hay nada que comprimir",K1e=()=>"छोटा करने के लिए अभी कुछ नहीं है",W1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q1e():t==="fa"?U1e():t==="ar"?G1e():t==="es"?V1e():t==="hi"?K1e():H1e()}),Q1e=()=>"No response to copy yet",X1e=()=>"还没有可复制的回复",Y1e=()=>"هنوز پاسخی برای کپی وجود ندارد",Z1e=()=>"لا يوجد رد لنسخه بعد",J1e=()=>"Aún no hay ninguna respuesta que copiar",eve=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",tve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X1e():t==="fa"?Y1e():t==="ar"?Z1e():t==="es"?J1e():t==="hi"?eve():Q1e()}),nve=()=>"Nothing to export yet",rve=()=>"还没有可导出的内容",sve=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",ive=()=>"لا يوجد شيء لتصديره بعد",ave=()=>"Aún no hay nada que exportar",ove=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",cve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rve():t==="fa"?sve():t==="ar"?ive():t==="es"?ave():t==="hi"?ove():nve()}),lve=()=>"1 annotation",uve=()=>"1 条批注",_ve=()=>"۱ یادداشت",fve=()=>"تعليق واحد",dve=()=>"1 anotación",hve=()=>"1 एनोटेशन",pve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uve():t==="fa"?_ve():t==="ar"?fve():t==="es"?dve():t==="hi"?hve():lve()}),mve=()=>"Open sub-agent transcript",gve=()=>"打开子智能体记录",vve=()=>"باز کردن متن گفت‌وگوی عامل فرعی",bve=()=>"فتح سجل محادثة الوكيل الفرعي",yve=()=>"Abrir la transcripción del subagente",xve=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",wve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gve():t==="fa"?vve():t==="ar"?bve():t==="es"?yve():t==="hi"?xve():mve()}),kve=()=>"About this demo",Sve=()=>"关于此演示",Cve=()=>"دربارهٔ این نسخهٔ نمایشی",Eve=()=>"حول هذا العرض التوضيحي",Nve=()=>"Acerca de esta demo",zve=()=>"इस डेमो के बारे में",nN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sve():t==="fa"?Cve():t==="ar"?Eve():t==="es"?Nve():t==="hi"?zve():kve()}),jve=()=>"Accept and auto mode",Tve=()=>"接受并使用自动模式",Ave=()=>"پذیرش و حالت خودکار",Rve=()=>"قبول وتفعيل الوضع التلقائي",Mve=()=>"Aceptar en modo automático",Ove=()=>"स्वीकार करें और ऑटो मोड",Dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tve():t==="fa"?Ave():t==="ar"?Rve():t==="es"?Mve():t==="hi"?Ove():jve()}),Lve=()=>"Accept and bypass all",Ive=()=>"接受并跳过所有审批",$ve=()=>"پذیرش و عبور از همهٔ تأییدها",Bve=()=>"القبول وتجاوز الكل",Pve=()=>"Aceptar y omitir permisos",Fve=()=>"स्वीकार करें और सब बायपास करें",Hve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ive():t==="fa"?$ve():t==="ar"?Bve():t==="es"?Pve():t==="hi"?Fve():Lve()}),qve=()=>"Active",Uve=()=>"活跃",Gve=()=>"فعال",Vve=()=>"نشط",Kve=()=>"Activas",Wve=()=>"सक्रिय",Qve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uve():t==="fa"?Gve():t==="ar"?Vve():t==="es"?Kve():t==="hi"?Wve():qve()}),Xve=()=>"All",Yve=()=>"全部",Zve=()=>"همه",Jve=()=>"الكل",ebe=()=>"Todas",tbe=()=>"सभी",nbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yve():t==="fa"?Zve():t==="ar"?Jve():t==="es"?ebe():t==="hi"?tbe():Xve()}),rbe=()=>"Allow",sbe=()=>"允许",ibe=()=>"اجازه دادن",abe=()=>"السماح",obe=()=>"Permitir",cbe=()=>"अनुमति दें",lbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sbe():t==="fa"?ibe():t==="ar"?abe():t==="es"?obe():t==="hi"?cbe():rbe()}),ube=()=>"Approval required",_be=()=>"需要批准",fbe=()=>"نیازمند تأیید",dbe=()=>"الموافقة مطلوبة",hbe=()=>"Aprobación necesaria",pbe=()=>"स्वीकृति ज़रूरी है",mbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_be():t==="fa"?fbe():t==="ar"?dbe():t==="es"?hbe():t==="hi"?pbe():ube()}),gbe=()=>"Archived",vbe=()=>"已归档",bbe=()=>"بایگانی‌شده",ybe=()=>"مؤرشف",xbe=()=>"Archivadas",wbe=()=>"आर्काइव किया गया",rN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vbe():t==="fa"?bbe():t==="ar"?ybe():t==="es"?xbe():t==="hi"?wbe():gbe()}),kbe=()=>"Ask about this",Sbe=()=>"询问此内容",Cbe=()=>"دربارهٔ این بپرسید",Ebe=()=>"اسأل عن هذا",Nbe=()=>"Preguntar sobre esto",zbe=()=>"इसके बारे में पूछें",jbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sbe():t==="fa"?Cbe():t==="ar"?Ebe():t==="es"?Nbe():t==="hi"?zbe():kbe()}),Tbe=()=>"Attach a PDF or image",Abe=()=>"附加 PDF 或图片",Rbe=()=>"پیوست PDF یا تصویر",Mbe=()=>"إرفاق ملف PDF أو صورة",Obe=()=>"Adjuntar un PDF o una imagen",Dbe=()=>"PDF या इमेज अटैच करें",sN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abe():t==="fa"?Rbe():t==="ar"?Mbe():t==="es"?Obe():t==="hi"?Dbe():Tbe()}),Lbe=()=>"Bash",Ibe=()=>"Bash",$be=()=>"Bash",Bbe=()=>"Bash",Pbe=()=>"Bash",Fbe=()=>"Bash",kD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ibe():t==="fa"?$be():t==="ar"?Bbe():t==="es"?Pbe():t==="hi"?Fbe():Lbe()}),Hbe=()=>"Browsed the web",qbe=()=>"已浏览网页",Ube=()=>"وب مرور شد",Gbe=()=>"تصفّح الويب",Vbe=()=>"Navegó por la web",Kbe=()=>"वेब ब्राउज़ किया",iN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qbe():t==="fa"?Ube():t==="ar"?Gbe():t==="es"?Vbe():t==="hi"?Kbe():Hbe()}),Wbe=()=>"Built the project",Qbe=()=>"已构建项目",Xbe=()=>"پروژه ساخته شد",Ybe=()=>"بنى المشروع",Zbe=()=>"Compiló el proyecto",Jbe=()=>"प्रोजेक्ट बिल्ड किया",eye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qbe():t==="fa"?Xbe():t==="ar"?Ybe():t==="es"?Zbe():t==="hi"?Jbe():Wbe()}),tye=()=>"Cancel",nye=()=>"取消",rye=()=>"لغو",sye=()=>"إلغاء",iye=()=>"Cancelar",aye=()=>"रद्द करें",oye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nye():t==="fa"?rye():t==="ar"?sye():t==="es"?iye():t==="hi"?aye():tye()}),cye=()=>"Cancelled an experiment run",lye=()=>"已取消实验运行",uye=()=>"اجرای آزمایش لغو شد",_ye=()=>"ألغى تشغيل تجربة",fye=()=>"Canceló una ejecución de experimento",dye=()=>"एक प्रयोग रन रद्द किया",hye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lye():t==="fa"?uye():t==="ar"?_ye():t==="es"?fye():t==="hi"?dye():cye()}),pye=()=>"Checked code style",mye=()=>"已检查代码风格",gye=()=>"سبک کد بررسی شد",vye=()=>"فحص نمط الشيفرة",bye=()=>"Revisó el estilo del código",yye=()=>"कोड स्टाइल जाँची",xye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mye():t==="fa"?gye():t==="ar"?vye():t==="es"?bye():t==="hi"?yye():pye()}),wye=()=>"Checked compute options",kye=()=>"已检查算力选项",Sye=()=>"گزینه‌های رایانشی بررسی شد",Cye=()=>"فحص خيارات الحوسبة",Eye=()=>"Consultó las opciones de cómputo",Nye=()=>"कंप्यूट विकल्प जाँचे",zye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kye():t==="fa"?Sye():t==="ar"?Cye():t==="es"?Eye():t==="hi"?Nye():wye()}),jye=()=>"Checked experiment status",Tye=()=>"已检查实验状态",Aye=()=>"وضعیت آزمایش بررسی شد",Rye=()=>"فحص حالة التجربة",Mye=()=>"Consultó el estado del experimento",Oye=()=>"प्रयोग की स्थिति जाँची",aN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tye():t==="fa"?Aye():t==="ar"?Rye():t==="es"?Mye():t==="hi"?Oye():jye()}),Dye=()=>"Checked Git status",Lye=()=>"已检查 Git 状态",Iye=()=>"وضعیت Git بررسی شد",$ye=()=>"فحص حالة Git",Bye=()=>"Consultó el estado de Git",Pye=()=>"Git स्थिति जाँची",Fye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lye():t==="fa"?Iye():t==="ar"?$ye():t==="es"?Bye():t==="hi"?Pye():Dye()}),Hye=()=>"Checked local times",qye=()=>"已查询当地时间",Uye=()=>"زمان‌های محلی بررسی شد",Gye=()=>"فحص التوقيتات المحلية",Vye=()=>"Consultó horas locales",Kye=()=>"स्थानीय समय जाँचे",Wye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qye():t==="fa"?Uye():t==="ar"?Gye():t==="es"?Vye():t==="hi"?Kye():Hye()}),Qye=()=>"Checked market data",Xye=()=>"已查询市场数据",Yye=()=>"داده‌های بازار بررسی شد",Zye=()=>"فحص بيانات السوق",Jye=()=>"Consultó datos de mercado",exe=()=>"बाज़ार डेटा जाँचा",txe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xye():t==="fa"?Yye():t==="ar"?Zye():t==="es"?Jye():t==="hi"?exe():Qye()}),nxe=()=>"Checked sports data",rxe=()=>"已查询体育数据",sxe=()=>"داده‌های ورزشی بررسی شد",ixe=()=>"فحص البيانات الرياضية",axe=()=>"Consultó datos deportivos",oxe=()=>"खेल डेटा जाँचा",cxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rxe():t==="fa"?sxe():t==="ar"?ixe():t==="es"?axe():t==="hi"?oxe():nxe()}),lxe=()=>"Checked the weather",uxe=()=>"已查询天气",_xe=()=>"آب‌وهوا بررسی شد",fxe=()=>"فحص حالة الطقس",dxe=()=>"Consultó el tiempo",hxe=()=>"मौसम जाँचा",pxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uxe():t==="fa"?_xe():t==="ar"?fxe():t==="es"?dxe():t==="hi"?hxe():lxe()}),mxe=()=>"Checked types",gxe=()=>"已检查类型",vxe=()=>"نوع‌ها بررسی شد",bxe=()=>"فحص الأنواع",yxe=()=>"Comprobó los tipos",xxe=()=>"टाइप जाँचे",wxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():mxe()}),kxe=()=>"Clear annotations",Sxe=()=>"清除批注",Cxe=()=>"پاک کردن یادداشت‌ها",Exe=()=>"مسح التعليقات",Nxe=()=>"Borrar anotaciones",zxe=()=>"एनोटेशन साफ़ करें",oN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxe():t==="fa"?Cxe():t==="ar"?Exe():t==="es"?Nxe():t==="hi"?zxe():kxe()}),jxe=e=>`Clear the goal: ${e==null?void 0:e.goal}`,Txe=e=>`清除目标:${e==null?void 0:e.goal}`,Axe=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,Rxe=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,Mxe=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,Oxe=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,cN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Txe(e):t==="fa"?Axe(e):t==="ar"?Rxe(e):t==="es"?Mxe(e):t==="hi"?Oxe(e):jxe(e)}),Dxe=()=>"Customize",Lxe=()=>"自定义",Ixe=()=>"سفارشی‌سازی",$xe=()=>"تخصيص",Bxe=()=>"Personalizar",Pxe=()=>"कस्टमाइज़ करें",Fxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lxe():t==="fa"?Ixe():t==="ar"?$xe():t==="es"?Bxe():t==="hi"?Pxe():Dxe()}),Hxe=()=>"Data sources",qxe=()=>"数据源",Uxe=()=>"منابع داده",Gxe=()=>"مصادر البيانات",Vxe=()=>"Fuentes de datos",Kxe=()=>"डेटा स्रोत",Q2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qxe():t==="fa"?Uxe():t==="ar"?Gxe():t==="es"?Vxe():t==="hi"?Kxe():Hxe()}),Wxe=()=>"Delegated a task to a new agent",Qxe=()=>"已将任务委派给新智能体",Xxe=()=>"وظیفه به عامل جدید واگذار شد",Yxe=()=>"فوّض مهمة إلى وكيل جديد",Zxe=()=>"Delegó una tarea a un nuevo agente",Jxe=()=>"एक नए एजेंट को टास्क सौंपा",e2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qxe():t==="fa"?Xxe():t==="ar"?Yxe():t==="es"?Zxe():t==="hi"?Jxe():Wxe()}),t2e=()=>"Delete",n2e=()=>"删除",r2e=()=>"حذف",s2e=()=>"حذف",i2e=()=>"Eliminar",a2e=()=>"हटाएं",SD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n2e():t==="fa"?r2e():t==="ar"?s2e():t==="es"?i2e():t==="hi"?a2e():t2e()}),o2e=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",c2e=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",l2e=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",u2e=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",_2e=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",f2e=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",d2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c2e():t==="fa"?l2e():t==="ar"?u2e():t==="es"?_2e():t==="hi"?f2e():o2e()}),h2e=()=>"to monitor it.",p2e=()=>"以查看进度。",m2e=()=>"بزنید.",g2e=()=>"لمتابعتها.",v2e=()=>"para seguirlo.",b2e=()=>"इस पर नज़र रखने के लिए।",lN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p2e():t==="fa"?m2e():t==="ar"?g2e():t==="es"?v2e():t==="hi"?b2e():h2e()}),y2e=()=>"The experiment is now running. Tap",x2e=()=>"实验正在运行。点按",w2e=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",k2e=()=>"التجربة قيد التشغيل الآن. اضغط على",S2e=()=>"El experimento ya se está ejecutando. Pulsa",C2e=()=>"प्रयोग अब चल रहा है। टैप करें",uN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x2e():t==="fa"?w2e():t==="ar"?k2e():t==="es"?S2e():t==="hi"?C2e():y2e()}),E2e=()=>"Deny",N2e=()=>"拒绝",z2e=()=>"رد کردن",j2e=()=>"رفض",T2e=()=>"Denegar",A2e=()=>"अस्वीकार करें",R2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N2e():t==="fa"?z2e():t==="ar"?j2e():t==="es"?T2e():t==="hi"?A2e():E2e()}),M2e=()=>"Dismiss",O2e=()=>"关闭",D2e=()=>"بستن",L2e=()=>"إغلاق",I2e=()=>"Cerrar",$2e=()=>"खारिज करें",Xg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O2e():t==="fa"?D2e():t==="ar"?L2e():t==="es"?I2e():t==="hi"?$2e():M2e()}),B2e=()=>"Edit and re-send",P2e=()=>"编辑并重新发送",F2e=()=>"ویرایش و ارسال دوباره",H2e=()=>"تعديل وإعادة الإرسال",q2e=()=>"Editar y reenviar",U2e=()=>"संपादित करें और फिर भेजें",_N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P2e():t==="fa"?F2e():t==="ar"?H2e():t==="es"?q2e():t==="hi"?U2e():B2e()}),G2e=()=>"Edit message",V2e=()=>"编辑消息",K2e=()=>"ویرایش پیام",W2e=()=>"تعديل الرسالة",Q2e=()=>"Editar mensaje",X2e=()=>"संदेश संपादित करें",Y2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V2e():t==="fa"?K2e():t==="ar"?W2e():t==="es"?Q2e():t==="hi"?X2e():G2e()}),Z2e=()=>"Edited a file",J2e=()=>"已编辑文件",ewe=()=>"فایل ویرایش شد",twe=()=>"عدّل ملفًا",nwe=()=>"Editó un archivo",rwe=()=>"एक फ़ाइल संपादित की",fN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J2e():t==="fa"?ewe():t==="ar"?twe():t==="es"?nwe():t==="hi"?rwe():Z2e()}),swe=()=>"Exit Bash mode",iwe=()=>"退出 Bash 模式",awe=()=>"خروج از حالت Bash",owe=()=>"الخروج من وضع Bash",cwe=()=>"Salir del modo Bash",lwe=()=>"Bash मोड से बाहर निकलें",dN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iwe():t==="fa"?awe():t==="ar"?owe():t==="es"?cwe():t==="hi"?lwe():swe()}),uwe=()=>"Exit Plan mode",_we=()=>"退出计划模式",fwe=()=>"خروج از حالت طرح",dwe=()=>"الخروج من وضع التخطيط",hwe=()=>"Salir del modo Plan",pwe=()=>"प्लान मोड से बाहर निकलें",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_we():t==="fa"?fwe():t==="ar"?dwe():t==="es"?hwe():t==="hi"?pwe():uwe()}),mwe=()=>"Failed:",gwe=()=>"失败:",vwe=()=>"ناموفق:",bwe=()=>"فشل:",ywe=()=>"Error:",xwe=()=>"विफल:",Fk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gwe():t==="fa"?vwe():t==="ar"?bwe():t==="es"?ywe():t==="hi"?xwe():mwe()}),wwe=()=>"Filter sessions",kwe=()=>"筛选会话",Swe=()=>"فیلتر نشست‌ها",Cwe=()=>"تصفية الجلسات",Ewe=()=>"Filtrar sesiones",Nwe=()=>"सेशन फ़िल्टर करें",pN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kwe():t==="fa"?Swe():t==="ar"?Cwe():t==="es"?Ewe():t==="hi"?Nwe():wwe()}),zwe=()=>"Goal",jwe=()=>"目标",Twe=()=>"هدف",Awe=()=>"الهدف",Rwe=()=>"Objetivo",Mwe=()=>"लक्ष्य",Owe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jwe():t==="fa"?Twe():t==="ar"?Awe():t==="es"?Rwe():t==="hi"?Mwe():zwe()}),Dwe=()=>"is unavailable.",Lwe=()=>"不可用。",Iwe=()=>"در دسترس نیست.",$we=()=>"غير متاح.",Bwe=()=>"no está disponible.",Pwe=()=>"उपलब्ध नहीं है।",Fwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lwe():t==="fa"?Iwe():t==="ar"?$we():t==="es"?Bwe():t==="hi"?Pwe():Dwe()}),Hwe=()=>"Later queued messages will wait until this is retried or removed.",qwe=()=>"后续排队的消息会等待此消息重试或移除。",Uwe=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",Gwe=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",Vwe=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",Kwe=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",Wwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qwe():t==="fa"?Uwe():t==="ar"?Gwe():t==="es"?Vwe():t==="hi"?Kwe():Hwe()}),Qwe=()=>"Listed files",Xwe=()=>"已列出文件",Ywe=()=>"فایل‌ها فهرست شد",Zwe=()=>"سرد الملفات",Jwe=()=>"Listó archivos",e4e=()=>"फ़ाइलों की सूची बनाई",mN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xwe():t==="fa"?Ywe():t==="ar"?Zwe():t==="es"?Jwe():t==="hi"?e4e():Qwe()}),t4e=()=>"Listed project runs",n4e=()=>"已列出项目运行",r4e=()=>"اجراهای پروژه فهرست شد",s4e=()=>"سرد عمليات تشغيل المشروع",i4e=()=>"Listó las ejecuciones del proyecto",a4e=()=>"प्रोजेक्ट रन की सूची बनाई",o4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n4e():t==="fa"?r4e():t==="ar"?s4e():t==="es"?i4e():t==="hi"?a4e():t4e()}),c4e=()=>"Listed projects",l4e=()=>"已列出项目",u4e=()=>"پروژه‌ها فهرست شد",_4e=()=>"سرد المشاريع",f4e=()=>"Listó proyectos",d4e=()=>"प्रोजेक्ट की सूची बनाई",h4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l4e():t==="fa"?u4e():t==="ar"?_4e():t==="es"?f4e():t==="hi"?d4e():c4e()}),p4e=()=>"Loading conversation…",m4e=()=>"正在加载对话…",g4e=()=>"در حال بارگیری گفتگو…",v4e=()=>"جارٍ تحميل المحادثة…",b4e=()=>"Cargando conversación…",y4e=()=>"बातचीत लोड हो रही है…",x4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m4e():t==="fa"?g4e():t==="ar"?v4e():t==="es"?b4e():t==="hi"?y4e():p4e()}),w4e=()=>"New Chat",k4e=()=>"新对话",S4e=()=>"گفتگوی جدید",C4e=()=>"محادثة جديدة",E4e=()=>"Nuevo chat",N4e=()=>"नई चैट",z4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k4e():t==="fa"?S4e():t==="ar"?C4e():t==="es"?E4e():t==="hi"?N4e():w4e()}),j4e=()=>"Next version",T4e=()=>"下一版本",A4e=()=>"نسخهٔ بعدی",R4e=()=>"النسخة التالية",M4e=()=>"Siguiente versión",O4e=()=>"अगला वर्शन",gN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T4e():t==="fa"?A4e():t==="ar"?R4e():t==="es"?M4e():t==="hi"?O4e():j4e()}),D4e=()=>"Open the session this agent spawned",L4e=()=>"打开此智能体创建的会话",I4e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",$4e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",B4e=()=>"Abrir la sesión que creó este agente",P4e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",F4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L4e():t==="fa"?I4e():t==="ar"?$4e():t==="es"?B4e():t==="hi"?P4e():D4e()}),H4e=()=>"Opened web pages",q4e=()=>"已打开网页",U4e=()=>"صفحه‌های وب باز شد",G4e=()=>"فتح صفحات ويب",V4e=()=>"Abrió páginas web",K4e=()=>"वेब पेज खोले",W4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4e():t==="fa"?U4e():t==="ar"?G4e():t==="es"?V4e():t==="hi"?K4e():H4e()}),Q4e=()=>"Plan",X4e=()=>"计划",Y4e=()=>"طرح",Z4e=()=>"خطة",J4e=()=>"Plan",e3e=()=>"प्लान",t3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X4e():t==="fa"?Y4e():t==="ar"?Z4e():t==="es"?J4e():t==="hi"?e3e():Q4e()}),n3e=()=>"Plan approved",r3e=()=>"计划已批准",s3e=()=>"طرح تأیید شد",i3e=()=>"تمت الموافقة على الخطة",a3e=()=>"Plan aprobado",o3e=()=>"प्लान स्वीकृत",c3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r3e():t==="fa"?s3e():t==="ar"?i3e():t==="es"?a3e():t==="hi"?o3e():n3e()}),l3e=()=>"Plan rejected",u3e=()=>"计划已拒绝",_3e=()=>"طرح رد شد",f3e=()=>"رُفضت الخطة",d3e=()=>"Plan rechazado",h3e=()=>"प्लान अस्वीकृत",p3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u3e():t==="fa"?_3e():t==="ar"?f3e():t==="es"?d3e():t==="hi"?h3e():l3e()}),m3e=()=>"Plan resolved",g3e=()=>"计划已处理",v3e=()=>"طرح تعیین تکلیف شد",b3e=()=>"تمت معالجة الخطة",y3e=()=>"Plan resuelto",x3e=()=>"प्लान सुलझाया गया",w3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g3e():t==="fa"?v3e():t==="ar"?b3e():t==="es"?y3e():t==="hi"?x3e():m3e()}),k3e=()=>"Plan revision requested",S3e=()=>"已请求修改计划",C3e=()=>"درخواست بازنگری طرح ثبت شد",E3e=()=>"طُلب تعديل الخطة",N3e=()=>"Cambios en el plan solicitados",z3e=()=>"प्लान में बदलाव का अनुरोध",j3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S3e():t==="fa"?C3e():t==="ar"?E3e():t==="es"?N3e():t==="hi"?z3e():k3e()}),T3e=()=>"Previous version",A3e=()=>"上一版本",R3e=()=>"نسخهٔ قبلی",M3e=()=>"النسخة السابقة",O3e=()=>"Versión anterior",D3e=()=>"पिछला वर्शन",vN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A3e():t==="fa"?R3e():t==="ar"?M3e():t==="es"?O3e():t==="hi"?D3e():T3e()}),L3e=()=>"Ran a command",I3e=()=>"已运行命令",$3e=()=>"فرمان اجرا شد",B3e=()=>"نفّذ أمرًا",P3e=()=>"Ejecutó un comando",F3e=()=>"एक कमांड चलाई",H3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I3e():t==="fa"?$3e():t==="ar"?B3e():t==="es"?P3e():t==="hi"?F3e():L3e()}),q3e=()=>"Ran tests",U3e=()=>"已运行测试",G3e=()=>"آزمون‌ها اجرا شد",V3e=()=>"شغّل الاختبارات",K3e=()=>"Ejecutó tests",W3e=()=>"टेस्ट चलाए",Q3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U3e():t==="fa"?G3e():t==="ar"?V3e():t==="es"?K3e():t==="hi"?W3e():q3e()}),X3e=()=>"Read a file",Y3e=()=>"已读取文件",Z3e=()=>"فایل خوانده شد",J3e=()=>"قرأ ملفًا",e5e=()=>"Leyó un archivo",t5e=()=>"एक फ़ाइल पढ़ी",n5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y3e():t==="fa"?Z3e():t==="ar"?J3e():t==="es"?e5e():t==="hi"?t5e():X3e()}),r5e=()=>"Read Git history",s5e=()=>"已读取 Git 历史",i5e=()=>"تاریخچهٔ Git خوانده شد",a5e=()=>"قرأ سجل Git",o5e=()=>"Leyó el historial de Git",c5e=()=>"Git इतिहास पढ़ा",l5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s5e():t==="fa"?i5e():t==="ar"?a5e():t==="es"?o5e():t==="hi"?c5e():r5e()}),u5e=()=>"Read project details",_5e=()=>"已读取项目详情",f5e=()=>"جزئیات پروژه خوانده شد",d5e=()=>"قرأ تفاصيل المشروع",h5e=()=>"Leyó los detalles del proyecto",p5e=()=>"प्रोजेक्ट विवरण पढ़ा",m5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_5e():t==="fa"?f5e():t==="ar"?d5e():t==="es"?h5e():t==="hi"?p5e():u5e()}),g5e=()=>"Reject",v5e=()=>"拒绝",b5e=()=>"رد کردن",y5e=()=>"رفض",x5e=()=>"Rechazar",w5e=()=>"अस्वीकार करें",k5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v5e():t==="fa"?b5e():t==="ar"?y5e():t==="es"?x5e():t==="hi"?w5e():g5e()}),S5e=()=>"Remove",C5e=()=>"移除",E5e=()=>"حذف",N5e=()=>"إزالة",z5e=()=>"Quitar",j5e=()=>"हटाएं",T5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C5e():t==="fa"?E5e():t==="ar"?N5e():t==="es"?z5e():t==="hi"?j5e():S5e()}),A5e=()=>"Remove annotation",R5e=()=>"移除批注",M5e=()=>"حذف یادداشت",O5e=()=>"إزالة التعليق",D5e=()=>"Quitar anotación",L5e=()=>"एनोटेशन हटाएं",I5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R5e():t==="fa"?M5e():t==="ar"?O5e():t==="es"?D5e():t==="hi"?L5e():A5e()}),$5e=()=>"Remove file",B5e=()=>"移除文件",P5e=()=>"حذف فایل",F5e=()=>"إزالة الملف",H5e=()=>"Quitar archivo",q5e=()=>"फ़ाइल हटाएं",bN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B5e():t==="fa"?P5e():t==="ar"?F5e():t==="es"?H5e():t==="hi"?q5e():$5e()}),U5e=()=>"Remove image",G5e=()=>"移除图片",V5e=()=>"حذف تصویر",K5e=()=>"إزالة الصورة",W5e=()=>"Quitar imagen",Q5e=()=>"इमेज हटाएं",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G5e():t==="fa"?V5e():t==="ar"?K5e():t==="es"?W5e():t==="hi"?Q5e():U5e()}),X5e=()=>"Remove queued message",Y5e=()=>"移除排队消息",Z5e=()=>"حذف پیام صف",J5e=()=>"إزالة الرسالة من قائمة الانتظار",eke=()=>"Quitar mensaje en cola",tke=()=>"कतार में लगा संदेश हटाएं",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y5e():t==="fa"?Z5e():t==="ar"?J5e():t==="es"?eke():t==="hi"?tke():X5e()}),nke=()=>"Rename",rke=()=>"重命名",ske=()=>"تغییر نام",ike=()=>"إعادة تسمية",ake=()=>"Renombrar",oke=()=>"नाम बदलें",CD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rke():t==="fa"?ske():t==="ar"?ike():t==="es"?ake():t==="hi"?oke():nke()}),cke=()=>"Reviewed code changes",lke=()=>"已审查代码更改",uke=()=>"تغییرات کد بازبینی شد",_ke=()=>"راجع تغييرات الشيفرة",fke=()=>"Revisó cambios en el código",dke=()=>"कोड में बदलावों की समीक्षा की",hke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lke():t==="fa"?uke():t==="ar"?_ke():t==="es"?fke():t==="hi"?dke():cke()}),pke=()=>"Run",mke=()=>"运行",gke=()=>"اجرا",vke=()=>"تشغيل",bke=()=>"Ejecutar",yke=()=>"रन",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mke():t==="fa"?gke():t==="ar"?vke():t==="es"?bke():t==="hi"?yke():pke()}),xke=()=>"Selected chat text",wke=()=>"已选聊天文本",kke=()=>"متن انتخاب‌شدهٔ گفتگو",Ske=()=>"النص المحدد من المحادثة",Cke=()=>"Texto seleccionado del chat",Eke=()=>"चयनित चैट टेक्स्ट",Nke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?Ske():t==="es"?Cke():t==="hi"?Eke():xke()}),zke=()=>"Selected text:",jke=()=>"已选文本:",Tke=()=>"متن انتخاب‌شده:",Ake=()=>"النص المحدد:",Rke=()=>"Texto seleccionado:",Mke=()=>"चयनित टेक्स्ट:",Oke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jke():t==="fa"?Tke():t==="ar"?Ake():t==="es"?Rke():t==="hi"?Mke():zke()}),Dke=()=>"Send",Lke=()=>"发送",Ike=()=>"ارسال",$ke=()=>"إرسال رسالة",Bke=()=>"Enviar",Pke=()=>"भेजें",i3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lke():t==="fa"?Ike():t==="ar"?$ke():t==="es"?Bke():t==="hi"?Pke():Dke()}),Fke=()=>"Session options",Hke=()=>"会话选项",qke=()=>"گزینه‌های نشست",Uke=()=>"خيارات الجلسة",Gke=()=>"Opciones de la sesión",Vke=()=>"सेशन विकल्प",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hke():t==="fa"?qke():t==="ar"?Uke():t==="es"?Gke():t==="hi"?Vke():Fke()}),Kke=()=>"Session title",Wke=()=>"会话标题",Qke=()=>"عنوان نشست",Xke=()=>"عنوان الجلسة",Yke=()=>"Título de la sesión",Zke=()=>"सेशन शीर्षक",Jke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wke():t==="fa"?Qke():t==="ar"?Xke():t==="es"?Yke():t==="hi"?Zke():Kke()}),eSe=()=>"Show sidebar",tSe=()=>"显示侧边栏",nSe=()=>"نمایش نوار کناری",rSe=()=>"إظهار الشريط الجانبي",sSe=()=>"Mostrar barra lateral",iSe=()=>"साइडबार दिखाएं",SN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tSe():t==="fa"?nSe():t==="ar"?rSe():t==="es"?sSe():t==="hi"?iSe():eSe()}),aSe=()=>"Started an experiment run",oSe=()=>"已启动实验运行",cSe=()=>"اجرای آزمایش آغاز شد",lSe=()=>"بدأ تشغيل تجربة",uSe=()=>"Inició una ejecución de experimento",_Se=()=>"एक प्रयोग रन शुरू किया",fSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oSe():t==="fa"?cSe():t==="ar"?lSe():t==="es"?uSe():t==="hi"?_Se():aSe()}),dSe=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",hSe=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",pSe=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",mSe=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",gSe=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",vSe=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",bSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hSe():t==="fa"?pSe():t==="ar"?mSe():t==="es"?gSe():t==="hi"?vSe():dSe()}),ySe=()=>"Shape a research question",xSe=()=>"明确研究问题",wSe=()=>"شکل دادن به پرسش پژوهشی",kSe=()=>"صياغة سؤال بحثي",SSe=()=>"Definir una pregunta de investigación",CSe=()=>"एक शोध प्रश्न तैयार करें",ESe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xSe():t==="fa"?wSe():t==="ar"?kSe():t==="es"?SSe():t==="hi"?CSe():ySe()}),NSe=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",zSe=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",jSe=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",TSe=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",ASe=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",RSe=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",MSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zSe():t==="fa"?jSe():t==="ar"?TSe():t==="es"?ASe():t==="hi"?RSe():NSe()}),OSe=()=>"Survey related work",DSe=()=>"调研相关工作",LSe=()=>"مرور کارهای مرتبط",ISe=()=>"استعراض الأعمال ذات الصلة",$Se=()=>"Revisar trabajos relacionados",BSe=()=>"संबंधित कार्य का सर्वेक्षण करें",PSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DSe():t==="fa"?LSe():t==="ar"?ISe():t==="es"?$Se():t==="hi"?BSe():OSe()}),FSe=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",HSe=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",qSe=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",USe=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",GSe=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",VSe=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",KSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HSe():t==="fa"?qSe():t==="ar"?USe():t==="es"?GSe():t==="hi"?VSe():FSe()}),WSe=()=>"Scaffold a baseline",QSe=()=>"搭建基线",XSe=()=>"ساخت خط مبنا",YSe=()=>"بناء خط أساس",ZSe=()=>"Crear un modelo de referencia",JSe=()=>"एक बेसलाइन तैयार करें",e6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QSe():t==="fa"?XSe():t==="ar"?YSe():t==="es"?ZSe():t==="hi"?JSe():WSe()}),t6e=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",n6e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",r6e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",s6e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",i6e=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",a6e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",o6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n6e():t==="fa"?r6e():t==="ar"?s6e():t==="es"?i6e():t==="hi"?a6e():t6e()}),c6e=()=>"Run a first experiment",l6e=()=>"运行第一个实验",u6e=()=>"اجرای اولین آزمایش",_6e=()=>"تشغيل التجربة الأولى",f6e=()=>"Ejecutar un primer experimento",d6e=()=>"पहला प्रयोग चलाएं",h6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l6e():t==="fa"?u6e():t==="ar"?_6e():t==="es"?f6e():t==="hi"?d6e():c6e()}),p6e=()=>"Reading the project to suggest where to start…",m6e=()=>"正在阅读项目以建议从哪里开始…",g6e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",v6e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",b6e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",y6e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",x6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m6e():t==="fa"?g6e():t==="ar"?v6e():t==="es"?b6e():t==="hi"?y6e():p6e()}),w6e=()=>"Starter prompts",k6e=()=>"入门提示",S6e=()=>"پیشنهادهای شروع",C6e=()=>"اقتراحات للبدء",E6e=()=>"Prompts para empezar",N6e=()=>"शुरुआती प्रॉम्प्ट",z6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k6e():t==="fa"?S6e():t==="ar"?C6e():t==="es"?E6e():t==="hi"?N6e():w6e()}),j6e=()=>"Stop",T6e=()=>"停止",A6e=()=>"توقف",R6e=()=>"إيقاف",M6e=()=>"Detener",O6e=()=>"रोकें",CN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T6e():t==="fa"?A6e():t==="ar"?R6e():t==="es"?M6e():t==="hi"?O6e():j6e()}),D6e=()=>"Submit",L6e=()=>"提交",I6e=()=>"ارسال",$6e=()=>"إرسال",B6e=()=>"Enviar",P6e=()=>"सबमिट करें",F6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L6e():t==="fa"?I6e():t==="ar"?$6e():t==="es"?B6e():t==="hi"?P6e():D6e()}),H6e=()=>"Tool failed",q6e=()=>"工具失败",U6e=()=>"ابزار ناموفق بود",G6e=()=>"فشلت الأداة",V6e=()=>"Error en la herramienta",K6e=()=>"टूल विफल",W6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q6e():t==="fa"?U6e():t==="ar"?G6e():t==="es"?V6e():t==="hi"?K6e():H6e()}),Q6e=()=>"Used tools",X6e=()=>"已使用工具",Y6e=()=>"ابزارها استفاده شد",Z6e=()=>"استخدم الأدوات",J6e=()=>"Usó herramientas",eCe=()=>"टूल इस्तेमाल किए",ED=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X6e():t==="fa"?Y6e():t==="ar"?Z6e():t==="es"?J6e():t==="hi"?eCe():Q6e()}),tCe=()=>"View full plan",nCe=()=>"查看完整计划",rCe=()=>"مشاهدهٔ طرح کامل",sCe=()=>"عرض الخطة كاملة",iCe=()=>"Ver plan completo",aCe=()=>"पूरा प्लान देखें",oCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nCe():t==="fa"?rCe():t==="ar"?sCe():t==="es"?iCe():t==="hi"?aCe():tCe()}),cCe=()=>"Waited for an experiment run",lCe=()=>"已等待实验运行",uCe=()=>"برای اجرای آزمایش صبر شد",_Ce=()=>"انتظر تشغيل تجربة",fCe=()=>"Esperó a una ejecución de experimento",dCe=()=>"एक प्रयोग रन का इंतज़ार किया",hCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lCe():t==="fa"?uCe():t==="ar"?_Ce():t==="es"?fCe():t==="hi"?dCe():cCe()}),pCe=()=>"Waiting for your input…",mCe=()=>"正在等待你的输入…",gCe=()=>"منتظر ورودی شما…",vCe=()=>"في انتظار إدخالك…",bCe=()=>"Esperando tu respuesta…",yCe=()=>"आपके इनपुट का इंतज़ार है…",xCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mCe():t==="fa"?gCe():t==="ar"?vCe():t==="es"?bCe():t==="hi"?yCe():pCe()}),wCe=()=>"What should we research?",kCe=()=>"我们应该研究什么?",SCe=()=>"چه چیزی را پژوهش کنیم؟",CCe=()=>"ما الذي نبحثه؟",ECe=()=>"¿Qué investigamos?",NCe=()=>"हमें क्या शोध करना चाहिए?",zCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kCe():t==="fa"?SCe():t==="ar"?CCe():t==="es"?ECe():t==="hi"?NCe():wCe()}),jCe=()=>"You, mid-task",TCe=()=>"你(任务进行中)",ACe=()=>"شما، هنگام انجام وظیفه",RCe=()=>"أنت، أثناء المهمة",MCe=()=>"Tú, durante la tarea",OCe=()=>"आप, टास्क के बीच में",DCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TCe():t==="fa"?ACe():t==="ar"?RCe():t==="es"?MCe():t==="hi"?OCe():jCe()}),LCe=()=>"Pasted image",ICe=()=>"粘贴的图片",$Ce=()=>"تصویر جای‌گذاری‌شده",BCe=()=>"صورة ملصقة",PCe=()=>"Imagen pegada",FCe=()=>"पेस्ट की गई इमेज",ND=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ICe():t==="fa"?$Ce():t==="ar"?BCe():t==="es"?PCe():t==="hi"?FCe():LCe()}),HCe=()=>"Plan",qCe=()=>"计划",UCe=()=>"طرح",GCe=()=>"خطة",VCe=()=>"Plan",KCe=()=>"प्लान",zD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qCe():t==="fa"?UCe():t==="ar"?GCe():t==="es"?VCe():t==="hi"?KCe():HCe()}),WCe=()=>"Plan mode — ready to proceed?",QCe=()=>"计划模式 — 准备好继续了吗?",XCe=()=>"حالت طرح — آماده‌اید ادامه دهید؟",YCe=()=>"وضع التخطيط — جاهز للمتابعة؟",ZCe=()=>"Modo Plan — ¿listo para continuar?",JCe=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",e7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QCe():t==="fa"?XCe():t==="ar"?YCe():t==="es"?ZCe():t==="hi"?JCe():WCe()}),t7e=()=>"Proposed plan",n7e=()=>"提议的计划",r7e=()=>"طرح پیشنهادی",s7e=()=>"خطة مقترحة",i7e=()=>"Plan propuesto",a7e=()=>"प्रस्तावित प्लान",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n7e():t==="fa"?r7e():t==="ar"?s7e():t==="es"?i7e():t==="hi"?a7e():t7e()}),o7e=()=>"Question",c7e=()=>"问题",l7e=()=>"پرسش",u7e=()=>"سؤال",_7e=()=>"Pregunta",f7e=()=>"प्रश्न",d7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c7e():t==="fa"?l7e():t==="ar"?u7e():t==="es"?_7e():t==="hi"?f7e():o7e()}),h7e=()=>"Queued",p7e=()=>"已排队",m7e=()=>"در صف",g7e=()=>"في قائمة الانتظار",v7e=()=>"En cola",b7e=()=>"कतार में",y7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p7e():t==="fa"?m7e():t==="ar"?g7e():t==="es"?v7e():t==="hi"?b7e():h7e()}),x7e=()=>"Recents",w7e=()=>"最近",k7e=()=>"اخیر",S7e=()=>"الأخيرة",C7e=()=>"Recientes",E7e=()=>"हाल की",jD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w7e():t==="fa"?k7e():t==="ar"?S7e():t==="es"?C7e():t==="hi"?E7e():x7e()}),N7e=()=>"Re-check its setup.",z7e=()=>"请重新检查其设置。",j7e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",T7e=()=>"أعد فحص إعداده.",A7e=()=>"Vuelve a comprobar su configuración.",R7e=()=>"इसका सेटअप फिर से जाँचें।",M7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z7e():t==="fa"?j7e():t==="ar"?T7e():t==="es"?A7e():t==="hi"?R7e():N7e()}),O7e=()=>"Could not recover this turn. Try again.",D7e=()=>"无法恢复本轮。请重试。",L7e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",I7e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",$7e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",B7e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",P7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D7e():t==="fa"?L7e():t==="ar"?I7e():t==="es"?$7e():t==="hi"?B7e():O7e()}),F7e=()=>"Could not remove the queued message. Try again.",H7e=()=>"无法移除排队消息。请重试。",q7e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",U7e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",G7e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",V7e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",K7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H7e():t==="fa"?q7e():t==="ar"?U7e():t==="es"?G7e():t==="hi"?V7e():F7e()}),W7e=e=>`Could not re-send: ${e==null?void 0:e.error}`,Q7e=e=>`无法重新发送:${e==null?void 0:e.error}`,X7e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,Y7e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,Z7e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,J7e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,e8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q7e(e):t==="fa"?X7e(e):t==="ar"?Y7e(e):t==="es"?Z7e(e):t==="hi"?J7e(e):W7e(e)}),t8e=()=>"Resolved",n8e=()=>"已处理",r8e=()=>"رسیدگی شد",s8e=()=>"مُعالَج",i8e=()=>"Resuelto",a8e=()=>"सुलझाया गया",o8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n8e():t==="fa"?r8e():t==="ar"?s8e():t==="es"?i8e():t==="hi"?a8e():t8e()}),c8e=()=>"Could not retry the queued message. Try again.",l8e=()=>"无法重试排队消息。请重试。",u8e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",_8e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",f8e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",d8e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",h8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l8e():t==="fa"?u8e():t==="ar"?_8e():t==="es"?f8e():t==="hi"?d8e():c8e()}),p8e=()=>"run logs",m8e=()=>"运行日志",g8e=()=>"گزارش‌های اجرا",v8e=()=>"سجلات التشغيل",b8e=()=>"logs de ejecución",y8e=()=>"रन लॉग",x8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m8e():t==="fa"?g8e():t==="ar"?v8e():t==="es"?b8e():t==="hi"?y8e():p8e()}),w8e=()=>"Scroll to bottom",k8e=()=>"滚动到底部",S8e=()=>"رفتن به پایین گفتگو",C8e=()=>"التمرير إلى الأسفل",E8e=()=>"Ir al final",N8e=()=>"नीचे तक स्क्रॉल करें",NN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k8e():t==="fa"?S8e():t==="ar"?C8e():t==="es"?E8e():t==="hi"?N8e():w8e()}),z8e=()=>"The selected harness is unavailable",j8e=()=>"所选智能体工具不可用",T8e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",A8e=()=>"أداة البرمجة المحددة غير متاحة",R8e=()=>"El agente seleccionado no está disponible",M8e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",Yg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j8e():t==="fa"?T8e():t==="ar"?A8e():t==="es"?R8e():t==="hi"?M8e():z8e()}),O8e=()=>"Session limit reached",D8e=()=>"已达到会话使用限额",L8e=()=>"به سقف مصرف نشست رسیده‌اید",I8e=()=>"تم بلوغ حد الاستخدام",$8e=()=>"Límite de la sesión alcanzado",B8e=()=>"सेशन सीमा पूरी हो गई",P8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D8e():t==="fa"?L8e():t==="ar"?I8e():t==="es"?$8e():t==="hi"?B8e():O8e()}),F8e=()=>"The chat session was not created",H8e=()=>"未能创建聊天会话",q8e=()=>"نشست گفت‌وگو ایجاد نشد",U8e=()=>"لم تُنشأ جلسة المحادثة",G8e=()=>"No se creó la sesión de chat",V8e=()=>"चैट सेशन नहीं बनाया गया",K8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H8e():t==="fa"?q8e():t==="ar"?U8e():t==="es"?G8e():t==="hi"?V8e():F8e()}),W8e=()=>"Show full conversation",Q8e=()=>"显示完整对话",X8e=()=>"نمایش کامل گفتگو",Y8e=()=>"عرض المحادثة كاملة",Z8e=()=>"Mostrar la conversación completa",J8e=()=>"पूरी बातचीत दिखाएं",e9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q8e():t==="fa"?X8e():t==="ar"?Y8e():t==="es"?Z8e():t==="hi"?J8e():W8e()}),t9e=()=>" · Spawned by another agent",n9e=()=>" · 由另一个智能体创建",r9e=()=>" · ساخته‌شده به‌دست عامل دیگر",s9e=()=>" · أنشأه وكيل آخر",i9e=()=>" · Creada por otro agente",a9e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",o9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9e():t==="fa"?r9e():t==="ar"?s9e():t==="es"?i9e():t==="hi"?a9e():t9e()}),c9e=()=>"Starting…",l9e=()=>"正在启动…",u9e=()=>"در حال شروع…",_9e=()=>"جارٍ البدء…",f9e=()=>"Iniciando…",d9e=()=>"शुरू हो रहा है…",h9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l9e():t==="fa"?u9e():t==="ar"?_9e():t==="es"?f9e():t==="hi"?d9e():c9e()}),p9e=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,m9e=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,g9e=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,v9e=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,b9e=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,y9e=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,x9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?m9e(e):t==="fa"?g9e(e):t==="ar"?v9e(e):t==="es"?b9e(e):t==="hi"?y9e(e):p9e(e)}),w9e=()=>"Could not stop the turn. Try again.",k9e=()=>"无法停止本轮。请重试。",S9e=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",C9e=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",E9e=()=>"No se pudo detener el turno. Inténtalo de nuevo.",N9e=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",z9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k9e():t==="fa"?S9e():t==="ar"?C9e():t==="es"?E9e():t==="hi"?N9e():w9e()}),j9e=e=>`Could not switch fork: ${e==null?void 0:e.error}`,T9e=e=>`无法切换分支:${e==null?void 0:e.error}`,A9e=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,R9e=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,M9e=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,O9e=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,D9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?T9e(e):t==="fa"?A9e(e):t==="ar"?R9e(e):t==="es"?M9e(e):t==="hi"?O9e(e):j9e(e)}),L9e=()=>"The agent",I9e=()=>"智能体",$9e=()=>"عامل",B9e=()=>"الوكيل",P9e=()=>"El agente",F9e=()=>"एजेंट",H9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I9e():t==="fa"?$9e():t==="ar"?B9e():t==="es"?P9e():t==="hi"?F9e():L9e()}),q9e=()=>"Thinking",U9e=()=>"正在思考",G9e=()=>"در حال فکر کردن",V9e=()=>"جارٍ التفكير",K9e=()=>"Pensando",W9e=()=>"सोच रहा है",Q9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U9e():t==="fa"?G9e():t==="ar"?V9e():t==="es"?K9e():t==="hi"?W9e():q9e()}),X9e=()=>"Could not toggle Plan mode. Try again.",Y9e=()=>"无法切换计划模式。请重试。",Z9e=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",J9e=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",eEe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",tEe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y9e():t==="fa"?Z9e():t==="ar"?J9e():t==="es"?eEe():t==="hi"?tEe():X9e()}),nEe=()=>"This turn did not finish.",rEe=()=>"本轮未完成。",sEe=()=>"این نوبت کامل نشد.",iEe=()=>"لم تكتمل هذه الجولة.",aEe=()=>"Este turno no terminó.",oEe=()=>"यह टर्न पूरा नहीं हुआ।",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rEe():t==="fa"?sEe():t==="ar"?iEe():t==="es"?aEe():t==="hi"?oEe():nEe()}),cEe=()=>"Type a custom answer…",lEe=()=>"输入自定义回答…",uEe=()=>"پاسخ دلخواه را بنویسید…",_Ee=()=>"اكتب إجابة مخصصة…",fEe=()=>"Escribe una respuesta personalizada…",dEe=()=>"अपना जवाब टाइप करें…",hEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lEe():t==="fa"?uEe():t==="ar"?_Ee():t==="es"?fEe():t==="hi"?dEe():cEe()}),pEe=()=>"Unarchive",mEe=()=>"取消归档",gEe=()=>"خارج کردن از بایگانی",vEe=()=>"إلغاء الأرشفة",bEe=()=>"Desarchivar",yEe=()=>"आर्काइव से निकालें",xEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mEe():t==="fa"?gEe():t==="ar"?vEe():t==="es"?bEe():t==="hi"?yEe():pEe()}),wEe=()=>"Untitled",kEe=()=>"未命名",SEe=()=>"بدون عنوان",CEe=()=>"بدون عنوان",EEe=()=>"Sin título",NEe=()=>"बिना शीर्षक",yd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kEe():t==="fa"?SEe():t==="ar"?CEe():t==="es"?EEe():t==="hi"?NEe():wEe()}),zEe=()=>"Could not update permissions. Try again.",jEe=()=>"无法更新权限。请重试。",TEe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",AEe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",REe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",MEe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",OEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jEe():t==="fa"?TEe():t==="ar"?AEe():t==="es"?REe():t==="hi"?MEe():zEe()}),DEe=()=>"Work details",LEe=()=>"工作详情",IEe=()=>"جزئیات کار",$Ee=()=>"تفاصيل العمل",BEe=()=>"Detalles del trabajo",PEe=()=>"काम का विवरण",FEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LEe():t==="fa"?IEe():t==="ar"?$Ee():t==="es"?BEe():t==="hi"?PEe():DEe()}),HEe=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,qEe=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,UEe=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,GEe=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,VEe=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,KEe=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,WEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qEe(e):t==="fa"?UEe(e):t==="ar"?GEe(e):t==="es"?VEe(e):t==="hi"?KEe(e):HEe(e)}),QEe=e=>`Worked for ${e==null?void 0:e.duration}`,XEe=e=>`已工作 ${e==null?void 0:e.duration}`,YEe=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,ZEe=e=>`عمل لمدة ${e==null?void 0:e.duration}`,JEe=e=>`Trabajó durante ${e==null?void 0:e.duration}`,eNe=e=>`${e==null?void 0:e.duration} तक काम किया`,tNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XEe(e):t==="fa"?YEe(e):t==="ar"?ZEe(e):t==="es"?JEe(e):t==="hi"?eNe(e):QEe(e)}),nNe=()=>"Working…",rNe=()=>"正在工作…",sNe=()=>"در حال کار…",iNe=()=>"جارٍ العمل…",aNe=()=>"Trabajando…",oNe=()=>"काम हो रहा है…",Hk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rNe():t==="fa"?sNe():t==="ar"?iNe():t==="es"?aNe():t==="hi"?oNe():nNe()}),cNe=()=>"Close tab",lNe=()=>"关闭标签页",uNe=()=>"بستن زبانه",_Ne=()=>"إغلاق التبويب",fNe=()=>"Cerrar pestaña",dNe=()=>"टैब बंद करें",hNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lNe():t==="fa"?uNe():t==="ar"?_Ne():t==="es"?fNe():t==="hi"?dNe():cNe()}),pNe=()=>"Changes",mNe=()=>"更改",gNe=()=>"تغییرات",vNe=()=>"التغييرات",bNe=()=>"Cambios",yNe=()=>"बदलाव",TD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mNe():t==="fa"?gNe():t==="ar"?vNe():t==="es"?bNe():t==="hi"?yNe():pNe()}),xNe=()=>"Code browser view",wNe=()=>"代码浏览器视图",kNe=()=>"نمای مرورگر کد",SNe=()=>"عرض متصفح الشيفرة",CNe=()=>"Vista del explorador de código",ENe=()=>"कोड ब्राउज़र व्यू",NNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wNe():t==="fa"?kNe():t==="ar"?SNe():t==="es"?CNe():t==="hi"?ENe():xNe()}),zNe=()=>"Files",jNe=()=>"文件",TNe=()=>"فایل‌ها",ANe=()=>"الملفات",RNe=()=>"Archivos",MNe=()=>"फ़ाइलें",ONe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jNe():t==="fa"?TNe():t==="ar"?ANe():t==="es"?RNe():t==="hi"?MNe():zNe()}),DNe=()=>"Refresh",LNe=()=>"刷新",INe=()=>"تازه‌سازی",$Ne=()=>"تحديث",BNe=()=>"Actualizar",PNe=()=>"रीफ़्रेश करें",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LNe():t==="fa"?INe():t==="ar"?$Ne():t==="es"?BNe():t==="hi"?PNe():DNe()}),FNe=()=>"listing truncated",HNe=()=>"列表已截断",qNe=()=>"فهرست کوتاه شده است",UNe=()=>"القائمة مقتطعة",GNe=()=>"listado truncado",VNe=()=>"सूची छोटी की गई",KNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HNe():t==="fa"?qNe():t==="ar"?UNe():t==="es"?GNe():t==="hi"?VNe():FNe()}),WNe=()=>"No files.",QNe=()=>"没有文件。",XNe=()=>"فایلی وجود ندارد.",YNe=()=>"لا توجد ملفات.",ZNe=()=>"No hay archivos.",JNe=()=>"कोई फ़ाइल नहीं।",eze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QNe():t==="fa"?XNe():t==="ar"?YNe():t==="es"?ZNe():t==="hi"?JNe():WNe()}),tze=()=>"Refresh failed:",nze=()=>"刷新失败:",rze=()=>"تازه‌سازی ناموفق بود:",sze=()=>"فشل التحديث:",ize=()=>"Error al actualizar:",aze=()=>"रीफ़्रेश विफल:",oze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nze():t==="fa"?rze():t==="ar"?sze():t==="es"?ize():t==="hi"?aze():tze()}),cze=()=>"Cancelling…",lze=()=>"正在取消…",uze=()=>"در حال لغو…",_ze=()=>"جارٍ الإلغاء…",fze=()=>"Cancelando…",dze=()=>"रद्द हो रहा है…",hze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lze():t==="fa"?uze():t==="ar"?_ze():t==="es"?fze():t==="hi"?dze():cze()}),pze=()=>"Checking…",mze=()=>"正在检查…",gze=()=>"در حال بررسی…",vze=()=>"جارٍ التحقق…",bze=()=>"Comprobando…",yze=()=>"जाँचा जा रहा है…",ta=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mze():t==="fa"?gze():t==="ar"?vze():t==="es"?bze():t==="hi"?yze():pze()}),xze=()=>"Copied",wze=()=>"已复制",kze=()=>"کپی شد",Sze=()=>"تم النسخ",Cze=()=>"Copiado",Eze=()=>"कॉपी हो गया",K_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wze():t==="fa"?kze():t==="ar"?Sze():t==="es"?Cze():t==="hi"?Eze():xze()}),Nze=e=>`Failed to load: ${e==null?void 0:e.error}`,zze=e=>`加载失败:${e==null?void 0:e.error}`,jze=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,Tze=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,Aze=e=>`Error al cargar: ${e==null?void 0:e.error}`,Rze=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,qk=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zze(e):t==="fa"?jze(e):t==="ar"?Tze(e):t==="es"?Aze(e):t==="hi"?Rze(e):Nze(e)}),Mze=()=>"Loading…",Oze=()=>"正在加载…",Dze=()=>"در حال بارگیری…",Lze=()=>"جارٍ التحميل…",Ize=()=>"Cargando…",$ze=()=>"लोड हो रहा है…",Uk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oze():t==="fa"?Dze():t==="ar"?Lze():t==="es"?Ize():t==="hi"?$ze():Mze()}),Bze=e=>`+ ${e==null?void 0:e.count} more`,Pze=e=>`另有 ${e==null?void 0:e.count} 项`,Fze=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Hze=e=>`المزيد (+${e==null?void 0:e.count})`,qze=e=>`+ ${e==null?void 0:e.count} más`,Uze=e=>`+ ${e==null?void 0:e.count} और`,Gze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pze(e):t==="fa"?Fze(e):t==="ar"?Hze(e):t==="es"?qze(e):t==="hi"?Uze(e):Bze(e)}),Vze=()=>"Rendered view",Kze=()=>"渲染视图",Wze=()=>"نمای رندرشده",Qze=()=>"العرض المُنسَّق",Xze=()=>"Vista renderizada",Yze=()=>"रेंडर किया गया व्यू",Cv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kze():t==="fa"?Wze():t==="ar"?Qze():t==="es"?Xze():t==="hi"?Yze():Vze()}),Zze=()=>"Save",Jze=()=>"保存",eje=()=>"ذخیره",tje=()=>"حفظ",nje=()=>"Guardar",rje=()=>"सेव करें",nc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jze():t==="fa"?eje():t==="ar"?tje():t==="es"?nje():t==="hi"?rje():Zze()}),sje=()=>"Saving…",ije=()=>"正在保存…",aje=()=>"در حال ذخیره…",oje=()=>"جارٍ الحفظ…",cje=()=>"Guardando…",lje=()=>"सेव हो रहा है…",ia=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ije():t==="fa"?aje():t==="ar"?oje():t==="es"?cje():t==="hi"?lje():sje()}),uje=()=>"Show less",_je=()=>"收起",fje=()=>"نمایش کمتر",dje=()=>"عرض أقل",hje=()=>"Mostrar menos",pje=()=>"कम दिखाएं",AD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_je():t==="fa"?fje():t==="ar"?dje():t==="es"?hje():t==="hi"?pje():uje()}),mje=()=>"Show more",gje=()=>"展开",vje=()=>"نمایش بیشتر",bje=()=>"عرض المزيد",yje=()=>"Mostrar más",xje=()=>"और दिखाएं",wje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gje():t==="fa"?vje():t==="ar"?bje():t==="es"?yje():t==="hi"?xje():mje()}),kje=()=>"Stop",Sje=()=>"停止",Cje=()=>"توقف",Eje=()=>"إيقاف",Nje=()=>"Detener",zje=()=>"रोकें",RD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sje():t==="fa"?Cje():t==="ar"?Eje():t==="es"?Nje():t==="hi"?zje():kje()}),jje=()=>"Stopping…",Tje=()=>"正在停止…",Aje=()=>"در حال توقف…",Rje=()=>"جارٍ الإيقاف…",Mje=()=>"Deteniendo…",Oje=()=>"रोका जा रहा है…",Dje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tje():t==="fa"?Aje():t==="ar"?Rje():t==="es"?Mje():t==="hi"?Oje():jje()}),Lje=()=>"View source",Ije=()=>"查看源代码",$je=()=>"نمایش متن منبع",Bje=()=>"عرض المصدر",Pje=()=>"Ver código fuente",Fje=()=>"स्रोत देखें",Nd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ije():t==="fa"?$je():t==="ar"?Bje():t==="es"?Pje():t==="hi"?Fje():Lje()}),Hje=()=>"Shorten this chat's context",qje=()=>"压缩此聊天的上下文",Uje=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",Gje=()=>"اختصار سياق هذه المحادثة",Vje=()=>"Comprime el contexto de este chat",Kje=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",Wje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qje():t==="fa"?Uje():t==="ar"?Gje():t==="es"?Vje():t==="hi"?Kje():Hje()}),Qje=()=>"Runs as a remote Hugging Face Job",Xje=()=>"作为远程 Hugging Face Job 运行",Yje=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",Zje=()=>"يعمل كمهمة Hugging Face بعيدة",Jje=()=>"Se ejecuta como un Job remoto de Hugging Face",eTe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",tTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xje():t==="fa"?Yje():t==="ar"?Zje():t==="es"?Jje():t==="hi"?eTe():Qje()}),nTe=()=>"Runs as a Job on your Kubernetes cluster",rTe=()=>"作为 Kubernetes 集群上的 Job 运行",sTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",iTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",aTe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",oTe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",cTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rTe():t==="fa"?sTe():t==="ar"?iTe():t==="es"?aTe():t==="hi"?oTe():nTe()}),lTe=()=>"Runs directly on this computer",uTe=()=>"直接在此计算机上运行",_Te=()=>"مستقیماً روی این رایانه اجرا می‌شود",fTe=()=>"يعمل مباشرة على هذا الحاسوب",dTe=()=>"Se ejecuta directamente en este equipo",hTe=()=>"सीधे इस कंप्यूटर पर चलता है",pTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uTe():t==="fa"?_Te():t==="ar"?fTe():t==="es"?dTe():t==="hi"?hTe():lTe()}),mTe=()=>"Runs in a remote Modal sandbox",gTe=()=>"在远程 Modal 沙箱中运行",vTe=()=>"در sandbox دوردست Modal اجرا می‌شود",bTe=()=>"يعمل في بيئة Modal معزولة عن بُعد",yTe=()=>"Se ejecuta en un sandbox remoto de Modal",xTe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",wTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gTe():t==="fa"?vTe():t==="ar"?bTe():t==="es"?yTe():t==="hi"?xTe():mTe()}),kTe=()=>"Runs on an ephemeral OpenResearch box",STe=()=>"在临时 OpenResearch 主机上运行",CTe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",ETe=()=>"يعمل على صندوق OpenResearch مؤقت",NTe=()=>"Se ejecuta en una máquina efímera de OpenResearch",zTe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",jTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?STe():t==="fa"?CTe():t==="ar"?ETe():t==="es"?NTe():t==="hi"?zTe():kTe()}),TTe=()=>"Runs on the connected Ray cluster",ATe=()=>"在已连接的 Ray 集群上运行",RTe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",MTe=()=>"يعمل على عنقود Ray المتصل",OTe=()=>"Se ejecuta en el clúster de Ray conectado",DTe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",LTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ATe():t==="fa"?RTe():t==="ar"?MTe():t==="es"?OTe():t==="hi"?DTe():TTe()}),ITe=()=>"Runs as a scheduled job on your Slurm cluster",$Te=()=>"作为 Slurm 集群上的调度作业运行",BTe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",PTe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",FTe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",HTe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",qTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Te():t==="fa"?BTe():t==="ar"?PTe():t==="es"?FTe():t==="hi"?HTe():ITe()}),UTe=()=>"Runs on a host from your SSH config",GTe=()=>"在 SSH 配置中的主机上运行",VTe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",KTe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",WTe=()=>"Se ejecuta en un host de tu configuración SSH",QTe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",XTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GTe():t==="fa"?VTe():t==="ar"?KTe():t==="es"?WTe():t==="hi"?QTe():UTe()}),YTe=()=>"Runs through Tinker’s remote compute",ZTe=()=>"通过 Tinker 远程算力运行",JTe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",eAe=()=>"يعمل عبر حوسبة Tinker البعيدة",tAe=()=>"Se ejecuta en el cómputo remoto de Tinker",nAe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",rAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZTe():t==="fa"?JTe():t==="ar"?eAe():t==="es"?tAe():t==="hi"?nAe():YTe()}),sAe=()=>"HF Jobs",iAe=()=>"HF Jobs",aAe=()=>"HF Jobs",oAe=()=>"HF Jobs",cAe=()=>"HF Jobs",lAe=()=>"HF Jobs",uAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iAe():t==="fa"?aAe():t==="ar"?oAe():t==="es"?cAe():t==="hi"?lAe():sAe()}),_Ae=()=>"Kubernetes",fAe=()=>"Kubernetes",dAe=()=>"Kubernetes",hAe=()=>"Kubernetes",pAe=()=>"Kubernetes",mAe=()=>"Kubernetes",gAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fAe():t==="fa"?dAe():t==="ar"?hAe():t==="es"?pAe():t==="hi"?mAe():_Ae()}),vAe=()=>"This machine",bAe=()=>"此计算机",yAe=()=>"این رایانه",xAe=()=>"هذا الجهاز",wAe=()=>"Este equipo",kAe=()=>"यह मशीन",MD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bAe():t==="fa"?yAe():t==="ar"?xAe():t==="es"?wAe():t==="hi"?kAe():vAe()}),SAe=()=>"Modal",CAe=()=>"Modal",EAe=()=>"Modal",NAe=()=>"Modal",zAe=()=>"Modal",jAe=()=>"Modal",TAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CAe():t==="fa"?EAe():t==="ar"?NAe():t==="es"?zAe():t==="hi"?jAe():SAe()}),AAe=()=>"OpenResearch",RAe=()=>"OpenResearch",MAe=()=>"OpenResearch",OAe=()=>"OpenResearch",DAe=()=>"OpenResearch",LAe=()=>"OpenResearch",IAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RAe():t==="fa"?MAe():t==="ar"?OAe():t==="es"?DAe():t==="hi"?LAe():AAe()}),$Ae=()=>"Ray",BAe=()=>"Ray",PAe=()=>"Ray",FAe=()=>"Ray",HAe=()=>"Ray",qAe=()=>"Ray",UAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BAe():t==="fa"?PAe():t==="ar"?FAe():t==="es"?HAe():t==="hi"?qAe():$Ae()}),GAe=()=>"Slurm",VAe=()=>"Slurm",KAe=()=>"Slurm",WAe=()=>"Slurm",QAe=()=>"Slurm",XAe=()=>"Slurm",YAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VAe():t==="fa"?KAe():t==="ar"?WAe():t==="es"?QAe():t==="hi"?XAe():GAe()}),ZAe=()=>"SSH",JAe=()=>"SSH",eRe=()=>"SSH",tRe=()=>"SSH",nRe=()=>"SSH",rRe=()=>"SSH",sRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JAe():t==="fa"?eRe():t==="ar"?tRe():t==="es"?nRe():t==="hi"?rRe():ZAe()}),iRe=()=>"Tinker",aRe=()=>"Tinker",oRe=()=>"Tinker",cRe=()=>"Tinker",lRe=()=>"Tinker",uRe=()=>"Tinker",_Re=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aRe():t==="fa"?oRe():t==="ar"?cRe():t==="es"?lRe():t==="hi"?uRe():iRe()}),fRe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",dRe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",hRe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",pRe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",mRe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",gRe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",vRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dRe():t==="fa"?hRe():t==="ar"?pRe():t==="es"?mRe():t==="hi"?gRe():fRe()}),bRe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",yRe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",xRe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",wRe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",kRe=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",SRe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",CRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yRe():t==="fa"?xRe():t==="ar"?wRe():t==="es"?kRe():t==="hi"?SRe():bRe()}),ERe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",NRe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",zRe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",jRe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",TRe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",ARe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",RRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NRe():t==="fa"?zRe():t==="ar"?jRe():t==="es"?TRe():t==="hi"?ARe():ERe()}),MRe=()=>"This computer must stay awake and online while Tinker runs.",ORe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",DRe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",LRe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",IRe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",$Re=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",BRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ORe():t==="fa"?DRe():t==="ar"?LRe():t==="es"?IRe():t==="hi"?$Re():MRe()}),PRe=()=>"Context window",FRe=()=>"上下文窗口",HRe=()=>"پنجرهٔ زمینه",qRe=()=>"نافذة السياق",URe=()=>"Ventana de contexto",GRe=()=>"कॉन्टेक्स्ट विंडो",VRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FRe():t==="fa"?HRe():t==="ar"?qRe():t==="es"?URe():t==="hi"?GRe():PRe()}),KRe=()=>"Context window used",WRe=()=>"已使用的上下文窗口",QRe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",XRe=()=>"المستخدَم من نافذة السياق",YRe=()=>"Ventana de contexto usada",ZRe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",JRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WRe():t==="fa"?QRe():t==="ar"?XRe():t==="es"?YRe():t==="hi"?ZRe():KRe()}),eMe=e=>`${e==null?void 0:e.value} tokens`,tMe=e=>`${e==null?void 0:e.value} 个 token`,nMe=e=>`${e==null?void 0:e.value} توکن`,rMe=e=>`${e==null?void 0:e.value} رمز`,sMe=e=>`${e==null?void 0:e.value} tokens`,iMe=e=>`${e==null?void 0:e.value} टोकन`,aMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tMe(e):t==="fa"?nMe(e):t==="ar"?rMe(e):t==="es"?sMe(e):t==="hi"?iMe(e):eMe(e)}),oMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,cMe=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})`,uMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,_Me=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,fMe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,dMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cMe(e):t==="fa"?lMe(e):t==="ar"?uMe(e):t==="es"?_Me(e):t==="hi"?fMe(e):oMe(e)}),hMe=()=>"Copy the last response",pMe=()=>"复制最新回复",mMe=()=>"کپی آخرین پاسخ",gMe=()=>"نسخ آخر رد",vMe=()=>"Copia la última respuesta",bMe=()=>"आखिरी जवाब कॉपी करें",yMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pMe():t==="fa"?mMe():t==="ar"?gMe():t==="es"?vMe():t==="hi"?bMe():hMe()}),xMe=()=>"No runs yet — ask the agent to launch one.",wMe=()=>"尚无运行——让智能体启动一个。",kMe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",SMe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",CMe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",EMe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",NMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wMe():t==="fa"?kMe():t==="ar"?SMe():t==="es"?CMe():t==="hi"?EMe():xMe()}),zMe=()=>"Run",jMe=()=>"运行",TMe=()=>"اجرا",AMe=()=>"تشغيل",RMe=()=>"Ejecución",MMe=()=>"रन",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jMe():t==="fa"?TMe():t==="ar"?AMe():t==="es"?RMe():t==="hi"?MMe():zMe()}),OMe=()=>"Switch run",DMe=()=>"切换运行",LMe=()=>"تغییر اجرا",IMe=()=>"تبديل التشغيل",$Me=()=>"Cambiar de ejecución",BMe=()=>"रन बदलें",PMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DMe():t==="fa"?LMe():t==="ar"?IMe():t==="es"?$Me():t==="hi"?BMe():OMe()}),FMe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,HMe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,qMe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,UMe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,GMe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,VMe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,KMe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HMe(e):t==="fa"?qMe(e):t==="ar"?UMe(e):t==="es"?GMe(e):t==="hi"?VMe(e):FMe(e)}),WMe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,QMe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,XMe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,YMe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,ZMe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,JMe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,eOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QMe(e):t==="fa"?XMe(e):t==="ar"?YMe(e):t==="es"?ZMe(e):t==="hi"?JMe(e):WMe(e)}),tOe=e=>`${e==null?void 0:e.value}m`,nOe=e=>`${e==null?void 0:e.value} 分钟`,rOe=e=>`${e==null?void 0:e.value} دقیقه`,sOe=e=>`${e==null?void 0:e.value}د`,iOe=e=>`${e==null?void 0:e.value} min`,aOe=e=>`${e==null?void 0:e.value}मि`,oOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nOe(e):t==="fa"?rOe(e):t==="ar"?sOe(e):t==="es"?iOe(e):t==="hi"?aOe(e):tOe(e)}),cOe=e=>`${e==null?void 0:e.value}s`,lOe=e=>`${e==null?void 0:e.value} 秒`,uOe=e=>`${e==null?void 0:e.value} ثانیه`,_Oe=e=>`${e==null?void 0:e.value}ث`,fOe=e=>`${e==null?void 0:e.value} s`,dOe=e=>`${e==null?void 0:e.value}से`,hOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lOe(e):t==="fa"?uOe(e):t==="ar"?_Oe(e):t==="es"?fOe(e):t==="hi"?dOe(e):cOe(e)}),pOe=()=>"Code",mOe=()=>"代码",gOe=()=>"کد",vOe=()=>"الشيفرة",bOe=()=>"Código",yOe=()=>"कोड",xOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mOe():t==="fa"?gOe():t==="ar"?vOe():t==="es"?bOe():t==="hi"?yOe():pOe()}),wOe=()=>"created",kOe=()=>"创建于",SOe=()=>"ایجادشده",COe=()=>"أُنشئ",EOe=()=>"creado",NOe=()=>"बनाया गया",zOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kOe():t==="fa"?SOe():t==="ar"?COe():t==="es"?EOe():t==="hi"?NOe():wOe()}),jOe=()=>"from",TOe=()=>"来自",AOe=()=>"از",ROe=()=>"من",MOe=()=>"desde",OOe=()=>"से",DOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TOe():t==="fa"?AOe():t==="ar"?ROe():t==="es"?MOe():t==="hi"?OOe():jOe()}),LOe=()=>"Logs",IOe=()=>"日志",$Oe=()=>"گزارش‌ها",BOe=()=>"السجلات",POe=()=>"Logs",FOe=()=>"लॉग",HOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IOe():t==="fa"?$Oe():t==="ar"?BOe():t==="es"?POe():t==="hi"?FOe():LOe()}),qOe=()=>"Latest run",UOe=()=>"最新运行",GOe=()=>"آخرین اجرا",VOe=()=>"أحدث تشغيل",KOe=()=>"Última ejecución",WOe=()=>"नवीनतम रन",QOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UOe():t==="fa"?GOe():t==="ar"?VOe():t==="es"?KOe():t==="hi"?WOe():qOe()}),XOe=()=>"Code",YOe=()=>"代码",ZOe=()=>"کد",JOe=()=>"الشيفرة",eDe=()=>"Código",tDe=()=>"कोड",nDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YOe():t==="fa"?ZOe():t==="ar"?JOe():t==="es"?eDe():t==="hi"?tDe():XOe()}),rDe=()=>"Commit",sDe=()=>"提交",iDe=()=>"کامیت",aDe=()=>"إيداع",oDe=()=>"Commit",cDe=()=>"कमिट",lDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sDe():t==="fa"?iDe():t==="ar"?aDe():t==="es"?oDe():t==="hi"?cDe():rDe()}),uDe=()=>"created",_De=()=>"创建于",fDe=()=>"ایجادشده",dDe=()=>"أُنشئ",hDe=()=>"creado",pDe=()=>"बनाया गया",mDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_De():t==="fa"?fDe():t==="ar"?dDe():t==="es"?hDe():t==="hi"?pDe():uDe()}),gDe=()=>"Description",vDe=()=>"说明",bDe=()=>"توضیحات",yDe=()=>"الوصف",xDe=()=>"Descripción",wDe=()=>"विवरण",kDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vDe():t==="fa"?bDe():t==="ar"?yDe():t==="es"?xDe():t==="hi"?wDe():gDe()}),SDe=()=>"Duration",CDe=()=>"时长",EDe=()=>"مدت",NDe=()=>"المدة",zDe=()=>"Duración",jDe=()=>"अवधि",TDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CDe():t==="fa"?EDe():t==="ar"?NDe():t==="es"?zDe():t==="hi"?jDe():SDe()}),ADe=()=>"exit",RDe=()=>"退出码",MDe=()=>"خروج",ODe=()=>"رمز الخروج",DDe=()=>"salida",LDe=()=>"एग्ज़िट",IDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RDe():t==="fa"?MDe():t==="ar"?ODe():t==="es"?DDe():t==="hi"?LDe():ADe()}),$De=()=>"from",BDe=()=>"来自",PDe=()=>"از",FDe=()=>"من",HDe=()=>"desde",qDe=()=>"से",UDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BDe():t==="fa"?PDe():t==="ar"?FDe():t==="es"?HDe():t==="hi"?qDe():$De()}),GDe=()=>"Logs",VDe=()=>"日志",KDe=()=>"گزارش‌ها",WDe=()=>"السجلات",QDe=()=>"Logs",XDe=()=>"लॉग",YDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VDe():t==="fa"?KDe():t==="ar"?WDe():t==="es"?QDe():t==="hi"?XDe():GDe()}),ZDe=()=>"Run",JDe=()=>"运行",eLe=()=>"اجرا",tLe=()=>"تشغيل",nLe=()=>"Ejecución",rLe=()=>"रन",sLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JDe():t==="fa"?eLe():t==="ar"?tLe():t==="es"?nLe():t==="hi"?rLe():ZDe()}),iLe=()=>"Run history",aLe=()=>"运行历史",oLe=()=>"تاریخچهٔ اجرا",cLe=()=>"سجل التشغيل",lLe=()=>"Historial de ejecuciones",uLe=()=>"रन इतिहास",_Le=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aLe():t==="fa"?oLe():t==="ar"?cLe():t==="es"?lLe():t==="hi"?uLe():iLe()}),fLe=()=>"Started",dLe=()=>"开始时间",hLe=()=>"آغاز",pLe=()=>"بدأ",mLe=()=>"Inicio",gLe=()=>"शुरू हुआ",vLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dLe():t==="fa"?hLe():t==="ar"?pLe():t==="es"?mLe():t==="hi"?gLe():fLe()}),bLe=()=>"Runs",yLe=()=>"运行",xLe=()=>"اجراها",wLe=()=>"عمليات التشغيل",kLe=()=>"Ejecuciones",SLe=()=>"रन",CLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yLe():t==="fa"?xLe():t==="ar"?wLe():t==="es"?kLe():t==="hi"?SLe():bLe()}),ELe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",NLe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",zLe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",jLe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",TLe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",ALe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",RLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NLe():t==="fa"?zLe():t==="ar"?jLe():t==="es"?TLe():t==="hi"?ALe():ELe()}),MLe=()=>"No runs yet",OLe=()=>"还没有运行",DLe=()=>"هنوز اجرایی وجود ندارد",LLe=()=>"لا عمليات تشغيل بعد",ILe=()=>"Aún no hay ejecuciones",$Le=()=>"अभी तक कोई रन नहीं",BLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OLe():t==="fa"?DLe():t==="ar"?LLe():t==="es"?ILe():t==="hi"?$Le():MLe()}),PLe=()=>"No experiments yet.",FLe=()=>"还没有实验。",HLe=()=>"هنوز آزمایشی وجود ندارد.",qLe=()=>"لا توجد تجارب بعد.",ULe=()=>"Aún no hay experimentos.",GLe=()=>"अभी तक कोई प्रयोग नहीं।",VLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FLe():t==="fa"?HLe():t==="ar"?qLe():t==="es"?ULe():t==="hi"?GLe():PLe()}),KLe=()=>"Not run yet",WLe=()=>"尚未运行",QLe=()=>"هنوز اجرا نشده",XLe=()=>"لم تُشغَّل بعد",YLe=()=>"Aún sin ejecutar",ZLe=()=>"अभी तक नहीं चलाया गया",JLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WLe():t==="fa"?QLe():t==="ar"?XLe():t==="es"?YLe():t==="hi"?ZLe():KLe()}),eIe=()=>"1 run",tIe=()=>"1 次运行",nIe=()=>"۱ اجرا",rIe=()=>"تشغيل واحد",sIe=()=>"1 ejecución",iIe=()=>"1 रन",aIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tIe():t==="fa"?nIe():t==="ar"?rIe():t==="es"?sIe():t==="hi"?iIe():eIe()}),oIe=()=>"Open logs",cIe=()=>"打开日志",lIe=()=>"باز کردن گزارش‌ها",uIe=()=>"فتح السجلات",_Ie=()=>"Abrir logs",fIe=()=>"लॉग खोलें",dIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cIe():t==="fa"?lIe():t==="ar"?uIe():t==="es"?_Ie():t==="hi"?fIe():oIe()}),hIe=e=>`${e==null?void 0:e.count} runs`,pIe=e=>`${e==null?void 0:e.count} 次运行`,mIe=e=>`${e==null?void 0:e.count} اجرا`,gIe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,vIe=e=>`${e==null?void 0:e.count} ejecuciones`,bIe=e=>`${e==null?void 0:e.count} रन`,yIe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pIe(e):t==="fa"?mIe(e):t==="ar"?gIe(e):t==="es"?vIe(e):t==="hi"?bIe(e):hIe(e)}),xIe=()=>"Stop requested",wIe=()=>"已请求停止",kIe=()=>"درخواست توقف ثبت شد",SIe=()=>"طُلب الإيقاف",CIe=()=>"Detención solicitada",EIe=()=>"रोकने का अनुरोध किया गया",NIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wIe():t==="fa"?kIe():t==="ar"?SIe():t==="es"?CIe():t==="hi"?EIe():xIe()}),zIe=()=>"Stop run",jIe=()=>"停止运行",TIe=()=>"توقف اجرا",AIe=()=>"إيقاف التشغيل",RIe=()=>"Detener ejecución",MIe=()=>"रन रोकें",OIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jIe():t==="fa"?TIe():t==="ar"?AIe():t==="es"?RIe():t==="hi"?MIe():zIe()}),DIe=()=>"Code",LIe=()=>"代码",IIe=()=>"کد",$Ie=()=>"الشيفرة",BIe=()=>"Código",PIe=()=>"कोड",FIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LIe():t==="fa"?IIe():t==="ar"?$Ie():t==="es"?BIe():t==="hi"?PIe():DIe()}),HIe=()=>"Experiments",qIe=()=>"实验",UIe=()=>"آزمایش‌ها",GIe=()=>"التجارب",VIe=()=>"Experimentos",KIe=()=>"प्रयोग",WIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qIe():t==="fa"?UIe():t==="ar"?GIe():t==="es"?VIe():t==="hi"?KIe():HIe()}),QIe=()=>"Logs",XIe=()=>"日志",YIe=()=>"گزارش‌ها",ZIe=()=>"السجلات",JIe=()=>"Logs",e$e=()=>"लॉग",a3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XIe():t==="fa"?YIe():t==="ar"?ZIe():t==="es"?JIe():t==="hi"?e$e():QIe()}),t$e=()=>"Stop failed:",n$e=()=>"停止失败:",r$e=()=>"توقف ناموفق بود:",s$e=()=>"فشل الإيقاف:",i$e=()=>"Error al detener:",a$e=()=>"रोकना विफल:",o$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n$e():t==="fa"?r$e():t==="ar"?s$e():t==="es"?i$e():t==="hi"?a$e():t$e()}),c$e=()=>"Download this chat as Markdown",l$e=()=>"将此聊天下载为 Markdown",u$e=()=>"دانلود این گفت‌وگو به‌صورت Markdown",_$e=()=>"تنزيل هذه المحادثة بتنسيق Markdown",f$e=()=>"Descarga este chat en Markdown",d$e=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",h$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l$e():t==="fa"?u$e():t==="ar"?_$e():t==="es"?f$e():t==="hi"?d$e():c$e()}),p$e=()=>"Clipboard access is unavailable.",m$e=()=>"无法访问剪贴板。",g$e=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",v$e=()=>"الوصول إلى الحافظة غير متاح.",b$e=()=>"El acceso al portapapeles no está disponible.",y$e=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",OD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m$e():t==="fa"?g$e():t==="ar"?v$e():t==="es"?b$e():t==="hi"?y$e():p$e()}),x$e=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,w$e=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,k$e=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,S$e=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,C$e=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,E$e=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,N$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w$e(e):t==="fa"?k$e(e):t==="ar"?S$e(e):t==="es"?C$e(e):t==="hi"?E$e(e):x$e(e)}),z$e=()=>"Duplicate",j$e=()=>"创建副本",T$e=()=>"ایجاد نسخهٔ تکراری",A$e=()=>"تكرار",R$e=()=>"Duplicar",M$e=()=>"डुप्लिकेट करें",O$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j$e():t==="fa"?T$e():t==="ar"?A$e():t==="es"?R$e():t==="hi"?M$e():z$e()}),D$e=e=>`File actions for ${e==null?void 0:e.path}`,L$e=e=>`${e==null?void 0:e.path} 的文件操作`,I$e=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,$$e=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,B$e=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,P$e=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,F$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L$e(e):t==="fa"?I$e(e):t==="ar"?$$e(e):t==="es"?B$e(e):t==="hi"?P$e(e):D$e(e)}),H$e=()=>"Open",q$e=()=>"打开",U$e=()=>"باز کردن",G$e=()=>"فتح",V$e=()=>"Abrir",K$e=()=>"खोलें",W$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q$e():t==="fa"?U$e():t==="ar"?G$e():t==="es"?V$e():t==="hi"?K$e():H$e()}),Q$e=e=>`Rename ${e==null?void 0:e.path}`,X$e=e=>`重命名 ${e==null?void 0:e.path}`,Y$e=e=>`تغییر نام ${e==null?void 0:e.path}`,Z$e=e=>`إعادة تسمية ${e==null?void 0:e.path}`,J$e=e=>`Renombrar ${e==null?void 0:e.path}`,eBe=e=>`${e==null?void 0:e.path} का नाम बदलें`,tBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X$e(e):t==="fa"?Y$e(e):t==="ar"?Z$e(e):t==="es"?J$e(e):t==="hi"?eBe(e):Q$e(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=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,aBe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,oBe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,cBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rBe(e):t==="fa"?sBe(e):t==="ar"?iBe(e):t==="es"?aBe(e):t==="hi"?oBe(e):nBe(e)}),lBe=()=>"Binary file — no inline preview.",uBe=()=>"二进制文件——无法内嵌预览。",_Be=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",fBe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",dBe=()=>"Archivo binario — sin vista previa.",hBe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",pBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uBe():t==="fa"?_Be():t==="ar"?fBe():t==="es"?dBe():t==="hi"?hBe():lBe()}),mBe=()=>"This file changed on disk. Your edits have not been overwritten.",gBe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",vBe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",bBe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",yBe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",xBe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",RN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gBe():t==="fa"?vBe():t==="ar"?bBe():t==="es"?yBe():t==="hi"?xBe():mBe()}),wBe=()=>"Compile failed",kBe=()=>"编译失败",SBe=()=>"کامپایل ناموفق بود",CBe=()=>"فشل التجميع",EBe=()=>"Error al compilar",NBe=()=>"कंपाइल विफल",zBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kBe():t==="fa"?SBe():t==="ar"?CBe():t==="es"?EBe():t==="hi"?NBe():wBe()}),jBe=()=>"Compile PDF",TBe=()=>"编译 PDF",ABe=()=>"کامپایل PDF",RBe=()=>"تجميع PDF",MBe=()=>"Compilar PDF",OBe=()=>"PDF कंपाइल करें",MN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TBe():t==="fa"?ABe():t==="ar"?RBe():t==="es"?MBe():t==="hi"?OBe():jBe()}),DBe=()=>"Compiled, but the engine reported errors — check the output below.",LBe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",IBe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",$Be=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",BBe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",PBe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",FBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LBe():t==="fa"?IBe():t==="ar"?$Be():t==="es"?BBe():t==="hi"?PBe():DBe()}),HBe=()=>"Copy command",qBe=()=>"复制命令",UBe=()=>"کپی فرمان",GBe=()=>"نسخ الأمر",VBe=()=>"Copiar comando",KBe=()=>"कमांड कॉपी करें",WBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qBe():t==="fa"?UBe():t==="ar"?GBe():t==="es"?VBe():t==="hi"?KBe():HBe()}),QBe=()=>"Copy file contents",XBe=()=>"复制文件内容",YBe=()=>"کپی محتوای فایل",ZBe=()=>"نسخ محتوى الملف",JBe=()=>"Copiar contenido del archivo",ePe=()=>"फ़ाइल की सामग्री कॉपी करें",ON=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XBe():t==="fa"?YBe():t==="ar"?ZBe():t==="es"?JBe():t==="hi"?ePe():QBe()}),tPe=()=>"Could not copy file contents",nPe=()=>"无法复制文件内容",rPe=()=>"کپی محتوای فایل ممکن نشد",sPe=()=>"تعذّر نسخ محتوى الملف",iPe=()=>"No se pudo copiar el contenido del archivo",aPe=()=>"फ़ाइल की सामग्री कॉपी नहीं हो सकी",oPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nPe():t==="fa"?rPe():t==="ar"?sPe():t==="es"?iPe():t==="hi"?aPe():tPe()}),cPe=()=>"Copy install command",lPe=()=>"复制安装命令",uPe=()=>"کپی فرمان نصب",_Pe=()=>"نسخ أمر التثبيت",fPe=()=>"Copiar comando de instalación",dPe=()=>"इंस्टॉल कमांड कॉपी करें",hPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lPe():t==="fa"?uPe():t==="ar"?_Pe():t==="es"?fPe():t==="hi"?dPe():cPe()}),pPe=()=>"This file was deleted on disk. Your edits have not been discarded.",mPe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",gPe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",vPe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",bPe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",yPe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mPe():t==="fa"?gPe():t==="ar"?vPe():t==="es"?bPe():t==="hi"?yPe():pPe()}),xPe=()=>"Discard my edits and reload",wPe=()=>"放弃我的编辑并重新加载",kPe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",SPe=()=>"تجاهل تعديلاتي وإعادة التحميل",CPe=()=>"Descartar mis cambios y recargar",EPe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",NPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wPe():t==="fa"?kPe():t==="ar"?SPe():t==="es"?CPe():t==="hi"?EPe():xPe()}),zPe=()=>"Discard unsaved changes and close this file?",jPe=()=>"要丢弃未保存的更改并关闭此文件吗?",TPe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",APe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",RPe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",MPe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jPe():t==="fa"?TPe():t==="ar"?APe():t==="es"?RPe():t==="hi"?MPe():zPe()}),OPe=()=>"Dismiss",DPe=()=>"关闭",LPe=()=>"بستن",IPe=()=>"تجاهل",$Pe=()=>"Cerrar",BPe=()=>"खारिज करें",PPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPe():t==="fa"?LPe():t==="ar"?IPe():t==="es"?$Pe():t==="hi"?BPe():OPe()}),FPe=()=>"Dismiss compile message",HPe=()=>"关闭编译消息",qPe=()=>"بستن پیام کامپایل",UPe=()=>"تجاهل رسالة التجميع",GPe=()=>"Cerrar mensaje de compilación",VPe=()=>"कंपाइल संदेश खारिज करें",KPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HPe():t==="fa"?qPe():t==="ar"?UPe():t==="es"?GPe():t==="hi"?VPe():FPe()}),WPe=()=>"Dismiss Overleaf message",QPe=()=>"关闭 Overleaf 消息",XPe=()=>"بستن پیام Overleaf",YPe=()=>"تجاهل رسالة Overleaf",ZPe=()=>"Cerrar mensaje de Overleaf",JPe=()=>"Overleaf संदेश खारिज करें",eFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QPe():t==="fa"?XPe():t==="ar"?YPe():t==="es"?ZPe():t==="hi"?JPe():WPe()}),tFe=()=>"Download",nFe=()=>"下载",rFe=()=>"بارگیری",sFe=()=>"تنزيل",iFe=()=>"Descargar",aFe=()=>"डाउनलोड करें",DD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nFe():t==="fa"?rFe():t==="ar"?sFe():t==="es"?iFe():t==="hi"?aFe():tFe()}),oFe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,cFe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,lFe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,uFe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,_Fe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,fFe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,dFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cFe(e):t==="fa"?lFe(e):t==="ar"?uFe(e):t==="es"?_Fe(e):t==="hi"?fFe(e):oFe(e)}),hFe=()=>"Failed to load file:",pFe=()=>"加载文件失败:",mFe=()=>"بارگیری فایل ناموفق بود:",gFe=()=>"تعذّر تحميل الملف:",vFe=()=>"Error al cargar el archivo:",bFe=()=>"फ़ाइल लोड नहीं हो सकी:",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pFe():t==="fa"?mFe():t==="ar"?gFe():t==="es"?vFe():t==="hi"?bFe():hFe()}),yFe=()=>"File truncated — showing the first 512 KB.",xFe=()=>"文件已截断——仅显示前 512 KB。",wFe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",kFe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",SFe=()=>"Archivo truncado — se muestran los primeros 512 KB.",CFe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",EFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xFe():t==="fa"?wFe():t==="ar"?kFe():t==="es"?SFe():t==="hi"?CFe():yFe()}),NFe=()=>"The page below stops partway — the full file could not be loaded.",zFe=()=>"下方页面在中途结束——无法加载完整文件。",jFe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",TFe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",AFe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",RFe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",MFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFe():t==="fa"?jFe():t==="ar"?TFe():t==="es"?AFe():t==="hi"?RFe():NFe()}),OFe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,DFe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,LFe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,IFe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,$Fe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,BFe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,PFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DFe(e):t==="fa"?LFe(e):t==="ar"?IFe(e):t==="es"?$Fe(e):t==="hi"?BFe(e):OFe(e)}),FFe=()=>"Loading…",HFe=()=>"正在加载…",qFe=()=>"در حال بارگیری…",UFe=()=>"جارٍ التحميل…",GFe=()=>"Cargando…",VFe=()=>"लोड हो रहा है…",LD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFe():t==="fa"?qFe():t==="ar"?UFe():t==="es"?GFe():t==="hi"?VFe():FFe()}),KFe=()=>"File not found.",WFe=()=>"找不到文件。",QFe=()=>"فایل پیدا نشد.",XFe=()=>"لم يُعثر على الملف.",YFe=()=>"No se encontró el archivo.",ZFe=()=>"फ़ाइल नहीं मिली।",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WFe():t==="fa"?QFe():t==="ar"?XFe():t==="es"?YFe():t==="hi"?ZFe():KFe()}),JFe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,eHe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,tHe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,nHe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,rHe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,sHe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,iHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eHe(e):t==="fa"?tHe(e):t==="ar"?nHe(e):t==="es"?rHe(e):t==="hi"?sHe(e):JFe(e)}),aHe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,oHe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,cHe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,lHe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,uHe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,_He=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,fHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe(e):t==="fa"?cHe(e):t==="ar"?lHe(e):t==="es"?uHe(e):t==="hi"?_He(e):aHe(e)}),dHe=()=>"File not found on disk.",hHe=()=>"磁盘上找不到此文件。",pHe=()=>"فایل روی دیسک پیدا نشد.",mHe=()=>"لم يُعثر على الملف على القرص.",gHe=()=>"No se encontró el archivo en disco.",vHe=()=>"फ़ाइल डिस्क पर नहीं मिली।",bHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hHe():t==="fa"?pHe():t==="ar"?mHe():t==="es"?gHe():t==="hi"?vHe():dHe()}),yHe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,xHe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,wHe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,kHe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,SHe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,CHe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,EHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xHe(e):t==="fa"?wHe(e):t==="ar"?kHe(e):t==="es"?SHe(e):t==="hi"?CHe(e):yHe(e)}),NHe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,zHe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,jHe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,THe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,AHe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,RHe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,MHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zHe(e):t==="fa"?jHe(e):t==="ar"?THe(e):t==="es"?AHe(e):t==="hi"?RHe(e):NHe(e)}),OHe=()=>"Open in default editor",DHe=()=>"在默认编辑器中打开",LHe=()=>"باز کردن در ویرایشگر پیش‌فرض",IHe=()=>"فتح في المحرر الافتراضي",$He=()=>"Abrir en el editor predeterminado",BHe=()=>"डिफ़ॉल्ट एडिटर में खोलें",BN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DHe():t==="fa"?LHe():t==="ar"?IHe():t==="es"?$He():t==="hi"?BHe():OHe()}),PHe=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,FHe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,HHe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,qHe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,UHe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,GHe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,VHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FHe(e):t==="fa"?HHe(e):t==="ar"?qHe(e):t==="es"?UHe(e):t==="hi"?GHe(e):PHe(e)}),KHe=()=>"Only for projects on this computer",WHe=()=>"仅适用于此电脑上的项目",QHe=()=>"فقط برای پروژه‌های این رایانه",XHe=()=>"فقط للمشاريع على هذا الكمبيوتر",YHe=()=>"Solo para proyectos en este equipo",ZHe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",JHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WHe():t==="fa"?QHe():t==="ar"?XHe():t==="es"?YHe():t==="hi"?ZHe():KHe()}),eqe=()=>"Only for files in the project folder",tqe=()=>"仅适用于项目文件夹中的文件",nqe=()=>"فقط برای فایل‌های پوشهٔ پروژه",rqe=()=>"فقط لملفات مجلد المشروع",sqe=()=>"Solo para archivos de la carpeta del proyecto",iqe=()=>"केवल प्रोजेक्ट फ़ोल्डर की फ़ाइलों के लिए",aqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tqe():t==="fa"?nqe():t==="ar"?rqe():t==="es"?sqe():t==="hi"?iqe():eqe()}),oqe=()=>"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.",cqe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",lqe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",uqe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",_qe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",fqe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",dqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cqe():t==="fa"?lqe():t==="ar"?uqe():t==="es"?_qe():t==="hi"?fqe():oqe()}),hqe=()=>"Overwrite disk file",pqe=()=>"覆盖磁盘文件",mqe=()=>"بازنویسی فایل روی دیسک",gqe=()=>"استبدال الملف على القرص",vqe=()=>"Sobrescribir el archivo en disco",bqe=()=>"डिस्क फ़ाइल अधिलेखित करें",yqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pqe():t==="fa"?mqe():t==="ar"?gqe():t==="es"?vqe():t==="hi"?bqe():hqe()}),xqe=()=>"Compiled PDF is out of date",wqe=()=>"已编译的 PDF 不是最新版本",kqe=()=>"PDF کامپایل‌شده به‌روز نیست",Sqe=()=>"ملف PDF المُجمَّع غير محدَّث",Cqe=()=>"El PDF compilado está desactualizado",Eqe=()=>"कंपाइल की गई PDF पुरानी है",Nqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wqe():t==="fa"?kqe():t==="ar"?Sqe():t==="es"?Cqe():t==="hi"?Eqe():xqe()}),zqe=()=>"project clone",jqe=()=>"项目克隆",Tqe=()=>"کلون پروژه",Aqe=()=>"نسخة المشروع المستنسخة",Rqe=()=>"el clon del proyecto",Mqe=()=>"प्रोजेक्ट क्लोन",Zg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jqe():t==="fa"?Tqe():t==="ar"?Aqe():t==="es"?Rqe():t==="hi"?Mqe():zqe()}),Oqe=()=>"Recompile PDF",Dqe=()=>"重新编译 PDF",Lqe=()=>"کامپایل دوبارهٔ PDF",Iqe=()=>"إعادة تجميع PDF",$qe=()=>"Volver a compilar el PDF",Bqe=()=>"PDF फिर से कंपाइल करें",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dqe():t==="fa"?Lqe():t==="ar"?Iqe():t==="es"?$qe():t==="hi"?Bqe():Oqe()}),Pqe=()=>"Reload from disk",Fqe=()=>"从磁盘重新加载",Hqe=()=>"بارگذاری مجدد از دیسک",qqe=()=>"إعادة التحميل من القرص",Uqe=()=>"Recargar desde el disco",Gqe=()=>"डिस्क से फिर से लोड करें",Vqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fqe():t==="fa"?Hqe():t==="ar"?qqe():t==="es"?Uqe():t==="hi"?Gqe():Pqe()}),Kqe=()=>"Reveal in file manager",Wqe=()=>"在文件管理器中显示",Qqe=()=>"نمایش در مدیر فایل",Xqe=()=>"إظهار في مدير الملفات",Yqe=()=>"Mostrar en el administrador de archivos",Zqe=()=>"फ़ाइल मैनेजर में दिखाएँ",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wqe():t==="fa"?Qqe():t==="ar"?Xqe():t==="es"?Yqe():t==="hi"?Zqe():Kqe()}),Jqe=()=>"Save failed",eUe=()=>"保存失败",tUe=()=>"ذخیره ناموفق بود",nUe=()=>"فشل الحفظ",rUe=()=>"Error al guardar",sUe=()=>"सेव विफल",iUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe():t==="fa"?tUe():t==="ar"?nUe():t==="es"?rUe():t==="hi"?sUe():Jqe()}),aUe=()=>"Saving…",oUe=()=>"正在保存…",cUe=()=>"در حال ذخیره…",lUe=()=>"جارٍ الحفظ…",uUe=()=>"Guardando…",_Ue=()=>"सेव हो रहा है…",fUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUe():t==="fa"?cUe():t==="ar"?lUe():t==="es"?uUe():t==="hi"?_Ue():aUe()}),dUe=()=>"Selected — press ⌘C",hUe=()=>"已选中 — 按 ⌘C 复制",pUe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",mUe=()=>"محدد — اضغط ⌘C",gUe=()=>"Seleccionado — pulsa ⌘C",vUe=()=>"चयनित — ⌘C दबाएं",bUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hUe():t==="fa"?pUe():t==="ar"?mUe():t==="es"?gUe():t==="hi"?vUe():dUe()}),yUe=()=>"session’s worktree",xUe=()=>"会话工作树",wUe=()=>"درخت کاری نشست",kUe=()=>"شجرة عمل الجلسة",SUe=()=>"el árbol de trabajo de la sesión",CUe=()=>"सेशन की वर्कट्री",Jg=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xUe():t==="fa"?wUe():t==="ar"?kUe():t==="es"?SUe():t==="hi"?CUe():yUe()}),EUe=()=>"Show compiled PDF",NUe=()=>"显示已编译的 PDF",zUe=()=>"نمایش PDF کامپایل‌شده",jUe=()=>"عرض ملف PDF المُجمَّع",TUe=()=>"Mostrar el PDF compilado",AUe=()=>"कंपाइल की गई PDF दिखाएं",HN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NUe():t==="fa"?zUe():t==="ar"?jUe():t==="es"?TUe():t==="hi"?AUe():EUe()}),RUe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",MUe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",OUe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",DUe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",LUe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",IUe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",$Ue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUe():t==="fa"?OUe():t==="ar"?DUe():t==="es"?LUe():t==="hi"?IUe():RUe()}),BUe=()=>"This session's worktree isn't available — showing the project clone's copy.",PUe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",FUe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",HUe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",qUe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",UUe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",GUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PUe():t==="fa"?FUe():t==="ar"?HUe():t==="es"?qUe():t==="hi"?UUe():BUe()}),VUe=()=>"Unsaved",KUe=()=>"未保存",WUe=()=>"ذخیره نشده",QUe=()=>"غير محفوظ",XUe=()=>"Sin guardar",YUe=()=>"सेव नहीं हुआ",ID=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KUe():t==="fa"?WUe():t==="ar"?QUe():t==="es"?XUe():t==="hi"?YUe():VUe()}),ZUe=()=>"Unsaved — ⌘S to save",JUe=()=>"未保存 — 按 ⌘S 保存",eGe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",tGe=()=>"غير محفوظ — ⌘S للحفظ",nGe=()=>"Sin guardar — ⌘S para guardar",rGe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",sGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JUe():t==="fa"?eGe():t==="ar"?tGe():t==="es"?nGe():t==="hi"?rGe():ZUe()}),iGe=()=>"Update orx on the remote machine to edit this file safely.",aGe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",oGe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",cGe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",lGe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",uGe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",_Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe():t==="fa"?oGe():t==="ar"?cGe():t==="es"?lGe():t==="hi"?uGe():iGe()}),fGe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",dGe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",hGe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",pGe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",mGe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",gGe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",vGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dGe():t==="fa"?hGe():t==="ar"?pGe():t==="es"?mGe():t==="hi"?gGe():fGe()}),bGe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",yGe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",xGe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",wGe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",kGe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",SGe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",CGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yGe():t==="fa"?xGe():t==="ar"?wGe():t==="es"?kGe():t==="hi"?SGe():bGe()}),EGe=()=>"Back to preview",NGe=()=>"返回预览",zGe=()=>"بازگشت به پیش‌نمایش",jGe=()=>"العودة إلى المعاينة",TGe=()=>"Volver a la vista previa",AGe=()=>"प्रीव्यू पर वापस जाएं",RGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NGe():t==="fa"?zGe():t==="ar"?jGe():t==="es"?TGe():t==="hi"?AGe():EGe()}),MGe=e=>`${e==null?void 0:e.count} changed files`,OGe=e=>`${e==null?void 0:e.count} 个已更改文件`,DGe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,LGe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,IGe=e=>`${e==null?void 0:e.count} archivos modificados`,$Ge=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,$D=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OGe(e):t==="fa"?DGe(e):t==="ar"?LGe(e):t==="es"?IGe(e):t==="hi"?$Ge(e):MGe(e)}),BGe=()=>"Changed files",PGe=()=>"已更改文件",FGe=()=>"فایل‌های تغییرکرده",HGe=()=>"الملفات المتغيّرة",qGe=()=>"Archivos modificados",UGe=()=>"बदली गई फ़ाइलें",GGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PGe():t==="fa"?FGe():t==="ar"?HGe():t==="es"?qGe():t==="hi"?UGe():BGe()}),VGe=()=>"Diff preview truncated",KGe=()=>"差异预览已截断",WGe=()=>"پیش‌نمایش تفاوت کوتاه شده است",QGe=()=>"معاينة الفروق مقتطعة",XGe=()=>"Vista previa del diff truncada",YGe=()=>"डिफ़ प्रीव्यू छोटा किया गया",ZGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KGe():t==="fa"?WGe():t==="ar"?QGe():t==="es"?XGe():t==="hi"?YGe():VGe()}),JGe=e=>`${e==null?void 0:e.count} files shown (partial)`,eVe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,tVe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,nVe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,rVe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,sVe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,iVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eVe(e):t==="fa"?tVe(e):t==="ar"?nVe(e):t==="es"?rVe(e):t==="hi"?sVe(e):JGe(e)}),aVe=()=>"No changes.",oVe=()=>"没有更改。",cVe=()=>"تغییری وجود ندارد.",lVe=()=>"لا توجد تغييرات.",uVe=()=>"No hay cambios.",_Ve=()=>"कोई बदलाव नहीं।",fVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oVe():t==="fa"?cVe():t==="ar"?lVe():t==="es"?uVe():t==="hi"?_Ve():aVe()}),dVe=()=>"No complete file preview was available before the cutoff.",hVe=()=>"在截断位置之前没有完整的文件预览。",pVe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",mVe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",gVe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",vVe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",bVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hVe():t==="fa"?pVe():t==="ar"?mVe():t==="es"?gVe():t==="hi"?vVe():dVe()}),yVe=()=>"No textual diff for this file.",xVe=()=>"此文件没有文本差异。",wVe=()=>"برای این فایل تفاوت متنی وجود ندارد.",kVe=()=>"لا يوجد فرق نصّي لهذا الملف.",SVe=()=>"No hay diff de texto para este archivo.",CVe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",EVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xVe():t==="fa"?wVe():t==="ar"?kVe():t==="es"?SVe():t==="hi"?CVe():yVe()}),NVe=()=>"1 changed file",zVe=()=>"1 个已更改文件",jVe=()=>"۱ فایل تغییرکرده",TVe=()=>"ملف واحد معدَّل",AVe=()=>"1 archivo modificado",RVe=()=>"1 बदली गई फ़ाइल",BD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zVe():t==="fa"?jVe():t==="ar"?TVe():t==="es"?AVe():t==="hi"?RVe():NVe()}),MVe=()=>"1 file shown (partial)",OVe=()=>"显示 1 个文件(部分)",DVe=()=>"۱ فایل نمایش داده شده (ناقص)",LVe=()=>"عُرض ملف واحد (جزئيًا)",IVe=()=>"1 archivo mostrado (parcial)",$Ve=()=>"1 फ़ाइल दिखाई गई (आंशिक)",BVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OVe():t==="fa"?DVe():t==="ar"?LVe():t==="es"?IVe():t==="hi"?$Ve():MVe()}),PVe=()=>"Unable to parse this diff.",FVe=()=>"无法解析此差异。",HVe=()=>"خواندن این تفاوت ممکن نبود.",qVe=()=>"تعذّر تحليل هذا الفرق.",UVe=()=>"No se pudo interpretar este diff.",GVe=()=>"यह डिफ़ पार्स नहीं हो सका।",VVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FVe():t==="fa"?HVe():t==="ar"?qVe():t==="es"?UVe():t==="hi"?GVe():PVe()}),KVe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,WVe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,QVe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,XVe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,YVe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,ZVe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,JVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WVe(e):t==="fa"?QVe(e):t==="ar"?XVe(e):t==="es"?YVe(e):t==="hi"?ZVe(e):KVe(e)}),eKe=()=>"View full diff",tKe=()=>"查看完整差异",nKe=()=>"نمایش تفاوت کامل",rKe=()=>"عرض الفرق الكامل",sKe=()=>"Ver diff completo",iKe=()=>"पूरा डिफ़ देखें",aKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tKe():t==="fa"?nKe():t==="ar"?rKe():t==="es"?sKe():t==="hi"?iKe():eKe()}),oKe=()=>"Create a token ↗",cKe=()=>"创建令牌 ↗",lKe=()=>"ساخت توکن ↗",uKe=()=>"إنشاء رمز ↗",_Ke=()=>"Crear un token ↗",fKe=()=>"एक टोकन बनाएं ↗",dKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cKe():t==="fa"?lKe():t==="ar"?uKe():t==="es"?_Ke():t==="hi"?fKe():oKe()}),hKe=()=>"Keep the agent working toward a goal",pKe=()=>"让智能体持续朝目标推进",mKe=()=>"عامل را در مسیر یک هدف نگه دارید",gKe=()=>"اجعل الوكيل يعمل نحو هدف",vKe=()=>"Mantén al agente trabajando hacia un objetivo",bKe=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",yKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pKe():t==="fa"?mKe():t==="ar"?gKe():t==="es"?vKe():t==="hi"?bKe():hKe()}),xKe=()=>"Approve and run",wKe=()=>"批准并运行",kKe=()=>"تأیید و اجرا",SKe=()=>"الموافقة والتشغيل",CKe=()=>"Aprobar y ejecutar",EKe=()=>"स्वीकार करें और चलाएं",NKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wKe():t==="fa"?kKe():t==="ar"?SKe():t==="es"?CKe():t==="hi"?EKe():xKe()}),zKe=()=>"Cancel setup",jKe=()=>"取消设置",TKe=()=>"لغو راه‌اندازی",AKe=()=>"إلغاء الإعداد",RKe=()=>"Cancelar configuración",MKe=()=>"सेटअप रद्द करें",OKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jKe():t==="fa"?TKe():t==="ar"?AKe():t==="es"?RKe():t==="hi"?MKe():zKe()}),DKe=()=>"Checking connection…",LKe=()=>"正在检查连接…",IKe=()=>"در حال بررسی اتصال…",$Ke=()=>"جارٍ التحقق من الإعداد…",BKe=()=>"Comprobando conexión…",PKe=()=>"कनेक्शन जाँचा जा रहा है…",FKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LKe():t==="fa"?IKe():t==="ar"?$Ke():t==="es"?BKe():t==="hi"?PKe():DKe()}),HKe=e=>`${e==null?void 0:e.agent} is connected.`,qKe=e=>`${e==null?void 0:e.agent} 已连接。`,UKe=e=>`${e==null?void 0:e.agent} متصل است.`,GKe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,VKe=e=>`${e==null?void 0:e.agent} está conectado.`,KKe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,WKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qKe(e):t==="fa"?UKe(e):t==="ar"?GKe(e):t==="es"?VKe(e):t==="hi"?KKe(e):HKe(e)}),QKe=()=>"Setup needs attention.",XKe=()=>"设置需要处理。",YKe=()=>"راه‌اندازی نیاز به بررسی دارد.",ZKe=()=>"تعذّر إكمال الإعداد.",JKe=()=>"La configuración requiere atención.",eWe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",PD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XKe():t==="fa"?YKe():t==="ar"?ZKe():t==="es"?JKe():t==="hi"?eWe():QKe()}),tWe=()=>"Install",nWe=()=>"安装",rWe=()=>"نصب",sWe=()=>"تثبيت",iWe=()=>"Instalar",aWe=()=>"इंस्टॉल करें",oWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nWe():t==="fa"?rWe():t==="ar"?sWe():t==="es"?iWe():t==="hi"?aWe():tWe()}),cWe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,lWe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,uWe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,_We=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,fWe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,dWe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,hWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lWe(e):t==="fa"?uWe(e):t==="ar"?_We(e):t==="es"?fWe(e):t==="hi"?dWe(e):cWe(e)}),pWe=()=>"Could not load setup commands.",mWe=()=>"无法加载设置命令。",gWe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",vWe=()=>"تعذّر تحميل أوامر الإعداد.",bWe=()=>"No se pudieron cargar los comandos de configuración.",yWe=()=>"सेटअप कमांड लोड नहीं हो सके।",xWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mWe():t==="fa"?gWe():t==="ar"?vWe():t==="es"?bWe():t==="hi"?yWe():pWe()}),wWe=()=>"Sign in",kWe=()=>"登录",SWe=()=>"ورود",CWe=()=>"تسجيل الدخول",EWe=()=>"Iniciar sesión",NWe=()=>"साइन इन करें",FD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kWe():t==="fa"?SWe():t==="ar"?CWe():t==="es"?EWe():t==="hi"?NWe():wWe()}),zWe=()=>"The agent is not ready yet. Re-check or retry sign-in.",jWe=()=>"代理尚未就绪。请重新检查或重试登录。",TWe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",AWe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",RWe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",MWe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",HD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jWe():t==="fa"?TWe():t==="ar"?AWe():t==="es"?RWe():t==="hi"?MWe():zWe()}),OWe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",DWe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",LWe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",IWe=()=>"يفتح طرفية هنا",$We=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",BWe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",PWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DWe():t==="fa"?LWe():t==="ar"?IWe():t==="es"?$We():t==="hi"?BWe():OWe()}),FWe=()=>"This install command requires Node.js and npm.",HWe=()=>"此安装命令需要 Node.js 和 npm。",qWe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",UWe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",GWe=()=>"Este comando de instalación requiere Node.js y npm.",VWe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",KWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HWe():t==="fa"?qWe():t==="ar"?UWe():t==="es"?GWe():t==="hi"?VWe():FWe()}),WWe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,QWe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,XWe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,YWe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,ZWe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,JWe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,eQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QWe(e):t==="fa"?XWe(e):t==="ar"?YWe(e):t==="es"?ZWe(e):t==="hi"?JWe(e):WWe(e)}),tQe=e=>`Set up ${e==null?void 0:e.agent}`,nQe=e=>`设置 ${e==null?void 0:e.agent}`,rQe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,sQe=e=>`إعداد ${e==null?void 0:e.agent}`,iQe=e=>`Configurar ${e==null?void 0:e.agent}`,aQe=e=>`${e==null?void 0:e.agent} सेट अप करें`,qN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nQe(e):t==="fa"?rQe(e):t==="ar"?sQe(e):t==="es"?iQe(e):t==="hi"?aQe(e):tQe(e)}),oQe=()=>"Update",cQe=()=>"更新",lQe=()=>"به‌روزرسانی",uQe=()=>"تحديث",_Qe=()=>"Actualizar",fQe=()=>"अपडेट करें",dQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cQe():t==="fa"?lQe():t==="ar"?uQe():t==="es"?_Qe():t==="hi"?fQe():oQe()}),hQe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,pQe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,mQe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,gQe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,vQe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,bQe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,yQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pQe(e):t==="fa"?mQe(e):t==="ar"?gQe(e):t==="es"?vQe(e):t==="hi"?bQe(e):hQe(e)}),xQe=()=>"All projects",wQe=()=>"所有项目",kQe=()=>"همهٔ پروژه‌ها",SQe=()=>"كل المشاريع",CQe=()=>"Todos los proyectos",EQe=()=>"सभी प्रोजेक्ट",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wQe():t==="fa"?kQe():t==="ar"?SQe():t==="es"?CQe():t==="hi"?EQe():xQe()}),NQe=()=>"Configure Repository",zQe=()=>"配置仓库",jQe=()=>"پیکربندی مخزن",TQe=()=>"إعداد المستودع",AQe=()=>"Configurar repositorio",RQe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",MQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zQe():t==="fa"?jQe():t==="ar"?TQe():t==="es"?AQe():t==="hi"?RQe():NQe()}),OQe=()=>"Create a new project",DQe=()=>"新建项目",LQe=()=>"ایجاد پروژهٔ جدید",IQe=()=>"إنشاء مشروع جديد",$Qe=()=>"Crear un proyecto nuevo",BQe=()=>"नया प्रोजेक्ट बनाएं",PQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DQe():t==="fa"?LQe():t==="ar"?IQe():t==="es"?$Qe():t==="hi"?BQe():OQe()}),FQe=()=>"Hide sidebar",HQe=()=>"隐藏侧边栏",qQe=()=>"پنهان کردن نوار کناری",UQe=()=>"إخفاء الشريط الجانبي",GQe=()=>"Ocultar barra lateral",VQe=()=>"साइडबार छिपाएं",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HQe():t==="fa"?qQe():t==="ar"?UQe():t==="es"?GQe():t==="hi"?VQe():FQe()}),KQe=()=>"Project",WQe=()=>"项目",QQe=()=>"پروژه",XQe=()=>"المشروع",YQe=()=>"Proyecto",ZQe=()=>"प्रोजेक्ट",JQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WQe():t==="fa"?QQe():t==="ar"?XQe():t==="es"?YQe():t==="hi"?ZQe():KQe()}),eXe=e=>`${e==null?void 0:e.count} cancelled`,tXe=e=>`${e==null?void 0:e.count} 次取消`,nXe=e=>`${e==null?void 0:e.count} لغوشده`,rXe=e=>`الملغاة: ${e==null?void 0:e.count}`,sXe=e=>`${e==null?void 0:e.count} canceladas`,iXe=e=>`${e==null?void 0:e.count} रद्द`,aXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tXe(e):t==="fa"?nXe(e):t==="ar"?rXe(e):t==="es"?sXe(e):t==="hi"?iXe(e):eXe(e)}),oXe=e=>`${e==null?void 0:e.count} done`,cXe=e=>`${e==null?void 0:e.count} 次完成`,lXe=e=>`${e==null?void 0:e.count} تمام‌شده`,uXe=e=>`المكتملة: ${e==null?void 0:e.count}`,_Xe=e=>`${e==null?void 0:e.count} completadas`,fXe=e=>`${e==null?void 0:e.count} पूरे`,dXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cXe(e):t==="fa"?lXe(e):t==="ar"?uXe(e):t==="es"?_Xe(e):t==="hi"?fXe(e):oXe(e)}),hXe=e=>`${e==null?void 0:e.count} failed`,pXe=e=>`${e==null?void 0:e.count} 次失败`,mXe=e=>`${e==null?void 0:e.count} ناموفق`,gXe=e=>`الفاشلة: ${e==null?void 0:e.count}`,vXe=e=>`${e==null?void 0:e.count} con error`,bXe=e=>`${e==null?void 0:e.count} विफल`,yXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pXe(e):t==="fa"?mXe(e):t==="ar"?gXe(e):t==="es"?vXe(e):t==="hi"?bXe(e):hXe(e)}),xXe=e=>`${e==null?void 0:e.count} files`,wXe=e=>`${e==null?void 0:e.count} 个文件`,kXe=e=>`${e==null?void 0:e.count} فایل`,SXe=e=>`الملفات: ${e==null?void 0:e.count}`,CXe=e=>`${e==null?void 0:e.count} archivos`,EXe=e=>`${e==null?void 0:e.count} फ़ाइलें`,NXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wXe(e):t==="fa"?kXe(e):t==="ar"?SXe(e):t==="es"?CXe(e):t==="hi"?EXe(e):xXe(e)}),zXe=e=>`${e==null?void 0:e.count}+ files`,jXe=e=>`至少 ${e==null?void 0:e.count} 个文件`,TXe=e=>`بیش از ${e==null?void 0:e.count} فایل`,AXe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,RXe=e=>`${e==null?void 0:e.count}+ archivos`,MXe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,OXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jXe(e):t==="fa"?TXe(e):t==="ar"?AXe(e):t==="es"?RXe(e):t==="hi"?MXe(e):zXe(e)}),DXe=e=>`${e==null?void 0:e.count} live`,LXe=e=>`${e==null?void 0:e.count} 次进行中`,IXe=e=>`${e==null?void 0:e.count} فعال`,$Xe=e=>`النشطة: ${e==null?void 0:e.count}`,BXe=e=>`${e==null?void 0:e.count} en curso`,PXe=e=>`${e==null?void 0:e.count} लाइव`,FXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LXe(e):t==="fa"?IXe(e):t==="ar"?$Xe(e):t==="es"?BXe(e):t==="hi"?PXe(e):DXe(e)}),HXe=()=>"1 file",qXe=()=>"1 个文件",UXe=()=>"۱ فایل",GXe=()=>"ملف واحد",VXe=()=>"1 archivo",KXe=()=>"1 फ़ाइल",WXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qXe():t==="fa"?UXe():t==="ar"?GXe():t==="es"?VXe():t==="hi"?KXe():HXe()}),QXe=()=>"1 run",XXe=()=>"1 次运行",YXe=()=>"۱ اجرا",ZXe=()=>"تشغيل واحد",JXe=()=>"1 ejecución",eYe=()=>"1 रन",tYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XXe():t==="fa"?YXe():t==="ar"?ZXe():t==="es"?JXe():t==="hi"?eYe():QXe()}),nYe=e=>`${e==null?void 0:e.count} runs`,rYe=e=>`${e==null?void 0:e.count} 次运行`,sYe=e=>`${e==null?void 0:e.count} اجرا`,iYe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,aYe=e=>`${e==null?void 0:e.count} ejecuciones`,oYe=e=>`${e==null?void 0:e.count} रन`,cYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rYe(e):t==="fa"?sYe(e):t==="ar"?iYe(e):t==="es"?aYe(e):t==="hi"?oYe(e):nYe(e)}),lYe=()=>"Zoom in",uYe=()=>"放大",_Ye=()=>"بزرگ‌نمایی",fYe=()=>"تكبير",dYe=()=>"Acercar",hYe=()=>"ज़ूम इन",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uYe():t==="fa"?_Ye():t==="ar"?fYe():t==="es"?dYe():t==="hi"?hYe():lYe()}),pYe=()=>"Zoom out",mYe=()=>"缩小",gYe=()=>"کوچک‌نمایی",vYe=()=>"تصغير",bYe=()=>"Alejar",yYe=()=>"ज़ूम आउट",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mYe():t==="fa"?gYe():t==="ar"?vYe():t==="es"?bYe():t==="hi"?yYe():pYe()}),xYe=()=>"Reset zoom to fit",wYe=()=>"重置为适合窗口",kYe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",SYe=()=>"إعادة ضبط التكبير للملاءمة",CYe=()=>"Restablecer zoom para ajustar",EYe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wYe():t==="fa"?kYe():t==="ar"?SYe():t==="es"?CYe():t==="hi"?EYe():xYe()}),NYe=()=>"No instances yet.",zYe=()=>"还没有实例。",jYe=()=>"هنوز نمونه‌ای وجود ندارد.",TYe=()=>"لا توجد مثيلات بعد.",AYe=()=>"Aún no hay instancias.",RYe=()=>"अभी तक कोई इंस्टेंस नहीं।",MYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zYe():t==="fa"?jYe():t==="ar"?TYe():t==="es"?AYe():t==="hi"?RYe():NYe()}),OYe=()=>"Nothing running right now.",DYe=()=>"当前没有运行中的实例。",LYe=()=>"اکنون چیزی در حال اجرا نیست.",IYe=()=>"لا شيء قيد التشغيل الآن.",$Ye=()=>"No hay nada en ejecución ahora mismo.",BYe=()=>"अभी कुछ नहीं चल रहा।",PYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DYe():t==="fa"?LYe():t==="ar"?IYe():t==="es"?$Ye():t==="hi"?BYe():OYe()}),FYe=()=>"Select a project to see its history.",HYe=()=>"请选择一个项目以查看其历史记录。",qYe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",UYe=()=>"اختر مشروعًا لرؤية سجله.",GYe=()=>"Selecciona un proyecto para ver su historial.",VYe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",KYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HYe():t==="fa"?qYe():t==="ar"?UYe():t==="es"?GYe():t==="hi"?VYe():FYe()}),WYe=()=>"Select a project to see its runs.",QYe=()=>"请选择一个项目以查看其运行。",XYe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",YYe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",ZYe=()=>"Selecciona un proyecto para ver sus ejecuciones.",JYe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",eZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QYe():t==="fa"?XYe():t==="ar"?YYe():t==="es"?ZYe():t==="hi"?JYe():WYe()}),tZe=()=>"View history",nZe=()=>"查看历史记录",rZe=()=>"مشاهدهٔ تاریخچه",sZe=()=>"عرض السجل",iZe=()=>"Ver historial",aZe=()=>"इतिहास देखें",oZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nZe():t==="fa"?rZe():t==="ar"?sZe():t==="es"?iZe():t==="hi"?aZe():tZe()}),cZe=e=>`View history (${e==null?void 0:e.count})`,lZe=e=>`查看历史记录(${e==null?void 0:e.count})`,uZe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,_Ze=e=>`عرض السجل (${e==null?void 0:e.count})`,fZe=e=>`Ver historial (${e==null?void 0:e.count})`,dZe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,hZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lZe(e):t==="fa"?uZe(e):t==="ar"?_Ze(e):t==="es"?fZe(e):t==="hi"?dZe(e):cZe(e)}),pZe=()=>"The engine exited without producing a PDF or a log.",mZe=()=>"引擎已退出,但没有生成 PDF 或日志。",gZe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",vZe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",bZe=()=>"El motor terminó sin generar un PDF ni un log.",yZe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",xZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mZe():t==="fa"?gZe():t==="ar"?vZe():t==="es"?bZe():t==="hi"?yZe():pZe()}),wZe=()=>"Loading…",kZe=()=>"正在加载…",SZe=()=>"در حال بارگیری…",CZe=()=>"جارٍ التحميل…",EZe=()=>"Cargando…",NZe=()=>"लोड हो रहा है…",zZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kZe():t==="fa"?SZe():t==="ar"?CZe():t==="es"?EZe():t==="hi"?NZe():wZe()}),jZe=()=>"Add local model",TZe=()=>"添加本地模型",AZe=()=>"افزودن مدل محلی",RZe=()=>"إضافة نموذج محلي",MZe=()=>"Añadir modelo local",OZe=()=>"लोकल मॉडल जोड़ें",qD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TZe():t==="fa"?AZe():t==="ar"?RZe():t==="es"?MZe():t==="hi"?OZe():jZe()}),DZe=()=>"Local server address",LZe=()=>"本地服务器地址",IZe=()=>"نشانی سرور محلی",$Ze=()=>"عنوان الخادم المحلي",BZe=()=>"Dirección del servidor local",PZe=()=>"लोकल सर्वर पता",FZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LZe():t==="fa"?IZe():t==="ar"?$Ze():t==="es"?BZe():t==="hi"?PZe():DZe()}),HZe=()=>"Find models",qZe=()=>"查找模型",UZe=()=>"یافتن مدل‌ها",GZe=()=>"العثور على النماذج",VZe=()=>"Buscar modelos",KZe=()=>"मॉडल खोजें",WZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qZe():t==="fa"?UZe():t==="ar"?GZe():t==="es"?VZe():t==="hi"?KZe():HZe()}),QZe=()=>"(OpenAI compatible)",XZe=()=>"(兼容 OpenAI)",YZe=()=>"(سازگار با OpenAI)",ZZe=()=>"(متوافق مع OpenAI)",JZe=()=>"(compatible con OpenAI)",eJe=()=>"(OpenAI संगत)",UD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XZe():t==="fa"?YZe():t==="ar"?ZZe():t==="es"?JZe():t==="hi"?eJe():QZe()}),tJe=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",nJe=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",rJe=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",sJe=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",iJe=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",aJe=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",oJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nJe():t==="fa"?rJe():t==="ar"?sJe():t==="es"?iJe():t==="hi"?aJe():tJe()}),cJe=()=>"Connected",lJe=()=>"已连接",uJe=()=>"متصل شد",_Je=()=>"متصل",fJe=()=>"Conectado",dJe=()=>"कनेक्टेड",hJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lJe():t==="fa"?uJe():t==="ar"?_Je():t==="es"?fJe():t==="hi"?dJe():cJe()}),pJe=()=>"Context window",mJe=()=>"上下文窗口",gJe=()=>"پنجرهٔ زمینه",vJe=()=>"نافذة السياق",bJe=()=>"Ventana de contexto",yJe=()=>"कॉन्टेक्स्ट विंडो",xJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mJe():t==="fa"?gJe():t==="ar"?vJe():t==="es"?bJe():t==="hi"?yJe():pJe()}),wJe=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",kJe=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",SJe=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",CJe=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",EJe=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",NJe=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",zJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kJe():t==="fa"?SJe():t==="ar"?CJe():t==="es"?EJe():t==="hi"?NJe():wJe()}),jJe=()=>"Custom Endpoint",TJe=()=>"自定义端点",AJe=()=>"نقطهٔ اتصال سفارشی",RJe=()=>"نقطة نهاية مخصصة",MJe=()=>"Endpoint personalizado",OJe=()=>"कस्टम एंडपॉइंट",Gk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TJe():t==="fa"?AJe():t==="ar"?RJe():t==="es"?MJe():t==="hi"?OJe():jJe()}),DJe=e=>`Disconnect ${e==null?void 0:e.name}`,LJe=e=>`断开 ${e==null?void 0:e.name}`,IJe=e=>`قطع اتصال ${e==null?void 0:e.name}`,$Je=e=>`قطع اتصال ${e==null?void 0:e.name}`,BJe=e=>`Desconectar ${e==null?void 0:e.name}`,PJe=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,FJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LJe(e):t==="fa"?IJe(e):t==="ar"?$Je(e):t==="es"?BJe(e):t==="hi"?PJe(e):DJe(e)}),HJe=()=>"Get OpenCode",qJe=()=>"获取 OpenCode",UJe=()=>"دریافت OpenCode",GJe=()=>"الحصول على OpenCode",VJe=()=>"Obtener OpenCode",KJe=()=>"OpenCode लें",WJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qJe():t==="fa"?UJe():t==="ar"?GJe():t==="es"?VJe():t==="hi"?KJe():HJe()}),QJe=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",XJe=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",YJe=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",ZJe=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",JJe=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",eet=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",tet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XJe():t==="fa"?YJe():t==="ar"?ZJe():t==="es"?JJe():t==="hi"?eet():QJe()}),net=()=>"API key (optional)",ret=()=>"API 密钥(可选)",set=()=>"کلید API (اختیاری)",iet=()=>"مفتاح API (اختياري)",aet=()=>"Clave de API (opcional)",oet=()=>"API की (वैकल्पिक)",cet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ret():t==="fa"?set():t==="ar"?iet():t==="es"?aet():t==="hi"?oet():net()}),uet=()=>"Save model",_et=()=>"保存模型",fet=()=>"ذخیرهٔ مدل",det=()=>"حفظ النموذج",het=()=>"Guardar modelo",pet=()=>"मॉडल सेव करें",met=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_et():t==="fa"?fet():t==="ar"?det():t==="es"?het():t==="hi"?pet():uet()}),get=()=>"Model server",vet=()=>"模型服务器",bet=()=>"سرور مدل",yet=()=>"خادم النموذج",xet=()=>"Servidor del modelo",wet=()=>"मॉडल सर्वर",QN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vet():t==="fa"?bet():t==="ar"?yet():t==="es"?xet():t==="hi"?wet():get()}),ket=()=>"Local models",Cet=()=>"本地模型",Eet=()=>"مدل‌های محلی",Net=()=>"النماذج المحلية",zet=()=>"Modelos locales",jet=()=>"लोकल मॉडल",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cet():t==="fa"?Eet():t==="ar"?Net():t==="es"?zet():t==="hi"?jet():ket()}),Tet=()=>"API token (optional)",Aet=()=>"API 令牌(可选)",Ret=()=>"توکن API (اختیاری)",Met=()=>"رمز API (اختياري)",Oet=()=>"Token de API (opcional)",Det=()=>"API टोकन (वैकल्पिक)",Let=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aet():t==="fa"?Ret():t==="ar"?Met():t==="es"?Oet():t==="hi"?Det():Tet()}),Iet=()=>"Copy",$et=()=>"复制",Bet=()=>"کپی",Pet=()=>"نسخ",Fet=()=>"Copiar",Het=()=>"कॉपी करें",Vk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$et():t==="fa"?Bet():t==="ar"?Pet():t==="es"?Fet():t==="hi"?Het():Iet()}),qet=()=>"Copy code",Uet=()=>"复制代码",Get=()=>"کپی کد",Vet=()=>"نسخ الشيفرة",Ket=()=>"Copiar código",Wet=()=>"कोड कॉपी करें",Qet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uet():t==="fa"?Get():t==="ar"?Vet():t==="es"?Ket():t==="hi"?Wet():qet()}),Xet=()=>"Download",Yet=()=>"下载",Zet=()=>"بارگیری",Jet=()=>"تنزيل",ett=()=>"Descargar",ttt=()=>"डाउनलोड करें",Ev=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yet():t==="fa"?Zet():t==="ar"?Jet():t==="es"?ett():t==="hi"?ttt():Xet()}),ntt=()=>"This browser can’t preview this media format.",rtt=()=>"此浏览器无法预览该媒体格式。",stt=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",itt=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",att=()=>"Este navegador no puede mostrar este formato multimedia.",ott=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",ctt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rtt():t==="fa"?stt():t==="ar"?itt():t==="es"?att():t==="hi"?ott():ntt()}),ltt=()=>"Choose the model for this chat",utt=()=>"选择此聊天的模型",_tt=()=>"انتخاب مدل این گفت‌وگو",ftt=()=>"اختيار نموذج هذه المحادثة",dtt=()=>"Elige el modelo de este chat",htt=()=>"इस चैट के लिए मॉडल चुनें",ptt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?utt():t==="fa"?_tt():t==="ar"?ftt():t==="es"?dtt():t==="hi"?htt():ltt()}),mtt=()=>"Add Local Model",gtt=()=>"添加本地模型",vtt=()=>"افزودن مدل محلی",btt=()=>"إضافة نموذج محلي",ytt=()=>"Añadir modelo local",xtt=()=>"लोकल मॉडल जोड़ें",wtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gtt():t==="fa"?vtt():t==="ar"?btt():t==="es"?ytt():t==="hi"?xtt():mtt()}),ktt=()=>" · CLI configuration",Stt=()=>" · CLI 配置",Ctt=()=>" · پیکربندی CLI",Ett=()=>" · إعداد واجهة سطر الأوامر",Ntt=()=>" · Configuración de la CLI",ztt=()=>" · CLI कॉन्फ़िगरेशन",GD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Stt():t==="fa"?Ctt():t==="ar"?Ett():t==="es"?Ntt():t==="hi"?ztt():ktt()}),jtt=()=>"· Default",Ttt=()=>"· 默认",Att=()=>"· پیش‌فرض",Rtt=()=>"· الافتراضي",Mtt=()=>"· Predeterminado",Ott=()=>"· डिफ़ॉल्ट",VD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ttt():t==="fa"?Att():t==="ar"?Rtt():t==="es"?Mtt():t==="hi"?Ott():jtt()}),Dtt=()=>"Default model",Ltt=()=>"默认模型",Itt=()=>"مدل پیش‌فرض",$tt=()=>"النموذج الافتراضي",Btt=()=>"Modelo predeterminado",Ptt=()=>"डिफ़ॉल्ट मॉडल",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ltt():t==="fa"?Itt():t==="ar"?$tt():t==="es"?Btt():t==="hi"?Ptt():Dtt()}),Ftt=()=>"Detecting harnesses…",Htt=()=>"正在检测智能体工具…",qtt=()=>"در حال شناسایی ابزارهای عامل…",Utt=()=>"جارٍ اكتشاف أدوات البرمجة…",Gtt=()=>"Detectando agentes…",Vtt=()=>"हार्नेस पहचाने जा रहे हैं…",Ktt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Htt():t==="fa"?qtt():t==="ar"?Utt():t==="es"?Gtt():t==="hi"?Vtt():Ftt()}),Wtt=()=>"Effort",Qtt=()=>"推理强度",Xtt=()=>"میزان استدلال",Ytt=()=>"الجهد",Ztt=()=>"Esfuerzo",Jtt=()=>"प्रयास स्तर",ent=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qtt():t==="fa"?Xtt():t==="ar"?Ytt():t==="es"?Ztt():t==="hi"?Jtt():Wtt()}),tnt=()=>"Fast speed ·",nnt=()=>"快速 ·",rnt=()=>"سرعت بالا ·",snt=()=>"سرعة عالية ·",int=()=>"Modo rápido ·",ant=()=>"तेज़ गति ·",ont=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nnt():t==="fa"?rnt():t==="ar"?snt():t==="es"?int():t==="hi"?ant():tnt()}),cnt=()=>"Mode",lnt=()=>"模式",unt=()=>"حالت",_nt=()=>"الوضع",fnt=()=>"Modo",dnt=()=>"मोड",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lnt():t==="fa"?unt():t==="ar"?_nt():t==="es"?fnt():t==="hi"?dnt():cnt()}),hnt=()=>"Model",pnt=()=>"模型",mnt=()=>"مدل",gnt=()=>"النموذج",vnt=()=>"Modelo",bnt=()=>"मॉडल",_0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pnt():t==="fa"?mnt():t==="ar"?gnt():t==="es"?vnt():t==="hi"?bnt():hnt()}),ynt=e=>`${e==null?void 0:e.count} more — search to find`,xnt=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,wnt=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,knt=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,Snt=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,Cnt=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,Ent=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xnt(e):t==="fa"?wnt(e):t==="ar"?knt(e):t==="es"?Snt(e):t==="hi"?Cnt(e):ynt(e)}),Nnt=()=>"Not available",znt=()=>"不可用",jnt=()=>"در دسترس نیست",Tnt=()=>"غير متاح",Ant=()=>"No disponible",Rnt=()=>"उपलब्ध नहीं",Mnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?znt():t==="fa"?jnt():t==="ar"?Tnt():t==="es"?Ant():t==="hi"?Rnt():Nnt()}),Ont=()=>"Search models…",Dnt=()=>"搜索模型…",Lnt=()=>"جست‌وجوی مدل‌ها…",Int=()=>"البحث في النماذج…",$nt=()=>"Buscar modelos…",Bnt=()=>"मॉडल खोजें…",KD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dnt():t==="fa"?Lnt():t==="ar"?Int():t==="es"?$nt():t==="hi"?Bnt():Ont()}),Pnt=()=>"Sessions keep their harness. Start a new chat to switch.",Fnt=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Hnt=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",qnt=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Unt=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Gnt=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Vnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fnt():t==="fa"?Hnt():t==="ar"?qnt():t==="es"?Unt():t==="hi"?Gnt():Pnt()}),Knt=()=>"Speed",Wnt=()=>"速度",Qnt=()=>"سرعت",Xnt=()=>"السرعة",Ynt=()=>"Velocidad",Znt=()=>"गति",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wnt():t==="fa"?Qnt():t==="ar"?Xnt():t==="es"?Ynt():t==="hi"?Znt():Knt()}),Jnt=()=>"Unavailable",ert=()=>"不可用",trt=()=>"در دسترس نیست",nrt=()=>"غير متاح",rrt=()=>"No disponible",srt=()=>"उपलब्ध नहीं",ro=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ert():t==="fa"?trt():t==="ar"?nrt():t==="es"?rrt():t==="hi"?srt():Jnt()}),irt=e=>`Use “${e==null?void 0:e.id}” as the model ID`,art=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,ort=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,crt=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,lrt=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,urt=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,_rt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?art(e):t==="fa"?ort(e):t==="ar"?crt(e):t==="es"?lrt(e):t==="hi"?urt(e):irt(e)}),frt=()=>"Variant",drt=()=>"变体",hrt=()=>"گونه",prt=()=>"الصنف",mrt=()=>"Variante",grt=()=>"वेरिएंट",vrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?drt():t==="fa"?hrt():t==="ar"?prt():t==="es"?mrt():t==="hi"?grt():frt()}),brt=()=>"Start a new chat",yrt=()=>"开始新聊天",xrt=()=>"شروع گفت‌وگوی جدید",wrt=()=>"بدء محادثة جديدة",krt=()=>"Inicia un chat nuevo",Srt=()=>"नई चैट शुरू करें",Crt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yrt():t==="fa"?xrt():t==="ar"?wrt():t==="es"?krt():t==="hi"?Srt():brt()}),Ert=()=>"Advanced",Nrt=()=>"高级",zrt=()=>"پیشرفته",jrt=()=>"متقدم",Trt=()=>"Avanzado",Art=()=>"उन्नत",WD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nrt():t==="fa"?zrt():t==="ar"?jrt():t==="es"?Trt():t==="hi"?Art():Ert()}),Rrt=()=>"Advanced · Connect GitHub",Mrt=()=>"高级 · 连接 GitHub",Ort=()=>"پیشرفته · اتصال GitHub",Drt=()=>"متقدم · ربط GitHub",Lrt=()=>"Avanzado · Conectar GitHub",Irt=()=>"उन्नत · GitHub कनेक्ट करें",$rt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mrt():t==="fa"?Ort():t==="ar"?Drt():t==="es"?Lrt():t==="hi"?Irt():Rrt()}),Brt=()=>"Advanced · GitHub sync on",Prt=()=>"高级 · GitHub 同步已开启",Frt=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Hrt=()=>"متقدم · مزامنة GitHub مفعّلة",qrt=()=>"Avanzado · Sincronización con GitHub activada",Urt=()=>"उन्नत · GitHub सिंक चालू",Grt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Prt():t==="fa"?Frt():t==="ar"?Hrt():t==="es"?qrt():t==="hi"?Urt():Brt()}),Vrt=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Krt=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Wrt=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Qrt=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",Xrt=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",Yrt=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",Zrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Krt():t==="fa"?Wrt():t==="ar"?Qrt():t==="es"?Xrt():t==="hi"?Yrt():Vrt()}),Jrt=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,est=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,tst=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,nst=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,rst=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,sst=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,ist=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?est(e):t==="fa"?tst(e):t==="ar"?nst(e):t==="es"?rst(e):t==="hi"?sst(e):Jrt(e)}),ast=()=>"Choose an existing project folder",ost=()=>"选择现有项目文件夹",cst=()=>"انتخاب پوشهٔ موجود پروژه",lst=()=>"اختر مجلد مشروع موجود",ust=()=>"Elige una carpeta de proyecto existente",_st=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ost():t==="fa"?cst():t==="ar"?lst():t==="es"?ust():t==="hi"?_st():ast()}),fst=()=>"Choosing…",dst=()=>"正在选择…",hst=()=>"در حال انتخاب…",pst=()=>"جارٍ الاختيار…",mst=()=>"Eligiendo…",gst=()=>"चुना जा रहा है…",vst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dst():t==="fa"?hst():t==="ar"?pst():t==="es"?mst():t==="hi"?gst():fst()}),bst=()=>"Clone destination",yst=()=>"克隆位置",xst=()=>"مقصد کلون",wst=()=>"وجهة الاستنساخ",kst=()=>"Destino del clon",Sst=()=>"क्लोन गंतव्य",Cst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yst():t==="fa"?xst():t==="ar"?wst():t==="es"?kst():t==="hi"?Sst():bst()}),Est=()=>"Clone paper project",Nst=()=>"克隆论文项目",zst=()=>"کلون پروژهٔ مقاله",jst=()=>"استنساخ مشروع الورقة",Tst=()=>"Clonar proyecto del paper",Ast=()=>"पेपर प्रोजेक्ट क्लोन करें",Rst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nst():t==="fa"?zst():t==="ar"?jst():t==="es"?Tst():t==="hi"?Ast():Est()}),Mst=()=>"Create project",Ost=()=>"创建项目",Dst=()=>"ایجاد پروژه",Lst=()=>"إنشاء المشروع",Ist=()=>"Crear proyecto",$st=()=>"प्रोजेक्ट बनाएं",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ost():t==="fa"?Dst():t==="ar"?Lst():t==="es"?Ist():t==="hi"?$st():Mst()}),Bst=()=>"Creating…",Pst=()=>"正在创建…",Fst=()=>"در حال ایجاد…",Hst=()=>"جارٍ الإنشاء…",qst=()=>"Creando…",Ust=()=>"बनाया जा रहा है…",Gst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pst():t==="fa"?Fst():t==="ar"?Hst():t==="es"?qst():t==="hi"?Ust():Bst()}),Vst=()=>"Choose a different destination. This path is a file, not a folder.",Kst=()=>"请选择其他位置。此路径是文件,不是文件夹。",Wst=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Qst=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",Xst=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Yst=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",X2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kst():t==="fa"?Wst():t==="ar"?Qst():t==="es"?Xst():t==="hi"?Yst():Vst()}),Zst=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Jst=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",eit=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",tit=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",nit=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",rit=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jst():t==="fa"?eit():t==="ar"?tit():t==="es"?nit():t==="hi"?rit():Zst()}),sit=()=>"Blank project",iit=()=>"空白项目",ait=()=>"پروژهٔ خالی",oit=()=>"مشروع فارغ",cit=()=>"Proyecto en blanco",lit=()=>"खाली प्रोजेक्ट",uit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iit():t==="fa"?ait():t==="ar"?oit():t==="es"?cit():t==="hi"?lit():sit()}),_it=()=>"Cancel",fit=()=>"取消",dit=()=>"لغو",hit=()=>"إلغاء",pit=()=>"Cancelar",mit=()=>"रद्द करें",git=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fit():t==="fa"?dit():t==="ar"?hit():t==="es"?pit():t==="hi"?mit():_it()}),vit=()=>"Change",bit=()=>"更改",yit=()=>"تغییر",xit=()=>"تغيير",wit=()=>"Cambiar",kit=()=>"बदलें",Sit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bit():t==="fa"?yit():t==="ar"?xit():t==="es"?wit():t==="hi"?kit():vit()}),Cit=()=>"Change selected paper",Eit=()=>"更改所选论文",Nit=()=>"تغییر مقالهٔ انتخاب‌شده",zit=()=>"تغيير الورقة المحددة",jit=()=>"Cambiar el paper seleccionado",Tit=()=>"चयनित पेपर बदलें",Ait=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eit():t==="fa"?Nit():t==="ar"?zit():t==="es"?jit():t==="hi"?Tit():Cit()}),Rit=()=>"Check out a Git branch before using this folder.",Mit=()=>"使用此文件夹前,请先检出一个 Git 分支。",Oit=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",Dit=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Lit=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Iit=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",$it=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mit():t==="fa"?Oit():t==="ar"?Dit():t==="es"?Lit():t==="hi"?Iit():Rit()}),Bit=()=>"Checking project location.",Pit=()=>"正在检查项目位置。",Fit=()=>"در حال بررسی محل پروژه.",Hit=()=>"جارٍ التحقق من موقع المشروع.",qit=()=>"Comprobando la ubicación del proyecto.",Uit=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pit():t==="fa"?Fit():t==="ar"?Hit():t==="es"?qit():t==="hi"?Uit():Bit()}),Git=()=>"Existing folder",Vit=()=>"现有文件夹",Kit=()=>"پوشهٔ موجود",Wit=()=>"مجلد موجود",Qit=()=>"Carpeta existente",Xit=()=>"मौजूदा फ़ोल्डर",Yit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vit():t==="fa"?Kit():t==="ar"?Wit():t==="es"?Qit():t==="hi"?Xit():Git()}),Zit=()=>"Experiment branches will be pushed to the remote GitHub repository.",Jit=()=>"实验分支将推送到远程 GitHub 仓库。",eat=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",tat=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",nat=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",rat=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",sat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jit():t==="fa"?eat():t==="ar"?tat():t==="es"?nat():t==="hi"?rat():Zit()}),iat=()=>"From a paper",aat=()=>"从论文创建",oat=()=>"از یک مقاله",cat=()=>"من ورقة بحثية",lat=()=>"A partir de un paper",uat=()=>"एक पेपर से",_at=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aat():t==="fa"?oat():t==="ar"?cat():t==="es"?lat():t==="hi"?uat():iat()}),fat=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",dat=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",hat=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",pat=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",mat=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",gat=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",vat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dat():t==="fa"?hat():t==="ar"?pat():t==="es"?mat():t==="hi"?gat():fat()}),bat=()=>"my-research",yat=()=>"my-research",xat=()=>"my-research",wat=()=>"my-research",kat=()=>"mi-investigacion",Sat=()=>"मेरा-शोध",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yat():t==="fa"?xat():t==="ar"?wat():t==="es"?kat():t==="hi"?Sat():bat()}),Cat=()=>"No papers found. Try an arXiv ID, URL, or a different title.",Eat=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Nat=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",zat=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",jat=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Tat=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",Aat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eat():t==="fa"?Nat():t==="ar"?zat():t==="es"?jat():t==="hi"?Tat():Cat()}),Rat=()=>"No public repository found on alphaXiv",Mat=()=>"在 alphaXiv 上未找到公开仓库",Oat=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Dat=()=>"لم يُعثر على مستودع عام على alphaXiv",Lat=()=>"No se encontró ningún repositorio público en alphaXiv",Iat=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",$at=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mat():t==="fa"?Oat():t==="ar"?Dat():t==="es"?Lat():t==="hi"?Iat():Rat()}),Bat=()=>"OpenResearch will start a blank project with this paper's PDF.",Pat=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Fat=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Hat=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",qat=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Uat=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Gat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pat():t==="fa"?Fat():t==="ar"?Hat():t==="es"?qat():t==="hi"?Uat():Bat()}),Vat=()=>"Paper",Kat=()=>"论文",Wat=()=>"مقاله",Qat=()=>"ورقة بحثية",Xat=()=>"Paper",Yat=()=>"पेपर",Zat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kat():t==="fa"?Wat():t==="ar"?Qat():t==="es"?Xat():t==="hi"?Yat():Vat()}),Jat=()=>"Project location",eot=()=>"项目位置",tot=()=>"محل پروژه",not=()=>"موقع المشروع",rot=()=>"Ubicación del proyecto",sot=()=>"प्रोजेक्ट स्थान",Y2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eot():t==="fa"?tot():t==="ar"?not():t==="es"?rot():t==="hi"?sot():Jat()}),iot=()=>"Project name",aot=()=>"项目名称",oot=()=>"نام پروژه",cot=()=>"اسم المشروع",lot=()=>"Nombre del proyecto",uot=()=>"प्रोजेक्ट नाम",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aot():t==="fa"?oot():t==="ar"?cot():t==="es"?lot():t==="hi"?uot():iot()}),_ot=()=>"Search for a paper by arXiv ID, URL, or title",fot=()=>"按 arXiv ID、网址或标题搜索论文",dot=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",hot=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",pot=()=>"Busca un paper por ID de arXiv, URL o título",mot=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",got=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fot():t==="fa"?dot():t==="ar"?hot():t==="es"?pot():t==="hi"?mot():_ot()}),vot=()=>"Sync experiments to GitHub",bot=()=>"将实验同步到 GitHub",yot=()=>"همگام‌سازی آزمایش‌ها با GitHub",xot=()=>"مزامنة التجارب مع GitHub",wot=()=>"Sincronizar experimentos con GitHub",kot=()=>"प्रयोग GitHub पर सिंक करें",Sot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bot():t==="fa"?yot():t==="ar"?xot():t==="es"?wot():t==="hi"?kot():vot()}),Cot=()=>"That folder no longer exists. Choose it again.",Eot=()=>"该文件夹已不存在。请重新选择。",Not=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",zot=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",jot=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",Tot=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",Aot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eot():t==="fa"?Not():t==="ar"?zot():t==="es"?jot():t==="hi"?Tot():Cot()}),Rot=()=>"The selected folder contains an invalid Git repository.",Mot=()=>"所选文件夹包含无效的 Git 仓库。",Oot=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",Dot=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Lot=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Iot=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",$ot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mot():t==="fa"?Oot():t==="ar"?Dot():t==="es"?Lot():t==="hi"?Iot():Rot()}),Bot=()=>"The selected path is not a folder.",Pot=()=>"所选路径不是文件夹。",Fot=()=>"مسیر انتخاب‌شده پوشه نیست.",Hot=()=>"المسار المحدد ليس مجلدًا.",qot=()=>"La ruta seleccionada no es una carpeta.",Uot=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Got=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pot():t==="fa"?Fot():t==="ar"?Hot():t==="es"?qot():t==="hi"?Uot():Bot()}),Vot=e=>`Checking ${e==null?void 0:e.repository}.`,Kot=e=>`正在检查 ${e==null?void 0:e.repository}。`,Wot=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Qot=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,Xot=e=>`Comprobando ${e==null?void 0:e.repository}.`,Yot=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Zot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kot(e):t==="fa"?Wot(e):t==="ar"?Qot(e):t==="es"?Xot(e):t==="hi"?Yot(e):Vot(e)}),Jot=e=>`Creates ${e==null?void 0:e.repository}.`,ect=e=>`将创建 ${e==null?void 0:e.repository}。`,tct=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,nct=e=>`ينشئ ${e==null?void 0:e.repository}.`,rct=e=>`Crea ${e==null?void 0:e.repository}.`,sct=e=>`${e==null?void 0:e.repository} बनाता है।`,ict=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ect(e):t==="fa"?tct(e):t==="ar"?nct(e):t==="es"?rct(e):t==="hi"?sct(e):Jot(e)}),act=e=>`Pushes to ${e==null?void 0:e.repository}.`,oct=e=>`将推送到 ${e==null?void 0:e.repository}。`,cct=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,lct=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,uct=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,_ct=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,fct=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oct(e):t==="fa"?cct(e):t==="ar"?lct(e):t==="es"?uct(e):t==="hi"?_ct(e):act(e)}),dct=()=>"Project location is required.",hct=()=>"必须填写项目位置。",pct=()=>"محل پروژه الزامی است.",mct=()=>"موقع المشروع مطلوب.",gct=()=>"La ubicación del proyecto es obligatoria.",vct=()=>"प्रोजेक्ट स्थान ज़रूरी है।",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hct():t==="fa"?pct():t==="ar"?mct():t==="es"?gct():t==="hi"?vct():dct()}),bct=()=>"Choose a different destination. The paper repository needs a new or empty folder.",yct=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",xct=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",wct=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",kct=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",Sct=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yct():t==="fa"?xct():t==="ar"?wct():t==="es"?kct():t==="hi"?Sct():bct()}),Cct=()=>"A linked public code repository is cloned without credentials.",Ect=()=>"关联的公开代码仓库无需凭据即可克隆。",Nct=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",zct=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",jct=()=>"El repositorio de código público vinculado se clona sin credenciales.",Tct=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",Act=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ect():t==="fa"?Nct():t==="ar"?zct():t==="es"?jct():t==="hi"?Tct():Cct()}),Rct=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Mct=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,Oct=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,Dct=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,Lct=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Ict=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,$ct=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mct(e):t==="fa"?Oct(e):t==="ar"?Dct(e):t==="es"?Lct(e):t==="hi"?Ict(e):Rct(e)}),Bct=()=>"Searching alphaXiv…",Pct=()=>"正在搜索 alphaXiv…",Fct=()=>"در حال جست‌وجوی alphaXiv…",Hct=()=>"جارٍ البحث في alphaXiv…",qct=()=>"Buscando en alphaXiv…",Uct=()=>"alphaXiv खोजा जा रहा है…",Gct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pct():t==="fa"?Fct():t==="ar"?Hct():t==="es"?qct():t==="hi"?Uct():Bct()}),Vct=()=>"Use folder",Kct=()=>"使用文件夹",Wct=()=>"استفاده از پوشه",Qct=()=>"استخدام المجلد",Xct=()=>"Usar carpeta",Yct=()=>"फ़ोल्डर इस्तेमाल करें",Zct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kct():t==="fa"?Wct():t==="ar"?Qct():t==="es"?Xct():t==="hi"?Yct():Vct()}),Jct=()=>"Can’t reach OpenResearch. This page is no longer live.",elt=()=>"无法连接 OpenResearch。此页面已不再实时同步。",tlt=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",nlt=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",rlt=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",slt=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",o3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?elt():t==="fa"?tlt():t==="ar"?nlt():t==="es"?rlt():t==="hi"?slt():Jct()}),ilt=()=>"A workspace for your research agents",alt=()=>"面向研究智能体的工作空间",olt=()=>"فضای کاری برای عامل‌های پژوهشی شما",clt=()=>"مساحة عمل لوكلاء بحثك",llt=()=>"Un espacio de trabajo para tus agentes de investigación",ult=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",_lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?alt():t==="fa"?olt():t==="ar"?clt():t==="es"?llt():t==="hi"?ult():ilt()}),flt=()=>"Add papers that represent your research interests, including papers by other authors.",dlt=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",hlt=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",plt=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",mlt=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",glt=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",vlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dlt():t==="fa"?hlt():t==="ar"?plt():t==="es"?mlt():t==="hi"?glt():flt()}),blt=()=>"API key",ylt=()=>"API 密钥",xlt=()=>"کلید API",wlt=()=>"مفتاح API",klt=()=>"Clave de API",Slt=()=>"API की",Kk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ylt():t==="fa"?xlt():t==="ar"?wlt():t==="es"?klt():t==="hi"?Slt():blt()}),Clt=()=>"AI/ML",Elt=()=>"人工智能与机器学习",Nlt=()=>"هوش مصنوعی و یادگیری ماشین",zlt=()=>"الذكاء الاصطناعي/تعلّم الآلة",jlt=()=>"IA/ML",Tlt=()=>"AI/ML",Alt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Elt():t==="fa"?Nlt():t==="ar"?zlt():t==="es"?jlt():t==="hi"?Tlt():Clt()}),Rlt=()=>"Biology",Mlt=()=>"生物学",Olt=()=>"زیست‌شناسی",Dlt=()=>"الأحياء",Llt=()=>"Biología",Ilt=()=>"जीव विज्ञान",$lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mlt():t==="fa"?Olt():t==="ar"?Dlt():t==="es"?Llt():t==="hi"?Ilt():Rlt()}),Blt=()=>"Other",Plt=()=>"其他",Flt=()=>"سایر",Hlt=()=>"أخرى",qlt=()=>"Otra",Ult=()=>"अन्य",Glt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Plt():t==="fa"?Flt():t==="ar"?Hlt():t==="es"?qlt():t==="hi"?Ult():Blt()}),Vlt=()=>"Physics",Klt=()=>"物理学",Wlt=()=>"فیزیک",Qlt=()=>"الفيزياء",Xlt=()=>"Física",Ylt=()=>"भौतिकी",Zlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Klt():t==="fa"?Wlt():t==="ar"?Qlt():t==="es"?Xlt():t==="hi"?Ylt():Vlt()}),Jlt=()=>"Back",eut=()=>"返回",tut=()=>"بازگشت",nut=()=>"رجوع",rut=()=>"Atrás",sut=()=>"वापस",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eut():t==="fa"?tut():t==="ar"?nut():t==="es"?rut():t==="hi"?sut():Jlt()}),iut=()=>"Check failed",aut=()=>"检查失败",out=()=>"بررسی ناموفق بود",cut=()=>"فشل الفحص",lut=()=>"Error en la comprobación",uut=()=>"जाँच विफल",_ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aut():t==="fa"?out():t==="ar"?cut():t==="es"?lut():t==="hi"?uut():iut()}),fut=()=>"Checking",dut=()=>"正在检查",hut=()=>"در حال بررسی",put=()=>"جارٍ الفحص",mut=()=>"Comprobando",gut=()=>"जाँचा जा रहा है",W_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dut():t==="fa"?hut():t==="ar"?put():t==="es"?mut():t==="hi"?gut():fut()}),vut=()=>"Checking Git…",but=()=>"正在检查 Git…",yut=()=>"در حال بررسی Git…",xut=()=>"جارٍ فحص Git…",wut=()=>"Comprobando Git…",kut=()=>"Git जाँचा जा रहा है…",Sut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?but():t==="fa"?yut():t==="ar"?xut():t==="es"?wut():t==="hi"?kut():vut()}),Cut=()=>"Choose a coding agent",Eut=()=>"选择编程智能体",Nut=()=>"یک عامل کدنویسی انتخاب کنید",zut=()=>"اختر وكيل برمجة",jut=()=>"Elige un agente de programación",Tut=()=>"एक कोडिंग एजेंट चुनें",Aut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eut():t==="fa"?Nut():t==="ar"?zut():t==="es"?jut():t==="hi"?Tut():Cut()}),Rut=()=>"Choose a coding agent to continue.",Mut=()=>"选择一个编程智能体以继续。",Out=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Dut=()=>"اختر وكيل برمجة للمتابعة.",Lut=()=>"Elige un agente de programación para continuar.",Iut=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",$ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mut():t==="fa"?Out():t==="ar"?Dut():t==="es"?Lut():t==="hi"?Iut():Rut()}),But=()=>"Choose another coding agent",Put=()=>"选择其他编程智能体",Fut=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Hut=()=>"اختيار وكيل برمجة آخر",qut=()=>"Elegir otro agente de programación",Uut=()=>"दूसरा कोडिंग एजेंट चुनें",Gut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Put():t==="fa"?Fut():t==="ar"?Hut():t==="es"?qut():t==="hi"?Uut():But()}),Vut=()=>"Choose at least one research area to continue.",Kut=()=>"请至少选择一个研究领域后再继续。",Wut=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Qut=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",Xut=()=>"Elige al menos un área de investigación para continuar.",Yut=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Zut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kut():t==="fa"?Wut():t==="ar"?Qut():t==="es"?Xut():t==="hi"?Yut():Vut()}),Jut=()=>"Choose one or more.",e_t=()=>"请选择一项或多项。",t_t=()=>"یک یا چند مورد را انتخاب کنید.",n_t=()=>"اختر واحدًا أو أكثر.",r_t=()=>"Elige una o varias.",s_t=()=>"एक या अधिक चुनें।",i_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e_t():t==="fa"?t_t():t==="ar"?n_t():t==="es"?r_t():t==="hi"?s_t():Jut()}),a_t=()=>"Choose your preferred coding agent",o_t=()=>"请选择首选编程智能体",c_t=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",l_t=()=>"اختر وكيل البرمجة المفضّل لديك",u_t=()=>"Elige tu agente de programación preferido",__t=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",f_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o_t():t==="fa"?c_t():t==="ar"?l_t():t==="es"?u_t():t==="hi"?__t():a_t()}),d_t=()=>"Consolidate your research",h_t=()=>"集中管理研究",p_t=()=>"پژوهش خود را یکپارچه کنید",m_t=()=>"وحّد أبحاثك",g_t=()=>"Consolida tu investigación",v_t=()=>"अपने शोध को एक जगह लाएं",b_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h_t():t==="fa"?p_t():t==="ar"?m_t():t==="es"?g_t():t==="hi"?v_t():d_t()}),y_t=()=>"Continue",x_t=()=>"继续",w_t=()=>"ادامه",k_t=()=>"متابعة",S_t=()=>"Continuar",C_t=()=>"जारी रखें",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x_t():t==="fa"?w_t():t==="ar"?k_t():t==="es"?S_t():t==="hi"?C_t():y_t()}),E_t=()=>"Describe your research area to continue.",N_t=()=>"请描述你的研究领域后再继续。",z_t=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",j_t=()=>"صِف مجالك البحثي للمتابعة.",T_t=()=>"Describe tu área de investigación para continuar.",A_t=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",R_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N_t():t==="fa"?z_t():t==="ar"?j_t():t==="es"?T_t():t==="hi"?A_t():E_t()}),M_t=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",O_t=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",D_t=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",L_t=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",I_t=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",$_t=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",B_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_t():t==="fa"?D_t():t==="ar"?L_t():t==="es"?I_t():t==="hi"?$_t():M_t()}),P_t=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",F_t=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",H_t=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",q_t=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",U_t=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",G_t=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",V_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F_t():t==="fa"?H_t():t==="ar"?q_t():t==="es"?U_t():t==="hi"?G_t():P_t()}),K_t=()=>"Error details",W_t=()=>"错误详情",Q_t=()=>"جزئیات خطا",X_t=()=>"تفاصيل الخطأ",Y_t=()=>"Detalles del error",Z_t=()=>"त्रुटि विवरण",J_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W_t():t==="fa"?Q_t():t==="ar"?X_t():t==="es"?Y_t():t==="hi"?Z_t():K_t()}),eft=()=>"Everything stays local",tft=()=>"一切都保留在本地",nft=()=>"همه‌چیز محلی می‌ماند",rft=()=>"كل شيء يبقى محليًا",sft=()=>"Todo se queda en local",ift=()=>"सब कुछ लोकल ही रहता है",aft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tft():t==="fa"?nft():t==="ar"?rft():t==="es"?sft():t==="hi"?ift():eft()}),oft=()=>"Get started",cft=()=>"开始使用",lft=()=>"شروع",uft=()=>"ابدأ الآن",_ft=()=>"Empezar",fft=()=>"शुरू करें",dft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cft():t==="fa"?lft():t==="ar"?uft():t==="es"?_ft():t==="hi"?fft():oft()}),hft=()=>"Git is required for local experiments. Install Git, then re-check.",pft=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",mft=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",gft=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",vft=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",bft=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pft():t==="fa"?mft():t==="ar"?gft():t==="es"?vft():t==="hi"?bft():hft()}),yft=()=>"Ground your agents",xft=()=>"为智能体提供可靠依据",wft=()=>"عامل‌هایتان را به منابع متصل کنید",kft=()=>"زوّد وكلاءك بأساس بحثي",Sft=()=>"Dale contexto a tus agentes",Cft=()=>"अपने एजेंटों को आधार दें",Eft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xft():t==="fa"?wft():t==="ar"?kft():t==="es"?Sft():t==="hi"?Cft():yft()}),Nft=()=>"Install broken",zft=()=>"安装损坏",jft=()=>"نصب خراب است",Tft=()=>"التثبيت معطوب",Aft=()=>"Instalación dañada",Rft=()=>"इंस्टॉल खराब है",Mft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zft():t==="fa"?jft():t==="ar"?Tft():t==="es"?Aft():t==="hi"?Rft():Nft()}),Oft=()=>"Install Git to continue",Dft=()=>"请安装 Git 后再继续",Lft=()=>"برای ادامه Git را نصب کنید",Ift=()=>"ثبّت Git للمتابعة",$ft=()=>"Instala Git para continuar",Bft=()=>"जारी रखने के लिए Git इंस्टॉल करें",Pft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dft():t==="fa"?Lft():t==="ar"?Ift():t==="es"?$ft():t==="hi"?Bft():Oft()}),Fft=()=>"Loading account details…",Hft=()=>"正在加载账户信息…",qft=()=>"در حال بارگذاری اطلاعات حساب…",Uft=()=>"جارٍ تحميل تفاصيل الحساب…",Gft=()=>"Cargando los datos de la cuenta…",Vft=()=>"खाता विवरण लोड हो रहा है…",Kft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hft():t==="fa"?qft():t==="ar"?Uft():t==="es"?Gft():t==="hi"?Vft():Fft()}),Wft=()=>"Local Git",Qft=()=>"本地 Git",Xft=()=>"Git محلی",Yft=()=>"Git محلي",Zft=()=>"Git local",Jft=()=>"लोकल Git",edt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qft():t==="fa"?Xft():t==="ar"?Yft():t==="es"?Zft():t==="hi"?Jft():Wft()}),tdt=()=>"Install needed",ndt=()=>"需要安装",rdt=()=>"نیاز به نصب",sdt=()=>"التثبيت مطلوب",idt=()=>"No detectado",adt=()=>"इंस्टॉल ज़रूरी है",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ndt():t==="fa"?rdt():t==="ar"?sdt():t==="es"?idt():t==="hi"?adt():tdt()}),odt=()=>"Not found",cdt=()=>"未找到",ldt=()=>"پیدا نشد",udt=()=>"غير موجود",_dt=()=>"No encontrado",fdt=()=>"नहीं मिला",QD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cdt():t==="fa"?ldt():t==="ar"?udt():t==="es"?_dt():t==="hi"?fdt():odt()}),ddt=()=>"Signed out",hdt=()=>"未登录",pdt=()=>"وارد نشده",mdt=()=>"غير مسجل الدخول",gdt=()=>"Sin iniciar sesión",vdt=()=>"साइन आउट",XD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hdt():t==="fa"?pdt():t==="ar"?mdt():t==="es"?gdt():t==="hi"?vdt():ddt()}),bdt=()=>"OpenResearch uses a coding agent already installed on this machine.",ydt=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",xdt=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",wdt=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",kdt=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",Sdt=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",Cdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ydt():t==="fa"?xdt():t==="ar"?wdt():t==="es"?kdt():t==="hi"?Sdt():bdt()}),Edt=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",Ndt=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",zdt=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",jdt=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",Tdt=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",Adt=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",Rdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ndt():t==="fa"?zdt():t==="ar"?jdt():t==="es"?Tdt():t==="hi"?Adt():Edt()}),Mdt=()=>"Other research area",Odt=()=>"其他研究领域",Ddt=()=>"حوزهٔ پژوهشی دیگر",Ldt=()=>"مجال بحثي آخر",Idt=()=>"Otra área de investigación",$dt=()=>"अन्य शोध क्षेत्र",Bdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Odt():t==="fa"?Ddt():t==="ar"?Ldt():t==="es"?Idt():t==="hi"?$dt():Mdt()}),Pdt=()=>"Re-check",Fdt=()=>"重新检查",Hdt=()=>"بررسی دوباره",qdt=()=>"إعادة الفحص",Udt=()=>"Volver a comprobar",Gdt=()=>"फिर से जाँचें",Nv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fdt():t==="fa"?Hdt():t==="ar"?qdt():t==="es"?Udt():t==="hi"?Gdt():Pdt()}),Vdt=()=>"Ready",Kdt=()=>"已就绪",Wdt=()=>"آماده",Qdt=()=>"جاهز",Xdt=()=>"Listo",Ydt=()=>"तैयार",Wk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kdt():t==="fa"?Wdt():t==="ar"?Qdt():t==="es"?Xdt():t==="hi"?Ydt():Vdt()}),Zdt=()=>"Re-check Git before continuing",Jdt=()=>"请重新检查 Git 后再继续",eht=()=>"پیش از ادامه Git را دوباره بررسی کنید",tht=()=>"أعد فحص Git قبل المتابعة",nht=()=>"Vuelve a comprobar Git antes de continuar",rht=()=>"जारी रखने से पहले Git फिर से जाँचें",sht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jdt():t==="fa"?eht():t==="ar"?tht():t==="es"?nht():t==="hi"?rht():Zdt()}),iht=()=>"Representative papers",aht=()=>"代表性论文",oht=()=>"مقاله‌های شاخص",cht=()=>"أوراق تمثّل اهتماماتك البحثية",lht=()=>"Papers representativos",uht=()=>"प्रतिनिधि पेपर",_ht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aht():t==="fa"?oht():t==="ar"?cht():t==="es"?lht():t==="hi"?uht():iht()}),fht=()=>"Research background",dht=()=>"研究背景",hht=()=>"پیشینهٔ پژوهشی",pht=()=>"الخلفية البحثية",mht=()=>"Trayectoria de investigación",ght=()=>"शोध पृष्ठभूमि",vht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dht():t==="fa"?hht():t==="ar"?pht():t==="es"?mht():t==="hi"?ght():fht()}),bht=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",yht=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",xht=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",wht=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",kht=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",Sht=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",Z2=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yht():t==="fa"?xht():t==="ar"?wht():t==="es"?kht():t==="hi"?Sht():bht()}),Cht=()=>"Search alphaXiv by title to link a paper…",Eht=()=>"按标题搜索 alphaXiv 以关联论文…",Nht=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",zht=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",jht=()=>"Busca en alphaXiv por título para vincular un paper…",Tht=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",Aht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eht():t==="fa"?Nht():t==="ar"?zht():t==="es"?jht():t==="hi"?Tht():Cht()}),Rht=()=>"Searching alphaXiv…",Mht=()=>"正在搜索 alphaXiv…",Oht=()=>"در حال جست‌وجوی alphaXiv…",Dht=()=>"جارٍ البحث في alphaXiv…",Lht=()=>"Buscando en alphaXiv…",Iht=()=>"alphaXiv खोजा जा रहा है…",$ht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mht():t==="fa"?Oht():t==="ar"?Dht():t==="es"?Lht():t==="hi"?Iht():Rht()}),Bht=()=>"Selected",Pht=()=>"已选择",Fht=()=>"انتخاب‌شده",Hht=()=>"محدد",qht=()=>"Seleccionado",Uht=()=>"चयनित",Ght=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pht():t==="fa"?Fht():t==="ar"?Hht():t==="es"?qht():t==="hi"?Uht():Bht()}),Vht=()=>"Local model unavailable",Kht=()=>"本地模型不可用",Wht=()=>"مدل محلی در دسترس نیست",Qht=()=>"النموذج المحلي غير متاح",Xht=()=>"Modelo local no disponible",Yht=()=>"लोकल मॉडल उपलब्ध नहीं",YD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kht():t==="fa"?Wht():t==="ar"?Qht():t==="es"?Xht():t==="hi"?Yht():Vht()}),Zht=()=>"Setting things up…",Jht=()=>"正在设置…",ept=()=>"در حال راه‌اندازی…",tpt=()=>"جارٍ التهيئة…",npt=()=>"Preparando todo…",rpt=()=>"सेट अप किया जा रहा है…",spt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jht():t==="fa"?ept():t==="ar"?tpt():t==="es"?npt():t==="hi"?rpt():Zht()}),ipt=()=>"Connect a local model or sign in to a coding agent to continue",apt=()=>"连接本地模型或登录编码智能体以继续",opt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",cpt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",lpt=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",upt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",_pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?apt():t==="fa"?opt():t==="ar"?cpt():t==="es"?lpt():t==="hi"?upt():ipt()}),fpt=()=>"Connect a local model or sign in to an agent to continue.",dpt=()=>"连接本地模型或登录一个智能体以继续。",hpt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",ppt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",mpt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",gpt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpt():t==="fa"?hpt():t==="ar"?ppt():t==="es"?mpt():t==="hi"?gpt():fpt()}),bpt=()=>"Signed in",ypt=()=>"已登录",xpt=()=>"وارد شده",wpt=()=>"تم تسجيل الدخول",kpt=()=>"Sesión iniciada",Spt=()=>"साइन इन",Cpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ypt():t==="fa"?xpt():t==="ar"?wpt():t==="es"?kpt():t==="hi"?Spt():bpt()}),Ept=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",Npt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",zpt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",jpt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",Tpt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",Apt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",Rpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Npt():t==="fa"?zpt():t==="ar"?jpt():t==="es"?Tpt():t==="hi"?Apt():Ept()}),Mpt=()=>"· Step 1 of 2",Opt=()=>"· 第 1 步,共 2 步",Dpt=()=>"· مرحلهٔ ۱ از ۲",Lpt=()=>"· الخطوة 1 من 2",Ipt=()=>"· Paso 1 de 2",$pt=()=>"· चरण 1 / 2",Bpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Opt():t==="fa"?Dpt():t==="ar"?Lpt():t==="es"?Ipt():t==="hi"?$pt():Mpt()}),Ppt=()=>"· Step 2 of 2",Fpt=()=>"· 第 2 步,共 2 步",Hpt=()=>"· مرحلهٔ ۲ از ۲",qpt=()=>"· الخطوة 2 من 2",Upt=()=>"· Paso 2 de 2",Gpt=()=>"· चरण 2 / 2",Vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fpt():t==="fa"?Hpt():t==="ar"?qpt():t==="es"?Upt():t==="hi"?Gpt():Ppt()}),Kpt=()=>"Tell us about your research",Wpt=()=>"介绍一下你的研究",Qpt=()=>"از پژوهش خود بگویید",Xpt=()=>"أخبرنا عن بحثك",Ypt=()=>"Cuéntanos sobre tu investigación",Zpt=()=>"हमें अपने शोध के बारे में बताएं",Jpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wpt():t==="fa"?Qpt():t==="ar"?Xpt():t==="es"?Ypt():t==="hi"?Zpt():Kpt()}),e0t=()=>"Tell us your other research area",t0t=()=>"告诉我们你的其他研究领域",n0t=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",r0t=()=>"أخبرنا عن مجالك البحثي الآخر",s0t=()=>"Cuéntanos cuál es tu otra área de investigación",i0t=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",a0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t0t():t==="fa"?n0t():t==="ar"?r0t():t==="es"?s0t():t==="hi"?i0t():e0t()}),o0t=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",c0t=()=>"在一处跟踪实验、产物、算力、技能和代码。",l0t=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",u0t=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",_0t=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",f0t=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",d0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c0t():t==="fa"?l0t():t==="ar"?u0t():t==="es"?_0t():t==="hi"?f0t():o0t()}),h0t=()=>"Unable to verify",p0t=()=>"无法验证",m0t=()=>"تأیید ممکن نیست",g0t=()=>"تعذّر التحقق",v0t=()=>"No se pudo verificar",b0t=()=>"सत्यापित नहीं हो सका",y0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p0t():t==="fa"?m0t():t==="ar"?g0t():t==="es"?v0t():t==="hi"?b0t():h0t()}),x0t=()=>"Update required",w0t=()=>"需要更新",k0t=()=>"نیازمند به‌روزرسانی",S0t=()=>"مطلوب تحديث",C0t=()=>"Actualización necesaria",E0t=()=>"अपडेट ज़रूरी है",N0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w0t():t==="fa"?k0t():t==="ar"?S0t():t==="es"?C0t():t==="hi"?E0t():x0t()}),z0t=()=>"Waiting for the Git check",j0t=()=>"正在等待 Git 检查",T0t=()=>"در انتظار بررسی Git",A0t=()=>"في انتظار فحص Git",R0t=()=>"Esperando la comprobación de Git",M0t=()=>"Git जाँच का इंतज़ार है",O0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j0t():t==="fa"?T0t():t==="ar"?A0t():t==="es"?R0t():t==="hi"?M0t():z0t()}),D0t=()=>"Waiting for the local tool checks",L0t=()=>"正在等待本地工具检查",I0t=()=>"در انتظار بررسی ابزارهای محلی",$0t=()=>"في انتظار فحوص الأدوات المحلية",B0t=()=>"Esperando las comprobaciones de las herramientas locales",P0t=()=>"लोकल टूल जाँच का इंतज़ार है",F0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L0t():t==="fa"?I0t():t==="ar"?$0t():t==="es"?B0t():t==="hi"?P0t():D0t()}),H0t=()=>"What areas are you interested in?",q0t=()=>"你对哪些领域感兴趣?",U0t=()=>"به چه حوزه‌هایی علاقه دارید؟",G0t=()=>"ما المجالات التي تهتم بها؟",V0t=()=>"¿Qué áreas te interesan?",K0t=()=>"आपकी रुचि किन क्षेत्रों में है?",W0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q0t():t==="fa"?U0t():t==="ar"?G0t():t==="es"?V0t():t==="hi"?K0t():H0t()}),Q0t=()=>"Your code, data, and experiment history stay on your machine.",X0t=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",Y0t=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Z0t=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",J0t=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",emt=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",tmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X0t():t==="fa"?Y0t():t==="ar"?Z0t():t==="es"?J0t():t==="hi"?emt():Q0t()}),nmt=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",rmt=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",smt=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",imt=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",amt=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",omt=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",cmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rmt():t==="fa"?smt():t==="ar"?imt():t==="es"?amt():t==="hi"?omt():nmt()}),lmt=()=>"Add cookie",umt=()=>"添加 cookie",_mt=()=>"افزودن کوکی",fmt=()=>"إضافة ملف تعريف الارتباط",dmt=()=>"Añadir cookie",hmt=()=>"कुकी जोड़ें",pmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?umt():t==="fa"?_mt():t==="ar"?fmt():t==="es"?dmt():t==="hi"?hmt():lmt()}),mmt=()=>"Changed here and on Overleaf — choose which copy to keep",gmt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",vmt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",bmt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",ymt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",xmt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",wmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gmt():t==="fa"?vmt():t==="ar"?bmt():t==="es"?ymt():t==="hi"?xmt():mmt()}),kmt=()=>"Create a token ↗",Smt=()=>"创建令牌 ↗",Cmt=()=>"ساخت توکن ↗",Emt=()=>"إنشاء رمز ↗",Nmt=()=>"Crear un token ↗",zmt=()=>"एक टोकन बनाएं ↗",jmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Smt():t==="fa"?Cmt():t==="ar"?Emt():t==="es"?Nmt():t==="hi"?zmt():kmt()}),Tmt=()=>"Overleaf Git token",Amt=()=>"Overleaf Git 令牌",Rmt=()=>"توکن Git در Overleaf",Mmt=()=>"رمز Git لـ Overleaf",Omt=()=>"Token de Git de Overleaf",Dmt=()=>"Overleaf Git टोकन",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Amt():t==="fa"?Rmt():t==="ar"?Mmt():t==="es"?Omt():t==="hi"?Dmt():Tmt()}),Lmt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Imt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",$mt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",Bmt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",Pmt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",Fmt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",Hmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Imt():t==="fa"?$mt():t==="ar"?Bmt():t==="es"?Pmt():t==="hi"?Fmt():Lmt()}),qmt=()=>"Import from browser",Umt=()=>"从浏览器导入",Gmt=()=>"وارد کردن از مرورگر",Vmt=()=>"الاستيراد من المتصفح",Kmt=()=>"Importar desde el navegador",Wmt=()=>"ब्राउज़र से इंपोर्ट करें",Qmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Umt():t==="fa"?Gmt():t==="ar"?Vmt():t==="es"?Kmt():t==="hi"?Wmt():qmt()}),Xmt=()=>"In step with Overleaf",Ymt=()=>"已与 Overleaf 同步",Zmt=()=>"با Overleaf همگام است",Jmt=()=>"متزامن مع Overleaf",egt=()=>"Sincronizado con Overleaf",tgt=()=>"Overleaf के साथ मेल में",ZD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ymt():t==="fa"?Zmt():t==="ar"?Jmt():t==="es"?egt():t==="hi"?tgt():Xmt()}),ngt=()=>"The last sync did not finish.",rgt=()=>"上次同步未完成。",sgt=()=>"آخرین همگام‌سازی کامل نشد.",igt=()=>"لم تكتمل آخر مزامنة.",agt=()=>"La última sincronización no terminó.",ogt=()=>"पिछला सिंक पूरा नहीं हुआ।",cgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rgt():t==="fa"?sgt():t==="ar"?igt():t==="es"?agt():t==="hi"?ogt():ngt()}),lgt=()=>"Link and sync",ugt=()=>"关联并同步",_gt=()=>"پیوند و همگام‌سازی",fgt=()=>"الربط والمزامنة",dgt=()=>"Vincular y sincronizar",hgt=()=>"लिंक करें और सिंक करें",pgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ugt():t==="fa"?_gt():t==="ar"?fgt():t==="es"?dgt():t==="hi"?hgt():lgt()}),mgt=()=>"Connecting to Overleaf…",ggt=()=>"正在连接 Overleaf…",vgt=()=>"در حال اتصال به Overleaf…",bgt=()=>"جارٍ الاتصال بـ Overleaf…",ygt=()=>"Conectando con Overleaf…",xgt=()=>"Overleaf से कनेक्ट हो रहा है…",wgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ggt():t==="fa"?vgt():t==="ar"?bgt():t==="es"?ygt():t==="hi"?xgt():mgt()}),kgt=()=>"Edits are live on Overleaf",Sgt=()=>"编辑已在 Overleaf 实时同步",Cgt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",Egt=()=>"تظهر التعديلات فورًا على Overleaf",Ngt=()=>"Los cambios se sincronizan en directo con Overleaf",zgt=()=>"बदलाव Overleaf पर लाइव हैं",jgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sgt():t==="fa"?Cgt():t==="ar"?Egt():t==="es"?Ngt():t==="hi"?zgt():kgt()}),Tgt=()=>"Retry",Agt=()=>"重试",Rgt=()=>"تلاش دوباره",Mgt=()=>"إعادة المحاولة",Ogt=()=>"Reintentar",Dgt=()=>"फिर से कोशिश करें",Lgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Agt():t==="fa"?Rgt():t==="ar"?Mgt():t==="es"?Ogt():t==="hi"?Dgt():Tgt()}),Igt=()=>"Live sync stopped.",$gt=()=>"实时同步已停止。",Bgt=()=>"همگام‌سازی زنده متوقف شد.",Pgt=()=>"توقفت المزامنة المباشرة.",Fgt=()=>"Sincronización en directo detenida.",Hgt=()=>"लाइव सिंक रुक गया।",qgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$gt():t==="fa"?Bgt():t==="ar"?Pgt():t==="es"?Fgt():t==="hi"?Hgt():Igt()}),Ugt=()=>"Live sync starts once the paper is in step with Overleaf.",Ggt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Vgt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Kgt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Wgt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Qgt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",Xgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ggt():t==="fa"?Vgt():t==="ar"?Kgt():t==="es"?Wgt():t==="hi"?Qgt():Ugt()}),Ygt=()=>"My projects ↗",Zgt=()=>"我的项目 ↗",Jgt=()=>"پروژه‌های من ↗",e1t=()=>"مشاريعي ↗",t1t=()=>"Mis proyectos ↗",n1t=()=>"मेरे प्रोजेक्ट ↗",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zgt():t==="fa"?Jgt():t==="ar"?e1t():t==="es"?t1t():t==="hi"?n1t():Ygt()}),r1t=()=>"Nothing could be synced.",s1t=()=>"没有内容可以同步。",i1t=()=>"هیچ موردی قابل همگام‌سازی نبود.",a1t=()=>"تعذّرت مزامنة أي شيء.",o1t=()=>"No se pudo sincronizar nada.",c1t=()=>"कुछ भी सिंक नहीं हो सका।",l1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s1t():t==="fa"?i1t():t==="ar"?a1t():t==="es"?o1t():t==="hi"?c1t():r1t()}),u1t=()=>"Open Overleaf ↗",_1t=()=>"打开 Overleaf ↗",f1t=()=>"باز کردن Overleaf ↗",d1t=()=>"فتح Overleaf ↗",h1t=()=>"Abrir Overleaf ↗",p1t=()=>"Overleaf खोलें ↗",m1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_1t():t==="fa"?f1t():t==="ar"?d1t():t==="es"?h1t():t==="hi"?p1t():u1t()}),g1t=()=>"Cancel",v1t=()=>"取消",b1t=()=>"لغو",y1t=()=>"إلغاء",x1t=()=>"Cancelar",w1t=()=>"रद्द करें",JD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v1t():t==="fa"?b1t():t==="ar"?y1t():t==="es"?x1t():t==="hi"?w1t():g1t()}),k1t=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",S1t=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",C1t=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",E1t=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",N1t=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",z1t=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",j1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S1t():t==="fa"?C1t():t==="ar"?E1t():t==="es"?N1t():t==="hi"?z1t():k1t()}),T1t=()=>"Keep this copy",A1t=()=>"保留此副本",R1t=()=>"نگه داشتن این نسخه",M1t=()=>"الاحتفاظ بهذه النسخة",O1t=()=>"Conservar esta copia",D1t=()=>"यह कॉपी रखें",L1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A1t():t==="fa"?R1t():t==="ar"?M1t():t==="es"?O1t():t==="hi"?D1t():T1t()}),I1t=()=>"Open in Overleaf",$1t=()=>"在 Overleaf 中打开",B1t=()=>"باز کردن در Overleaf",P1t=()=>"فتح في Overleaf",F1t=()=>"Abrir en Overleaf",H1t=()=>"Overleaf में खोलें",q1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$1t():t==="fa"?B1t():t==="ar"?P1t():t==="es"?F1t():t==="hi"?H1t():I1t()}),U1t=()=>"Replace the Overleaf token",G1t=()=>"替换 Overleaf 令牌",V1t=()=>"جایگزینی توکن Overleaf",K1t=()=>"استبدال رمز Overleaf",W1t=()=>"Reemplazar el token de Overleaf",Q1t=()=>"Overleaf टोकन बदलें",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G1t():t==="fa"?V1t():t==="ar"?K1t():t==="es"?W1t():t==="hi"?Q1t():U1t()}),X1t=()=>"Sync files",Y1t=()=>"同步文件",Z1t=()=>"همگام‌سازی فایل‌ها",J1t=()=>"مزامنة الملفات",evt=()=>"Sincronizar archivos",tvt=()=>"फ़ाइलें सिंक करें",nvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y1t():t==="fa"?Z1t():t==="ar"?J1t():t==="es"?evt():t==="hi"?tvt():X1t()}),rvt=()=>"Unlink",svt=()=>"取消关联",ivt=()=>"قطع پیوند",avt=()=>"إلغاء الربط",ovt=()=>"Desvincular",cvt=()=>"लिंक हटाएं",lvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?svt():t==="fa"?ivt():t==="ar"?avt():t==="es"?ovt():t==="hi"?cvt():rvt()}),uvt=()=>"Upload a copy as a new project ↗",_vt=()=>"上传副本作为新项目 ↗",fvt=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",dvt=()=>"رفع نسخة كمشروع جديد ↗",hvt=()=>"Subir una copia como proyecto nuevo ↗",pvt=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",eL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_vt():t==="fa"?fvt():t==="ar"?dvt():t==="es"?hvt():t==="hi"?pvt():uvt()}),mvt=()=>"Use Overleaf's",gvt=()=>"使用 Overleaf 的副本",vvt=()=>"استفاده از نسخهٔ Overleaf",bvt=()=>"استخدام نسخة Overleaf",yvt=()=>"Usar la de Overleaf",xvt=()=>"Overleaf का इस्तेमाल करें",wvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gvt():t==="fa"?vvt():t==="ar"?bvt():t==="es"?yvt():t==="hi"?xvt():mvt()}),kvt=()=>"This paper stays in step with Overleaf.",Svt=()=>"此论文将与 Overleaf 保持同步。",Cvt=()=>"این مقاله با Overleaf همگام می‌ماند.",Evt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",Nvt=()=>"Este paper se mantiene sincronizado con Overleaf.",zvt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",jvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Svt():t==="fa"?Cvt():t==="ar"?Evt():t==="es"?Nvt():t==="hi"?zvt():kvt()}),Tvt=()=>"Paste it instead",Avt=()=>"改为粘贴",Rvt=()=>"به‌جایش بچسبانید",Mvt=()=>"الصقه بدلًا من ذلك",Ovt=()=>"Pegarla manualmente",Dvt=()=>"इसके बजाय पेस्ट करें",Lvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Avt():t==="fa"?Rvt():t==="ar"?Mvt():t==="es"?Ovt():t==="hi"?Dvt():Tvt()}),Ivt=e=>`Pulled ${e==null?void 0:e.paths}.`,$vt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Bvt=e=>`${e==null?void 0:e.paths} دریافت شد.`,Pvt=e=>`سُحب ${e==null?void 0:e.paths}.`,Fvt=e=>`Descargado: ${e==null?void 0:e.paths}.`,Hvt=e=>`${e==null?void 0:e.paths} पुल किया।`,qvt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$vt(e):t==="fa"?Bvt(e):t==="ar"?Pvt(e):t==="es"?Fvt(e):t==="hi"?Hvt(e):Ivt(e)}),Uvt=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,Gvt=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,Vvt=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,Kvt=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,Wvt=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,Qvt=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,Xvt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gvt(e):t==="fa"?Vvt(e):t==="ar"?Kvt(e):t==="es"?Wvt(e):t==="hi"?Qvt(e):Uvt(e)}),Yvt=e=>`Pushed ${e==null?void 0:e.paths}.`,Zvt=e=>`已推送 ${e==null?void 0:e.paths}。`,Jvt=e=>`${e==null?void 0:e.paths} ارسال شد.`,ebt=e=>`رُفع ${e==null?void 0:e.paths}.`,tbt=e=>`Subido: ${e==null?void 0:e.paths}.`,nbt=e=>`${e==null?void 0:e.paths} पुश किया।`,rbt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zvt(e):t==="fa"?Jvt(e):t==="ar"?ebt(e):t==="es"?tbt(e):t==="hi"?nbt(e):Yvt(e)}),sbt=()=>"Add a fresh Overleaf session cookie to start following again.",ibt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",abt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",obt=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",cbt=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",lbt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",ubt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ibt():t==="fa"?abt():t==="ar"?obt():t==="es"?cbt():t==="hi"?lbt():sbt()}),_bt=()=>"Save the file first",fbt=()=>"请先保存文件",dbt=()=>"ابتدا فایل را ذخیره کنید",hbt=()=>"احفظ الملف أولًا",pbt=()=>"Guarda el archivo primero",mbt=()=>"पहले फ़ाइल सेव करें",gbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fbt():t==="fa"?dbt():t==="ar"?hbt():t==="es"?pbt():t==="hi"?mbt():_bt()}),vbt=()=>"Save this file to sync it with Overleaf",bbt=()=>"保存此文件以与 Overleaf 同步",ybt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",xbt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",wbt=()=>"Guarda este archivo para sincronizarlo con Overleaf",kbt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",tL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bbt():t==="fa"?ybt():t==="ar"?xbt():t==="es"?wbt():t==="hi"?kbt():vbt()}),Sbt=()=>"Save token",Cbt=()=>"保存令牌",Ebt=()=>"ذخیرهٔ توکن",Nbt=()=>"حفظ الرمز",zbt=()=>"Guardar token",jbt=()=>"टोकन सेव करें",Tbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cbt():t==="fa"?Ebt():t==="ar"?Nbt():t==="es"?zbt():t==="hi"?jbt():Sbt()}),Abt=()=>"Send this paper to Overleaf",Rbt=()=>"将此论文发送到 Overleaf",Mbt=()=>"ارسال مقاله به Overleaf",Obt=()=>"أرسل هذه الورقة إلى Overleaf",Dbt=()=>"Enviar este paper a Overleaf",Lbt=()=>"यह पेपर Overleaf को भेजें",Ibt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rbt():t==="fa"?Mbt():t==="ar"?Obt():t==="es"?Dbt():t==="hi"?Lbt():Abt()}),$bt=()=>"Overleaf session cookie",Bbt=()=>"Overleaf 会话 cookie",Pbt=()=>"کوکی نشست Overleaf",Fbt=()=>"ملف تعريف ارتباط جلسة Overleaf",Hbt=()=>"Cookie de sesión de Overleaf",qbt=()=>"Overleaf सेशन कुकी",c3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bbt():t==="fa"?Pbt():t==="ar"?Fbt():t==="es"?Hbt():t==="hi"?qbt():$bt()}),Ubt=()=>"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.",Gbt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Vbt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Kbt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Wbt=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",Qbt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",Xbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbt():t==="fa"?Vbt():t==="ar"?Kbt():t==="es"?Wbt():t==="hi"?Qbt():Ubt()}),Ybt=()=>"Overleaf sync failed",Zbt=()=>"Overleaf 同步失败",Jbt=()=>"همگام‌سازی با Overleaf ناموفق بود",eyt=()=>"فشلت مزامنة Overleaf",tyt=()=>"Error al sincronizar con Overleaf",nyt=()=>"Overleaf सिंक विफल",l3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zbt():t==="fa"?Jbt():t==="ar"?eyt():t==="es"?tyt():t==="hi"?nyt():Ybt()}),ryt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",syt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",iyt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",ayt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",oyt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",cyt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",lyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?syt():t==="fa"?iyt():t==="ar"?ayt():t==="es"?oyt():t==="hi"?cyt():ryt()}),uyt=()=>"Syncing with Overleaf…",_yt=()=>"正在与 Overleaf 同步…",fyt=()=>"در حال همگام‌سازی با Overleaf…",dyt=()=>"جارٍ المزامنة مع Overleaf…",hyt=()=>"Sincronizando con Overleaf…",pyt=()=>"Overleaf के साथ सिंक हो रहा है…",nL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_yt():t==="fa"?fyt():t==="ar"?dyt():t==="es"?hyt():t==="hi"?pyt():uyt()}),myt=()=>"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.",gyt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",vyt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",byt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",yyt=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",xyt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",wyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gyt():t==="fa"?vyt():t==="ar"?byt():t==="es"?yyt():t==="hi"?xyt():myt()}),kyt=()=>"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.",Syt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",Cyt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",Eyt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",Nyt=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",zyt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",jyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Syt():t==="fa"?Cyt():t==="ar"?Eyt():t==="es"?Nyt():t==="hi"?zyt():kyt()}),Tyt=()=>"Toggle Plan mode for this chat",Ayt=()=>"切换此聊天的计划模式",Ryt=()=>"تغییر حالت طرح این گفت‌وگو",Myt=()=>"تبديل وضع التخطيط لهذه المحادثة",Oyt=()=>"Activa o desactiva el modo Plan en este chat",Dyt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",Lyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ayt():t==="fa"?Ryt():t==="ar"?Myt():t==="es"?Oyt():t==="hi"?Dyt():Tyt()}),Iyt=()=>"Accept and auto mode",$yt=()=>"接受并使用自动模式",Byt=()=>"پذیرش و حالت خودکار",Pyt=()=>"قبول وتفعيل الوضع التلقائي",Fyt=()=>"Aceptar en modo automático",Hyt=()=>"स्वीकार करें और ऑटो मोड",qyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$yt():t==="fa"?Byt():t==="ar"?Pyt():t==="es"?Fyt():t==="hi"?Hyt():Iyt()}),Uyt=()=>"Accept and bypass all",Gyt=()=>"接受并跳过所有审批",Vyt=()=>"پذیرش و عبور از همهٔ تأییدها",Kyt=()=>"القبول وتجاوز الكل",Wyt=()=>"Aceptar y omitir permisos",Qyt=()=>"स्वीकार करें और सब बायपास करें",Xyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gyt():t==="fa"?Vyt():t==="ar"?Kyt():t==="es"?Wyt():t==="hi"?Qyt():Uyt()}),Yyt=()=>"Accept plan",Zyt=()=>"接受计划",Jyt=()=>"پذیرش طرح",ext=()=>"قبول الخطة",txt=()=>"Aceptar plan",nxt=()=>"प्लान स्वीकार करें",rxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zyt():t==="fa"?Jyt():t==="ar"?ext():t==="es"?txt():t==="hi"?nxt():Yyt()}),sxt=e=>`${e==null?void 0:e.agent} proposed a plan`,ixt=e=>`${e==null?void 0:e.agent} 提出了一个计划`,axt=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,oxt=e=>`${e==null?void 0:e.agent} اقترح خطة`,cxt=e=>`${e==null?void 0:e.agent} propuso un plan`,lxt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,uxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ixt(e):t==="fa"?axt(e):t==="ar"?oxt(e):t==="es"?cxt(e):t==="hi"?lxt(e):sxt(e)}),_xt=e=>`${e==null?void 0:e.agent} is ready to proceed`,fxt=e=>`${e==null?void 0:e.agent} 已准备好继续`,dxt=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,hxt=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,pxt=e=>`${e==null?void 0:e.agent} está listo para continuar`,mxt=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,gxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fxt(e):t==="fa"?dxt(e):t==="ar"?hxt(e):t==="es"?pxt(e):t==="hi"?mxt(e):_xt(e)}),vxt=()=>"Back",bxt=()=>"返回",yxt=()=>"بازگشت",xxt=()=>"رجوع",wxt=()=>"Atrás",kxt=()=>"वापस",rL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bxt():t==="fa"?yxt():t==="ar"?xxt():t==="es"?wxt():t==="hi"?kxt():vxt()}),Sxt=()=>"More approval options",Cxt=()=>"更多批准选项",Ext=()=>"گزینه‌های تأیید بیشتر",Nxt=()=>"خيارات موافقة إضافية",zxt=()=>"Más opciones de aprobación",jxt=()=>"और स्वीकृति विकल्प",Txt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cxt():t==="fa"?Ext():t==="ar"?Nxt():t==="es"?zxt():t==="hi"?jxt():Sxt()}),Axt=()=>"Open plan",Rxt=()=>"打开计划",Mxt=()=>"باز کردن طرح",Oxt=()=>"فتح الخطة",Dxt=()=>"Abrir plan",Lxt=()=>"प्लान खोलें",Ixt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rxt():t==="fa"?Mxt():t==="ar"?Oxt():t==="es"?Dxt():t==="hi"?Lxt():Axt()}),$xt=()=>"Reject",Bxt=()=>"拒绝",Pxt=()=>"رد کردن",Fxt=()=>"رفض",Hxt=()=>"Rechazar",qxt=()=>"अस्वीकार करें",Uxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bxt():t==="fa"?Pxt():t==="ar"?Fxt():t==="es"?Hxt():t==="hi"?qxt():$xt()}),Gxt=()=>"Revise",Vxt=()=>"修改",Kxt=()=>"بازنگری",Wxt=()=>"طلب تعديل",Qxt=()=>"Pedir cambios",Xxt=()=>"संशोधित करें",Yxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vxt():t==="fa"?Kxt():t==="ar"?Wxt():t==="es"?Qxt():t==="hi"?Xxt():Gxt()}),Zxt=()=>"Revise…",Jxt=()=>"修改…",e2t=()=>"بازنگری…",t2t=()=>"طلب تعديل…",n2t=()=>"Pedir cambios…",r2t=()=>"संशोधित करें…",s2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jxt():t==="fa"?e2t():t==="ar"?t2t():t==="es"?n2t():t==="hi"?r2t():Zxt()}),i2t=()=>"What should change? (optional)",a2t=()=>"需要更改什么?(可选)",o2t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",c2t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",l2t=()=>"¿Qué debería cambiar? (opcional)",u2t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",_2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a2t():t==="fa"?o2t():t==="ar"?c2t():t==="es"?l2t():t==="hi"?u2t():i2t()}),f2t=e=>`${e==null?void 0:e.count} active`,d2t=e=>`${e==null?void 0:e.count} 个活跃`,h2t=e=>`${e==null?void 0:e.count} فعال`,p2t=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,m2t=e=>`${e==null?void 0:e.count} activos`,g2t=e=>`${e==null?void 0:e.count} सक्रिय`,v2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?d2t(e):t==="fa"?h2t(e):t==="ar"?p2t(e):t==="es"?m2t(e):t==="hi"?g2t(e):f2t(e)}),b2t=e=>`${e==null?void 0:e.count} total agents`,y2t=e=>`共 ${e==null?void 0:e.count} 个智能体`,x2t=e=>`در مجموع ${e==null?void 0:e.count} عامل`,w2t=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,k2t=e=>`${e==null?void 0:e.count} agentes en total`,S2t=e=>`${e==null?void 0:e.count} कुल एजेंट`,C2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?y2t(e):t==="fa"?x2t(e):t==="ar"?w2t(e):t==="es"?k2t(e):t==="hi"?S2t(e):b2t(e)}),E2t=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,N2t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,z2t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,j2t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,T2t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,A2t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,R2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N2t(e):t==="fa"?z2t(e):t==="ar"?j2t(e):t==="es"?T2t(e):t==="hi"?A2t(e):E2t(e)}),M2t=()=>"Agents",O2t=()=>"智能体",D2t=()=>"عامل‌ها",L2t=()=>"الوكلاء",I2t=()=>"Agentes",$2t=()=>"एजेंट",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O2t():t==="fa"?D2t():t==="ar"?L2t():t==="es"?I2t():t==="hi"?$2t():M2t()}),B2t=()=>"arXiv paper ID:",P2t=()=>"arXiv 论文 ID:",F2t=()=>"شناسهٔ مقالهٔ arXiv:",H2t=()=>"معرّف ورقة arXiv:",q2t=()=>"ID del paper en arXiv:",U2t=()=>"arXiv पेपर ID:",G2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P2t():t==="fa"?F2t():t==="ar"?H2t():t==="es"?q2t():t==="hi"?U2t():B2t()}),V2t=()=>"Cancel",K2t=()=>"取消",W2t=()=>"لغو",Q2t=()=>"إلغاء",X2t=()=>"Cancelar",Y2t=()=>"रद्द करें",Z2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K2t():t==="fa"?W2t():t==="ar"?Q2t():t==="es"?X2t():t==="hi"?Y2t():V2t()}),J2t=()=>"Created",ewt=()=>"创建时间",twt=()=>"ایجادشده",nwt=()=>"أُنشئ",rwt=()=>"Creado",swt=()=>"बनाया गया",iwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ewt():t==="fa"?twt():t==="ar"?nwt():t==="es"?rwt():t==="hi"?swt():J2t()}),awt=()=>"Delete project?",owt=()=>"删除项目?",cwt=()=>"پروژه حذف شود؟",lwt=()=>"حذف المشروع؟",uwt=()=>"¿Eliminar el proyecto?",_wt=()=>"प्रोजेक्ट हटाएं?",fwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?owt():t==="fa"?cwt():t==="ar"?lwt():t==="es"?uwt():t==="hi"?_wt():awt()}),dwt=()=>"Delete project",hwt=()=>"删除项目",pwt=()=>"حذف پروژه",mwt=()=>"حذف المشروع",gwt=()=>"Eliminar proyecto",vwt=()=>"प्रोजेक्ट हटाएं",bwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hwt():t==="fa"?pwt():t==="ar"?mwt():t==="es"?gwt():t==="hi"?vwt():dwt()}),ywt=()=>"Deleting…",xwt=()=>"正在删除…",wwt=()=>"در حال حذف…",kwt=()=>"جارٍ الحذف…",Swt=()=>"Eliminando…",Cwt=()=>"हटाया जा रहा है…",Ewt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xwt():t==="fa"?wwt():t==="ar"?kwt():t==="es"?Swt():t==="hi"?Cwt():ywt()}),Nwt=()=>"Experiments",zwt=()=>"实验",jwt=()=>"آزمایش‌ها",Twt=()=>"التجارب",Awt=()=>"Experimentos",Rwt=()=>"प्रयोग",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwt():t==="fa"?jwt():t==="ar"?Twt():t==="es"?Awt():t==="hi"?Rwt():Nwt()}),Mwt=()=>"The local folder and linked GitHub repository are kept.",Owt=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",Dwt=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",Lwt=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",Iwt=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",$wt=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",Bwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Owt():t==="fa"?Dwt():t==="ar"?Lwt():t==="es"?Iwt():t==="hi"?$wt():Mwt()}),Pwt=()=>"The local folder is kept.",Fwt=()=>"本地文件夹会保留。",Hwt=()=>"پوشهٔ محلی نگه داشته می‌شود.",qwt=()=>"يُحتفظ بالمجلد المحلي.",Uwt=()=>"La carpeta local se conserva.",Gwt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",Vwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fwt():t==="fa"?Hwt():t==="ar"?qwt():t==="es"?Uwt():t==="hi"?Gwt():Pwt()}),Kwt=()=>"New project",Wwt=()=>"新建项目",Qwt=()=>"پروژهٔ جدید",Xwt=()=>"مشروع جديد",Ywt=()=>"Nuevo proyecto",Zwt=()=>"नया प्रोजेक्ट",sL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wwt():t==="fa"?Qwt():t==="ar"?Xwt():t==="es"?Ywt():t==="hi"?Zwt():Kwt()}),Jwt=()=>"No projects yet — create one to get started.",e4t=()=>"尚无项目——新建一个即可开始。",t4t=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",n4t=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",r4t=()=>"Aún no hay proyectos — crea uno para empezar.",s4t=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",i4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e4t():t==="fa"?t4t():t==="ar"?n4t():t==="es"?r4t():t==="hi"?s4t():Jwt()}),a4t=()=>"Project",o4t=()=>"项目",c4t=()=>"پروژه",l4t=()=>"المشروع",u4t=()=>"Proyecto",_4t=()=>"प्रोजेक्ट",f4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o4t():t==="fa"?c4t():t==="ar"?l4t():t==="es"?u4t():t==="hi"?_4t():a4t()}),d4t=()=>"Projects",h4t=()=>"项目",p4t=()=>"پروژه‌ها",m4t=()=>"المشاريع",g4t=()=>"Proyectos",v4t=()=>"प्रोजेक्ट",b4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h4t():t==="fa"?p4t():t==="ar"?m4t():t==="es"?g4t():t==="hi"?v4t():d4t()}),y4t=()=>"Repository",x4t=()=>"仓库",w4t=()=>"مخزن",k4t=()=>"المستودع",S4t=()=>"Repositorio",C4t=()=>"रिपॉज़िटरी",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4t():t==="fa"?w4t():t==="ar"?k4t():t==="es"?S4t():t==="hi"?C4t():y4t()}),E4t=()=>"Idle",N4t=()=>"空闲",z4t=()=>"بیکار",j4t=()=>"خامل",T4t=()=>"Inactivo",A4t=()=>"निष्क्रिय",R4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N4t():t==="fa"?z4t():t==="ar"?j4t():t==="es"?T4t():t==="hi"?A4t():E4t()}),M4t=()=>"Local",O4t=()=>"本地",D4t=()=>"محلی",L4t=()=>"محلي",I4t=()=>"Local",$4t=()=>"लोकल",zv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O4t():t==="fa"?D4t():t==="ar"?L4t():t==="es"?I4t():t==="hi"?$4t():M4t()}),B4t=()=>"1 total agent",P4t=()=>"共 1 个智能体",F4t=()=>"در مجموع ۱ عامل",H4t=()=>"وكيل واحد إجمالًا",q4t=()=>"1 agente en total",U4t=()=>"1 कुल एजेंट",G4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P4t():t==="fa"?F4t():t==="ar"?H4t():t==="es"?q4t():t==="hi"?U4t():B4t()}),V4t=e=>`${e==null?void 0:e.count} running`,K4t=e=>`${e==null?void 0:e.count} 个运行中`,W4t=e=>`${e==null?void 0:e.count} در حال اجرا`,Q4t=e=>`${e==null?void 0:e.count} قيد التشغيل`,X4t=e=>`${e==null?void 0:e.count} en ejecución`,Y4t=e=>`${e==null?void 0:e.count} चल रहे`,Z4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K4t(e):t==="fa"?W4t(e):t==="ar"?Q4t(e):t==="es"?X4t(e):t==="hi"?Y4t(e):V4t(e)}),J4t=e=>`${e==null?void 0:e.count} total`,e3t=e=>`共 ${e==null?void 0:e.count} 个`,t3t=e=>`در مجموع ${e==null?void 0:e.count}`,n3t=e=>`${e==null?void 0:e.count} إجمالًا`,r3t=e=>`${e==null?void 0:e.count} en total`,s3t=e=>`${e==null?void 0:e.count} कुल`,vz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e3t(e):t==="fa"?t3t(e):t==="ar"?n3t(e):t==="es"?r3t(e):t==="hi"?s3t(e):J4t(e)}),i3t=()=>"Installing the compatible binary. This may take a few minutes.",a3t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",o3t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",c3t=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",l3t=()=>"Instalando el binario compatible. Puede tardar unos minutos.",u3t=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",_3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a3t():t==="fa"?o3t():t==="ar"?c3t():t==="es"?l3t():t==="hi"?u3t():i3t()}),f3t=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,d3t=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,h3t=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,p3t=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,m3t=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,g3t=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,v3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?d3t(e):t==="fa"?h3t(e):t==="ar"?p3t(e):t==="es"?m3t(e):t==="hi"?g3t(e):f3t(e)}),b3t=()=>"Check again",y3t=()=>"再次检查",x3t=()=>"بررسی دوباره",w3t=()=>"تحقق مجددًا",k3t=()=>"Volver a comprobar",S3t=()=>"फिर से जाँचें",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y3t():t==="fa"?x3t():t==="ar"?w3t():t==="es"?k3t():t==="hi"?S3t():b3t()}),C3t=()=>"Closing…",E3t=()=>"正在关闭…",N3t=()=>"در حال بستن…",z3t=()=>"جارٍ الإغلاق…",j3t=()=>"Cerrando…",T3t=()=>"बंद हो रहा है…",A3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E3t():t==="fa"?N3t():t==="ar"?z3t():t==="es"?j3t():t==="hi"?T3t():C3t()}),R3t=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,M3t=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,O3t=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,D3t=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,L3t=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,I3t=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,$3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M3t(e):t==="fa"?O3t(e):t==="ar"?D3t(e):t==="es"?L3t(e):t==="hi"?I3t(e):R3t(e)}),B3t=()=>"Preparing your remote workspace…",P3t=()=>"正在准备远程工作区…",F3t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",H3t=()=>"جارٍ تحضير مساحة عملك البعيدة…",q3t=()=>"Preparando tu espacio de trabajo remoto…",U3t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",G3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P3t():t==="fa"?F3t():t==="ar"?H3t():t==="es"?q3t():t==="hi"?U3t():B3t()}),V3t=e=>`Connecting to ${e==null?void 0:e.host}`,K3t=e=>`正在连接到 ${e==null?void 0:e.host}`,W3t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,Q3t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,X3t=e=>`Conectando a ${e==null?void 0:e.host}`,Y3t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,Z3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K3t(e):t==="fa"?W3t(e):t==="ar"?Q3t(e):t==="es"?X3t(e):t==="hi"?Y3t(e):V3t(e)}),J3t=()=>"Close remote host picker",e5t=()=>"关闭远程主机选择器",t5t=()=>"بستن انتخاب‌گر میزبان راه‌دور",n5t=()=>"إغلاق مُنتقي المضيف البعيد",r5t=()=>"Cerrar el selector de hosts remotos",s5t=()=>"रिमोट होस्ट पिकर बंद करें",i5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e5t():t==="fa"?t5t():t==="ar"?n5t():t==="es"?r5t():t==="hi"?s5t():J3t()}),a5t=()=>"Choose a configured SSH host.",o5t=()=>"选择已配置的 SSH 主机。",c5t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",l5t=()=>"اختر مضيف SSH مُعدًّا.",u5t=()=>"Elige un host SSH configurado.",_5t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",f5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o5t():t==="fa"?c5t():t==="ar"?l5t():t==="es"?u5t():t==="hi"?_5t():a5t()}),d5t=()=>"Connect to remote",h5t=()=>"连接到远程主机",p5t=()=>"اتصال به میزبان راه‌دور",m5t=()=>"الاتصال بجهاز بعيد",g5t=()=>"Conectar a un host remoto",v5t=()=>"रिमोट से कनेक्ट करें",u3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h5t():t==="fa"?p5t():t==="ar"?m5t():t==="es"?g5t():t==="hi"?v5t():d5t()}),b5t=()=>"Disconnect",y5t=()=>"断开连接",x5t=()=>"قطع اتصال",w5t=()=>"قطع الاتصال",k5t=()=>"Desconectar",S5t=()=>"डिस्कनेक्ट करें",_3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y5t():t==="fa"?x5t():t==="ar"?w5t():t==="es"?k5t():t==="hi"?S5t():b5t()}),C5t=()=>"Your remote work is still running. Reconnect when you’re ready.",E5t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",N5t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",z5t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",j5t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",T5t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",A5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E5t():t==="fa"?N5t():t==="ar"?z5t():t==="es"?j5t():t==="hi"?T5t():C5t()}),R5t=e=>`Disconnected from ${e==null?void 0:e.host}`,M5t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,O5t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,D5t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,L5t=e=>`Desconectado de ${e==null?void 0:e.host}`,I5t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,iL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M5t(e):t==="fa"?O5t(e):t==="ar"?D5t(e):t==="es"?L5t(e):t==="hi"?I5t(e):R5t(e)}),$5t=e=>`Could not connect to ${e==null?void 0:e.host}`,B5t=e=>`无法连接到 ${e==null?void 0:e.host}`,P5t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,F5t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,H5t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,q5t=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,U5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B5t(e):t==="fa"?P5t(e):t==="ar"?F5t(e):t==="es"?H5t(e):t==="hi"?q5t(e):$5t(e)}),G5t=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",V5t=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",K5t=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",W5t=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",Q5t=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",X5t=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",Y5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V5t():t==="fa"?K5t():t==="ar"?W5t():t==="es"?Q5t():t==="hi"?X5t():G5t()}),Z5t=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",J5t=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",ekt=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",tkt=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",nkt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",rkt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",skt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J5t():t==="fa"?ekt():t==="ar"?tkt():t==="es"?nkt():t==="hi"?rkt():Z5t()}),ikt=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,akt=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,okt=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,ckt=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,lkt=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,ukt=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,_kt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?akt(e):t==="fa"?okt(e):t==="ar"?ckt(e):t==="es"?lkt(e):t==="hi"?ukt(e):ikt(e)}),fkt=()=>"OpenResearch binary",dkt=()=>"OpenResearch 二进制文件",hkt=()=>"فایل اجرایی OpenResearch",pkt=()=>"الملف التنفيذي لـ OpenResearch",mkt=()=>"Binario de OpenResearch",gkt=()=>"OpenResearch बाइनरी",vkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dkt():t==="fa"?hkt():t==="ar"?pkt():t==="es"?mkt():t==="hi"?gkt():fkt()}),bkt=()=>"OpenResearch Database",ykt=()=>"OpenResearch 数据库",xkt=()=>"پایگاه دادهٔ OpenResearch",wkt=()=>"قاعدة بيانات OpenResearch",kkt=()=>"Base de datos de OpenResearch",Skt=()=>"OpenResearch डेटाबेस",Ckt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ykt():t==="fa"?xkt():t==="ar"?wkt():t==="es"?kkt():t==="hi"?Skt():bkt()}),Ekt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",Nkt=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",zkt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",jkt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",Tkt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",Akt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",Rkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nkt():t==="fa"?zkt():t==="ar"?jkt():t==="es"?Tkt():t==="hi"?Akt():Ekt()}),Mkt=()=>"Install OpenResearch?",Okt=()=>"安装 OpenResearch?",Dkt=()=>"OpenResearch نصب شود؟",Lkt=()=>"تثبيت OpenResearch؟",Ikt=()=>"¿Instalar OpenResearch?",$kt=()=>"OpenResearch इंस्टॉल करें?",Bkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Okt():t==="fa"?Dkt():t==="ar"?Lkt():t==="es"?Ikt():t==="hi"?$kt():Mkt()}),Pkt=()=>"Installing…",Fkt=()=>"正在安装…",Hkt=()=>"در حال نصب…",qkt=()=>"جارٍ التثبيت…",Ukt=()=>"Instalando…",Gkt=()=>"इंस्टॉल हो रहा है…",Vkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fkt():t==="fa"?Hkt():t==="ar"?qkt():t==="es"?Ukt():t==="hi"?Gkt():Pkt()}),Kkt=()=>"No matching SSH hosts",Wkt=()=>"没有匹配的 SSH 主机",Qkt=()=>"میزبان SSH منطبقی پیدا نشد",Xkt=()=>"لا توجد مضيفات SSH مطابقة",Ykt=()=>"No hay hosts SSH que coincidan",Zkt=()=>"कोई मेल खाता SSH होस्ट नहीं",Jkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wkt():t==="fa"?Qkt():t==="ar"?Xkt():t==="es"?Ykt():t==="hi"?Zkt():Kkt()}),eSt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,tSt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,nSt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,rSt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,sSt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,iSt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,aSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tSt(e):t==="fa"?nSt(e):t==="ar"?rSt(e):t==="es"?sSt(e):t==="hi"?iSt(e):eSt(e)}),oSt=()=>"Open remote",cSt=()=>"打开远程工作区",lSt=()=>"باز کردن راه‌دور",uSt=()=>"فتح مساحة العمل البعيدة",_St=()=>"Abrir remoto",fSt=()=>"रिमोट खोलें",dSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cSt():t==="fa"?lSt():t==="ar"?uSt():t==="es"?_St():t==="hi"?fSt():oSt()}),hSt=()=>"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.",pSt=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",mSt=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",gSt=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",vSt=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",bSt=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",ySt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pSt():t==="fa"?mSt():t==="ar"?gSt():t==="es"?vSt():t==="hi"?bSt():hSt()}),xSt=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",wSt=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",kSt=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",SSt=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",CSt=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",ESt=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",NSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wSt():t==="fa"?kSt():t==="ar"?SSt():t==="es"?CSt():t==="hi"?ESt():xSt()}),zSt=()=>"Preparing remote workspace…",jSt=()=>"正在准备远程工作区…",TSt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",ASt=()=>"جارٍ تحضير مساحة العمل البعيدة…",RSt=()=>"Preparando el espacio de trabajo remoto…",MSt=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",OSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jSt():t==="fa"?TSt():t==="ar"?ASt():t==="es"?RSt():t==="hi"?MSt():zSt()}),DSt=()=>"Reconnect",LSt=()=>"重新连接",ISt=()=>"اتصال دوباره",$St=()=>"إعادة الاتصال",BSt=()=>"Reconectar",PSt=()=>"फिर से कनेक्ट करें",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LSt():t==="fa"?ISt():t==="ar"?$St():t==="es"?BSt():t==="hi"?PSt():DSt()}),FSt=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",HSt=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",qSt=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",USt=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",GSt=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",VSt=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",KSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HSt():t==="fa"?qSt():t==="ar"?USt():t==="es"?GSt():t==="hi"?VSt():FSt()}),WSt=e=>`Reconnecting to ${e==null?void 0:e.host}`,QSt=e=>`正在重新连接到 ${e==null?void 0:e.host}`,XSt=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,YSt=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,ZSt=e=>`Reconectando a ${e==null?void 0:e.host}`,JSt=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,e6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QSt(e):t==="fa"?XSt(e):t==="ar"?YSt(e):t==="es"?ZSt(e):t==="hi"?JSt(e):WSt(e)}),t6t=()=>"Search SSH hosts",n6t=()=>"搜索 SSH 主机",r6t=()=>"جستجوی میزبان‌های SSH",s6t=()=>"البحث في مضيفات SSH",i6t=()=>"Buscar hosts SSH",a6t=()=>"SSH होस्ट खोजें",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n6t():t==="fa"?r6t():t==="ar"?s6t():t==="es"?i6t():t==="hi"?a6t():t6t()}),o6t=e=>`SSH: ${e==null?void 0:e.host}`,c6t=e=>`SSH:${e==null?void 0:e.host}`,l6t=e=>`SSH: ${e==null?void 0:e.host}`,u6t=e=>`SSH: ${e==null?void 0:e.host}`,_6t=e=>`SSH: ${e==null?void 0:e.host}`,f6t=e=>`SSH: ${e==null?void 0:e.host}`,J2=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c6t(e):t==="fa"?l6t(e):t==="ar"?u6t(e):t==="es"?_6t(e):t==="hi"?f6t(e):o6t(e)}),d6t=()=>"Start a new OpenResearch host",h6t=()=>"启动新的 OpenResearch 主机",p6t=()=>"راه‌اندازی میزبان جدید OpenResearch",m6t=()=>"بدء مضيف OpenResearch جديد",g6t=()=>"Iniciar un nuevo host de OpenResearch",v6t=()=>"एक नया OpenResearch होस्ट शुरू करें",b6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h6t():t==="fa"?p6t():t==="ar"?m6t():t==="es"?g6t():t==="hi"?v6t():d6t()}),y6t=e=>`End ${e==null?void 0:e.count} pending approvals.`,x6t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,w6t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,k6t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,S6t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,C6t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,E6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?x6t(e):t==="fa"?w6t(e):t==="ar"?k6t(e):t==="es"?S6t(e):t==="hi"?C6t(e):y6t(e)}),N6t=()=>"Stop OpenResearch",z6t=()=>"停止 OpenResearch",j6t=()=>"توقف OpenResearch",T6t=()=>"إيقاف OpenResearch",A6t=()=>"Detener OpenResearch",R6t=()=>"OpenResearch रोकें",M6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z6t():t==="fa"?j6t():t==="ar"?T6t():t==="es"?A6t():t==="hi"?R6t():N6t()}),O6t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,D6t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,L6t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,I6t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,$6t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,B6t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,P6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D6t(e):t==="fa"?L6t(e):t==="ar"?I6t(e):t==="es"?$6t(e):t==="hi"?B6t(e):O6t(e)}),F6t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,H6t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,q6t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,U6t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,G6t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,V6t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,K6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H6t(e):t==="fa"?q6t(e):t==="ar"?U6t(e):t==="es"?G6t(e):t==="hi"?V6t(e):F6t(e)}),W6t=()=>"Stop OpenResearch on host",Q6t=()=>"停止主机上的 OpenResearch",X6t=()=>"توقف OpenResearch روی میزبان",Y6t=()=>"إيقاف OpenResearch على المضيف",Z6t=()=>"Detener OpenResearch en el host",J6t=()=>"होस्ट पर OpenResearch रोकें",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q6t():t==="fa"?X6t():t==="ar"?Y6t():t==="es"?Z6t():t==="hi"?J6t():W6t()}),eCt=()=>"This will also:",tCt=()=>"这还将:",nCt=()=>"این کار همچنین:",rCt=()=>"سيؤدي هذا أيضًا إلى:",sCt=()=>"Esto también:",iCt=()=>"इससे यह भी होगा:",aCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tCt():t==="fa"?nCt():t==="ar"?rCt():t==="es"?sCt():t==="hi"?iCt():eCt()}),oCt=()=>"End 1 pending approval.",cCt=()=>"结束 1 个待审批请求。",lCt=()=>"۱ تأیید در انتظار را پایان می‌دهد.",uCt=()=>"إنهاء طلب موافقة معلّق واحد.",_Ct=()=>"Cancelará 1 aprobación pendiente.",fCt=()=>"1 लंबित स्वीकृति खत्म होगी।",dCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cCt():t==="fa"?lCt():t==="ar"?uCt():t==="es"?_Ct():t==="hi"?fCt():oCt()}),hCt=()=>"Leave 1 submitted experiment running.",pCt=()=>"让 1 个已提交实验继续运行。",mCt=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",gCt=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",vCt=()=>"Dejará 1 experimento enviado en ejecución.",bCt=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",yCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pCt():t==="fa"?mCt():t==="ar"?gCt():t==="es"?vCt():t==="hi"?bCt():hCt()}),xCt=()=>"Disconnect 1 other client.",wCt=()=>"断开 1 个其他客户端。",kCt=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",SCt=()=>"قطع اتصال عميل آخر واحد.",CCt=()=>"Desconectará a otro cliente.",ECt=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",NCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wCt():t==="fa"?kCt():t==="ar"?SCt():t==="es"?CCt():t==="hi"?ECt():xCt()}),zCt=()=>"Keep 1 queued message saved.",jCt=()=>"保留 1 条排队消息。",TCt=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",ACt=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",RCt=()=>"Conservará 1 mensaje en cola.",MCt=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",OCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jCt():t==="fa"?TCt():t==="ar"?ACt():t==="es"?RCt():t==="hi"?MCt():zCt()}),DCt=()=>"Interrupt 1 active agent turn.",LCt=()=>"中断 1 个活动代理任务。",ICt=()=>"۱ نوبت فعال عامل را قطع می‌کند.",$Ct=()=>"مقاطعة جولة وكيل نشطة واحدة.",BCt=()=>"Interrumpirá 1 turno activo de un agente.",PCt=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",FCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LCt():t==="fa"?ICt():t==="ar"?$Ct():t==="es"?BCt():t==="hi"?PCt():DCt()}),HCt=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,qCt=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,UCt=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,GCt=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,VCt=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,KCt=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,WCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qCt(e):t==="fa"?UCt(e):t==="ar"?GCt(e):t==="es"?VCt(e):t==="hi"?KCt(e):HCt(e)}),QCt=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,XCt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,YCt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,ZCt=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,JCt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,e7t=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,t7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XCt(e):t==="fa"?YCt(e):t==="ar"?ZCt(e):t==="es"?JCt(e):t==="hi"?e7t(e):QCt(e)}),n7t=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,r7t=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,s7t=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,i7t=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,a7t=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,o7t=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,c7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?r7t(e):t==="fa"?s7t(e):t==="ar"?i7t(e):t==="es"?a7t(e):t==="hi"?o7t(e):n7t(e)}),l7t=()=>"Stopping host…",u7t=()=>"正在停止主机…",_7t=()=>"در حال توقف میزبان…",f7t=()=>"جارٍ إيقاف المضيف…",d7t=()=>"Deteniendo el host…",h7t=()=>"होस्ट रोका जा रहा है…",p7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u7t():t==="fa"?_7t():t==="ar"?f7t():t==="es"?d7t():t==="hi"?h7t():l7t()}),m7t=()=>"Update",g7t=()=>"更新",v7t=()=>"به‌روزرسانی",b7t=()=>"تحديث",y7t=()=>"Actualizar",x7t=()=>"अपडेट करें",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g7t():t==="fa"?v7t():t==="ar"?b7t():t==="es"?y7t():t==="hi"?x7t():m7t()}),w7t=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,k7t=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,S7t=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,C7t=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,E7t=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,N7t=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,z7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?k7t(e):t==="fa"?S7t(e):t==="ar"?C7t(e):t==="es"?E7t(e):t==="hi"?N7t(e):w7t(e)}),j7t=()=>"Update OpenResearch?",T7t=()=>"更新 OpenResearch?",A7t=()=>"OpenResearch به‌روزرسانی شود؟",R7t=()=>"تحديث OpenResearch؟",M7t=()=>"¿Actualizar OpenResearch?",O7t=()=>"OpenResearch अपडेट करें?",D7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T7t():t==="fa"?A7t():t==="ar"?R7t():t==="es"?M7t():t==="hi"?O7t():j7t()}),L7t=()=>"Updating…",I7t=()=>"正在更新…",$7t=()=>"در حال به‌روزرسانی…",B7t=()=>"جارٍ التحديث…",P7t=()=>"Actualizando…",F7t=()=>"अपडेट हो रहा है…",H7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I7t():t==="fa"?$7t():t==="ar"?B7t():t==="es"?P7t():t==="hi"?F7t():L7t()}),q7t=()=>"Disable syncing",U7t=()=>"关闭同步",G7t=()=>"غیرفعال کردن همگام‌سازی",V7t=()=>"تعطيل المزامنة",K7t=()=>"Desactivar sincronización",W7t=()=>"सिंकिंग बंद करें",Q7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U7t():t==="fa"?G7t():t==="ar"?V7t():t==="es"?K7t():t==="hi"?W7t():q7t()}),X7t=()=>"Enable GitHub syncing",Y7t=()=>"启用 GitHub 同步",Z7t=()=>"فعال‌سازی همگام‌سازی GitHub",J7t=()=>"تفعيل مزامنة GitHub",e8t=()=>"Activar sincronización con GitHub",t8t=()=>"GitHub सिंकिंग चालू करें",n8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y7t():t==="fa"?Z7t():t==="ar"?J7t():t==="es"?e8t():t==="hi"?t8t():X7t()}),r8t=()=>"Enabling…",s8t=()=>"正在启用…",i8t=()=>"در حال فعال‌سازی…",a8t=()=>"جارٍ التفعيل…",o8t=()=>"Activando…",c8t=()=>"चालू हो रहा है…",l8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s8t():t==="fa"?i8t():t==="ar"?a8t():t==="es"?o8t():t==="hi"?c8t():r8t()}),u8t=()=>"Updating…",_8t=()=>"正在更新…",f8t=()=>"در حال به‌روزرسانی…",d8t=()=>"جارٍ التحديث…",h8t=()=>"Actualizando…",p8t=()=>"अपडेट हो रहा है…",m8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_8t():t==="fa"?f8t():t==="ar"?d8t():t==="es"?h8t():t==="hi"?p8t():u8t()}),g8t=()=>"Reopen a previous chat",v8t=()=>"重新打开之前的聊天",b8t=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",y8t=()=>"إعادة فتح محادثة سابقة",x8t=()=>"Vuelve a abrir un chat anterior",w8t=()=>"पिछली चैट फिर से खोलें",k8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v8t():t==="fa"?b8t():t==="ar"?y8t():t==="es"?x8t():t==="hi"?w8t():g8t()}),S8t=()=>"No chats to resume",C8t=()=>"没有可恢复的聊天",E8t=()=>"گفت‌وگویی برای ادامه وجود ندارد",N8t=()=>"لا توجد محادثات لاستئنافها",z8t=()=>"No hay chats que reanudar",j8t=()=>"फिर से शुरू करने के लिए कोई चैट नहीं है",T8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C8t():t==="fa"?E8t():t==="ar"?N8t():t==="es"?z8t():t==="hi"?j8t():S8t()}),A8t=()=>"From your terminal — adopting copies the transcript, and new turns continue there",R8t=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",M8t=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",O8t=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",D8t=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",L8t=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R8t():t==="fa"?M8t():t==="ar"?O8t():t==="es"?D8t():t==="hi"?L8t():A8t()}),I8t=()=>"Search chats",$8t=()=>"搜索聊天",B8t=()=>"جست‌وجوی گفت‌وگوها",P8t=()=>"البحث في المحادثات",F8t=()=>"Buscar chats",H8t=()=>"चैट खोजें",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$8t():t==="fa"?B8t():t==="ar"?P8t():t==="es"?F8t():t==="hi"?H8t():I8t()}),q8t=()=>"Resume a chat",U8t=()=>"恢复聊天",G8t=()=>"ادامهٔ یک گفت‌وگو",V8t=()=>"استئناف محادثة",K8t=()=>"Reanudar un chat",W8t=()=>"चैट फिर से शुरू करें",Cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U8t():t==="fa"?G8t():t==="ar"?V8t():t==="es"?K8t():t==="hi"?W8t():q8t()}),Q8t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,X8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,Y8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,Z8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,J8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,e9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,t9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X8t(e):t==="fa"?Y8t(e):t==="ar"?Z8t(e):t==="es"?J8t(e):t==="hi"?e9t(e):Q8t(e)}),n9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,r9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,s9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,i9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,a9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,o9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,c9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?r9t(e):t==="fa"?s9t(e):t==="ar"?i9t(e):t==="es"?a9t(e):t==="hi"?o9t(e):n9t(e)}),l9t=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`,u9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,_9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,f9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,d9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,h9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,p9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?u9t(e):t==="fa"?_9t(e):t==="ar"?f9t(e):t==="es"?d9t(e):t==="hi"?h9t(e):l9t(e)}),m9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,g9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,v9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,b9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,y9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,x9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,w9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g9t(e):t==="fa"?v9t(e):t==="ar"?b9t(e):t==="es"?y9t(e):t==="hi"?x9t(e):m9t(e)}),k9t=()=>"CLI is retrying…",S9t=()=>"CLI 正在重试…",C9t=()=>"CLI در حال تلاش دوباره است…",E9t=()=>"تعيد واجهة سطر الأوامر المحاولة…",N9t=()=>"La CLI está reintentando…",z9t=()=>"CLI फिर से कोशिश कर रहा है…",j9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S9t():t==="fa"?C9t():t==="ar"?E9t():t==="es"?N9t():t==="hi"?z9t():k9t()}),T9t=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,A9t=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,R9t=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,M9t=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,O9t=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,D9t=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,L9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?A9t(e):t==="fa"?R9t(e):t==="ar"?M9t(e):t==="es"?O9t(e):t==="hi"?D9t(e):T9t(e)}),I9t=()=>"Sending again…",$9t=()=>"正在重新发送…",B9t=()=>"در حال ارسال دوباره…",P9t=()=>"جارٍ إعادة الإرسال…",F9t=()=>"Reenviando…",H9t=()=>"फिर से भेजा जा रहा है…",q9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$9t():t==="fa"?B9t():t==="ar"?P9t():t==="es"?F9t():t==="hi"?H9t():I9t()}),U9t=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,G9t=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,V9t=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,K9t=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,W9t=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,Q9t=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,X9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G9t(e):t==="fa"?V9t(e):t==="ar"?K9t(e):t==="es"?W9t(e):t==="hi"?Q9t(e):U9t(e)}),Y9t=()=>"Retrying…",Z9t=()=>"正在重试…",J9t=()=>"در حال تلاش دوباره…",eEt=()=>"جارٍ إعادة المحاولة…",tEt=()=>"Reintentando…",nEt=()=>"फिर से कोशिश हो रही है…",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z9t():t==="fa"?J9t():t==="ar"?eEt():t==="es"?tEt():t==="hi"?nEt():Y9t()}),rEt=()=>"Default speed",sEt=()=>"默认速度",iEt=()=>"سرعت پیش‌فرض",aEt=()=>"السرعة الافتراضية",oEt=()=>"Velocidad predeterminada",cEt=()=>"डिफ़ॉल्ट गति",lEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sEt():t==="fa"?iEt():t==="ar"?aEt():t==="es"?oEt():t==="hi"?cEt():rEt()}),uEt=()=>"Standard",_Et=()=>"标准",fEt=()=>"استاندارد",dEt=()=>"قياسي",hEt=()=>"Estándar",pEt=()=>"स्टैंडर्ड",mEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Et():t==="fa"?fEt():t==="ar"?dEt():t==="es"?hEt():t==="hi"?pEt():uEt()}),gEt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,vEt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,bEt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,yEt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,xEt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,wEt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,kEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vEt(e):t==="fa"?bEt(e):t==="ar"?yEt(e):t==="es"?xEt(e):t==="hi"?wEt(e):gEt(e)}),SEt=()=>"Appearance",CEt=()=>"外观",EEt=()=>"ظاهر",NEt=()=>"المظهر",zEt=()=>"Apariencia",jEt=()=>"रूप-रंग",TEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CEt():t==="fa"?EEt():t==="ar"?NEt():t==="es"?zEt():t==="hi"?jEt():SEt()}),AEt=()=>"Check",REt=()=>"检查",MEt=()=>"بررسی",OEt=()=>"فحص",DEt=()=>"Comprobar",LEt=()=>"जाँचें",IEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?REt():t==="fa"?MEt():t==="ar"?OEt():t==="es"?DEt():t==="hi"?LEt():AEt()}),$Et=()=>"Check again",BEt=()=>"再次检查",PEt=()=>"بررسی دوباره",FEt=()=>"تحقق مجددًا",HEt=()=>"Volver a comprobar",qEt=()=>"फिर से जाँचें",xm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BEt():t==="fa"?PEt():t==="ar"?FEt():t==="es"?HEt():t==="hi"?qEt():$Et()}),UEt=()=>"Check for updates",GEt=()=>"检查更新",VEt=()=>"بررسی به‌روزرسانی",KEt=()=>"التحقق من التحديثات",WEt=()=>"Buscar actualizaciones",QEt=()=>"अपडेट के लिए जाँचें",XEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GEt():t==="fa"?VEt():t==="ar"?KEt():t==="es"?WEt():t==="hi"?QEt():UEt()}),YEt=()=>"Check now",ZEt=()=>"立即检查",JEt=()=>"اکنون بررسی کن",eNt=()=>"التحقق الآن",tNt=()=>"Comprobar ahora",nNt=()=>"अभी जाँचें",rNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZEt():t==="fa"?JEt():t==="ar"?eNt():t==="es"?tNt():t==="hi"?nNt():YEt()}),sNt=()=>"Check setup",iNt=()=>"检查设置",aNt=()=>"بررسی راه‌اندازی",oNt=()=>"فحص الإعداد",cNt=()=>"Comprobar configuración",lNt=()=>"सेटअप जाँचें",uNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iNt():t==="fa"?aNt():t==="ar"?oNt():t==="es"?cNt():t==="hi"?lNt():sNt()}),_Nt=()=>"orx checks a few times a day on its own.",fNt=()=>"orx 每天会自动检查几次。",dNt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",hNt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",pNt=()=>"orx lo comprueba por sí solo varias veces al día.",mNt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",gNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fNt():t==="fa"?dNt():t==="ar"?hNt():t==="es"?pNt():t==="hi"?mNt():_Nt()}),vNt=()=>"Choose a flavor",bNt=()=>"选择配置",yNt=()=>"انتخاب پیکربندی",xNt=()=>"اختر تكوين الموارد",wNt=()=>"Elige una opción",kNt=()=>"एक फ़्लेवर चुनें",SNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bNt():t==="fa"?yNt():t==="ar"?xNt():t==="es"?wNt():t==="hi"?kNt():vNt()}),CNt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,ENt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,NNt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,zNt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,jNt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,TNt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,ANt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ENt(e):t==="fa"?NNt(e):t==="ar"?zNt(e):t==="es"?jNt(e):t==="hi"?TNt(e):CNt(e)}),RNt=()=>"clean",MNt=()=>"无更改",ONt=()=>"بدون تغییر",DNt=()=>"نظيف",LNt=()=>"sin cambios",INt=()=>"साफ़",$Nt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MNt():t==="fa"?ONt():t==="ar"?DNt():t==="es"?LNt():t==="hi"?INt():RNt()}),BNt=e=>`Already linked at ${e==null?void 0:e.link}.`,PNt=e=>`已链接到 ${e==null?void 0:e.link}。`,FNt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,HNt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,qNt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,UNt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,GNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PNt(e):t==="fa"?FNt(e):t==="ar"?HNt(e):t==="es"?qNt(e):t==="hi"?UNt(e):BNt(e)}),VNt=e=>`Linked ${e==null?void 0:e.link}.`,KNt=e=>`已链接 ${e==null?void 0:e.link}。`,WNt=e=>`${e==null?void 0:e.link} پیوند شد.`,QNt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,XNt=e=>`Enlazado en ${e==null?void 0:e.link}.`,YNt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,ZNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KNt(e):t==="fa"?WNt(e):t==="ar"?QNt(e):t==="es"?XNt(e):t==="hi"?YNt(e):VNt(e)}),JNt=()=>"Close terminal",ezt=()=>"关闭终端",tzt=()=>"بستن ترمینال",nzt=()=>"إغلاق الطرفية",rzt=()=>"Cerrar la terminal",szt=()=>"टर्मिनल बंद करें",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ezt():t==="fa"?tzt():t==="ar"?nzt():t==="es"?rzt():t==="hi"?szt():JNt()}),izt=()=>"Terminal closed",azt=()=>"终端已关闭",ozt=()=>"ترمینال بسته شد",czt=()=>"أُغلقت الطرفية",lzt=()=>"Terminal cerrada",uzt=()=>"टर्मिनल बंद हो गया",_zt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?azt():t==="fa"?ozt():t==="ar"?czt():t==="es"?lzt():t==="hi"?uzt():izt()}),fzt=()=>"Finished",dzt=()=>"已完成",hzt=()=>"انجام شد",pzt=()=>"اكتمل",mzt=()=>"Finalizado",gzt=()=>"पूर्ण",vzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dzt():t==="fa"?hzt():t==="ar"?pzt():t==="es"?mzt():t==="hi"?gzt():fzt()}),bzt=()=>"Command failed",yzt=()=>"命令失败",xzt=()=>"دستور ناموفق بود",wzt=()=>"فشل الأمر",kzt=()=>"El comando falló",Szt=()=>"कमांड विफल रही",Czt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yzt():t==="fa"?xzt():t==="ar"?wzt():t==="es"?kzt():t==="hi"?Szt():bzt()}),Ezt=()=>"Running…",Nzt=()=>"运行中…",zzt=()=>"در حال اجرا…",jzt=()=>"قيد التشغيل…",Tzt=()=>"Ejecutando…",Azt=()=>"चल रहा है…",Rzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nzt():t==="fa"?zzt():t==="ar"?jzt():t==="es"?Tzt():t==="hi"?Azt():Ezt()}),Mzt=()=>"Connect",Ozt=()=>"连接",Dzt=()=>"اتصال",Lzt=()=>"اتصال",Izt=()=>"Conectar",$zt=()=>"कनेक्ट करें",Qk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ozt():t==="fa"?Dzt():t==="ar"?Lzt():t==="es"?Izt():t==="hi"?$zt():Mzt()}),Bzt=()=>"Connected via GitHub CLI",Pzt=()=>"已通过 GitHub CLI 连接",Fzt=()=>"از طریق GitHub CLI متصل است",Hzt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",qzt=()=>"Conectado mediante GitHub CLI",Uzt=()=>"GitHub CLI के ज़रिए कनेक्टेड",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pzt():t==="fa"?Fzt():t==="ar"?Hzt():t==="es"?qzt():t==="hi"?Uzt():Bzt()}),Gzt=()=>"Connecting…",Vzt=()=>"正在连接…",Kzt=()=>"در حال اتصال…",Wzt=()=>"جارٍ الاتصال…",Qzt=()=>"Conectando…",Xzt=()=>"कनेक्ट हो रहा है…",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vzt():t==="fa"?Kzt():t==="ar"?Wzt():t==="es"?Qzt():t==="hi"?Xzt():Gzt()}),Yzt=e=>`CPU cores: ${e==null?void 0:e.count}`,Zzt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,Jzt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,ejt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,tjt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,njt=e=>`CPU कोर: ${e==null?void 0:e.count}`,rjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zzt(e):t==="fa"?Jzt(e):t==="ar"?ejt(e):t==="es"?tjt(e):t==="hi"?njt(e):Yzt(e)}),sjt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",ijt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",ajt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",ojt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",cjt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",ljt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",ujt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ijt():t==="fa"?ajt():t==="ar"?ojt():t==="es"?cjt():t==="hi"?ljt():sjt()}),_jt=()=>"the current project",fjt=()=>"当前项目",djt=()=>"پروژهٔ فعلی",hjt=()=>"المشروع الحالي",pjt=()=>"el proyecto actual",mjt=()=>"मौजूदा प्रोजेक्ट",gjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fjt():t==="fa"?djt():t==="ar"?hjt():t==="es"?pjt():t==="hi"?mjt():_jt()}),vjt=e=>`${e==null?void 0:e.value} (custom)`,bjt=e=>`${e==null?void 0:e.value}(自定义)`,yjt=e=>`${e==null?void 0:e.value} (سفارشی)`,xjt=e=>`${e==null?void 0:e.value} (مخصص)`,wjt=e=>`${e==null?void 0:e.value} (personalizado)`,kjt=e=>`${e==null?void 0:e.value} (कस्टम)`,Sjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bjt(e):t==="fa"?yjt(e):t==="ar"?xjt(e):t==="es"?wjt(e):t==="hi"?kjt(e):vjt(e)}),Cjt=()=>"detached",Ejt=()=>"分离头指针",Njt=()=>"جدا از شاخه",zjt=()=>"منفصل",jjt=()=>"desacoplado",Tjt=()=>"डिटैच्ड",Xk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ejt():t==="fa"?Njt():t==="ar"?zjt():t==="es"?jjt():t==="hi"?Tjt():Cjt()}),Ajt=()=>"Disconnected",Rjt=()=>"已断开连接",Mjt=()=>"قطع اتصال",Ojt=()=>"غير متصل",Djt=()=>"Desconectado",Ljt=()=>"डिस्कनेक्ट हो गया",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rjt():t==="fa"?Mjt():t==="ar"?Ojt():t==="es"?Djt():t==="hi"?Ljt():Ajt()}),Ijt=()=>"Environment tab",$jt=()=>"环境标签页",Bjt=()=>"زبانهٔ محیط",Pjt=()=>"تبويب البيئة",Fjt=()=>"pestaña Entorno",Hjt=()=>"एनवायरनमेंट टैब",qjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$jt():t==="fa"?Bjt():t==="ar"?Pjt():t==="es"?Fjt():t==="hi"?Hjt():Ijt()}),Ujt=()=>"Free models · No sign-in required",Gjt=()=>"免费模型 · 无需登录",Vjt=()=>"مدل‌های رایگان · بدون نیاز به ورود",Kjt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",Wjt=()=>"Modelos gratuitos · No es necesario iniciar sesión",Qjt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",Xjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gjt():t==="fa"?Vjt():t==="ar"?Kjt():t==="es"?Wjt():t==="hi"?Qjt():Ujt()}),Yjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Zjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Jjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,eTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,tTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,nTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,rTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zjt(e):t==="fa"?Jjt(e):t==="ar"?eTt(e):t==="es"?tTt(e):t==="hi"?nTt(e):Yjt(e)}),sTt=()=>"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.",iTt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",aTt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",oTt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",cTt=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",lTt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",uTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iTt():t==="fa"?aTt():t==="ar"?oTt():t==="es"?cTt():t==="hi"?lTt():sTt()}),_Tt=()=>"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.",fTt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",dTt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",hTt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",pTt=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",mTt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",gTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fTt():t==="fa"?dTt():t==="ar"?hTt():t==="es"?pTt():t==="hi"?mTt():_Tt()}),vTt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",bTt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",yTt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",xTt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",wTt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",kTt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",STt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bTt():t==="fa"?yTt():t==="ar"?xTt():t==="es"?wTt():t==="hi"?kTt():vTt()}),CTt=e=>`GPU × ${e==null?void 0:e.count}`,ETt=e=>`${e==null?void 0:e.count} 个 GPU`,NTt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,zTt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,jTt=e=>`GPU × ${e==null?void 0:e.count}`,TTt=e=>`GPU × ${e==null?void 0:e.count}`,ATt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ETt(e):t==="fa"?NTt(e):t==="ar"?zTt(e):t==="es"?jTt(e):t==="hi"?TTt(e):CTt(e)}),RTt=()=>"has changes",MTt=()=>"有更改",OTt=()=>"دارای تغییر",DTt=()=>"به تغييرات",LTt=()=>"con cambios",ITt=()=>"बदलाव हैं",$Tt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MTt():t==="fa"?OTt():t==="ar"?DTt():t==="es"?LTt():t==="hi"?ITt():RTt()}),BTt=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}.`,PTt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,FTt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,HTt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,qTt=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,UTt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,GTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PTt(e):t==="fa"?FTt(e):t==="ar"?HTt(e):t==="es"?qTt(e):t==="hi"?UTt(e):BTt(e)}),VTt=()=>"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.",KTt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",WTt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",QTt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",XTt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",YTt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",ZTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KTt():t==="fa"?WTt():t==="ar"?QTt():t==="es"?XTt():t==="hi"?YTt():VTt()}),JTt=()=>"Install",eAt=()=>"安装",tAt=()=>"نصب",nAt=()=>"تثبيت",rAt=()=>"Instalar",sAt=()=>"इंस्टॉल करें",iAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eAt():t==="fa"?tAt():t==="ar"?nAt():t==="es"?rAt():t==="hi"?sAt():JTt()}),aAt=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.`,oAt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,cAt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,lAt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,uAt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,_At=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,fAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oAt(e):t==="fa"?cAt(e):t==="ar"?lAt(e):t==="es"?uAt(e):t==="hi"?_At(e):aAt(e)}),dAt=e=>`Install the ${e==null?void 0:e.command} command`,hAt=e=>`安装 ${e==null?void 0:e.command} 命令`,pAt=e=>`نصب فرمان ${e==null?void 0:e.command}`,mAt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,gAt=e=>`Instalar el comando ${e==null?void 0:e.command}`,vAt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,bAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hAt(e):t==="fa"?pAt(e):t==="ar"?mAt(e):t==="es"?gAt(e):t==="hi"?vAt(e):dAt(e)}),yAt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",xAt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",wAt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",kAt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",SAt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",CAt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",EAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xAt():t==="fa"?wAt():t==="ar"?kAt():t==="es"?SAt():t==="hi"?CAt():yAt()}),NAt=()=>"Install the new release now instead of waiting for the background update.",zAt=()=>"立即安装新版本,无需等待后台更新。",jAt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",TAt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",AAt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",RAt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",MAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zAt():t==="fa"?jAt():t==="ar"?TAt():t==="es"?AAt():t==="hi"?RAt():NAt()}),OAt=()=>"Discard your unsaved Kubernetes changes?",DAt=()=>"要放弃未保存的 Kubernetes 更改吗?",LAt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",IAt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",$At=()=>"¿Descartar los cambios sin guardar de Kubernetes?",BAt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",PAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DAt():t==="fa"?LAt():t==="ar"?IAt():t==="es"?$At():t==="hi"?BAt():OAt()}),FAt=()=>"Key from",HAt=()=>"密钥来自",qAt=()=>"کلید از",UAt=()=>"المفتاح من",GAt=()=>"Clave tomada de la",VAt=()=>"की स्रोत",KAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HAt():t==="fa"?qAt():t==="ar"?UAt():t==="es"?GAt():t==="hi"?VAt():FAt()}),WAt=()=>"Use current kubectl context",QAt=()=>"使用当前 kubectl 上下文",XAt=()=>"استفاده از کانتکست فعلی kubectl",YAt=()=>"استخدام سياق kubectl الحالي",ZAt=()=>"Usar el contexto actual de kubectl",JAt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",eRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QAt():t==="fa"?XAt():t==="ar"?YAt():t==="es"?ZAt():t==="hi"?JAt():WAt()}),tRt=e=>`Use current context (${e==null?void 0:e.context})`,nRt=e=>`使用当前上下文(${e==null?void 0:e.context})`,rRt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,sRt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,iRt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,aRt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,oRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nRt(e):t==="fa"?rRt(e):t==="ar"?sRt(e):t==="es"?iRt(e):t==="hi"?aRt(e):tRt(e)}),cRt=()=>"Language",lRt=()=>"语言",uRt=()=>"زبان",_Rt=()=>"اللغة",fRt=()=>"Idioma",dRt=()=>"भाषा",hRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lRt():t==="fa"?uRt():t==="ar"?_Rt():t==="es"?fRt():t==="hi"?dRt():cRt()}),pRt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,mRt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,gRt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,vRt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,bRt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,yRt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,xRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mRt(e):t==="fa"?gRt(e):t==="ar"?vRt(e):t==="es"?bRt(e):t==="hi"?yRt(e):pRt(e)}),wRt=()=>"Make default",kRt=()=>"设为默认值",SRt=()=>"پیش‌فرض شود",CRt=()=>"جعله افتراضيًا",ERt=()=>"Establecer como predeterminado",NRt=()=>"डिफ़ॉल्ट बनाएं",zRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRt():t==="fa"?SRt():t==="ar"?CRt():t==="es"?ERt():t==="hi"?NRt():wRt()}),jRt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",TRt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",ARt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",RRt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",MRt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",ORt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",DRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TRt():t==="fa"?ARt():t==="ar"?RRt():t==="es"?MRt():t==="hi"?ORt():jRt()}),LRt=()=>"Replace token ID",IRt=()=>"替换令牌 ID",$Rt=()=>"جایگزینی شناسهٔ توکن",BRt=()=>"استبدال معرّف الرمز",PRt=()=>"Reemplazar ID del token",FRt=()=>"टोकन ID बदलें",HRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRt():t==="fa"?$Rt():t==="ar"?BRt():t==="es"?PRt():t==="hi"?FRt():LRt()}),qRt=()=>"Replace token secret",URt=()=>"替换令牌密钥",GRt=()=>"جایگزینی رمز توکن",VRt=()=>"استبدال سرّ الرمز",KRt=()=>"Reemplazar secreto del token",WRt=()=>"टोकन सीक्रेट बदलें",QRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?URt():t==="fa"?GRt():t==="ar"?VRt():t==="es"?KRt():t==="hi"?WRt():qRt()}),XRt=()=>"How to get a Modal token",YRt=()=>"如何获取 Modal 令牌",ZRt=()=>"روش دریافت توکن Modal",JRt=()=>"كيفية الحصول على رمز Modal",eMt=()=>"Cómo obtener un token de Modal",tMt=()=>"Modal टोकन कैसे लें",nMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YRt():t==="fa"?ZRt():t==="ar"?JRt():t==="es"?eMt():t==="hi"?tMt():XRt()}),rMt=()=>"Token ID",sMt=()=>"令牌 ID",iMt=()=>"شناسهٔ توکن",aMt=()=>"معرّف الرمز",oMt=()=>"ID del token",cMt=()=>"टोकन ID",lMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sMt():t==="fa"?iMt():t==="ar"?aMt():t==="es"?oMt():t==="hi"?cMt():rMt()}),uMt=()=>"Token secret",_Mt=()=>"令牌密钥",fMt=()=>"رمز توکن",dMt=()=>"سرّ الرمز",hMt=()=>"Secreto del token",pMt=()=>"टोकन सीक्रेट",mMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Mt():t==="fa"?fMt():t==="ar"?dMt():t==="es"?hMt():t==="hi"?pMt():uMt()}),gMt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,vMt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,bMt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,yMt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,xMt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,wMt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,kMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vMt(e):t==="fa"?bMt(e):t==="ar"?yMt(e):t==="es"?xMt(e):t==="hi"?wMt(e):gMt(e)}),SMt=e=>`Needs ${e==null?void 0:e.tool}`,CMt=e=>`需要 ${e==null?void 0:e.tool}`,EMt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,NMt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,zMt=e=>`Requiere ${e==null?void 0:e.tool}`,jMt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,TMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CMt(e):t==="fa"?EMt(e):t==="ar"?NMt(e):t==="es"?zMt(e):t==="hi"?jMt(e):SMt(e)}),AMt=()=>"Needs tools",RMt=()=>"缺少工具",MMt=()=>"به ابزارها نیاز دارد",OMt=()=>"يحتاج إلى أدوات",DMt=()=>"Requiere herramientas",LMt=()=>"टूल की ज़रूरत है",IMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RMt():t==="fa"?MMt():t==="ar"?OMt():t==="es"?DMt():t==="hi"?LMt():AMt()}),$Mt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,BMt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,PMt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,FMt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,HMt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,qMt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,UMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BMt(e):t==="fa"?PMt(e):t==="ar"?FMt(e):t==="es"?HMt(e):t==="hi"?qMt(e):$Mt(e)}),GMt=()=>"New runs use SSH; choose a host when launching.",VMt=()=>"新运行将使用 SSH;启动时请选择主机。",KMt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",WMt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",QMt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",XMt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",YMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VMt():t==="fa"?KMt():t==="ar"?WMt():t==="es"?QMt():t==="hi"?XMt():GMt()}),ZMt=()=>"New token",JMt=()=>"新令牌",eOt=()=>"توکن جدید",tOt=()=>"رمز جديد",nOt=()=>"Nuevo token",rOt=()=>"नया टोकन",sOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JMt():t==="fa"?eOt():t==="ar"?tOt():t==="es"?nOt():t==="hi"?rOt():ZMt()}),iOt=()=>"No default flavor",aOt=()=>"不设默认配置",oOt=()=>"بدون پیکربندی پیش‌فرض",cOt=()=>"لا يوجد تكوين افتراضي للموارد",lOt=()=>"Sin opción predeterminada",uOt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",_Ot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aOt():t==="fa"?oOt():t==="ar"?cOt():t==="es"?lOt():t==="hi"?uOt():iOt()}),fOt=()=>"none",dOt=()=>"无",hOt=()=>"هیچ‌کدام",pOt=()=>"لا شيء",mOt=()=>"ninguno",gOt=()=>"कोई नहीं",Yk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dOt():t==="fa"?hOt():t==="ar"?pOt():t==="es"?mOt():t==="hi"?gOt():fOt()}),vOt=()=>"Not connected",bOt=()=>"未连接",yOt=()=>"متصل نیست",xOt=()=>"غير متصل",wOt=()=>"No conectado",kOt=()=>"कनेक्टेड नहीं",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bOt():t==="fa"?yOt():t==="ar"?xOt():t==="es"?wOt():t==="hi"?kOt():vOt()}),SOt=()=>"not found on PATH",COt=()=>"在 PATH 中未找到",EOt=()=>"در PATH پیدا نشد",NOt=()=>"غير موجود في PATH",zOt=()=>"no se encontró en el PATH",jOt=()=>"PATH पर नहीं मिला",TOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?COt():t==="fa"?EOt():t==="ar"?NOt():t==="es"?zOt():t==="hi"?jOt():SOt()}),AOt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,ROt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,MOt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,OOt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,DOt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,LOt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,IOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ROt(e):t==="fa"?MOt(e):t==="ar"?OOt(e):t==="es"?DOt(e):t==="hi"?LOt(e):AOt(e)}),$Ot=()=>"not initialized",BOt=()=>"尚未初始化",POt=()=>"راه‌اندازی نشده",FOt=()=>"غير مهيّأ",HOt=()=>"sin inicializar",qOt=()=>"शुरू नहीं किया गया",UOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BOt():t==="fa"?POt():t==="ar"?FOt():t==="es"?HOt():t==="hi"?qOt():$Ot()}),GOt=()=>"Not set",VOt=()=>"未设置",KOt=()=>"تنظیم نشده",WOt=()=>"غير مضبوط",QOt=()=>"Sin definir",XOt=()=>"सेट नहीं",f3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VOt():t==="fa"?KOt():t==="ar"?WOt():t==="es"?QOt():t==="hi"?XOt():GOt()}),YOt=()=>"OAuth (subscription login)",ZOt=()=>"OAuth(订阅登录)",JOt=()=>"OAuth (ورود با اشتراک)",eDt=()=>"OAuth (تسجيل دخول الاشتراك)",tDt=()=>"OAuth (inicio de sesión con suscripción)",nDt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",rDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZOt():t==="fa"?JOt():t==="ar"?eDt():t==="es"?tDt():t==="hi"?nDt():YOt()}),sDt=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.`,iDt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,aDt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,oDt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,cDt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,lDt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,uDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iDt(e):t==="fa"?aDt(e):t==="ar"?oDt(e):t==="es"?cDt(e):t==="hi"?lDt(e):sDt(e)}),_Dt=()=>"Setting up…",fDt=()=>"正在设置…",dDt=()=>"در حال راه‌اندازی…",hDt=()=>"جارٍ الإعداد…",pDt=()=>"Configurando…",mDt=()=>"सेट अप हो रहा है…",gDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fDt():t==="fa"?dDt():t==="ar"?hDt():t==="es"?pDt():t==="hi"?mDt():_Dt()}),vDt=()=>"Account",bDt=()=>"账户",yDt=()=>"حساب",xDt=()=>"الحساب",wDt=()=>"Cuenta",kDt=()=>"खाता",Zk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bDt():t==="fa"?yDt():t==="ar"?xDt():t==="es"?wDt():t==="hi"?kDt():vDt()}),SDt=()=>"Add one with",CDt=()=>"使用以下命令添加:",EDt=()=>"یکی با این فرمان اضافه کنید:",NDt=()=>"أضِف واحدًا عبر",zDt=()=>"Añade una con",jDt=()=>"इसके साथ एक जोड़ें",TDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CDt():t==="fa"?EDt():t==="ar"?NDt():t==="es"?zDt():t==="hi"?jDt():SDt()}),ADt=()=>"Add variable",RDt=()=>"添加变量",MDt=()=>"افزودن متغیر",ODt=()=>"إضافة متغيّر",DDt=()=>"Añadir variable",LDt=()=>"वेरिएबल जोड़ें",IDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RDt():t==="fa"?MDt():t==="ar"?ODt():t==="es"?DDt():t==="hi"?LDt():ADt()}),$Dt=()=>"Agent models",BDt=()=>"智能体模型",PDt=()=>"مدل‌های عامل",FDt=()=>"نماذج الوكيل",HDt=()=>"Modelos de los agentes",qDt=()=>"एजेंट मॉडल",UDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BDt():t==="fa"?PDt():t==="ar"?FDt():t==="es"?HDt():t==="hi"?qDt():$Dt()}),GDt=()=>"Anonymous usage analytics",VDt=()=>"匿名使用情况分析",KDt=()=>"تحلیل ناشناس استفاده",WDt=()=>"تحليلات استخدام مجهولة الهوية",QDt=()=>"Estadísticas de uso anónimas",XDt=()=>"अनाम उपयोग एनालिटिक्स",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VDt():t==="fa"?KDt():t==="ar"?WDt():t==="es"?QDt():t==="hi"?XDt():GDt()}),YDt=()=>"Auth",ZDt=()=>"身份验证",JDt=()=>"احراز هویت",eLt=()=>"المصادقة",tLt=()=>"Autenticación",nLt=()=>"ऑथ",rLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZDt():t==="fa"?JDt():t==="ar"?eLt():t==="es"?tLt():t==="hi"?nLt():YDt()}),sLt=()=>"Authentication",iLt=()=>"身份验证",aLt=()=>"احراز هویت",oLt=()=>"المصادقة",cLt=()=>"Autenticación",lLt=()=>"प्रमाणीकरण",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iLt():t==="fa"?aLt():t==="ar"?oLt():t==="es"?cLt():t==="hi"?lLt():sLt()}),uLt=()=>"Back to Compute",_Lt=()=>"返回算力设置",fLt=()=>"بازگشت به رایانش",dLt=()=>"العودة إلى الحوسبة",hLt=()=>"Volver a Cómputo",pLt=()=>"कंप्यूट पर वापस जाएं",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Lt():t==="fa"?fLt():t==="ar"?dLt():t==="es"?hLt():t==="hi"?pLt():uLt()}),mLt=()=>"Backend",gLt=()=>"后端",vLt=()=>"بک‌اند",bLt=()=>"بيئة التنفيذ",yLt=()=>"Backend",xLt=()=>"बैकएंड",wLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gLt():t==="fa"?vLt():t==="ar"?bLt():t==="es"?yLt():t==="hi"?xLt():mLt()}),kLt=()=>"Baseline",SLt=()=>"基线",CLt=()=>"خط مبنا",ELt=()=>"الأساس المرجعي",NLt=()=>"Rama base",zLt=()=>"बेसलाइन",jLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLt():t==="fa"?CLt():t==="ar"?ELt():t==="es"?NLt():t==="hi"?zLt():kLt()}),TLt=()=>"Binary",ALt=()=>"可执行文件",RLt=()=>"فایل اجرایی",MLt=()=>"الملف التنفيذي",OLt=()=>"Binario",DLt=()=>"बाइनरी",LLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ALt():t==="fa"?RLt():t==="ar"?MLt():t==="es"?OLt():t==="hi"?DLt():TLt()}),ILt=()=>"Cancel",$Lt=()=>"取消",BLt=()=>"لغو",PLt=()=>"إلغاء",FLt=()=>"Cancelar",HLt=()=>"रद्द करें",Q_=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Lt():t==="fa"?BLt():t==="ar"?PLt():t==="es"?FLt():t==="hi"?HLt():ILt()}),qLt=()=>"Cancel new variable",ULt=()=>"取消新变量",GLt=()=>"لغو متغیر جدید",VLt=()=>"إلغاء المتغيّر الجديد",KLt=()=>"Cancelar nueva variable",WLt=()=>"नया वेरिएबल रद्द करें",QLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULt():t==="fa"?GLt():t==="ar"?VLt():t==="es"?KLt():t==="hi"?WLt():qLt()}),XLt=()=>"Checking compute targets…",YLt=()=>"正在检查算力目标…",ZLt=()=>"در حال بررسی مقصدهای رایانشی…",JLt=()=>"جارٍ التحقق من أهداف الحوسبة…",eIt=()=>"Comprobando destinos de cómputo…",tIt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",nIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YLt():t==="fa"?ZLt():t==="ar"?JLt():t==="es"?eIt():t==="hi"?tIt():XLt()}),rIt=()=>"Checking kubectl…",sIt=()=>"正在检查 kubectl…",iIt=()=>"در حال بررسی kubectl…",aIt=()=>"جارٍ التحقق من kubectl…",oIt=()=>"Comprobando kubectl…",cIt=()=>"kubectl जाँचा जा रहा है…",lIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sIt():t==="fa"?iIt():t==="ar"?aIt():t==="es"?oIt():t==="hi"?cIt():rIt()}),uIt=()=>"Checking Modal…",_It=()=>"正在检查 Modal…",fIt=()=>"در حال بررسی Modal…",dIt=()=>"جارٍ التحقق من Modal…",hIt=()=>"Comprobando Modal…",pIt=()=>"Modal जाँचा जा रहा है…",mIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_It():t==="fa"?fIt():t==="ar"?dIt():t==="es"?hIt():t==="hi"?pIt():uIt()}),gIt=()=>"Choose a preset flavor",vIt=()=>"选择预设规格",bIt=()=>"یک پیکربندی آماده انتخاب کنید",yIt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",xIt=()=>"Elige una opción predefinida",wIt=()=>"एक प्रीसेट फ़्लेवर चुनें",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vIt():t==="fa"?bIt():t==="ar"?yIt():t==="es"?xIt():t==="hi"?wIt():gIt()}),kIt=()=>"cluster default",SIt=()=>"集群默认值",CIt=()=>"پیش‌فرض خوشه",EIt=()=>"افتراضي العنقود",NIt=()=>"valor predeterminado del clúster",zIt=()=>"क्लस्टर डिफ़ॉल्ट",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SIt():t==="fa"?CIt():t==="ar"?EIt():t==="es"?NIt():t==="hi"?zIt():kIt()}),jIt=()=>"cluster default (e.g. 4h, 30m)",TIt=()=>"集群默认值(例如 4h、30m)",AIt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",RIt=()=>"افتراضي العنقود (مثل 4h أو 30m)",MIt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",OIt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",DIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TIt():t==="fa"?AIt():t==="ar"?RIt():t==="es"?MIt():t==="hi"?OIt():jIt()}),LIt=()=>"Cluster unreachable",IIt=()=>"无法连接集群",$It=()=>"خوشه در دسترس نیست",BIt=()=>"تعذّر الوصول إلى العنقود",PIt=()=>"Clúster inaccesible",FIt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",HIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IIt():t==="fa"?$It():t==="ar"?BIt():t==="es"?PIt():t==="hi"?FIt():LIt()}),qIt=()=>"Compute",UIt=()=>"算力",GIt=()=>"رایانش",VIt=()=>"الحوسبة",KIt=()=>"Cómputo",WIt=()=>"कंप्यूट",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UIt():t==="fa"?GIt():t==="ar"?VIt():t==="es"?KIt():t==="hi"?WIt():qIt()}),QIt=()=>"Connect compute backends and choose where new runs execute.",XIt=()=>"连接算力后端,并选择新运行的执行位置。",YIt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",ZIt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",JIt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",e$t=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",t$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XIt():t==="fa"?YIt():t==="ar"?ZIt():t==="es"?JIt():t==="hi"?e$t():QIt()}),n$t=()=>"Connected",r$t=()=>"已连接",s$t=()=>"متصل",i$t=()=>"متصل",a$t=()=>"Conectado",o$t=()=>"कनेक्टेड",c$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r$t():t==="fa"?s$t():t==="ar"?i$t():t==="es"?a$t():t==="hi"?o$t():n$t()}),l$t=()=>"Context",u$t=()=>"上下文",_$t=()=>"زمینه",f$t=()=>"السياق",d$t=()=>"Contexto",h$t=()=>"कॉन्टेक्स्ट",p$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u$t():t==="fa"?_$t():t==="ar"?f$t():t==="es"?d$t():t==="hi"?h$t():l$t()}),m$t=()=>"Current",g$t=()=>"当前",v$t=()=>"فعلی",b$t=()=>"الحالي",y$t=()=>"Actual",x$t=()=>"मौजूदा",w$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g$t():t==="fa"?v$t():t==="ar"?b$t():t==="es"?y$t():t==="hi"?x$t():m$t()}),k$t=()=>"Currently off:",S$t=()=>"当前已关闭:",C$t=()=>"اکنون خاموش است:",E$t=()=>"معطّل حاليًا:",N$t=()=>"Desactivado actualmente:",z$t=()=>"फ़िलहाल बंद:",j$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S$t():t==="fa"?C$t():t==="ar"?E$t():t==="es"?N$t():t==="hi"?z$t():k$t()}),T$t=()=>"Custom flavor",A$t=()=>"自定义规格",R$t=()=>"پیکربندی سفارشی",M$t=()=>"تكوين موارد مخصّص",O$t=()=>"Opción personalizada",D$t=()=>"कस्टम फ़्लेवर",L$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A$t():t==="fa"?R$t():t==="ar"?M$t():t==="es"?O$t():t==="hi"?D$t():T$t()}),I$t=()=>"Custom flavor…",$$t=()=>"自定义规格…",B$t=()=>"پیکربندی سفارشی…",P$t=()=>"تكوين موارد مخصّص…",F$t=()=>"Opción personalizada…",H$t=()=>"कस्टम फ़्लेवर…",q$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$$t():t==="fa"?B$t():t==="ar"?P$t():t==="es"?F$t():t==="hi"?H$t():I$t()}),U$t=()=>"Data directory",G$t=()=>"数据目录",V$t=()=>"پوشهٔ داده",K$t=()=>"دليل البيانات",W$t=()=>"Directorio de datos",Q$t=()=>"डेटा डायरेक्टरी",X$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G$t():t==="fa"?V$t():t==="ar"?K$t():t==="es"?W$t():t==="hi"?Q$t():U$t()}),Y$t=()=>"default",Z$t=()=>"默认",J$t=()=>"پیش‌فرض",eBt=()=>"افتراضي",tBt=()=>"predeterminado",nBt=()=>"डिफ़ॉल्ट",rBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z$t():t==="fa"?J$t():t==="ar"?eBt():t==="es"?tBt():t==="hi"?nBt():Y$t()}),sBt=()=>"Default",iBt=()=>"默认",aBt=()=>"پیش‌فرض",oBt=()=>"الافتراضي",cBt=()=>"Predeterminado",lBt=()=>"डिफ़ॉल्ट",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iBt():t==="fa"?aBt():t==="ar"?oBt():t==="es"?cBt():t==="hi"?lBt():sBt()}),uBt=()=>"Default destination",_Bt=()=>"默认目标",fBt=()=>"مقصد پیش‌فرض",dBt=()=>"الوجهة الافتراضية",hBt=()=>"Destino predeterminado",pBt=()=>"डिफ़ॉल्ट गंतव्य",mBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Bt():t==="fa"?fBt():t==="ar"?dBt():t==="es"?hBt():t==="hi"?pBt():uBt()}),gBt=()=>"Detecting hardware…",vBt=()=>"正在检测硬件…",bBt=()=>"در حال شناسایی سخت‌افزار…",yBt=()=>"جارٍ اكتشاف العتاد…",xBt=()=>"Detectando hardware…",wBt=()=>"हार्डवेयर पहचाना जा रहा है…",kBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vBt():t==="fa"?bBt():t==="ar"?yBt():t==="es"?xBt():t==="hi"?wBt():gBt()}),SBt=()=>"Detecting harnesses…",CBt=()=>"正在检测智能体工具…",EBt=()=>"در حال شناسایی ابزارهای عامل…",NBt=()=>"جارٍ اكتشاف أدوات البرمجة…",zBt=()=>"Detectando agentes…",jBt=()=>"हार्नेस पहचाने जा रहे हैं…",TBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CBt():t==="fa"?EBt():t==="ar"?NBt():t==="es"?zBt():t==="hi"?jBt():SBt()}),ABt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",RBt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",MBt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",OBt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",DBt=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",LBt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",IBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RBt():t==="fa"?MBt():t==="ar"?OBt():t==="es"?DBt():t==="hi"?LBt():ABt()}),$Bt=()=>"Effective URL",BBt=()=>"实际使用的网址",PBt=()=>"نشانی مؤثر",FBt=()=>"الرابط الفعّال",HBt=()=>"URL efectiva",qBt=()=>"प्रभावी URL",UBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BBt():t==="fa"?PBt():t==="ar"?FBt():t==="es"?HBt():t==="hi"?qBt():$Bt()}),GBt=()=>"Enable GitHub syncing for new projects",VBt=()=>"为新项目启用 GitHub 同步",KBt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",WBt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",QBt=()=>"Activar la sincronización con GitHub en proyectos nuevos",XBt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VBt():t==="fa"?KBt():t==="ar"?WBt():t==="es"?QBt():t==="hi"?XBt():GBt()}),YBt=()=>"Environment",ZBt=()=>"环境",JBt=()=>"محیط",ePt=()=>"البيئة",tPt=()=>"Entorno",nPt=()=>"एनवायरनमेंट",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZBt():t==="fa"?JBt():t==="ar"?ePt():t==="es"?tPt():t==="hi"?nPt():YBt()}),rPt=()=>"Failed",sPt=()=>"失败",iPt=()=>"ناموفق",aPt=()=>"فشل",oPt=()=>"Error",cPt=()=>"विफल",Jk=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sPt():t==="fa"?iPt():t==="ar"?aPt():t==="es"?oPt():t==="hi"?cPt():rPt()}),lPt=()=>"General",uPt=()=>"常规",_Pt=()=>"عمومی",fPt=()=>"عام",dPt=()=>"General",hPt=()=>"सामान्य",pPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uPt():t==="fa"?_Pt():t==="ar"?fPt():t==="es"?dPt():t==="hi"?hPt():lPt()}),mPt=()=>"GitHub publishing",gPt=()=>"GitHub 发布",vPt=()=>"انتشار در GitHub",bPt=()=>"النشر على GitHub",yPt=()=>"Publicación en GitHub",xPt=()=>"GitHub प्रकाशन",wPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gPt():t==="fa"?vPt():t==="ar"?bPt():t==="es"?yPt():t==="hi"?xPt():mPt()}),kPt=()=>"Git token",SPt=()=>"Git 令牌",CPt=()=>"توکن Git",EPt=()=>"رمز Git",NPt=()=>"Token de Git",zPt=()=>"Git टोकन",jPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SPt():t==="fa"?CPt():t==="ar"?EPt():t==="es"?NPt():t==="hi"?zPt():kPt()}),TPt=()=>"Harnesses",APt=()=>"智能体工具",RPt=()=>"ابزارهای عامل",MPt=()=>"أدوات البرمجة",OPt=()=>"Agentes",DPt=()=>"हार्नेस",d3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?APt():t==="fa"?RPt():t==="ar"?MPt():t==="es"?OPt():t==="hi"?DPt():TPt()}),LPt=()=>"hf_…",IPt=()=>"hf_…",$Pt=()=>"hf_…",BPt=()=>"hf_…",PPt=()=>"hf_…",FPt=()=>"hf_…",HPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IPt():t==="fa"?$Pt():t==="ar"?BPt():t==="es"?PPt():t==="hi"?FPt():LPt()}),qPt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",UPt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",GPt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",VPt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",KPt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",WPt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",QPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UPt():t==="fa"?GPt():t==="ar"?VPt():t==="es"?KPt():t==="hi"?WPt():qPt()}),XPt=()=>"Initialize Git",YPt=()=>"初始化 Git",ZPt=()=>"راه‌اندازی Git",JPt=()=>"تهيئة Git",eFt=()=>"Inicializar Git",tFt=()=>"Git शुरू करें",nFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YPt():t==="fa"?ZPt():t==="ar"?JPt():t==="es"?eFt():t==="hi"?tFt():XPt()}),rFt=()=>"Install",sFt=()=>"安装",iFt=()=>"نصب",aFt=()=>"تثبيت",oFt=()=>"Instalar",cFt=()=>"इंस्टॉल करें",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sFt():t==="fa"?iFt():t==="ar"?aFt():t==="es"?oFt():t==="hi"?cFt():rFt()}),lFt=()=>"Install broken",uFt=()=>"安装损坏",_Ft=()=>"نصب خراب است",fFt=()=>"التثبيت معطوب",dFt=()=>"Instalación dañada",hFt=()=>"इंस्टॉल खराब है",pFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uFt():t==="fa"?_Ft():t==="ar"?fFt():t==="es"?dFt():t==="hi"?hFt():lFt()}),mFt=()=>"Install GitHub CLI",gFt=()=>"安装 GitHub CLI",vFt=()=>"نصب GitHub CLI",bFt=()=>"تثبيت واجهة GitHub لسطر الأوامر",yFt=()=>"Instalar GitHub CLI",xFt=()=>"GitHub CLI इंस्टॉल करें",wFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gFt():t==="fa"?vFt():t==="ar"?bFt():t==="es"?yFt():t==="hi"?xFt():mFt()}),kFt=()=>"Install updates automatically",SFt=()=>"自动安装更新",CFt=()=>"نصب خودکار به‌روزرسانی‌ها",EFt=()=>"تثبيت التحديثات تلقائيًا",NFt=()=>"Instalar actualizaciones automáticamente",zFt=()=>"अपडेट अपने आप इंस्टॉल करें",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SFt():t==="fa"?CFt():t==="ar"?EFt():t==="es"?NFt():t==="hi"?zFt():kFt()}),jFt=()=>"Instance history",TFt=()=>"实例历史",AFt=()=>"تاریخچهٔ نمونه‌ها",RFt=()=>"سجل المثيلات",MFt=()=>"Historial de instancias",OFt=()=>"इंस्टेंस इतिहास",DFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TFt():t==="fa"?AFt():t==="ar"?RFt():t==="es"?MFt():t==="hi"?OFt():jFt()}),LFt=()=>"Invalid Token",IFt=()=>"令牌无效",$Ft=()=>"توکن نامعتبر",BFt=()=>"رمز غير صالح",PFt=()=>"Token no válido",FFt=()=>"अमान्य टोकन",HFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IFt():t==="fa"?$Ft():t==="ar"?BFt():t==="es"?PFt():t==="hi"?FFt():LFt()}),qFt=()=>"Jobs / Dashboard URL",UFt=()=>"Jobs / 控制台网址",GFt=()=>"نشانی Jobs / داشبورد",VFt=()=>"رابط المهام / لوحة التحكم",KFt=()=>"URL de jobs / dashboard",WFt=()=>"Jobs / डैशबोर्ड URL",QFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UFt():t==="fa"?GFt():t==="ar"?VFt():t==="es"?KFt():t==="hi"?WFt():qFt()}),XFt=()=>"kubectl not found",YFt=()=>"未找到 kubectl",ZFt=()=>"kubectl پیدا نشد",JFt=()=>"لم يُعثر على kubectl",eHt=()=>"No se encontró kubectl",tHt=()=>"kubectl नहीं मिला",nHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YFt():t==="fa"?ZFt():t==="ar"?JFt():t==="es"?eHt():t==="hi"?tHt():XFt()}),rHt=()=>"Latest",sHt=()=>"最新版本",iHt=()=>"جدیدترین",aHt=()=>"الأحدث",oHt=()=>"Última",cHt=()=>"नवीनतम",lHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sHt():t==="fa"?iHt():t==="ar"?aHt():t==="es"?oHt():t==="hi"?cHt():rHt()}),uHt=()=>"Loading…",_Ht=()=>"正在加载…",fHt=()=>"در حال بارگیری…",dHt=()=>"جارٍ التحميل…",hHt=()=>"Cargando…",pHt=()=>"लोड हो रहा है…",Ru=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ht():t==="fa"?fHt():t==="ar"?dHt():t==="es"?hHt():t==="hi"?pHt():uHt()}),mHt=()=>"Loading Ray settings…",gHt=()=>"正在加载 Ray 设置…",vHt=()=>"در حال بارگیری تنظیمات Ray…",bHt=()=>"جارٍ تحميل إعدادات Ray…",yHt=()=>"Cargando configuración de Ray…",xHt=()=>"Ray सेटिंग्स लोड हो रही हैं…",wHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gHt():t==="fa"?vHt():t==="ar"?bHt():t==="es"?yHt():t==="hi"?xHt():mHt()}),kHt=()=>"Loading slurm settings…",SHt=()=>"正在加载 Slurm 设置…",CHt=()=>"در حال بارگیری تنظیمات Slurm…",EHt=()=>"جارٍ تحميل إعدادات slurm…",NHt=()=>"Cargando configuración de Slurm…",zHt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",jHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SHt():t==="fa"?CHt():t==="ar"?EHt():t==="es"?NHt():t==="hi"?zHt():kHt()}),THt=()=>"Loading status…",AHt=()=>"正在加载状态…",RHt=()=>"در حال بارگیری وضعیت…",MHt=()=>"جارٍ تحميل الحالة…",OHt=()=>"Cargando estado…",DHt=()=>"स्थिति लोड हो रही है…",LHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AHt():t==="fa"?RHt():t==="ar"?MHt():t==="es"?OHt():t==="hi"?DHt():THt()}),IHt=()=>"Local only",$Ht=()=>"仅本地",BHt=()=>"فقط محلی",PHt=()=>"محلي فقط",FHt=()=>"Solo local",HHt=()=>"केवल लोकल",qHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ht():t==="fa"?BHt():t==="ar"?PHt():t==="es"?FHt():t==="hi"?HHt():IHt()}),UHt=()=>"Local repository",GHt=()=>"本地仓库",VHt=()=>"مخزن محلی",KHt=()=>"مستودع محلي",WHt=()=>"Repositorio local",QHt=()=>"लोकल रिपॉज़िटरी",XHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GHt():t==="fa"?VHt():t==="ar"?KHt():t==="es"?WHt():t==="hi"?QHt():UHt()}),YHt=()=>"Login node",ZHt=()=>"登录节点",JHt=()=>"گرهٔ ورود",eqt=()=>"عقدة الدخول",tqt=()=>"Nodo de acceso",nqt=()=>"लॉगिन नोड",rqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZHt():t==="fa"?JHt():t==="ar"?eqt():t==="es"?tqt():t==="hi"?nqt():YHt()}),sqt=()=>"Make GitHub syncing the default?",iqt=()=>"将 GitHub 同步设为默认值?",aqt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",oqt=()=>"جعل مزامنة GitHub افتراضية؟",cqt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",lqt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",uqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iqt():t==="fa"?aqt():t==="ar"?oqt():t==="es"?cqt():t==="hi"?lqt():sqt()}),_qt=()=>"Missing bash/tar",fqt=()=>"缺少 bash/tar",dqt=()=>"bash/tar موجود نیست",hqt=()=>"‏bash/tar مفقودان",pqt=()=>"Falta bash/tar",mqt=()=>"bash/tar गुम है",gqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fqt():t==="fa"?dqt():t==="ar"?hqt():t==="es"?pqt():t==="hi"?mqt():_qt()}),vqt=()=>"More compute options",bqt=()=>"更多算力选项",yqt=()=>"گزینه‌های رایانشی بیشتر",xqt=()=>"خيارات حوسبة إضافية",wqt=()=>"Más opciones de cómputo",kqt=()=>"और कंप्यूट विकल्प",Sqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bqt():t==="fa"?yqt():t==="ar"?xqt():t==="es"?wqt():t==="hi"?kqt():vqt()}),Cqt=()=>"Move failed:",Eqt=()=>"移动失败:",Nqt=()=>"انتقال ناموفق بود:",zqt=()=>"فشل النقل:",jqt=()=>"Error al mover:",Tqt=()=>"स्थानांतरण विफल:",Aqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eqt():t==="fa"?Nqt():t==="ar"?zqt():t==="es"?jqt():t==="hi"?Tqt():Cqt()}),Rqt=()=>"Moved. orx is now using the new location.",Mqt=()=>"已移动。orx 现在使用新位置。",Oqt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",Dqt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",Lqt=()=>"Movido. orx ya usa la nueva ubicación.",Iqt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",$qt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mqt():t==="fa"?Oqt():t==="ar"?Dqt():t==="es"?Lqt():t==="hi"?Iqt():Rqt()}),Bqt=()=>"Namespace",Pqt=()=>"命名空间",Fqt=()=>"فضای نام",Hqt=()=>"مساحة الأسماء",qqt=()=>"Namespace",Uqt=()=>"नेमस्पेस",Gqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqt():t==="fa"?Fqt():t==="ar"?Hqt():t==="es"?qqt():t==="hi"?Uqt():Bqt()}),Vqt=()=>"New location",Kqt=()=>"新位置",Wqt=()=>"محل جدید",Qqt=()=>"الموقع الجديد",Xqt=()=>"Nueva ubicación",Yqt=()=>"नया स्थान",Zqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqt():t==="fa"?Wqt():t==="ar"?Qqt():t==="es"?Xqt():t==="hi"?Yqt():Vqt()}),Jqt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",eUt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",tUt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",nUt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",rUt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",sUt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",iUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUt():t==="fa"?tUt():t==="ar"?nUt():t==="es"?rUt():t==="hi"?sUt():Jqt()}),aUt=()=>"New variable key",oUt=()=>"新变量键名",cUt=()=>"کلید متغیر جدید",lUt=()=>"مفتاح المتغيّر الجديد",uUt=()=>"Nombre de la nueva variable",_Ut=()=>"नई वेरिएबल की",fUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUt():t==="fa"?cUt():t==="ar"?lUt():t==="es"?uUt():t==="hi"?_Ut():aUt()}),dUt=()=>"New variable value",hUt=()=>"新变量值",pUt=()=>"مقدار متغیر جدید",mUt=()=>"قيمة المتغيّر الجديد",gUt=()=>"Valor de la nueva variable",vUt=()=>"नई वेरिएबल वैल्यू",bUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hUt():t==="fa"?pUt():t==="ar"?mUt():t==="es"?gUt():t==="hi"?vUt():dUt()}),yUt=()=>"No code, prompts, file contents, or account identifiers are sent.",xUt=()=>"不会发送代码、提示词、文件内容或账户标识符。",wUt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",kUt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",SUt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",CUt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",EUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xUt():t==="fa"?wUt():t==="ar"?kUt():t==="es"?SUt():t==="hi"?CUt():yUt()}),NUt=()=>"No hosts found in ~/.ssh/config.",zUt=()=>"在 ~/.ssh/config 中未找到主机。",jUt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",TUt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",AUt=()=>"No se encontraron hosts en ~/.ssh/config.",RUt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",MUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zUt():t==="fa"?jUt():t==="ar"?TUt():t==="es"?AUt():t==="hi"?RUt():NUt()}),OUt=()=>"No job-create permission",DUt=()=>"没有创建 Job 的权限",LUt=()=>"مجوز ساخت Job وجود ندارد",IUt=()=>"لا صلاحية لإنشاء المهام",$Ut=()=>"Sin permiso para crear jobs",BUt=()=>"जॉब बनाने की अनुमति नहीं",PUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DUt():t==="fa"?LUt():t==="ar"?IUt():t==="es"?$Ut():t==="hi"?BUt():OUt()}),FUt=()=>"No Write Permissions",HUt=()=>"无写入权限",qUt=()=>"بدون مجوز نوشتن",UUt=()=>"لا صلاحيات كتابة",GUt=()=>"Sin permisos de escritura",VUt=()=>"लिखने की अनुमति नहीं",KUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HUt():t==="fa"?qUt():t==="ar"?UUt():t==="es"?GUt():t==="hi"?VUt():FUt()}),WUt=()=>"No key on this computer to register — load a registered key with",QUt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",XUt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",YUt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",ZUt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",JUt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",eGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QUt():t==="fa"?XUt():t==="ar"?YUt():t==="es"?ZUt():t==="hi"?JUt():WUt()}),tGt=()=>"No key on this computer yet — create one with",nGt=()=>"此计算机上还没有密钥——使用以下命令创建:",rGt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",sGt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",iGt=()=>"Aún no hay ninguna clave en este equipo — crea una con",aGt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",oGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nGt():t==="fa"?rGt():t==="ar"?sGt():t==="es"?iGt():t==="hi"?aGt():tGt()}),cGt=()=>"No Slurm CLI",lGt=()=>"无 Slurm CLI",uGt=()=>"بدون CLI اسلورم",_Gt=()=>"لا توجد واجهة Slurm لسطر الأوامر",fGt=()=>"Sin CLI de Slurm",dGt=()=>"कोई Slurm CLI नहीं",hGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lGt():t==="fa"?uGt():t==="ar"?_Gt():t==="es"?fGt():t==="hi"?dGt():cGt()}),pGt=()=>"None registered",mGt=()=>"未注册任何密钥",gGt=()=>"هیچ‌کدام ثبت نشده",vGt=()=>"لا شيء مسجّل",bGt=()=>"Ninguna registrada",yGt=()=>"कोई रजिस्टर्ड नहीं",xGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mGt():t==="fa"?gGt():t==="ar"?vGt():t==="es"?bGt():t==="hi"?yGt():pGt()}),wGt=()=>"Not checked",kGt=()=>"未检查",SGt=()=>"بررسی نشده",CGt=()=>"لم يُفحص",EGt=()=>"Sin comprobar",NGt=()=>"जाँचा नहीं गया",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kGt():t==="fa"?SGt():t==="ar"?CGt():t==="es"?EGt():t==="hi"?NGt():wGt()}),zGt=()=>"Not configured",jGt=()=>"未配置",TGt=()=>"پیکربندی نشده",AGt=()=>"غير مُعَد",RGt=()=>"Sin configurar",MGt=()=>"कॉन्फ़िगर नहीं किया गया",jb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jGt():t==="fa"?TGt():t==="ar"?AGt():t==="es"?RGt():t==="hi"?MGt():zGt()}),OGt=()=>"Not installed",DGt=()=>"未安装",LGt=()=>"نصب نیست",IGt=()=>"غير مثبّت",$Gt=()=>"No instalado",BGt=()=>"इंस्टॉल नहीं है",PGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DGt():t==="fa"?LGt():t==="ar"?IGt():t==="es"?$Gt():t==="hi"?BGt():OGt()}),FGt=()=>"Not now",HGt=()=>"暂不",qGt=()=>"اکنون نه",UGt=()=>"ليس الآن",GGt=()=>"Ahora no",VGt=()=>"अभी नहीं",KGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HGt():t==="fa"?qGt():t==="ar"?UGt():t==="es"?GGt():t==="hi"?VGt():FGt()}),WGt=()=>"Not on this computer",QGt=()=>"不在此计算机上",XGt=()=>"روی این رایانه نیست",YGt=()=>"ليس على هذا الحاسوب",ZGt=()=>"No en este equipo",JGt=()=>"इस कंप्यूटर पर नहीं",eVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QGt():t==="fa"?XGt():t==="ar"?YGt():t==="es"?ZGt():t==="hi"?JGt():WGt()}),tVt=()=>"Not set (pass --host per launch)",nVt=()=>"未设置(每次启动时传入 --host)",rVt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",sVt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",iVt=()=>"Sin definir (pasa --host en cada lanzamiento)",aVt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nVt():t==="fa"?rVt():t==="ar"?sVt():t==="es"?iVt():t==="hi"?aVt():tVt()}),oVt=()=>"Not signed in",cVt=()=>"未登录",lVt=()=>"وارد نشده",uVt=()=>"لم يتم تسجيل الدخول",_Vt=()=>"Sin iniciar sesión",fVt=()=>"साइन इन नहीं है",yL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cVt():t==="fa"?lVt():t==="ar"?uVt():t==="es"?_Vt():t==="hi"?fVt():oVt()}),dVt=()=>"On this computer",hVt=()=>"在此计算机上",pVt=()=>"روی این رایانه",mVt=()=>"على هذا الحاسوب",gVt=()=>"En este equipo",vVt=()=>"इस कंप्यूटर पर",bVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hVt():t==="fa"?pVt():t==="ar"?mVt():t==="es"?gVt():t==="hi"?vVt():dVt()}),yVt=()=>"Open a project to inspect its repository and GitHub publication state.",xVt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",wVt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",kVt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",SVt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",CVt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",EVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xVt():t==="fa"?wVt():t==="ar"?kVt():t==="es"?SVt():t==="hi"?CVt():yVt()}),NVt=()=>"Open job page",zVt=()=>"打开作业页面",jVt=()=>"باز کردن صفحهٔ کار",TVt=()=>"فتح صفحة المهمة",AVt=()=>"Abrir página del job",RVt=()=>"जॉब पेज खोलें",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zVt():t==="fa"?jVt():t==="ar"?TVt():t==="es"?AVt():t==="hi"?RVt():NVt()}),MVt=()=>"Open on GitHub",OVt=()=>"在 GitHub 上打开",DVt=()=>"باز کردن در GitHub",LVt=()=>"فتح على GitHub",IVt=()=>"Abrir en GitHub",$Vt=()=>"GitHub पर खोलें",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OVt():t==="fa"?DVt():t==="ar"?LVt():t==="es"?IVt():t==="hi"?$Vt():MVt()}),BVt=()=>", or create one with",PVt=()=>",或使用以下命令创建:",FVt=()=>"، یا با این فرمان یکی بسازید:",HVt=()=>"، أو أنشئ واحدًا عبر",qVt=()=>", o crea una con",UVt=()=>", या इसके साथ एक बनाएं",GVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PVt():t==="fa"?FVt():t==="ar"?HVt():t==="es"?qVt():t==="hi"?UVt():BVt()}),VVt=()=>"Org",KVt=()=>"组织",WVt=()=>"سازمان",QVt=()=>"المؤسسة",XVt=()=>"Org.",YVt=()=>"संगठन",ZVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KVt():t==="fa"?WVt():t==="ar"?QVt():t==="es"?XVt():t==="hi"?YVt():VVt()}),JVt=()=>"Orgs",eKt=()=>"组织",tKt=()=>"سازمان‌ها",nKt=()=>"المؤسسات",rKt=()=>"Orgs.",sKt=()=>"संगठन",iKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eKt():t==="fa"?tKt():t==="ar"?nKt():t==="es"?rKt():t==="hi"?sKt():JVt()}),aKt=()=>"orx can't update this install",oKt=()=>"orx 无法更新此安装",cKt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",lKt=()=>"لا يستطيع orx تحديث هذا التثبيت",uKt=()=>"orx no puede actualizar esta instalación",_Kt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",fKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oKt():t==="fa"?cKt():t==="ar"?lKt():t==="es"?uKt():t==="hi"?_Kt():aKt()}),dKt=()=>"Overleaf",hKt=()=>"Overleaf",pKt=()=>"Overleaf",mKt=()=>"Overleaf",gKt=()=>"Overleaf",vKt=()=>"Overleaf",xL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hKt():t==="fa"?pKt():t==="ar"?mKt():t==="es"?gKt():t==="hi"?vKt():dKt()}),bKt=()=>"Overleaf Git authentication token",yKt=()=>"Overleaf Git 身份验证令牌",xKt=()=>"توکن احراز هویت Git در Overleaf",wKt=()=>"رمز مصادقة Git لـ Overleaf",kKt=()=>"Token de autenticación de Git de Overleaf",SKt=()=>"Overleaf Git प्रमाणीकरण टोकन",CKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yKt():t==="fa"?xKt():t==="ar"?wKt():t==="es"?kKt():t==="hi"?SKt():bKt()}),EKt=()=>"Overridden by env",NKt=()=>"已被环境变量覆盖",zKt=()=>"بازنویسی‌شده توسط محیط",jKt=()=>"متجاوَز عبر متغيّر البيئة",TKt=()=>"Sobrescrito por el entorno",AKt=()=>"env द्वारा ओवरराइड किया गया",RKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NKt():t==="fa"?zKt():t==="ar"?jKt():t==="es"?TKt():t==="hi"?AKt():EKt()}),MKt=()=>"Partition",OKt=()=>"分区",DKt=()=>"پارتیشن",LKt=()=>"القسم",IKt=()=>"Partición",$Kt=()=>"पार्टीशन",BKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OKt():t==="fa"?DKt():t==="ar"?LKt():t==="es"?IKt():t==="hi"?$Kt():MKt()}),PKt=()=>"Path",FKt=()=>"路径",HKt=()=>"مسیر",qKt=()=>"المسار",UKt=()=>"Ruta",GKt=()=>"पथ",VKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FKt():t==="fa"?HKt():t==="ar"?qKt():t==="es"?UKt():t==="hi"?GKt():PKt()}),KKt=()=>"Plan",WKt=()=>"方案",QKt=()=>"سطح اشتراک",XKt=()=>"الخطة",YKt=()=>"Plan",ZKt=()=>"प्लान",JKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WKt():t==="fa"?QKt():t==="ar"?XKt():t==="es"?YKt():t==="hi"?ZKt():KKt()}),eWt=()=>"Project",tWt=()=>"项目",nWt=()=>"پروژه",rWt=()=>"المشروع",sWt=()=>"Proyecto",iWt=()=>"प्रोजेक्ट",aWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tWt():t==="fa"?nWt():t==="ar"?rWt():t==="es"?sWt():t==="hi"?iWt():eWt()}),oWt=()=>"Ray version",cWt=()=>"Ray 版本",lWt=()=>"نسخهٔ Ray",uWt=()=>"إصدار Ray",_Wt=()=>"Versión de Ray",fWt=()=>"Ray वर्शन",dWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cWt():t==="fa"?lWt():t==="ar"?uWt():t==="es"?_Wt():t==="hi"?fWt():oWt()}),hWt=()=>"Reachable",pWt=()=>"可访问",mWt=()=>"در دسترس",gWt=()=>"يمكن الوصول إليه",vWt=()=>"Accesible",bWt=()=>"पहुँच योग्य",yWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pWt():t==="fa"?mWt():t==="ar"?gWt():t==="es"?vWt():t==="hi"?bWt():hWt()}),xWt=()=>"Reading ~/.ssh/config…",wWt=()=>"正在读取 ~/.ssh/config…",kWt=()=>"در حال خواندن ‎~/.ssh/config…",SWt=()=>"جارٍ قراءة ‎~/.ssh/config…",CWt=()=>"Leyendo ~/.ssh/config…",EWt=()=>"~/.ssh/config पढ़ा जा रहा है…",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wWt():t==="fa"?kWt():t==="ar"?SWt():t==="es"?CWt():t==="hi"?EWt():xWt()}),NWt=()=>"Ready",zWt=()=>"就绪",jWt=()=>"آماده",TWt=()=>"جاهز",AWt=()=>"Listo",RWt=()=>"तैयार",wm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zWt():t==="fa"?jWt():t==="ar"?TWt():t==="es"?AWt():t==="hi"?RWt():NWt()}),MWt=()=>"Ready to move",OWt=()=>"可以移动",DWt=()=>"آمادهٔ انتقال",LWt=()=>"جاهز للنقل",IWt=()=>"Listo para mover",$Wt=()=>"स्थानांतरण के लिए तैयार",BWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OWt():t==="fa"?DWt():t==="ar"?LWt():t==="es"?IWt():t==="hi"?$Wt():MWt()}),PWt=()=>"Configured",FWt=()=>"已配置",HWt=()=>"پیکربندی‌شده",qWt=()=>"مُعَد",UWt=()=>"Configurado",GWt=()=>"कॉन्फ़िगर किया गया",eS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FWt():t==="fa"?HWt():t==="ar"?qWt():t==="es"?UWt():t==="hi"?GWt():PWt()}),VWt=()=>"Refresh",KWt=()=>"刷新",WWt=()=>"تازه‌سازی",QWt=()=>"تحديث",XWt=()=>"Actualizar",YWt=()=>"रीफ़्रेश करें",km=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWt():t==="fa"?WWt():t==="ar"?QWt():t==="es"?XWt():t==="hi"?YWt():VWt()}),ZWt=()=>"Remotes",JWt=()=>"远程仓库",eQt=()=>"مخزن‌های دوردست",tQt=()=>"المستودعات البعيدة",nQt=()=>"Remotos",rQt=()=>"रिमोट",sQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JWt():t==="fa"?eQt():t==="ar"?tQt():t==="es"?nQt():t==="hi"?rQt():ZWt()}),iQt=()=>"Repository",aQt=()=>"仓库",oQt=()=>"مخزن",cQt=()=>"المستودع",lQt=()=>"Repositorio",uQt=()=>"रिपॉज़िटरी",_Qt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aQt():t==="fa"?oQt():t==="ar"?cQt():t==="es"?lQt():t==="hi"?uQt():iQt()}),fQt=()=>"Restart to finish updating",dQt=()=>"重新启动以完成更新",hQt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",pQt=()=>"أعد التشغيل لإكمال التحديث",mQt=()=>"Reinicia para terminar la actualización",gQt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",vQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dQt():t==="fa"?hQt():t==="ar"?pQt():t==="es"?mQt():t==="hi"?gQt():fQt()}),bQt=()=>"Running instances",yQt=()=>"正在运行的实例",xQt=()=>"نمونه‌های در حال اجرا",wQt=()=>"المثيلات قيد التشغيل",kQt=()=>"Instancias en ejecución",SQt=()=>"चल रहे इंस्टेंस",CQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yQt():t==="fa"?xQt():t==="ar"?wQt():t==="es"?kQt():t==="hi"?SQt():bQt()}),EQt=()=>"Runtime",NQt=()=>"运行时间",zQt=()=>"زمان اجرا",jQt=()=>"مدة التشغيل",TQt=()=>"Runtime",AQt=()=>"रनटाइम",RQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NQt():t==="fa"?zQt():t==="ar"?jQt():t==="es"?TQt():t==="hi"?AQt():EQt()}),MQt=()=>". Save it under that key if it's meant for HF Jobs.",OQt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",DQt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",LQt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",IQt=()=>". Guárdalo con ese nombre si es para HF Jobs.",$Qt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",BQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OQt():t==="fa"?DQt():t==="ar"?LQt():t==="es"?IQt():t==="hi"?$Qt():MQt()}),PQt=()=>"Session cookie",FQt=()=>"会话 cookie",HQt=()=>"کوکی نشست",qQt=()=>"ملف تعريف ارتباط الجلسة",UQt=()=>"Cookie de sesión",GQt=()=>"सेशन कुकी",VQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FQt():t==="fa"?HQt():t==="ar"?qQt():t==="es"?UQt():t==="hi"?GQt():PQt()}),KQt=()=>"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.",WQt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",QQt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",XQt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",YQt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",ZQt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",JQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WQt():t==="fa"?QQt():t==="ar"?XQt():t==="es"?YQt():t==="hi"?ZQt():KQt()}),eXt=()=>"Settings",tXt=()=>"设置",nXt=()=>"تنظیمات",rXt=()=>"الإعدادات",sXt=()=>"Configuración",iXt=()=>"सेटिंग्स",tS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tXt():t==="fa"?nXt():t==="ar"?rXt():t==="es"?sXt():t==="hi"?iXt():eXt()}),aXt=()=>"Signed in",oXt=()=>"已登录",cXt=()=>"وارد شده",lXt=()=>"تم تسجيل الدخول",uXt=()=>"Sesión iniciada",_Xt=()=>"साइन इन है",fXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oXt():t==="fa"?cXt():t==="ar"?lXt():t==="es"?uXt():t==="hi"?_Xt():aXt()}),dXt=()=>"Source",hXt=()=>"来源",pXt=()=>"منبع",mXt=()=>"المصدر",gXt=()=>"Origen",vXt=()=>"स्रोत",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hXt():t==="fa"?pXt():t==="ar"?mXt():t==="es"?gXt():t==="hi"?vXt():dXt()}),bXt=()=>"SSH Key",yXt=()=>"SSH 密钥",xXt=()=>"کلید SSH",wXt=()=>"مفتاح SSH",kXt=()=>"Clave SSH",SXt=()=>"SSH की",CXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yXt():t==="fa"?xXt():t==="ar"?wXt():t==="es"?kXt():t==="hi"?SXt():bXt()}),EXt=()=>"Started",NXt=()=>"开始时间",zXt=()=>"آغاز",jXt=()=>"بدأ",TXt=()=>"Inicio",AXt=()=>"शुरू हुआ",RXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NXt():t==="fa"?zXt():t==="ar"?jXt():t==="es"?TXt():t==="hi"?AXt():EXt()}),MXt=()=>"State",OXt=()=>"状态",DXt=()=>"وضعیت",LXt=()=>"الحالة",IXt=()=>"Estado",$Xt=()=>"स्थिति",BXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OXt():t==="fa"?DXt():t==="ar"?LXt():t==="es"?IXt():t==="hi"?$Xt():MXt()}),PXt=()=>"Status",FXt=()=>"状态",HXt=()=>"وضعیت",qXt=()=>"الحالة",UXt=()=>"Estado",GXt=()=>"स्थिति",Dh=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FXt():t==="fa"?HXt():t==="ar"?qXt():t==="es"?UXt():t==="hi"?GXt():PXt()}),VXt=()=>"Storage",KXt=()=>"存储",WXt=()=>"ذخیره‌سازی",QXt=()=>"التخزين",XXt=()=>"Almacenamiento",YXt=()=>"स्टोरेज",ZXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KXt():t==="fa"?WXt():t==="ar"?QXt():t==="es"?XXt():t==="hi"?YXt():VXt()}),JXt=()=>"Sync",eYt=()=>"同步",tYt=()=>"همگام‌سازی",nYt=()=>"مزامنة",rYt=()=>"Sincronización",sYt=()=>"सिंक",iYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eYt():t==="fa"?tYt():t==="ar"?nYt():t==="es"?rYt():t==="hi"?sYt():JXt()}),aYt=()=>"Syncing off",oYt=()=>"同步已关闭",cYt=()=>"همگام‌سازی خاموش",lYt=()=>"المزامنة معطّلة",uYt=()=>"Sincronización desactivada",_Yt=()=>"सिंकिंग बंद है",fYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oYt():t==="fa"?cYt():t==="ar"?lYt():t==="es"?uYt():t==="hi"?_Yt():aYt()}),dYt=()=>"Test connection",hYt=()=>"测试连接",pYt=()=>"آزمایش اتصال",mYt=()=>"اختبار الاتصال",gYt=()=>"Probar conexión",vYt=()=>"कनेक्शन जाँचें",bYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hYt():t==="fa"?pYt():t==="ar"?mYt():t==="es"?gYt():t==="hi"?vYt():dYt()}),yYt=()=>"Testing…",xYt=()=>"正在测试…",wYt=()=>"در حال آزمایش…",kYt=()=>"جارٍ الاختبار…",SYt=()=>"Probando…",CYt=()=>"जाँचा जा रहा है…",EYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xYt():t==="fa"?wYt():t==="ar"?kYt():t==="es"?SYt():t==="hi"?CYt():yYt()}),NYt=()=>", then add it with",zYt=()=>",然后使用以下命令添加:",jYt=()=>"، سپس با این فرمان اضافه‌اش کنید:",TYt=()=>"، ثم أضِفه عبر",AYt=()=>" y luego añádela con",RYt=()=>", फिर इसे इसके साथ जोड़ें",MYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zYt():t==="fa"?jYt():t==="ar"?TYt():t==="es"?AYt():t==="hi"?RYt():NYt()}),OYt=()=>"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.",DYt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",LYt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",IYt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",$Yt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",BYt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",PYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DYt():t==="fa"?LYt():t==="ar"?IYt():t==="es"?$Yt():t==="hi"?BYt():OYt()}),FYt=()=>"This saved destination is not configured. Set it up below or choose another backend.",HYt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",qYt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",UYt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",GYt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",VYt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",KYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HYt():t==="fa"?qYt():t==="ar"?UYt():t==="es"?GYt():t==="hi"?VYt():FYt()}),WYt=()=>"This value looks like a Hugging Face token — compute runs only read it from",QYt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",XYt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",YYt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",ZYt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",JYt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",eZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QYt():t==="fa"?XYt():t==="ar"?YYt():t==="es"?ZYt():t==="hi"?JYt():WYt()}),tZt=()=>"Time limit",nZt=()=>"时间限制",rZt=()=>"محدودیت زمانی",sZt=()=>"الحد الزمني",iZt=()=>"Límite de tiempo",aZt=()=>"समय सीमा",oZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nZt():t==="fa"?rZt():t==="ar"?sZt():t==="es"?iZt():t==="hi"?aZt():tZt()}),cZt=()=>"Unable to verify",lZt=()=>"无法验证",uZt=()=>"تأیید ممکن نیست",_Zt=()=>"تعذّر التحقق",fZt=()=>"No se pudo verificar",dZt=()=>"सत्यापित नहीं हो सका",h3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lZt():t==="fa"?uZt():t==="ar"?_Zt():t==="es"?fZt():t==="hi"?dZt():cZt()}),hZt=()=>"Unknown",pZt=()=>"未知",mZt=()=>"نامشخص",gZt=()=>"غير معروف",vZt=()=>"Desconocido",bZt=()=>"अज्ञात",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pZt():t==="fa"?mZt():t==="ar"?gZt():t==="es"?vZt():t==="hi"?bZt():hZt()}),yZt=()=>"Update required",xZt=()=>"需要更新",wZt=()=>"نیازمند به‌روزرسانی",kZt=()=>"مطلوب تحديث",SZt=()=>"Actualización necesaria",CZt=()=>"अपडेट ज़रूरी है",EZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xZt():t==="fa"?wZt():t==="ar"?kZt():t==="es"?SZt():t==="hi"?CZt():yZt()}),NZt=()=>"Updates",zZt=()=>"更新",jZt=()=>"به‌روزرسانی‌ها",TZt=()=>"التحديثات",AZt=()=>"Actualizaciones",RZt=()=>"अपडेट",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zZt():t==="fa"?jZt():t==="ar"?TZt():t==="es"?AZt():t==="hi"?RZt():NZt()}),MZt=()=>"Usage analytics",OZt=()=>"使用情况分析",DZt=()=>"تحلیل استفاده",LZt=()=>"تحليلات الاستخدام",IZt=()=>"Estadísticas de uso",$Zt=()=>"उपयोग एनालिटिक्स",BZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZt():t==="fa"?DZt():t==="ar"?LZt():t==="es"?IZt():t==="hi"?$Zt():MZt()}),PZt=()=>"value",FZt=()=>"值",HZt=()=>"مقدار",qZt=()=>"القيمة",UZt=()=>"valor",GZt=()=>"वैल्यू",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FZt():t==="fa"?HZt():t==="ar"?qZt():t==="es"?UZt():t==="hi"?GZt():PZt()}),VZt=()=>"Variables available to runs and the research agent (API keys, tokens).",KZt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",WZt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",QZt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",XZt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",YZt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",ZZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KZt():t==="fa"?WZt():t==="ar"?QZt():t==="es"?XZt():t==="hi"?YZt():VZt()}),JZt=()=>"Version",eJt=()=>"版本",tJt=()=>"نسخه",nJt=()=>"الإصدار",rJt=()=>"Versión",sJt=()=>"वर्शन",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eJt():t==="fa"?tJt():t==="ar"?nJt():t==="es"?rJt():t==="hi"?sJt():JZt()}),iJt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",aJt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",oJt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",cJt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",lJt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",uJt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",_Jt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aJt():t==="fa"?oJt():t==="ar"?cJt():t==="es"?lJt():t==="hi"?uJt():iJt()}),fJt=()=>"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.",dJt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",hJt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",pJt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",mJt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",gJt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",vJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dJt():t==="fa"?hJt():t==="ar"?pJt():t==="es"?mJt():t==="hi"?gJt():fJt()}),bJt=()=>"Pick a login node first",yJt=()=>"请先选择登录节点",xJt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",wJt=()=>"اختر عقدة دخول أولًا",kJt=()=>"Elige primero un nodo de acceso",SJt=()=>"पहले एक लॉगिन नोड चुनें",CJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yJt():t==="fa"?xJt():t==="ar"?wJt():t==="es"?kJt():t==="hi"?SJt():bJt()}),EJt=()=>"Providers",NJt=()=>"提供商",zJt=()=>"ارائه‌دهندگان",jJt=()=>"المزوّدون",TJt=()=>"Proveedores",AJt=()=>"प्रोवाइडर",RJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NJt():t==="fa"?zJt():t==="ar"?jJt():t==="es"?TJt():t==="hi"?AJt():EJt()}),MJt=()=>"Reconnect",OJt=()=>"重新连接",DJt=()=>"اتصال دوباره",LJt=()=>"إعادة الاتصال",IJt=()=>"Reconectar",$Jt=()=>"फिर से कनेक्ट करें",NL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OJt():t==="fa"?DJt():t==="ar"?LJt():t==="es"?IJt():t==="hi"?$Jt():MJt()}),BJt=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,PJt=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,FJt=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,HJt=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,qJt=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,UJt=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,GJt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PJt(e):t==="fa"?FJt(e):t==="ar"?HJt(e):t==="es"?qJt(e):t==="hi"?UJt(e):BJt(e)}),VJt=()=>"Reinstall with the orx installer to get automatic updates.",KJt=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",WJt=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",QJt=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",XJt=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",YJt=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",ZJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KJt():t==="fa"?WJt():t==="ar"?QJt():t==="es"?XJt():t==="hi"?YJt():VJt()}),JJt=()=>"Re-link",een=()=>"重新链接",ten=()=>"پیوند دوباره",nen=()=>"إعادة الربط",ren=()=>"Volver a enlazar",sen=()=>"फिर से लिंक करें",ien=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?een():t==="fa"?ten():t==="ar"?nen():t==="es"?ren():t==="hi"?sen():JJt()}),aen=()=>"Remove cookie",oen=()=>"移除 cookie",cen=()=>"حذف کوکی",len=()=>"إزالة ملف تعريف الارتباط",uen=()=>"Quitar cookie",_en=()=>"कुकी हटाएं",fen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oen():t==="fa"?cen():t==="ar"?len():t==="es"?uen():t==="hi"?_en():aen()}),den=()=>"Remove token",hen=()=>"移除令牌",pen=()=>"حذف توکن",men=()=>"إزالة الرمز",gen=()=>"Quitar token",ven=()=>"टोकन हटाएं",ben=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hen():t==="fa"?pen():t==="ar"?men():t==="es"?gen():t==="hi"?ven():den()}),yen=()=>"Removing…",xen=()=>"正在移除…",wen=()=>"در حال حذف…",ken=()=>"جارٍ الإزالة…",Sen=()=>"Quitando…",Cen=()=>"हटाया जा रहा है…",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xen():t==="fa"?wen():t==="ar"?ken():t==="es"?Sen():t==="hi"?Cen():yen()}),Een=()=>"Replace anyway",Nen=()=>"仍要替换",zen=()=>"به‌هرحال جایگزین کن",jen=()=>"الاستبدال على أي حال",Ten=()=>"Reemplazar de todos modos",Aen=()=>"फिर भी बदलें",Ren=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nen():t==="fa"?zen():t==="ar"?jen():t==="es"?Ten():t==="hi"?Aen():Een()}),Men=()=>"Replace key",Oen=()=>"替换密钥",Den=()=>"جایگزینی کلید",Len=()=>"استبدال المفتاح",Ien=()=>"Reemplazar clave",$en=()=>"की बदलें",Ben=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oen():t==="fa"?Den():t==="ar"?Len():t==="es"?Ien():t==="hi"?$en():Men()}),Pen=()=>"Replace token",Fen=()=>"替换令牌",Hen=()=>"جایگزینی توکن",qen=()=>"استبدال الرمز",Uen=()=>"Reemplazar token",Gen=()=>"टोकन बदलें",Ven=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fen():t==="fa"?Hen():t==="ar"?qen():t==="es"?Uen():t==="hi"?Gen():Pen()}),Ken=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,Wen=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,Qen=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,Xen=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,Yen=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,Zen=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,Jen=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wen(e):t==="fa"?Qen(e):t==="ar"?Xen(e):t==="es"?Yen(e):t==="hi"?Zen(e):Ken(e)}),etn=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,ttn=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,ntn=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,rtn=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,stn=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,itn=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,atn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ttn(e):t==="fa"?ntn(e):t==="ar"?rtn(e):t==="es"?stn(e):t==="hi"?itn(e):etn(e)}),otn=()=>"Run `gh auth login` in your terminal.",ctn=()=>"请在终端中运行 `gh auth login`。",ltn=()=>"در پایانه `gh auth login` را اجرا کنید.",utn=()=>"نفّذ `gh auth login` في طرفيتك.",_tn=()=>"Ejecuta `gh auth login` en tu terminal.",ftn=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",dtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ctn():t==="fa"?ltn():t==="ar"?utn():t==="es"?_tn():t==="hi"?ftn():otn()}),htn=()=>"Saved",ptn=()=>"已保存",mtn=()=>"ذخیره شده",gtn=()=>"تم الحفظ",vtn=()=>"Guardado",btn=()=>"सेव हो गया",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ptn():t==="fa"?mtn():t==="ar"?gtn():t==="es"?vtn():t==="hi"?btn():htn()}),ytn=()=>"Set up",xtn=()=>"设置",wtn=()=>"راه‌اندازی",ktn=()=>"إعداد",Stn=()=>"Configurar",Ctn=()=>"सेट अप करें",Etn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xtn():t==="fa"?wtn():t==="ar"?ktn():t==="es"?Stn():t==="hi"?Ctn():ytn()}),Ntn=()=>"Set up SSH key",ztn=()=>"设置 SSH 密钥",jtn=()=>"راه‌اندازی کلید SSH",Ttn=()=>"إعداد مفتاح SSH",Atn=()=>"Configurar clave SSH",Rtn=()=>"SSH की सेट अप करें",Mtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ztn():t==="fa"?jtn():t==="ar"?Ttn():t==="es"?Atn():t==="hi"?Rtn():Ntn()}),Otn=()=>"Sign in",Dtn=()=>"登录",Ltn=()=>"ورود",Itn=()=>"تسجيل الدخول",$tn=()=>"Iniciar sesión",Btn=()=>"साइन इन करें",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dtn():t==="fa"?Ltn():t==="ar"?Itn():t==="es"?$tn():t==="hi"?Btn():Otn()}),Ptn=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,Ftn=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,Htn=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,qtn=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,Utn=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,Gtn=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,jL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ftn(e):t==="fa"?Htn(e):t==="ar"?qtn(e):t==="es"?Utn(e):t==="hi"?Gtn(e):Ptn(e)}),Vtn=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",Ktn=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",Wtn=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",Qtn=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",Xtn=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",Ytn=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",Ztn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ktn():t==="fa"?Wtn():t==="ar"?Qtn():t==="es"?Xtn():t==="hi"?Ytn():Vtn()}),Jtn=()=>"The terminal disconnected before setup completed. Try again.",enn=()=>"设置完成前终端连接已断开。请重试。",tnn=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",nnn=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",rnn=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",snn=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",jv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?enn():t==="fa"?tnn():t==="ar"?nnn():t==="es"?rnn():t==="hi"?snn():Jtn()}),inn=()=>"Dark",ann=()=>"深色",onn=()=>"تیره",cnn=()=>"داكن",lnn=()=>"Oscuro",unn=()=>"डार्क",_nn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ann():t==="fa"?onn():t==="ar"?cnn():t==="es"?lnn():t==="hi"?unn():inn()}),fnn=()=>"Theme",dnn=()=>"主题",hnn=()=>"پوسته",pnn=()=>"السمة",mnn=()=>"Tema",gnn=()=>"थीम",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dnn():t==="fa"?hnn():t==="ar"?pnn():t==="es"?mnn():t==="hi"?gnn():fnn()}),vnn=()=>"Light",bnn=()=>"浅色",ynn=()=>"روشن",xnn=()=>"فاتح",wnn=()=>"Claro",knn=()=>"लाइट",Snn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bnn():t==="fa"?ynn():t==="ar"?xnn():t==="es"?wnn():t==="hi"?knn():vnn()}),Cnn=()=>"System",Enn=()=>"系统",Nnn=()=>"سیستم",znn=()=>"النظام",jnn=()=>"Sistema",Tnn=()=>"सिस्टम",Ann=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Enn():t==="fa"?Nnn():t==="ar"?znn():t==="es"?jnn():t==="hi"?Tnn():Cnn()}),Rnn=()=>"Set up billing in the Tinker console",Mnn=()=>"在 Tinker 控制台设置账单",Onn=()=>"تنظیم پرداخت در کنسول Tinker",Dnn=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Lnn=()=>"Configura la facturación en la consola de Tinker",Inn=()=>"Tinker कंसोल में बिलिंग सेट अप करें",$nn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mnn():t==="fa"?Onn():t==="ar"?Dnn():t==="es"?Lnn():t==="hi"?Inn():Rnn()}),Bnn=()=>"Billing setup required",Pnn=()=>"需要设置账单",Fnn=()=>"تنظیم پرداخت لازم است",Hnn=()=>"مطلوب إعداد الفوترة",qnn=()=>"Hay que configurar la facturación",Unn=()=>"बिलिंग सेटअप ज़रूरी है",Gnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pnn():t==="fa"?Fnn():t==="ar"?Hnn():t==="es"?qnn():t==="hi"?Unn():Bnn()}),Vnn=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",Knn=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",Wnn=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",Qnn=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",Xnn=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",Ynn=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",Znn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Knn():t==="fa"?Wnn():t==="ar"?Qnn():t==="es"?Xnn():t==="hi"?Ynn():Vnn()}),Jnn=()=>"Invalid Key",ern=()=>"密钥无效",trn=()=>"کلید نامعتبر",nrn=()=>"مفتاح غير صالح",rrn=()=>"Clave no válida",srn=()=>"अमान्य की",irn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ern():t==="fa"?trn():t==="ar"?nrn():t==="es"?rrn():t==="hi"?srn():Jnn()}),arn=()=>"Token from",orn=()=>"令牌来自",crn=()=>"توکن از",lrn=()=>"الرمز من",urn=()=>"Token tomado de la",_rn=()=>"टोकन स्रोत",frn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?orn():t==="fa"?crn():t==="ar"?lrn():t==="es"?urn():t==="hi"?_rn():arn()}),drn=()=>"Update now",hrn=()=>"立即更新",prn=()=>"اکنون به‌روزرسانی کن",mrn=()=>"التحديث الآن",grn=()=>"Actualizar ahora",vrn=()=>"अभी अपडेट करें",brn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hrn():t==="fa"?prn():t==="ar"?mrn():t==="es"?grn():t==="hi"?vrn():drn()}),yrn=e=>`Update to ${e==null?void 0:e.version}`,xrn=e=>`更新到 ${e==null?void 0:e.version}`,wrn=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,krn=e=>`التحديث إلى ${e==null?void 0:e.version}`,Srn=e=>`Actualizar a ${e==null?void 0:e.version}`,Crn=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,Ern=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xrn(e):t==="fa"?wrn(e):t==="ar"?krn(e):t==="es"?Srn(e):t==="hi"?Crn(e):yrn(e)}),Nrn=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",zrn=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",jrn=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Trn=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",Arn=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",Rrn=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",Mrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zrn():t==="fa"?jrn():t==="ar"?Trn():t==="es"?Arn():t==="hi"?Rrn():Nrn()}),Orn=()=>"Updating default destination…",Drn=()=>"正在更新默认运行位置…",Lrn=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",Irn=()=>"جارٍ تحديث الوجهة الافتراضية…",$rn=()=>"Actualizando el destino predeterminado…",Brn=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",Prn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Drn():t==="fa"?Lrn():t==="ar"?Irn():t==="es"?$rn():t==="hi"?Brn():Orn()}),Frn=()=>"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.",Hrn=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",qrn=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",Urn=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",Grn=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",Vrn=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",Krn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hrn():t==="fa"?qrn():t==="ar"?Urn():t==="es"?Grn():t==="hi"?Vrn():Frn()}),Wrn=()=>"Validating…",Qrn=()=>"正在验证…",Xrn=()=>"در حال اعتبارسنجی…",Yrn=()=>"جارٍ التحقق…",Zrn=()=>"Validando…",Jrn=()=>"सत्यापित हो रहा है…",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qrn():t==="fa"?Xrn():t==="ar"?Yrn():t==="es"?Zrn():t==="hi"?Jrn():Wrn()}),esn=()=>"View settings",tsn=()=>"查看设置",nsn=()=>"مشاهدهٔ تنظیمات",rsn=()=>"عرض الإعدادات",ssn=()=>"Ver configuración",isn=()=>"सेटिंग्स देखें",asn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tsn():t==="fa"?nsn():t==="ar"?rsn():t==="es"?ssn():t==="hi"?isn():esn()}),osn=()=>"Skill",csn=()=>"技能",lsn=()=>"مهارت",usn=()=>"مهارة",_sn=()=>"Skill",fsn=()=>"स्किल",dsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?csn():t==="fa"?lsn():t==="ar"?usn():t==="es"?_sn():t==="hi"?fsn():osn()}),hsn=()=>"Loading skill…",psn=()=>"正在加载技能…",msn=()=>"در حال بارگیری مهارت…",gsn=()=>"جارٍ تحميل المهارة…",vsn=()=>"Cargando skill…",bsn=()=>"स्किल लोड हो रही है…",ysn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?psn():t==="fa"?msn():t==="ar"?gsn():t==="es"?vsn():t==="hi"?bsn():hsn()}),xsn=()=>"Personal",wsn=()=>"个人",ksn=()=>"شخصی",Ssn=()=>"شخصي",Csn=()=>"Personal",Esn=()=>"व्यक्तिगत",Nsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wsn():t==="fa"?ksn():t==="ar"?Ssn():t==="es"?Csn():t==="hi"?Esn():xsn()}),zsn=()=>"Alternatively, tell your agent to save a reusable skill for you.",jsn=()=>"或者,请你的智能体为你保存可重复使用的技能。",Tsn=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",Asn=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",Rsn=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",Msn=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",Osn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jsn():t==="fa"?Tsn():t==="ar"?Asn():t==="es"?Rsn():t==="hi"?Msn():zsn()}),Dsn=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Lsn=e=>`删除技能“${e==null?void 0:e.name}”?`,Isn=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,$sn=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,Bsn=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Psn=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Fsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lsn(e):t==="fa"?Isn(e):t==="ar"?$sn(e):t==="es"?Bsn(e):t==="hi"?Psn(e):Dsn(e)}),Hsn=e=>`Delete skill ${e==null?void 0:e.name}`,qsn=e=>`删除技能 ${e==null?void 0:e.name}`,Usn=e=>`حذف مهارت ${e==null?void 0:e.name}`,Gsn=e=>`حذف المهارة ${e==null?void 0:e.name}`,Vsn=e=>`Eliminar la skill ${e==null?void 0:e.name}`,Ksn=e=>`${e==null?void 0:e.name} स्किल हटाएं`,Wsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qsn(e):t==="fa"?Usn(e):t==="ar"?Gsn(e):t==="es"?Vsn(e):t==="hi"?Ksn(e):Hsn(e)}),Qsn=e=>`Delete the “${e==null?void 0:e.name}” template?`,Xsn=e=>`删除模板“${e==null?void 0:e.name}”?`,Ysn=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,Zsn=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,Jsn=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,ein=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,tin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xsn(e):t==="fa"?Ysn(e):t==="ar"?Zsn(e):t==="es"?Jsn(e):t==="hi"?ein(e):Qsn(e)}),nin=e=>`Delete template ${e==null?void 0:e.name}`,rin=e=>`删除模板 ${e==null?void 0:e.name}`,sin=e=>`حذف قالب ${e==null?void 0:e.name}`,iin=e=>`حذف القالب ${e==null?void 0:e.name}`,ain=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,oin=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,cin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rin(e):t==="fa"?sin(e):t==="ar"?iin(e):t==="es"?ain(e):t==="hi"?oin(e):nin(e)}),lin=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",uin=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",_in=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",fin=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",din=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",hin=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",pin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uin():t==="fa"?_in():t==="ar"?fin():t==="es"?din():t==="hi"?hin():lin()}),min=()=>"Drop a SKILL.md or .zip here, or click to choose",gin=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",vin=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",bin=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",yin=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",xin=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",win=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gin():t==="fa"?vin():t==="ar"?bin():t==="es"?yin():t==="hi"?xin():min()}),kin=()=>"Drop a .tex or .zip here, or click to choose",Sin=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Cin=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Ein=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Nin=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",zin=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",jin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sin():t==="fa"?Cin():t==="ar"?Ein():t==="es"?Nin():t==="hi"?zin():kin()}),Tin=()=>"File too large (max 20 MB).",Ain=()=>"文件过大(最大 20 MB)。",Rin=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Min=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",Oin=()=>"Archivo demasiado grande (máx. 20 MB).",Din=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ain():t==="fa"?Rin():t==="ar"?Min():t==="es"?Oin():t==="hi"?Din():Tin()}),Lin=()=>" + 1 file",Iin=()=>" + 1 个文件",$in=()=>" + ۱ فایل",Bin=()=>" + ملف واحد",Pin=()=>" + 1 archivo",Fin=()=>" + 1 फ़ाइल",Hin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iin():t==="fa"?$in():t==="ar"?Bin():t==="es"?Pin():t==="hi"?Fin():Lin()}),qin=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",Uin=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",Gin=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",Vin=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",Kin=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",Win=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",Qin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uin():t==="fa"?Gin():t==="ar"?Vin():t==="es"?Kin():t==="hi"?Win():qin()}),Xin=()=>"Remove from OpenResearch",Yin=()=>"从 OpenResearch 移除",Zin=()=>"حذف از OpenResearch",Jin=()=>"إزالة من OpenResearch",ean=()=>"Quitar de OpenResearch",tan=()=>"OpenResearch से हटाएं",nan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yin():t==="fa"?Zin():t==="ar"?Jin():t==="es"?ean():t==="hi"?tan():Xin()}),ran=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,san=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,ian=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,aan=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,oan=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,can=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,lan=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?san(e):t==="fa"?ian(e):t==="ar"?aan(e):t==="es"?oan(e):t==="hi"?can(e):ran(e)}),uan=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,_an=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,fan=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,dan=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,han=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,pan=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,man=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_an(e):t==="fa"?fan(e):t==="ar"?dan(e):t==="es"?han(e):t==="hi"?pan(e):uan(e)}),gan=e=>` + ${e==null?void 0:e.count} files`,van=e=>` + ${e==null?void 0:e.count} 个文件`,ban=e=>` + ${e==null?void 0:e.count} فایل`,yan=e=>` + ملفات (${e==null?void 0:e.count})`,xan=e=>` + ${e==null?void 0:e.count} archivos`,wan=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,kan=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?van(e):t==="fa"?ban(e):t==="ar"?yan(e):t==="es"?xan(e):t==="hi"?wan(e):gan(e)}),San=()=>"Could not load skills:",Can=()=>"无法加载技能:",Ean=()=>"بارگیری مهارت‌ها ممکن نشد:",Nan=()=>"تعذّر تحميل المهارات:",zan=()=>"No se pudieron cargar las skills:",jan=()=>"स्किल लोड नहीं हो सकीं:",Tan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Can():t==="fa"?Ean():t==="ar"?Nan():t==="es"?zan():t==="hi"?jan():San()}),Aan=()=>"Could not load templates:",Ran=()=>"无法加载模板:",Man=()=>"بارگیری قالب‌ها ممکن نشد:",Oan=()=>"تعذّر تحميل القوالب:",Dan=()=>"No se pudieron cargar las plantillas:",Lan=()=>"टेम्पलेट लोड नहीं हो सके:",Ian=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ran():t==="fa"?Man():t==="ar"?Oan():t==="es"?Dan():t==="hi"?Lan():Aan()}),$an=()=>"Customize",Ban=()=>"自定义",Pan=()=>"سفارشی‌سازی",Fan=()=>"تخصيص",Han=()=>"Personalizar",qan=()=>"कस्टमाइज़ करें",Uan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ban():t==="fa"?Pan():t==="ar"?Fan():t==="es"?Han():t==="hi"?qan():$an()}),Gan=()=>"Delete skill",Van=()=>"删除技能",Kan=()=>"حذف مهارت",Wan=()=>"حذف المهارة",Qan=()=>"Eliminar skill",Xan=()=>"स्किल हटाएं",Yan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Van():t==="fa"?Kan():t==="ar"?Wan():t==="es"?Qan():t==="hi"?Xan():Gan()}),Zan=()=>"Delete template",Jan=()=>"删除模板",eon=()=>"حذف قالب",ton=()=>"حذف القالب",non=()=>"Eliminar plantilla",ron=()=>"टेम्पलेट हटाएं",son=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jan():t==="fa"?eon():t==="ar"?ton():t==="es"?non():t==="hi"?ron():Zan()}),ion=()=>"LaTeX templates",aon=()=>"LaTeX 模板",oon=()=>"قالب‌های LaTeX",con=()=>"قوالب LaTeX",lon=()=>"Plantillas de LaTeX",uon=()=>"LaTeX टेम्पलेट",_on=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aon():t==="fa"?oon():t==="ar"?con():t==="es"?lon():t==="hi"?uon():ion()}),fon=()=>"Loading skills…",don=()=>"正在加载技能…",hon=()=>"در حال بارگیری مهارت‌ها…",pon=()=>"جارٍ تحميل المهارات…",mon=()=>"Cargando skills…",gon=()=>"स्किल लोड हो रही हैं…",von=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?don():t==="fa"?hon():t==="ar"?pon():t==="es"?mon():t==="hi"?gon():fon()}),bon=()=>"Loading templates…",yon=()=>"正在加载模板…",xon=()=>"در حال بارگیری قالب‌ها…",won=()=>"جارٍ تحميل القوالب…",kon=()=>"Cargando plantillas…",Son=()=>"टेम्पलेट लोड हो रहे हैं…",Con=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yon():t==="fa"?xon():t==="ar"?won():t==="es"?kon():t==="hi"?Son():bon()}),Eon=()=>"No skills yet.",Non=()=>"尚无技能。",zon=()=>"هنوز مهارتی وجود ندارد.",jon=()=>"لا توجد مهارات بعد.",Ton=()=>"Aún no hay skills.",Aon=()=>"अभी तक कोई स्किल नहीं।",Ron=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Non():t==="fa"?zon():t==="ar"?jon():t==="es"?Ton():t==="hi"?Aon():Eon()}),Mon=()=>"No templates yet.",Oon=()=>"尚无模板。",Don=()=>"هنوز قالبی وجود ندارد.",Lon=()=>"لا توجد قوالب بعد.",Ion=()=>"Aún no hay plantillas.",$on=()=>"अभी तक कोई टेम्पलेट नहीं।",Bon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oon():t==="fa"?Don():t==="ar"?Lon():t==="es"?Ion():t==="hi"?$on():Mon()}),Pon=()=>"Skills",Fon=()=>"技能",Hon=()=>"مهارت‌ها",qon=()=>"المهارات",Uon=()=>"Skills",Gon=()=>"स्किल",Von=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fon():t==="fa"?Hon():t==="ar"?qon():t==="es"?Uon():t==="hi"?Gon():Pon()}),Kon=()=>"Uploading…",Won=()=>"正在上传…",Qon=()=>"در حال بارگذاری…",Xon=()=>"جارٍ الرفع…",Yon=()=>"Subiendo…",Zon=()=>"अपलोड हो रहा है…",Jon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Won():t==="fa"?Qon():t==="ar"?Xon():t==="es"?Yon():t==="hi"?Zon():Kon()}),ecn=()=>"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. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",tcn=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",ncn=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",rcn=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",scn=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",icn=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",acn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tcn():t==="fa"?ncn():t==="ar"?rcn():t==="es"?scn():t==="hi"?icn():ecn()}),ocn=()=>"Upload a SKILL.md file or a .zip of a skill folder.",ccn=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",lcn=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",ucn=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",_cn=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",fcn=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",dcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ccn():t==="fa"?lcn():t==="ar"?ucn():t==="es"?_cn():t==="hi"?fcn():ocn()}),hcn=()=>"Upload a .tex file or a .zip of a template folder.",pcn=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",mcn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",gcn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",vcn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",bcn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",ycn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pcn():t==="fa"?mcn():t==="ar"?gcn():t==="es"?vcn():t==="hi"?bcn():hcn()}),xcn=()=>"Close SSH config",wcn=()=>"关闭 SSH 配置",kcn=()=>"بستن پیکربندی SSH",Scn=()=>"إغلاق إعداد SSH",Ccn=()=>"Cerrar la configuración SSH",Ecn=()=>"SSH कॉन्फ़िग बंद करें",Ncn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wcn():t==="fa"?kcn():t==="ar"?Scn():t==="es"?Ccn():t==="hi"?Ecn():xcn()}),zcn=()=>"Discard your unsaved SSH config changes?",jcn=()=>"要放弃未保存的 SSH 配置更改吗?",Tcn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Acn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",Rcn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Mcn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",Ocn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jcn():t==="fa"?Tcn():t==="ar"?Acn():t==="es"?Rcn():t==="hi"?Mcn():zcn()}),Dcn=()=>"Loading SSH config…",Lcn=()=>"正在加载 SSH 配置…",Icn=()=>"در حال بارگیری پیکربندی SSH…",$cn=()=>"جارٍ تحميل إعداد SSH…",Bcn=()=>"Cargando la configuración SSH…",Pcn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Fcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lcn():t==="fa"?Icn():t==="ar"?$cn():t==="es"?Bcn():t==="hi"?Pcn():Dcn()}),Hcn=()=>"SSH config saved",qcn=()=>"SSH 配置已保存",Ucn=()=>"پیکربندی SSH ذخیره شد",Gcn=()=>"تم حفظ إعداد SSH",Vcn=()=>"Configuración SSH guardada",Kcn=()=>"SSH कॉन्फ़िग सेव हो गया",Wcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qcn():t==="fa"?Ucn():t==="ar"?Gcn():t==="es"?Vcn():t==="hi"?Kcn():Hcn()}),Qcn=()=>"SSH config",Xcn=()=>"SSH 配置",Ycn=()=>"پیکربندی SSH",Zcn=()=>"إعداد SSH",Jcn=()=>"Configuración SSH",eln=()=>"SSH कॉन्फ़िग",tln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xcn():t==="fa"?Ycn():t==="ar"?Zcn():t==="es"?Jcn():t==="hi"?eln():Qcn()}),nln=()=>"Configure SSH hosts…",rln=()=>"配置 SSH 主机…",sln=()=>"پیکربندی میزبان‌های SSH…",iln=()=>"إعداد مضيفات SSH…",aln=()=>"Configurar hosts SSH…",oln=()=>"SSH होस्ट कॉन्फ़िगर करें…",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rln():t==="fa"?sln():t==="ar"?iln():t==="es"?aln():t==="hi"?oln():nln()}),cln=()=>"Container name or ID",lln=()=>"容器名称或 ID",uln=()=>"نام یا شناسهٔ کانتینر",_ln=()=>"اسم الحاوية أو معرّفها",fln=()=>"Nombre o ID del contenedor",dln=()=>"कंटेनर का नाम या ID",hln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lln():t==="fa"?uln():t==="ar"?_ln():t==="es"?fln():t==="hi"?dln():cln()}),pln=()=>"Default SSH host",mln=()=>"默认 SSH 主机",gln=()=>"میزبان پیش‌فرض SSH",vln=()=>"مضيف SSH الافتراضي",bln=()=>"Servidor SSH predeterminado",yln=()=>"डिफ़ॉल्ट SSH होस्ट",xln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mln():t==="fa"?gln():t==="ar"?vln():t==="es"?bln():t==="hi"?yln():pln()}),wln=()=>"Direct host",kln=()=>"直接在主机上",Sln=()=>"مستقیماً روی میزبان",Cln=()=>"المضيف مباشرة",Eln=()=>"Servidor directamente",Nln=()=>"सीधे होस्ट पर",zln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kln():t==="fa"?Sln():t==="ar"?Cln():t==="es"?Eln():t==="hi"?Nln():wln()}),jln=()=>"Existing container",Tln=()=>"现有容器",Aln=()=>"کانتینر موجود",Rln=()=>"حاوية موجودة",Mln=()=>"Contenedor existente",Oln=()=>"मौजूदा कंटेनर",Dln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tln():t==="fa"?Aln():t==="ar"?Rln():t==="es"?Mln():t==="hi"?Oln():jln()}),Lln=()=>"Run in",Iln=()=>"运行位置",$ln=()=>"اجرا در",Bln=()=>"التشغيل في",Pln=()=>"Ejecutar en",Fln=()=>"यहाँ चलाएँ",Hln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iln():t==="fa"?$ln():t==="ar"?Bln():t==="es"?Pln():t==="hi"?Fln():Lln()}),qln=()=>"Cancelled",Uln=()=>"已取消",Gln=()=>"لغوشده",Vln=()=>"ملغى",Kln=()=>"Cancelado",Wln=()=>"रद्द किया गया",Qln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uln():t==="fa"?Gln():t==="ar"?Vln():t==="es"?Kln():t==="hi"?Wln():qln()}),Xln=()=>"Cancelling",Yln=()=>"正在取消",Zln=()=>"در حال لغو",Jln=()=>"جارٍ الإلغاء",eun=()=>"Cancelando",tun=()=>"रद्द हो रहा है",nun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yln():t==="fa"?Zln():t==="ar"?Jln():t==="es"?eun():t==="hi"?tun():Xln()}),run=()=>"Done",sun=()=>"已完成",iun=()=>"انجام‌شده",aun=()=>"تم",oun=()=>"Completado",cun=()=>"पूरा हुआ",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sun():t==="fa"?iun():t==="ar"?aun():t==="es"?oun():t==="hi"?cun():run()}),lun=()=>"Editing",uun=()=>"正在编辑",_un=()=>"در حال ویرایش",fun=()=>"قيد التعديل",dun=()=>"Editando",hun=()=>"संपादित हो रहा है",pun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uun():t==="fa"?_un():t==="ar"?fun():t==="es"?dun():t==="hi"?hun():lun()}),mun=()=>"Failed",gun=()=>"失败",vun=()=>"ناموفق",bun=()=>"فشل",yun=()=>"Error",xun=()=>"विफल",wun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gun():t==="fa"?vun():t==="ar"?bun():t==="es"?yun():t==="hi"?xun():mun()}),kun=()=>"Idle",Sun=()=>"空闲",Cun=()=>"بی‌کار",Eun=()=>"خامل",Nun=()=>"Inactivo",zun=()=>"निष्क्रिय",jun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sun():t==="fa"?Cun():t==="ar"?Eun():t==="es"?Nun():t==="hi"?zun():kun()}),Tun=()=>"Running",Aun=()=>"运行中",Run=()=>"در حال اجرا",Mun=()=>"قيد التشغيل",Oun=()=>"En ejecución",Dun=()=>"चल रहा है",Lun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aun():t==="fa"?Run():t==="ar"?Mun():t==="es"?Oun():t==="hi"?Dun():Tun()}),Iun=()=>"Starting",$un=()=>"正在启动",Bun=()=>"در حال آغاز",Pun=()=>"جارٍ البدء",Fun=()=>"Iniciando",Hun=()=>"शुरू हो रहा है",qun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$un():t==="fa"?Bun():t==="ar"?Pun():t==="es"?Fun():t==="hi"?Hun():Iun()}),Uun=()=>"Copying…",Gun=()=>"正在复制…",Vun=()=>"در حال کپی…",Kun=()=>"جارٍ النسخ…",Wun=()=>"Copiando…",Qun=()=>"कॉपी हो रहा है…",Xun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gun():t==="fa"?Vun():t==="ar"?Kun():t==="es"?Wun():t==="hi"?Qun():Uun()}),Yun=()=>"Finalizing…",Zun=()=>"正在完成…",Jun=()=>"در حال نهایی‌سازی…",e_n=()=>"جارٍ الإنهاء…",t_n=()=>"Finalizando…",n_n=()=>"अंतिम रूप दिया जा रहा है…",r_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zun():t==="fa"?Jun():t==="ar"?e_n():t==="es"?t_n():t==="hi"?n_n():Yun()}),s_n=e=>`${e==null?void 0:e.size} free at target`,i_n=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,a_n=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,o_n=e=>`${e==null?void 0:e.size} متاح في الوجهة`,c_n=e=>`${e==null?void 0:e.size} libres en el destino`,l_n=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,u_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i_n(e):t==="fa"?a_n(e):t==="ar"?o_n(e):t==="es"?c_n(e):t==="hi"?l_n(e):s_n(e)}),__n=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.`,Zun=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,f_n=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,Jun=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,d_n=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,e_n=e=>`نقل كل بيانات orx إلى: +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,h_n=e=>`نقل كل بيانات orx إلى: ${e==null?void 0:e.path} -يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,t_n=e=>`¿Mover todos los datos de orx a esta ubicación? +يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,p_n=e=>`¿Mover todos los datos de orx a esta ubicación? ${e==null?void 0:e.path} -El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,n_n=e=>`सारा orx डेटा यहाँ ले जाएं: +El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,m_n=e=>`सारा orx डेटा यहाँ ले जाएं: ${e==null?void 0:e.path} -स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,r_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zun(e):t==="fa"?Jun(e):t==="ar"?e_n(e):t==="es"?t_n(e):t==="hi"?n_n(e):Yun(e)}),s_n=()=>"Move data here",i_n=()=>"将数据移动到此处",a_n=()=>"انتقال داده به اینجا",o_n=()=>"نقل البيانات إلى هنا",c_n=()=>"Mover los datos aquí",l_n=()=>"डेटा यहाँ ले जाएं",u_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i_n():t==="fa"?a_n():t==="ar"?o_n():t==="es"?c_n():t==="hi"?l_n():s_n()}),__n=()=>"Moving…",f_n=()=>"正在移动…",d_n=()=>"در حال جابه‌جایی…",h_n=()=>"جارٍ النقل…",p_n=()=>"Moviendo…",m_n=()=>"स्थानांतरित हो रहा है…",g_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f_n():t==="fa"?d_n():t==="ar"?h_n():t==="es"?p_n():t==="hi"?m_n():__n()}),v_n=()=>"Preparing…",b_n=()=>"正在准备…",y_n=()=>"در حال آماده‌سازی…",x_n=()=>"جارٍ التحضير…",w_n=()=>"Preparando…",k_n=()=>"तैयार हो रहा है…",S_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_n():t==="fa"?y_n():t==="ar"?x_n():t==="es"?w_n():t==="hi"?k_n():v_n()}),C_n=()=>" (same disk, instant)",E_n=()=>"(同一磁盘,可立即完成)",N_n=()=>" (روی همان دیسک، فوری)",z_n=()=>" (القرص نفسه، فوري)",j_n=()=>" (mismo disco, instantáneo)",T_n=()=>" (उसी डिस्क पर, तुरंत)",A_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_n():t==="fa"?N_n():t==="ar"?z_n():t==="es"?j_n():t==="hi"?T_n():C_n()}),R_n=()=>"default location",M_n=()=>"默认位置",O_n=()=>"محل پیش‌فرض",D_n=()=>"الموقع الافتراضي",L_n=()=>"ubicación predeterminada",I_n=()=>"डिफ़ॉल्ट स्थान",$_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M_n():t==="fa"?O_n():t==="ar"?D_n():t==="es"?L_n():t==="hi"?I_n():R_n()}),B_n=()=>"ORX_DATA_DIR environment variable",P_n=()=>"ORX_DATA_DIR 环境变量",F_n=()=>"متغیر محیطی ORX_DATA_DIR",H_n=()=>"متغيّر البيئة ORX_DATA_DIR",q_n=()=>"variable de entorno ORX_DATA_DIR",U_n=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",G_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P_n():t==="fa"?F_n():t==="ar"?H_n():t==="es"?q_n():t==="hi"?U_n():B_n()}),V_n=()=>"your saved setting",K_n=()=>"已保存的设置",W_n=()=>"تنظیم ذخیره‌شدهٔ شما",Q_n=()=>"إعدادك المحفوظ",X_n=()=>"tu ajuste guardado",Y_n=()=>"आपकी सेव की गई सेटिंग",Z_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_n():t==="fa"?W_n():t==="ar"?Q_n():t==="es"?X_n():t==="hi"?Y_n():V_n()}),J_n=()=>"XDG_DATA_HOME",efn=()=>"XDG_DATA_HOME",tfn=()=>"XDG_DATA_HOME",nfn=()=>"XDG_DATA_HOME",rfn=()=>"XDG_DATA_HOME",sfn=()=>"XDG_DATA_HOME",ifn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?efn():t==="fa"?tfn():t==="ar"?nfn():t==="es"?rfn():t==="hi"?sfn():J_n()}),afn=()=>"Verifying…",ofn=()=>"正在验证…",cfn=()=>"در حال بررسی…",lfn=()=>"جارٍ التحقق…",ufn=()=>"Verificando…",_fn=()=>"सत्यापित हो रहा है…",ffn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ofn():t==="fa"?cfn():t==="ar"?lfn():t==="es"?ufn():t==="hi"?_fn():afn()}),dfn=()=>"Loading…",hfn=()=>"正在加载…",pfn=()=>"در حال بارگیری…",mfn=()=>"جارٍ التحميل…",gfn=()=>"Cargando…",vfn=()=>"लोड हो रहा है…",bfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hfn():t==="fa"?pfn():t==="ar"?mfn():t==="es"?gfn():t==="hi"?vfn():dfn()}),yfn=()=>"This sub-agent is no longer available.",xfn=()=>"此子智能体已不可用。",wfn=()=>"این عامل فرعی دیگر در دسترس نیست.",kfn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",Sfn=()=>"Este subagente ya no está disponible.",Cfn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",Efn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xfn():t==="fa"?wfn():t==="ar"?kfn():t==="es"?Sfn():t==="hi"?Cfn():yfn()}),Nfn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,zfn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,jfn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Tfn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,Afn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Rfn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Mfn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zfn(e):t==="fa"?jfn(e):t==="ar"?Tfn(e):t==="es"?Afn(e):t==="hi"?Rfn(e):Nfn(e)}),Ofn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Dfn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Lfn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Ifn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,$fn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,Bfn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Pfn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dfn(e):t==="fa"?Lfn(e):t==="ar"?Ifn(e):t==="es"?$fn(e):t==="hi"?Bfn(e):Ofn(e)}),Ffn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Hfn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",qfn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",Ufn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Gfn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Vfn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Kfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hfn():t==="fa"?qfn():t==="ar"?Ufn():t==="es"?Gfn():t==="hi"?Vfn():Ffn()}),Wfn=()=>", a repo for training a mini-GPT from scratch.",Qfn=()=>",一个从零训练迷你 GPT 的仓库。",Xfn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Yfn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",Zfn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",Jfn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",edn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qfn():t==="fa"?Xfn():t==="ar"?Yfn():t==="es"?Zfn():t==="hi"?Jfn():Wfn()}),tdn=()=>"Close",ndn=()=>"关闭",rdn=()=>"بستن",sdn=()=>"إغلاق",idn=()=>"Cerrar",adn=()=>"बंद करें",p3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ndn():t==="fa"?rdn():t==="ar"?sdn():t==="es"?idn():t==="hi"?adn():tdn()}),odn=()=>"Create a new project",cdn=()=>"新建项目",ldn=()=>"ایجاد پروژهٔ جدید",udn=()=>"إنشاء مشروع جديد",_dn=()=>"Crear un proyecto nuevo",fdn=()=>"नया प्रोजेक्ट बनाएं",ddn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cdn():t==="fa"?ldn():t==="ar"?udn():t==="es"?_dn():t==="hi"?fdn():odn()}),hdn=()=>"Demo project",pdn=()=>"演示项目",mdn=()=>"پروژهٔ نمایشی",gdn=()=>"مشروع توضيحي",vdn=()=>"Proyecto de demostración",bdn=()=>"डेमो प्रोजेक्ट",ydn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pdn():t==="fa"?mdn():t==="ar"?gdn():t==="es"?vdn():t==="hi"?bdn():hdn()}),xdn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",wdn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",kdn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Sdn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Cdn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Edn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Ndn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wdn():t==="fa"?kdn():t==="ar"?Sdn():t==="es"?Cdn():t==="hi"?Edn():xdn()}),zdn=()=>"nanochat",jdn=()=>"nanochat",Tdn=()=>"nanochat",Adn=()=>"nanochat",Rdn=()=>"nanochat",Mdn=()=>"nanochat",Odn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jdn():t==="fa"?Tdn():t==="ar"?Adn():t==="es"?Rdn():t==="hi"?Mdn():zdn()}),Ddn=()=>"Try the demo experiment",Ldn=()=>"试试演示实验",Idn=()=>"آزمایش نمایشی را امتحان کنید",$dn=()=>"جرّب التجربة التوضيحية",Bdn=()=>"Probar el experimento de demostración",Pdn=()=>"डेमो प्रयोग आज़माएं",Fdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ldn():t==="fa"?Idn():t==="ar"?$dn():t==="es"?Bdn():t==="hi"?Pdn():Ddn()}),Hdn=()=>"Couldn’t save your progress. Try again.",qdn=()=>"无法保存进度。请重试。",Udn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",Gdn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",Vdn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",Kdn=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",Wdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qdn():t==="fa"?Udn():t==="ar"?Gdn():t==="es"?Vdn():t==="hi"?Kdn():Hdn()}),Qdn=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",Xdn=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",Ydn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",Zdn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",Jdn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",ehn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",thn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xdn():t==="fa"?Ydn():t==="ar"?Zdn():t==="es"?Jdn():t==="hi"?ehn():Qdn()}),nhn=()=>"Welcome to OpenResearch",rhn=()=>"欢迎使用 OpenResearch",shn=()=>"به OpenResearch خوش آمدید",ihn=()=>"مرحبًا بك في OpenResearch",ahn=()=>"Te damos la bienvenida a OpenResearch",ohn=()=>"OpenResearch में आपका स्वागत है",chn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rhn():t==="fa"?shn():t==="ar"?ihn():t==="es"?ahn():t==="hi"?ohn():nhn()}),lhn=()=>"Baseline",uhn=()=>"基线",_hn=()=>"مبنا",fhn=()=>"الأساس",dhn=()=>"Base",hhn=()=>"बेसलाइन",phn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uhn():t==="fa"?_hn():t==="ar"?fhn():t==="es"?dhn():t==="hi"?hhn():lhn()}),mhn=()=>"Experiment",ghn=()=>"实验",vhn=()=>"آزمایش",bhn=()=>"تجربة",yhn=()=>"Experimento",xhn=()=>"प्रयोग",Vc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ghn():t==="fa"?vhn():t==="ar"?bhn():t==="es"?yhn():t==="hi"?xhn():mhn()}),whn=e=>`${e==null?void 0:e.count} experiments`,khn=e=>`${e==null?void 0:e.count} 个实验`,Shn=e=>`${e==null?void 0:e.count} آزمایش`,Chn=e=>`التجارب: ${e==null?void 0:e.count}`,Ehn=e=>`${e==null?void 0:e.count} experimentos`,Nhn=e=>`${e==null?void 0:e.count} प्रयोग`,zhn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?khn(e):t==="fa"?Shn(e):t==="ar"?Chn(e):t==="es"?Ehn(e):t==="hi"?Nhn(e):whn(e)}),jhn=()=>"1 experiment",Thn=()=>"1 个实验",Ahn=()=>"۱ آزمایش",Rhn=()=>"تجربة واحدة",Mhn=()=>"1 experimento",Ohn=()=>"1 प्रयोग",Dhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Thn():t==="fa"?Ahn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():jhn()}),Lhn=()=>"Running",Ihn=()=>"运行中",$hn=()=>"در حال اجرا",Bhn=()=>"قيد التشغيل",Phn=()=>"En ejecución",Fhn=()=>"चल रहा है",Hhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ihn():t==="fa"?$hn():t==="ar"?Bhn():t==="es"?Phn():t==="hi"?Fhn():Lhn()}),qhn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Uhn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Ghn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Vhn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Khn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",Whn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",Qhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uhn():t==="fa"?Ghn():t==="ar"?Vhn():t==="es"?Khn():t==="hi"?Whn():qhn()}),Xhn=()=>"Ask the agent in chat to create and run your first experiment.",Yhn=()=>"在聊天中让智能体创建并运行你的第一个实验。",Zhn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",Jhn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",epn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",tpn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",npn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yhn():t==="fa"?Zhn():t==="ar"?Jhn():t==="es"?epn():t==="hi"?tpn():Xhn()}),rpn=()=>"Code",spn=()=>"代码",ipn=()=>"کد",apn=()=>"الشيفرة",opn=()=>"Código",cpn=()=>"कोड",lpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?spn():t==="fa"?ipn():t==="ar"?apn():t==="es"?opn():t==="hi"?cpn():rpn()}),upn=()=>"Logs",_pn=()=>"日志",fpn=()=>"گزارش‌ها",dpn=()=>"السجلات",hpn=()=>"Logs",ppn=()=>"लॉग",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pn():t==="fa"?fpn():t==="ar"?dpn():t==="es"?hpn():t==="hi"?ppn():upn()}),mpn=()=>"No experiments from the current task yet",gpn=()=>"当前任务尚无实验",vpn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",bpn=()=>"لا توجد تجارب من المهمة الحالية بعد",ypn=()=>"Aún no hay experimentos de la tarea actual",xpn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",wpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gpn():t==="fa"?vpn():t==="ar"?bpn():t==="es"?ypn():t==="hi"?xpn():mpn()}),kpn=()=>"No experiments yet",Spn=()=>"尚无实验",Cpn=()=>"هنوز آزمایشی وجود ندارد",Epn=()=>"لا توجد تجارب بعد",Npn=()=>"Aún no hay experimentos",zpn=()=>"अभी तक कोई प्रयोग नहीं",jpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Spn():t==="fa"?Cpn():t==="ar"?Epn():t==="es"?Npn():t==="hi"?zpn():kpn()}),Tpn=()=>"no runs",Apn=()=>"无运行",Rpn=()=>"بدون اجرا",Mpn=()=>"لا عمليات تشغيل",Opn=()=>"sin ejecuciones",Dpn=()=>"कोई रन नहीं",Lpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Apn():t==="fa"?Rpn():t==="ar"?Mpn():t==="es"?Opn():t==="hi"?Dpn():Tpn()}),Ipn=()=>"Open logs",$pn=()=>"打开日志",Bpn=()=>"باز کردن گزارش‌ها",Ppn=()=>"فتح السجلات",Fpn=()=>"Abrir logs",Hpn=()=>"लॉग खोलें",qpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$pn():t==="fa"?Bpn():t==="ar"?Ppn():t==="es"?Fpn():t==="hi"?Hpn():Ipn()}),Upn=()=>"other tasks",Gpn=()=>"其他任务",Vpn=()=>"وظایف دیگر",Kpn=()=>"مهام أخرى",Wpn=()=>"otras tareas",Qpn=()=>"अन्य टास्क",Xpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpn():t==="fa"?Vpn():t==="ar"?Kpn():t==="es"?Wpn():t==="hi"?Qpn():Upn()}),Ypn=()=>"Runs",Zpn=()=>"运行",Jpn=()=>"اجراها",e0n=()=>"عمليات التشغيل",t0n=()=>"Ejecuciones",n0n=()=>"रन",r0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpn():t==="fa"?Jpn():t==="ar"?e0n():t==="es"?t0n():t==="hi"?n0n():Ypn()}),s0n=()=>"Switch to Entire project to see all experiments",i0n=()=>"切换到“整个项目”以查看所有实验",a0n=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",o0n=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",c0n=()=>"Cambia a Todo el proyecto para ver todos los experimentos",l0n=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",u0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0n():t==="fa"?a0n():t==="ar"?o0n():t==="es"?c0n():t==="hi"?l0n():s0n()}),_0n=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,f0n=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,d0n=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,h0n=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,p0n=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,m0n=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,g0n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f0n(e):t==="fa"?d0n(e):t==="ar"?h0n(e):t==="es"?p0n(e):t==="hi"?m0n(e):_0n(e)}),v0n=()=>"Dismiss",b0n=()=>"关闭",y0n=()=>"بستن",x0n=()=>"تجاهل",w0n=()=>"Descartar",k0n=()=>"खारिज करें",S0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b0n():t==="fa"?y0n():t==="ar"?x0n():t==="es"?w0n():t==="hi"?k0n():v0n()}),C0n=()=>"Restart now",E0n=()=>"立即重新启动",N0n=()=>"هم‌اکنون دوباره راه‌اندازی کن",z0n=()=>"أعد التشغيل الآن",j0n=()=>"Reiniciar ahora",T0n=()=>"अभी फिर से शुरू करें",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0n():t==="fa"?N0n():t==="ar"?z0n():t==="es"?j0n():t==="hi"?T0n():C0n()}),A0n=e=>`Could not restart: ${e==null?void 0:e.error}`,R0n=e=>`无法重新启动:${e==null?void 0:e.error}`,M0n=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,O0n=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,D0n=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,L0n=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,DL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?R0n(e):t==="fa"?M0n(e):t==="ar"?O0n(e):t==="es"?D0n(e):t==="hi"?L0n(e):A0n(e)}),I0n=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",$0n=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",B0n=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",P0n=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",F0n=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",H0n=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",q0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$0n():t==="fa"?B0n():t==="ar"?P0n():t==="es"?F0n():t==="hi"?H0n():I0n()}),U0n=()=>"Restarting…",G0n=()=>"正在重新启动…",V0n=()=>"در حال راه‌اندازی مجدد…",K0n=()=>"جارٍ إعادة التشغيل…",W0n=()=>"Reiniciando…",Q0n=()=>"फिर से शुरू हो रहा है…",LL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G0n():t==="fa"?V0n():t==="ar"?K0n():t==="es"?W0n():t==="hi"?Q0n():U0n()}),X0n=()=>"macOS app",Y0n=()=>"macOS 应用",Z0n=()=>"برنامهٔ macOS",J0n=()=>"تطبيق macOS",emn=()=>"App de macOS",tmn=()=>"macOS ऐप",nmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y0n():t==="fa"?Z0n():t==="ar"?J0n():t==="es"?emn():t==="hi"?tmn():X0n()}),rmn=()=>"Installed with cargo",smn=()=>"通过 cargo 安装",imn=()=>"نصب‌شده با cargo",amn=()=>"مثبّت عبر cargo",omn=()=>"Instalado con cargo",cmn=()=>"cargo से इंस्टॉल किया गया",lmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?smn():t==="fa"?imn():t==="ar"?amn():t==="es"?omn():t==="hi"?cmn():rmn()}),umn=()=>"Installed with Homebrew",_mn=()=>"通过 Homebrew 安装",fmn=()=>"نصب‌شده با Homebrew",dmn=()=>"مثبّت عبر Homebrew",hmn=()=>"Instalado con Homebrew",pmn=()=>"Homebrew से इंस्टॉल किया गया",mmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_mn():t==="fa"?fmn():t==="ar"?dmn():t==="es"?hmn():t==="hi"?pmn():umn()}),gmn=()=>"Installed with the orx installer",vmn=()=>"通过 orx 安装程序安装",bmn=()=>"نصب‌شده با نصب‌کنندهٔ orx",ymn=()=>"مثبّت عبر مُثبّت orx",xmn=()=>"Instalado con el instalador de orx",wmn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",kmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vmn():t==="fa"?bmn():t==="ar"?ymn():t==="es"?xmn():t==="hi"?wmn():gmn()}),Smn=()=>"Managed by Nix",Cmn=()=>"由 Nix 管理",Emn=()=>"مدیریت‌شده با Nix",Nmn=()=>"مُدار بواسطة Nix",zmn=()=>"Gestionado por Nix",jmn=()=>"Nix द्वारा प्रबंधित",Tmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cmn():t==="fa"?Emn():t==="ar"?Nmn():t==="es"?zmn():t==="hi"?jmn():Smn()}),Amn=()=>"Portable orx.exe",Rmn=()=>"便携版 orx.exe",Mmn=()=>"orx.exe قابل‌حمل",Omn=()=>"‏orx.exe المحمول",Dmn=()=>"orx.exe portable",Lmn=()=>"पोर्टेबल orx.exe",Imn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rmn():t==="fa"?Mmn():t==="ar"?Omn():t==="es"?Dmn():t==="hi"?Lmn():Amn()}),$mn=()=>"Unknown install",Bmn=()=>"未知安装方式",Pmn=()=>"روش نصب نامشخص",Fmn=()=>"تثبيت غير معروف",Hmn=()=>"Instalación desconocida",qmn=()=>"अज्ञात इंस्टॉल",Umn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bmn():t==="fa"?Pmn():t==="ar"?Fmn():t==="es"?Hmn():t==="hi"?qmn():$mn()}),Gmn=()=>"Re-run your cargo install to update.",Vmn=()=>"重新运行 cargo 安装命令以更新。",Kmn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",Wmn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Qmn=()=>"Vuelve a ejecutar cargo install para actualizar.",Xmn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",Ymn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vmn():t==="fa"?Kmn():t==="ar"?Wmn():t==="es"?Qmn():t==="hi"?Xmn():Gmn()}),Zmn=()=>"Run brew upgrade to update.",Jmn=()=>"运行 brew upgrade 以更新。",egn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",tgn=()=>"نفّذ brew upgrade للتحديث.",ngn=()=>"Ejecuta brew upgrade para actualizar.",rgn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",sgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jmn():t==="fa"?egn():t==="ar"?tgn():t==="es"?ngn():t==="hi"?rgn():Zmn()}),ign=()=>"Update it through your Nix configuration.",agn=()=>"通过 Nix 配置进行更新。",ogn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",cgn=()=>"حدّثه عبر إعداد Nix الخاص بك.",lgn=()=>"Actualízalo desde tu configuración de Nix.",ugn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",_gn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?agn():t==="fa"?ogn():t==="ar"?cgn():t==="es"?lgn():t==="hi"?ugn():ign()}),fgn=()=>"Active Experiments",dgn=()=>"活跃实验",hgn=()=>"آزمایش‌های فعال",pgn=()=>"التجارب النشطة",mgn=()=>"Experimentos activos",ggn=()=>"सक्रिय प्रयोग",vgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dgn():t==="fa"?hgn():t==="ar"?pgn():t==="es"?mgn():t==="hi"?ggn():fgn()}),bgn=()=>"Default compute",ygn=()=>"默认计算目标",xgn=()=>"محاسبات پیش‌فرض",wgn=()=>"الحوسبة الافتراضية",kgn=()=>"Cómputo predeterminado",Sgn=()=>"डिफ़ॉल्ट कंप्यूट",Cgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ygn():t==="fa"?xgn():t==="ar"?wgn():t==="es"?kgn():t==="hi"?Sgn():bgn()}),Egn=()=>"Terminal",Ngn=()=>"终端",zgn=()=>"ترمینال",jgn=()=>"الطرفية",Tgn=()=>"Terminal",Agn=()=>"टर्मिनल",Tv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ngn():t==="fa"?zgn():t==="ar"?jgn():t==="es"?Tgn():t==="hi"?Agn():Egn()}),Rgn=()=>"The terminal disconnected.",Mgn=()=>"终端连接已断开。",Ogn=()=>"ارتباط ترمینال قطع شد.",Dgn=()=>"انقطعت الطرفية.",Lgn=()=>"La terminal se desconectó.",Ign=()=>"टर्मिनल डिस्कनेक्ट हो गया।",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mgn():t==="fa"?Ogn():t==="ar"?Dgn():t==="es"?Lgn():t==="hi"?Ign():Rgn()}),$gn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,Bgn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,Pgn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,Fgn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,Hgn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,qgn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,Ugn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bgn(e):t==="fa"?Pgn(e):t==="ar"?Fgn(e):t==="es"?Hgn(e):t==="hi"?qgn(e):$gn(e)}),Ggn=()=>"Restart shell",Vgn=()=>"重新启动 Shell",Kgn=()=>"راه‌اندازی دوباره پوسته",Wgn=()=>"إعادة تشغيل Shell",Qgn=()=>"Reiniciar shell",Xgn=()=>"शेल फिर से शुरू करें",Ygn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vgn():t==="fa"?Kgn():t==="ar"?Wgn():t==="es"?Qgn():t==="hi"?Xgn():Ggn()}),Zgn=()=>"This worktree",Jgn=()=>"当前工作树",e1n=()=>"این درخت کاری",t1n=()=>"شجرة العمل هذه",n1n=()=>"Este árbol de trabajo",r1n=()=>"यह वर्कट्री",s1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jgn():t==="fa"?e1n():t==="ar"?t1n():t==="es"?n1n():t==="hi"?r1n():Zgn()}),i1n=()=>"Workspace",a1n=()=>"工作区",o1n=()=>"فضای کاری",c1n=()=>"مساحة العمل",l1n=()=>"Espacio de trabajo",u1n=()=>"वर्कस्पेस",ew=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a1n():t==="fa"?o1n():t==="ar"?c1n():t==="es"?l1n():t==="hi"?u1n():i1n()}),_1n=e=>`Current worktree · ${e==null?void 0:e.branch}`,f1n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,d1n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,h1n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,p1n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,m1n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,g1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f1n(e):t==="fa"?d1n(e):t==="ar"?h1n(e):t==="es"?p1n(e):t==="hi"?m1n(e):_1n(e)}),v1n=e=>`Default branch · ${e==null?void 0:e.branch}`,b1n=e=>`默认分支 · ${e==null?void 0:e.branch}`,y1n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,x1n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,w1n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,k1n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,S1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b1n(e):t==="fa"?y1n(e):t==="ar"?x1n(e):t==="es"?w1n(e):t==="hi"?k1n(e):v1n(e)}),C1n=e=>`detached at ${e==null?void 0:e.branch}`,E1n=e=>`分离于 ${e==null?void 0:e.branch}`,N1n=e=>`جدا در ${e==null?void 0:e.branch}`,z1n=e=>`منفصل عند ${e==null?void 0:e.branch}`,j1n=e=>`desacoplado en ${e==null?void 0:e.branch}`,T1n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,A1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?E1n(e):t==="fa"?N1n(e):t==="ar"?z1n(e):t==="es"?j1n(e):t==="hi"?T1n(e):C1n(e)}),R1n=()=>"Listing truncated.",M1n=()=>"列表已截断。",O1n=()=>"فهرست کوتاه شده است.",D1n=()=>"القائمة مقتطعة.",L1n=()=>"Listado truncado.",I1n=()=>"सूची छोटी की गई।",$1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M1n():t==="fa"?O1n():t==="ar"?D1n():t==="es"?L1n():t==="hi"?I1n():R1n()}),B1n=()=>"Loading…",P1n=()=>"正在加载…",F1n=()=>"در حال بارگیری…",H1n=()=>"جارٍ التحميل…",q1n=()=>"Cargando…",U1n=()=>"लोड हो रहा है…",G1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P1n():t==="fa"?F1n():t==="ar"?H1n():t==="es"?q1n():t==="hi"?U1n():B1n()}),V1n=()=>"No changes yet.",K1n=()=>"尚无更改。",W1n=()=>"هنوز تغییری وجود ندارد.",Q1n=()=>"لا توجد تغييرات بعد.",X1n=()=>"Aún no hay cambios.",Y1n=()=>"अभी तक कोई बदलाव नहीं।",Z1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K1n():t==="fa"?W1n():t==="ar"?Q1n():t==="es"?X1n():t==="hi"?Y1n():V1n()}),J1n=()=>"No files.",evn=()=>"没有文件。",tvn=()=>"فایلی وجود ندارد.",nvn=()=>"لا توجد ملفات.",rvn=()=>"No hay archivos.",svn=()=>"कोई फ़ाइल नहीं।",ivn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?evn():t==="fa"?tvn():t==="ar"?nvn():t==="es"?rvn():t==="hi"?svn():J1n()}),avn=()=>"Refresh failed:",ovn=()=>"刷新失败:",cvn=()=>"تازه‌سازی ناموفق بود:",lvn=()=>"فشل التحديث:",uvn=()=>"Error al actualizar:",_vn=()=>"रीफ़्रेश विफल:",fvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ovn():t==="fa"?cvn():t==="ar"?lvn():t==="es"?uvn():t==="hi"?_vn():avn()}),Ne=e=>`⁦${e}⁩`,Gi=e=>`⁨${e}⁩`,Wt=e=>new Intl.NumberFormat(E()).format(e),$p="demo_nanochat_v1",Uc=e=>e.startsWith("demo_"),Od="chat_demo_nanochat_v1",Tb="chat_demo_nanochat_figures_v1",Ab="chat_demo_nanochat_literature_v1",dvn={[Od]:"cpu_end_to_end",[Tb]:"figures",[Ab]:"literature"},tw="cpu-apple-silicon-pipeline-results.md",hvn={[Od]:"msg_demo_nanochat_assistant_v1",[Tb]:"msg_demo_nanochat_figures_assistant_v1",[Ab]:"msg_demo_nanochat_literature_assistant_v1"},$z="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 m3 extends Error{constructor(t,r,s){super(t);Bs(this,"currentVersion");Bs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Qi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const IL=new WeakMap;async function fi(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 m3(s,a,i.exists)}}catch(i){if(i instanceof m3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=IL.get(e);if(t&&!Rn(t))throw new DOMException("Workspace changed","AbortError");return n}const zt=(e,n)=>fetch(e,{signal:n}).then(t=>fi(t));async function aa(e,n){const t=Ia(),r=await fetch(e,n);if(!Rn(t))throw new DOMException("Workspace changed","AbortError");return IL.set(r,t),r.ok&&lQ(e,t),r}const xt=(e,n,t=!1)=>aa(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>fi(r)),df=(e,n)=>aa(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),$L=(e,n)=>aa(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),pvn=e=>zt("/api/projects",e).then(n=>n.projects),mvn=e=>zt("/api/projects/activity",e).then(n=>n.activity),gvn=e=>zt("/api/settings/ui-state",e),vvn=(e,n)=>zt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),bvn=(e,n,t=!1)=>xt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),yvn=(e,n=!1)=>xt("/api/settings/ui-state",{workspace:e},n),xvn=e=>xt("/api/settings/ui-state",e),wvn=(e,n)=>xt("/api/onboarding/complete",{...e,...n}),kvn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return zt(`/api/project-path/status${t}`,n)},Svn=()=>xt("/api/project-path/pick").then(e=>e.path),Cvn=e=>xt("/api/projects",e),Evn=(e,n)=>zt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Nvn=e=>zt("/api/github/account",e),zvn=(e,n)=>zt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),jvn=(e,n,t)=>zt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),Tvn=(e,n)=>zt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Avn=e=>xt("/api/projects/starter-prompts/prewarm",e),Rvn=(e,n,t,r,s)=>zt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Mvn=e=>xt(`/api/projects/${e}/open`).then(n=>n.project),Ovn=e=>aa(`/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})`)}oQ(e)}),Dvn=(e,n)=>zt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),Lvn=(e,n)=>zt(`/api/projects/${e}/runs`,n).then(t=>t.runs),BL=e=>xt(`/api/runs/${e}/cancel`).then(()=>{}),Ivn=(e,n)=>zt(`/api/runs/${e}/log?offset=${n}`),$vn=(e,n)=>zt(`/api/runs/${e}/diff`,n),Bvn=(e,n)=>zt(`/api/experiments/${e}/diff`,n),Mu=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),Pvn=(e,n,t={},r)=>zt(`/api/projects/${e}/file?${Mu(t,new URLSearchParams({path:n}))}`,r),g3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Mu(t,new URLSearchParams({path:n}))}`,Fvn=(e,n)=>zt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),PL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,Hvn=(e,n,t,r)=>$L(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),qvn=(e,n,t,r={})=>df(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),Uvn=(e,n,t={})=>xt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),Gvn=(e,n,t={})=>xt(`/api/projects/${e}/file/reveal`,{path:n,sessionId:t.sessionId}),Vvn=e=>zt("/api/latex/engine",e),Kvn=(e,n,t={})=>xt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),Wvn=e=>zt("/api/overleaf/settings",e),FL=e=>xt("/api/overleaf/token",{token:e}),Qvn=()=>aa("/api/overleaf/token",{method:"DELETE"}).then(e=>fi(e)),HL=(e,n={})=>xt("/api/overleaf/session",{session:e,host:n.host}),Xvn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>fi(e)),Yvn=(e={})=>xt("/api/overleaf/session/import",{host:e.host}),Zvn=(e,n,t={})=>xt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),Jvn=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Mu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),ebn=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf?${Mu(t,new URLSearchParams({path:n}))}`,r),tbn=(e,n,t)=>xt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),nbn=(e,n,t={})=>aa(`/api/projects/${e}/file/overleaf?${Mu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),rbn=(e,n,t={})=>xt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),sbn=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf/status?${Mu(t,new URLSearchParams({path:n}))}`,r),ibn=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Mu(t,new URLSearchParams({path:n}))}`,abn=(e,n={},t)=>{const r=Mu(n).toString();return zt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},obn=(e,n)=>zt(`/api/chat/sessions/${e}/worktree`,n),Rb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,cbn=e=>zt("/api/settings/hf",e),lbn=e=>xt("/api/settings/hf",{token:e}),ubn=e=>zt("/api/settings/tinker",e),_bn=e=>xt("/api/settings/tinker",{key:e}),fbn=e=>zt("/api/update",e),dbn=()=>xt("/api/update/apply"),hbn=()=>xt("/api/update/restart"),pbn=e=>xt("/api/update/auto",{enabled:e}),mbn=(e=!1)=>xt("/api/update/install-cli",{force:e}),gbn=e=>zt("/api/settings/k8s",e),vbn=e=>xt("/api/settings/k8s",e),bbn=e=>zt("/api/settings/modal",e),ybn=(e,n)=>xt("/api/settings/modal",{tokenId:e,tokenSecret:n}),xbn=e=>zt("/api/settings/env",e).then(n=>n.vars),qL=(e,n)=>xt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),wbn=e=>aa(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)).then(n=>n.vars),kbn=e=>zt("/api/settings/data-dir",e),Sbn=e=>xt("/api/settings/data-dir/validate",{path:e}),Cbn=e=>xt("/api/settings/data-dir/move",{path:e}),Ebn=e=>zt("/api/settings/ssh",e),Nbn=e=>xt("/api/settings/ssh",e),zbn=e=>xt("/api/settings/ssh/default",{host:e}),jbn=(e,n)=>xt("/api/settings/ssh/preflight",{host:e,container:n}),Tbn=e=>zt("/api/settings/ssh/config",e),Abn=(e,n)=>$L("/api/settings/ssh/config",{content:e,previousContent:n}),Rbn=(e,n)=>zt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),Mbn=e=>zt("/_orx/runtime",e),Obn=e=>zt("/api/remote/sessions",e).then(n=>n.sessions),Dbn=(e,n)=>xt("/api/remote/sessions",{host:e,uiPreferences:n}),Lbn=e=>xt("/_orx/install",e),Ibn=()=>xt("/_orx/reconnect"),UL=()=>xt("/_orx/disconnect"),$bn=()=>xt("/_orx/start-host"),GL=()=>zt("/_orx/stop-host"),VL=e=>xt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),Bbn=e=>zt("/api/settings/slurm",e),Pbn=e=>xt("/api/settings/slurm",e),Fbn=e=>zt("/api/settings/ray",e),Hbn=e=>xt("/api/settings/ray",e),qbn=e=>xt("/api/settings/ray/preflight",{address:e??null}),Ubn=(e,n)=>zt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),Gbn=e=>xt("/api/settings/compute/default",e),Vbn=e=>zt("/api/settings/local",e),Kbn=e=>zt("/api/settings/openresearch",e),Wbn=(e,n)=>zt(`/api/projects/${e}/files`,n),Qbn=(e,n)=>aa(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),Xbn=(e,n,t)=>df(`/api/projects/${e}/files`,{path:n,...t}),Q_=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,KL=512e3,Ybn=(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}}},Zbn=(e,n,t)=>fetch(Q_(e,n),{signal:t,headers:{Range:`bytes=0-${KL-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=>Ybn(a,Number.isFinite(s)&&s>a.byteLength))}),Jbn=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",eyn=(e,n,t)=>fetch(Q_(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:Jbn(s)?s:"download"}}),tyn=e=>zt("/api/settings/profile",e),nyn=e=>zt("/api/settings/lit-sources",e),ryn=e=>xt("/api/settings/lit-sources",e),syn=e=>zt("/api/settings/projects",e),WL=(e,n)=>xt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),iyn=(e,n)=>zt(`/api/projects/${e}/git`,n),ayn=e=>xt(`/api/projects/${e}/git/init`),oyn=e=>xt(`/api/projects/${e}/github`),cyn=e=>xt(`/api/projects/${e}/github/disable`),lyn=e=>zt("/api/settings/telemetry",e),uyn=e=>xt("/api/settings/telemetry",{enabled:e}),ru=e=>{xt("/api/telemetry/event",e).catch(()=>{})};function K1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??b3(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?Gk():n,r=b3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Av="default";function Mb(e,n){var a,o,c;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===Av)?Av:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:i}}const v3="default";function QL(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:v3,label:nEt(),description:Q9t()},...t]:[]}function Rv(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=QL(e,n);return s.length===0?v3:t!=null&&s.some(a=>a.id===t)?t:v3}function XL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Mb(e,n);return r.length===0?Av:t&&r.some(i=>i.id===t)?t:s}const _yn=e=>zt("/api/harnesses/setup/commands",e),YL=(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 zt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},fyn=(e,n)=>zt(`/api/skills${n?`?harness=${encodeURIComponent(n)}`:""}`,e),dyn=(e,n,t,r)=>zt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),hyn=e=>zt("/api/latex-templates",e).then(n=>n.templates),pyn=e=>xt("/api/latex-templates",e).then(n=>n.template),myn=e=>aa(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),gyn=e=>zt("/api/user-skills",e),vyn=e=>xt("/api/user-skills",e).then(n=>n.skill),byn=e=>aa(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n));function b3(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 yyn=(e,n)=>zt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),xyn=e=>zt("/api/chat/native-sessions",e).then(n=>n.chats),wyn=(e,n)=>xt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),kyn=e=>zt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),Syn=(e,n,t={})=>xt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Cyn=e=>aa(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>fi(n).then(t=>(zb(e),t))),Eyn=(e,n)=>df(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Nyn=(e,n)=>df(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),zyn=(e,n)=>df(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),jyn=(e,n)=>df(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),Tyn=(e,n)=>df(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Ayn=(e,n)=>zt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Ryn=(e,n)=>aa(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),Myn=(e,n)=>xt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),Oyn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,Bz=(e,n,t={},r,s,i,a)=>xt(`/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}),Dyn=e=>xt(`/api/chat/sessions/${e}/compact`,{}),Lyn=(e,n)=>xt(`/api/chat/sessions/${e}/shell`,{command:n}),Iyn=(e,n,t,r={})=>xt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),$yn=(e,n,t)=>xt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Byn=(e,n)=>xt(`/api/chat/sessions/${e}/branch`,{leafId:n}),Pyn=e=>xt(`/api/chat/sessions/${e}/interrupt`),Fyn=(e,n)=>xt(`/api/chat/sessions/${e}/respond`,n);function co(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(E(),{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 T0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return dOe({value:Wt(n)});const t=Math.floor(n/60);if(t<60)return aOe({value:Wt(t)});const r=Math.floor(t/60);return r<24?JMe({hours:Wt(r),minutes:Wt(t%60)}):VMe({days:Wt(Math.floor(r/24)),hours:Wt(r%24)})}function el(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rzt("/api/local-models",e),Uyn=e=>xt("/api/local-models/discover",e),Gyn=e=>xt("/api/local-models",e),Vyn=e=>xt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),Kyn=e=>aa(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),Pz=()=>({queryKey:St("getHfSettings"),queryFn:({signal:e})=>cbn(e),staleTime:3e5}),Fz=()=>({queryKey:St("getTinkerSettings"),queryFn:({signal:e})=>ubn(e),staleTime:3e5}),Hz=()=>({queryKey:St("getK8sSettings"),queryFn:({signal:e})=>gbn(e),staleTime:3e4}),qz=()=>({queryKey:St("getModalSettings"),queryFn:({signal:e})=>bbn(e),staleTime:3e5}),Wyn=()=>({queryKey:St("getSlurmSettings"),queryFn:({signal:e})=>Bbn(e),staleTime:3e5}),Qyn=()=>({queryKey:St("getRaySettings"),queryFn:({signal:e})=>Fbn(e),staleTime:3e5}),ZL=e=>({queryKey:St("getComputeSettings",e??null),queryFn:({signal:n})=>Ubn(e,n),staleTime:3e4}),Xyn=()=>({queryKey:St("getLocalMachine"),queryFn:({signal:e})=>Vbn(e),staleTime:3e5}),Yyn=()=>({queryKey:St("getOpenResearchSettings"),queryFn:({signal:e})=>Kbn(e),staleTime:3e4}),Zyn=()=>({queryKey:St("getEnvVars"),queryFn:({signal:e})=>xbn(e),staleTime:3e5}),Jyn=()=>({queryKey:St("getDataDir"),queryFn:({signal:e})=>kbn(e),staleTime:3e5}),JL=()=>({queryKey:St("getSshSettings"),queryFn:({signal:e})=>Ebn(e),staleTime:3e4}),exn=()=>({queryKey:St("getSshConfig"),queryFn:({signal:e})=>Tbn(e),staleTime:3e5}),Uz=e=>({queryKey:St("getSshMasterStatus",e),queryFn:({signal:n})=>Rbn(e,n),staleTime:5e3}),txn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>Mbn(e),staleTime:2e3}),nxn=()=>({queryKey:St("listRemoteSessions"),queryFn:({signal:e})=>Obn(e),staleTime:3e4}),Mv=()=>({queryKey:St("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Rh(n,t,()=>fbn(e)),staleTime:3e4}),rxn=()=>({queryKey:St("getProfile"),queryFn:({signal:e})=>tyn(e),staleTime:3e5}),sxn=()=>({queryKey:St("getLitSources"),queryFn:({signal:e})=>nyn(e),staleTime:3e5}),rS=()=>({queryKey:St("getProjectDefaults"),queryFn:({signal:e})=>syn(e),staleTime:3e5}),ixn=e=>({queryKey:St("getProjectGitStatus",e),queryFn:({signal:n})=>iyn(e,n),staleTime:3e4}),axn=()=>({queryKey:St("getTelemetry"),queryFn:({signal:e})=>lyn(e),staleTime:3e5}),eI=()=>({queryKey:St("getHarnessSetupCommands"),queryFn:({signal:e})=>_yn(e),staleTime:1/0}),ku=()=>({queryKey:St("getHarnesses"),queryFn:({signal:e})=>YL(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),oxn=e=>({queryKey:St("getSkills",e??null),queryFn:({signal:n})=>fyn(n,e),select:n=>n.skills,refetchInterval:n=>{var t;return(t=n.state.data)!=null&&t.importing?2e3:3e4},staleTime:3e5}),cxn=(e,n,t)=>({queryKey:St("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>dyn(e,n,r,t),staleTime:3e5}),lxn=()=>({queryKey:St("listLatexTemplates"),queryFn:({signal:e})=>hyn(e),refetchInterval:3e4,staleTime:3e5}),uxn=()=>({queryKey:St("listUserSkills"),queryFn:({signal:e})=>gyn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function X_(e=!1,n=!1){const t=ku();if(!e&&!n)return nt.fetchQuery(t);await nt.cancelQueries(t);const r=await YL(e,n);return Rn(t.queryKey)&&nt.setQueryData(t.queryKey,r),r}const _xn=()=>({queryKey:St("getLocalModels"),queryFn:({signal:e})=>qyn(e),staleTime:3e4}),La=e=>({queryKey:St("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Rh(t,r,async()=>{const s=await yyn(e,n),i=t.getQueryData(r);return s.filter(a=>!ll.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(c=>c.id===a.id))==null?void 0:o.contextUsage)}})},ym),staleTime:3e4}),tI=()=>({queryKey:St("listNativeChats"),queryFn:({signal:e})=>xyn(e),staleTime:0}),fxn=()=>({queryKey:St("listAllChatSessions"),queryFn:async({signal:e})=>(await kyn(e)).filter(n=>!ll.has(n.id)),staleTime:0}),il=e=>({queryKey:St("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Rh(t,r,()=>Ayn(e,n),(_,p,m)=>{if(!p)return _;const x=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:ym(_.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:_.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),c=s!==void 0&&i.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...c.filter(_=>!i.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),P_="local-",nI="bash";function Gz(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(P_)),n]}function dxn(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(P_),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Gz(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:`${P_}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:nI,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?Gz(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:`${P_}${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 rI=0;function sI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}nt.getQueryCache().subscribe(e=>{sI(e)&&rI++});const hxn=e=>nt.getQueryCache().subscribe(n=>{sI(n)&&e()}),pxn=()=>rI;function mxn(e,n){const t=nt.getQueryData(La(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=nt.getQueryData(il(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function iI(e,n,t=!1){if(n.type==="busy"){Za(nt,La(e).queryKey,n.sessionId),nt.setQueryData(La(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=il(n.sessionId);if(ll.has(n.sessionId))return;Za(nt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=nt.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=dxn(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};nt.setQueryData(r.queryKey,o)}function gxn(e,n){const t=!!n&&!ll.has(n??""),r=ut({...il(n??""),enabled:t,subscribed:t}),s=A.useSyncExternalStore(hxn,pxn),i=A.useMemo(()=>mxn(e,n),[e,n,s]),a=Ia()[1],o=A.useCallback(c=>{Rn(["workspace",a])&&iI(e,c)},[e,a]);return[i,o,r]}const W1=new Map;function vxn(e,n){let t=W1.get(e);return t||(t=new Set,W1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&W1.delete(e)}}function bxn(e){var n;(n=W1.get(e.runId))==null||n.forEach(t=>t(e))}const y3=new Set;function Ov(e){return y3.add(e),()=>{y3.delete(e)}}function Ic(e){y3.forEach(n=>n(e))}const x3=new Set;function yxn(e){return x3.add(e),()=>{x3.delete(e)}}function $c(){x3.forEach(e=>e())}const w3=new Set;function xxn(e){return w3.add(e),()=>{w3.delete(e)}}const k3=new Set;function wxn(e){return k3.add(e),()=>{k3.delete(e)}}function kxn(){k3.forEach(e=>e())}function Vz(e){w3.forEach(n=>n(e))}const S3=new Set;function aI(e){return S3.add(e),()=>{S3.delete(e)}}function nw(e){S3.forEach(n=>n(e))}const C3=new Set;function Sxn(e){return C3.add(e),()=>{C3.delete(e)}}function Kz(e){C3.forEach(n=>n(e))}const E3=new Set;function Cxn(e){return E3.add(e),()=>{E3.delete(e)}}function Exn(e){E3.forEach(n=>n(e))}let N3=!0;const z3=new Set;function Nxn(e){return z3.add(e),()=>{z3.delete(e)}}function Wz(){return N3}function Qz(e){e!==N3&&(N3=e,z3.forEach(n=>n()))}const zxn=8e3,jxn=3e3;function Txn(e){const n=A.useRef(e);n.current=e,A.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>Qz(!1),zxn)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},jxn)))},c.onopen=()=>{var h,_;r||(window.clearTimeout(s),s=void 0,Qz(!0),a&&(Ic({type:"reconnected"}),$c(),Vz({harness:"*",authState:"unknown"}),(_=(h=n.current).onReconnect)==null||_.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,_;Ic({type:"reconnected"}),$c(),(_=(h=n.current).onReconnect)==null||_.call(h)}),c.addEventListener("run.updated",h=>{const _=u(h);_!=null&&_.run&&($c(),n.current.onRun(_.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const _=u(h);_!=null&&_.experiment&&($c(),(m=(p=n.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const _=u(h);_!=null&&_.project&&($c(),(m=(p=n.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",h=>{var p,m;const _=u(h);_!=null&&_.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",h=>{const _=u(h);_!=null&&_.runId&&bxn(_)}),c.addEventListener("chat.session",h=>{const _=u(h);_!=null&&_.session&&($c(),Ic({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",h=>{const _=u(h);_!=null&&_.sessionId&&($c(),Ic({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",h=>{const _=u(h);_!=null&&_.message&&($c(),Ic({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",h=>{const _=u(h);_!=null&&_.sessionId&&($c(),Ic({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",h=>{const _=u(h);_!=null&&_.sessionId&&_.usage&&Ic({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",h=>{const _=u(h);_!=null&&_.sessionId&&Ic({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",h=>{const _=u(h);_!=null&&_.sessionId&&Ic({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const _=u(h);_!=null&&_.harness&&_.authState&&Vz(_)}),c.addEventListener("harness.catalog",()=>kxn()),c.addEventListener("datadir.move.progress",h=>{const _=u(h);_&&nw({type:"progress",..._})}),c.addEventListener("datadir.move.done",h=>{const _=u(h);_&&nw({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const _=u(h);_&&nw({type:"error",error:_.error})}),c.addEventListener("update.status",h=>{const _=u(h);_&&Exn(_)}),c.addEventListener("overleaf.live",h=>{const _=u(h);_!=null&&_.key&&_.status&&Kz({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",h=>{const _=u(h);_!=null&&_.key&&Array.isArray(_.paths)&&Kz({type:"pulled",key:_.key,paths:_.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Dv=new Set;function Axn(e){const n=A.useRef(e);n.current=e,A.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 Dv.add(t),()=>{Dv.delete(t)}},[])}const Xz={onRun:e=>Dv.forEach(n=>n.onRun(e)),onReconnect:()=>Dv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},_h=()=>({queryKey:St("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Rh(n,t,()=>pvn(e),ym),staleTime:3e4}),Rxn=()=>({queryKey:St("listProjectActivity"),queryFn:({signal:e})=>mvn(e),staleTime:3e4}),Sm=()=>({queryKey:St("getUiState"),queryFn:({signal:e})=>gvn(e),staleTime:3e5}),sS=e=>({queryKey:St("getProjectUiState",e),queryFn:({signal:n})=>vvn(e,n),staleTime:3e5}),_0=(e="")=>({queryKey:St("getProjectPathStatus",e),queryFn:({signal:n})=>kvn(e,n),staleTime:3e4}),oI=e=>({queryKey:St("searchPapers",e),queryFn:({signal:n})=>Evn(e,n),staleTime:3e5}),Mxn=()=>({queryKey:St("githubAccount"),queryFn:({signal:e})=>Nvn(e),staleTime:3e5}),Oxn=e=>({queryKey:St("githubProjectRepoPreview",e),queryFn:({signal:n})=>zvn(e,n),staleTime:3e4}),Yz=(e,n)=>({queryKey:St("repoAccess",e,n),queryFn:({signal:t})=>jvn(e,n,t),staleTime:3e4}),j3=e=>({queryKey:St("resolvePaper",e),queryFn:({signal:n})=>Tvn(e,n),staleTime:36e5}),Dxn=(e,n,t,r)=>({queryKey:St("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>Rvn(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),T3=e=>({queryKey:St("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Rh(t,r,()=>Dvn(e,n),ym),staleTime:3e4}),mu=e=>({queryKey:St("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Rh(t,r,()=>Lvn(e,n),ym),staleTime:3e4});function t1(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 Zz(){const e=Ia();return Txn({onRun(n){var r;if(!Rn(e))return;const t=(r=nt.getQueryData(mu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Za(nt,mu(n.projectId).queryKey,n.id),nt.setQueryData(mu(n.projectId).queryKey,s=>t1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Ta(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Ta(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),Xz.onRun(n)},onExperiment(n){Rn(e)&&(Za(nt,T3(n.projectId).queryKey,n.id),nt.setQueryData(T3(n.projectId).queryKey,t=>t1(t,n)),Ta(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Ta(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Ta(["getRunDiff"],e,t=>{var r;return((r=nt.getQueryData(mu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){Rn(e)&&(Za(nt,_h().queryKey,n.id),nt.setQueryData(_h().queryKey,t=>t1(t,n)))},onArtifacts(n){Rn(e)&&(Ta(Ik,e,t=>t.queryKey[3]===n),Ta(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){Rn(e)&&(Ta(iQ,e),Xz.onReconnect())}}),A.useEffect(()=>{let n;const t=yxn(()=>{n??(n=setTimeout(()=>{n=void 0,Ta(["listProjectActivity"],e)},100))}),r=aI(c=>{c.type==="done"&&Ta(["getDataDir"],e)}),s=Ov(c=>{Rn(e)&&(c.type==="session"?Za(nt,La(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&Za(nt,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&iI("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!ll.has(c.session.id)?nt.setQueryData(La(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(_=>_.id===c.session.id);return h?t1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?zb(c.sessionId):(c.type==="busy"||c.type==="usage")&&nt.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=xxn(()=>{Rn(e)&&X_(!0).catch(()=>{})}),a=wxn(()=>{Rn(e)&&nt.fetchQuery({...ku(),staleTime:0}).catch(()=>{})}),o=Cxn(c=>{Rn(e)&&(Za(nt,Mv().queryKey),nt.setQueryData(Mv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const A3=new Set;function cI(e){if(e!==E()){_D(e,{reload:!1}),document.documentElement.lang=e;for(const n of A3)n()}}function Lxn(e){return A3.add(e),()=>A3.delete(e)}function hf(){return A.useSyncExternalStore(Lxn,E,E)}const lI="orx:theme";function Ixn(){try{const e=localStorage.getItem(lI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let fh=Ixn();const R3=new Set;function $xn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function iS(){document.documentElement.dataset.theme=$xn(fh)}function uI(e){fh=e;try{localStorage.setItem(lI,e)}catch{}iS();for(const n of R3)n()}function Bxn(){return fh}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{fh==="system"&&iS()});iS();function Pxn(e){return R3.add(e),()=>R3.delete(e)}function _I(){return[A.useSyncExternalStore(Pxn,()=>fh,()=>fh),uI]}const Fxn=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),fI=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Lv="-",Jz=[],qxn="arbitrary..",Uxn=e=>{const n=Vxn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Gxn(a);const o=a.split(Lv),c=o[0]===""&&o.length>1?1:0;return dI(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?Fxn(u,c):c:u||Jz}return t[a]||Jz}}},dI=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=dI(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Lv):e.slice(n).join(Lv),c=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?qxn+r:void 0})(),Vxn=e=>{const{theme:n,classGroups:t}=e;return Kxn(t,n)},Kxn=(e,n)=>{const t=fI();for(const r in e){const s=e[r];aS(s,t,r,n)}return t},aS=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){Qxn(e,n,t);return}if(typeof e=="function"){Xxn(e,n,t,r);return}Yxn(e,n,t,r)},Qxn=(e,n,t)=>{const r=e===""?n:hI(n,e);r.classGroupId=t},Xxn=(e,n,t,r)=>{if(Zxn(e)){aS(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(Hxn(t,e))},Yxn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Lv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,Jxn=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)}}},M3="!",ej=":",e2n=[],tj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),t2n=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return tj(i,m,p,x)};if(n){const s=n+ej,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):tj(e2n,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},n2n=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}},r2n=e=>({cache:Jxn(e.cacheSize),parseClassName:t2n(e),sortModifiers:n2n(e),postfixLookupClassGroupIds:s2n(e),...Uxn(e)}),s2n=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=[],c=e.trim().split(i2n);let u="";for(let h=c.length-1;h>=0;h-=1){const _=c[h],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const T=k.substring(0,v);w=r(T);const j=w&&a[w]?r(k):void 0;j&&j!==w&&(w=j,b=!1)}else w=r(k);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=r(k),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?y+M3:y,N=C+w;if(o.indexOf(N)>-1)continue;o.push(N);const z=s(w,b);for(let T=0;T0?" "+u:u)}return u},o2n=(...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=c=>{const u=n.reduce((h,_)=>_(h),e());return t=r2n(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=a2n(c,t);return s(c,h),h};return i=a,(...c)=>i(o2n(...c))},c2n=[],ls=e=>{const n=t=>t[e]||c2n;return n.isThemeGetter=!0,n},mI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,l2n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,u2n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_2n=/\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$/,f2n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d2n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,h2n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ql=e=>l2n.test(e),cn=e=>!!e&&!Number.isNaN(Number(e)),Mo=e=>!!e&&Number.isInteger(Number(e)),rw=e=>e.endsWith("%")&&cn(e.slice(0,-1)),Bc=e=>u2n.test(e),vI=()=>!0,p2n=e=>_2n.test(e)&&!f2n.test(e),oS=()=>!1,m2n=e=>d2n.test(e),g2n=e=>h2n.test(e),v2n=e=>!vt(e)&&!bt(e),b2n=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)),y2n=e=>Ou(e,xI,oS),vt=e=>mI.test(e),u_=e=>Ou(e,wI,p2n),rj=e=>Ou(e,z2n,cn),x2n=e=>Ou(e,SI,vI),w2n=e=>Ou(e,kI,oS),sj=e=>Ou(e,bI,oS),k2n=e=>Ou(e,yI,g2n),n1=e=>Ou(e,CI,m2n),bt=e=>gI.test(e),Bp=e=>pf(e,wI),S2n=e=>pf(e,kI),ij=e=>pf(e,bI),C2n=e=>pf(e,xI),E2n=e=>pf(e,yI),r1=e=>pf(e,CI,!0),N2n=e=>pf(e,SI,!0),Ou=(e,n,t)=>{const r=mI.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},pf=(e,n,t=!1)=>{const r=gI.exec(e);return r?r[1]?n(r[1]):t:!1},bI=e=>e==="position"||e==="percentage",yI=e=>e==="image"||e==="url",xI=e=>e==="length"||e==="size"||e==="bg-size",wI=e=>e==="length",z2n=e=>e==="number",kI=e=>e==="family-name",SI=e=>e==="number"||e==="weight",CI=e=>e==="shadow",aj=()=>{const e=ls("color"),n=ls("font"),t=ls("text"),r=ls("font-weight"),s=ls("tracking"),i=ls("leading"),a=ls("breakpoint"),o=ls("container"),c=ls("spacing"),u=ls("radius"),h=ls("shadow"),_=ls("inset-shadow"),p=ls("text-shadow"),m=ls("drop-shadow"),x=ls("blur"),k=ls("perspective"),v=ls("aspect"),b=ls("ease"),w=ls("animate"),y=()=>["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(),bt,vt],z=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],j=()=>[bt,vt,c],M=()=>[Ql,"full","auto",...j()],D=()=>[Mo,"none","subgrid",bt,vt],I=()=>["auto",{span:["full",Mo,bt,vt]},Mo,bt,vt],$=()=>[Mo,"auto",bt,vt],q=()=>["auto","min","max","fr",bt,vt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...j()],J=()=>[Ql,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Z=()=>[Ql,"screen","full","dvw","lvw","svw","min","max","fit",...j()],B=()=>[Ql,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],L=()=>[e,bt,vt],F=()=>[...C(),ij,sj,{position:[bt,vt]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",C2n,y2n,{size:[bt,vt]}],ne=()=>[rw,Bp,u_],ce=()=>["","none","full",u,bt,vt],_e=()=>["",cn,Bp,u_],se=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[cn,rw,ij,sj],le=()=>["","none",x,bt,vt],fe=()=>["none",cn,bt,vt],me=()=>["none",cn,bt,vt],Re=()=>[cn,bt,vt],Oe=()=>[Ql,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bc],breakpoint:[Bc],color:[vI],container:[Bc],"drop-shadow":[Bc],ease:["in","out","in-out"],font:[v2n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bc],shadow:[Bc],spacing:["px",cn],text:[Bc],"text-shadow":[Bc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ql,vt,bt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",bt,vt]}],"container-named":[b2n],columns:[{columns:[cn,vt,bt,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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:[Mo,"auto",bt,vt]}],basis:[{basis:[Ql,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[cn,Ql,"auto","initial","none",vt]}],grow:[{grow:["",cn,bt,vt]}],shrink:[{shrink:["",cn,bt,vt]}],order:[{order:[Mo,"first","last","none",bt,vt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[o,"screen",...J()]}],"min-w":[{"min-w":[o,"screen","none",...J()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,Bp,u_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,N2n,x2n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rw,vt]}],"font-family":[{font:[S2n,w2n,n]}],"font-features":[{"font-features":[vt]}],"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,bt,vt]}],"line-clamp":[{"line-clamp":[cn,"none",bt,rj]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",bt,vt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",bt,vt]}],"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:[cn,"from-font","auto",bt,u_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[cn,"auto",bt,vt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[Mo,bt,vt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",bt,vt]}],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",bt,vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mo,bt,vt],radial:["",bt,vt],conic:[Mo,bt,vt]},E2n,k2n]}],"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:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:_e()}],"border-w-x":[{"border-x":_e()}],"border-w-y":[{"border-y":_e()}],"border-w-s":[{"border-s":_e()}],"border-w-e":[{"border-e":_e()}],"border-w-bs":[{"border-bs":_e()}],"border-w-be":[{"border-be":_e()}],"border-w-t":[{"border-t":_e()}],"border-w-r":[{"border-r":_e()}],"border-w-b":[{"border-b":_e()}],"border-w-l":[{"border-l":_e()}],"divide-x":[{"divide-x":_e()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_e()}],"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":[cn,bt,vt]}],"outline-w":[{outline:["",cn,Bp,u_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,r1,n1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,r1,n1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:_e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[cn,u_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":_e()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,r1,n1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[cn,bt,vt]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[cn]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"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":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"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":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"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":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"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":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"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":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"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":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[bt,vt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"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":[cn]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"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:F()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",bt,vt]}],filter:[{filter:["","none",bt,vt]}],blur:[{blur:le()}],brightness:[{brightness:[cn,bt,vt]}],contrast:[{contrast:[cn,bt,vt]}],"drop-shadow":[{"drop-shadow":["","none",m,r1,n1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",cn,bt,vt]}],"hue-rotate":[{"hue-rotate":[cn,bt,vt]}],invert:[{invert:["",cn,bt,vt]}],saturate:[{saturate:[cn,bt,vt]}],sepia:[{sepia:["",cn,bt,vt]}],"backdrop-filter":[{"backdrop-filter":["","none",bt,vt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[cn,bt,vt]}],"backdrop-contrast":[{"backdrop-contrast":[cn,bt,vt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",cn,bt,vt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[cn,bt,vt]}],"backdrop-invert":[{"backdrop-invert":["",cn,bt,vt]}],"backdrop-opacity":[{"backdrop-opacity":[cn,bt,vt]}],"backdrop-saturate":[{"backdrop-saturate":[cn,bt,vt]}],"backdrop-sepia":[{"backdrop-sepia":["",cn,bt,vt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",bt,vt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[cn,"initial",bt,vt]}],ease:[{ease:["linear","initial",b,bt,vt]}],delay:[{delay:[cn,bt,vt]}],animate:[{animate:["none",w,bt,vt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,bt,vt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[bt,vt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],zoom:[{zoom:[Mo,bt,vt]}],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",bt,vt]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",bt,vt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[cn,Bp,u_,rj]}],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"]}},j2n=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(bd(e,"cacheSize",n),bd(e,"prefix",t),bd(e,"experimentalParseClassName",r),s1(e.theme,i.theme),s1(e.classGroups,i.classGroups),s1(e.conflictingClassGroups,i.conflictingClassGroups),s1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),bd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),bd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),i1(e.theme,s.theme),i1(e.classGroups,s.classGroups),i1(e.conflictingClassGroups,s.conflictingClassGroups),i1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),O3(e,s,"postfixLookupClassGroups"),O3(e,s,"orderSensitiveModifiers"),e),bd=(e,n,t)=>{t!==void 0&&(e[n]=t)},s1=(e,n)=>{if(n)for(const t in n)bd(e,t,n[t])},i1=(e,n)=>{if(n)for(const t in n)O3(e,n,t)},O3=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},T2n=(e,...n)=>typeof e=="function"?nj(aj,e,...n):nj(()=>j2n(aj(),e),...n),A2n=T2n({extend:{theme:{text:["menu"]}}});function fs(...e){return A2n(...e)}const R2n={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 Ht({variant:e="default",size:n="default",className:t,...r}){return f.jsx("span",{className:fs("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",R2n[e],t),...r})}const M2n=["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(" "),O2n={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"},D2n={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 EI(e,n,t,r){return fs(M2n,O2n[e],D2n[n],t&&"active",r)}function De({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:EI(n,t,e,r),...s})}function dh({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:EI(n,t,e,r),...s})}const L2n=["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(" "),I2n={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"},$2n={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function NI(e,n,t,r,s){return fs(L2n,I2n[e],$2n[n],r==="circle"&&"rounded-full",t&&"active",s)}const Lt=A.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return f.jsx("button",{ref:o,className:NI(s,r,n,t,i),...a})});function Cm({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return f.jsx("a",{className:NI(r,t,e,n,s),...i})}const B2n={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 Ir({variant:e="default",className:n,...t}){return f.jsx("input",{className:fs("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",B2n[e],n),...t})}function Yn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return f.jsx("button",{className:fs("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 Nt({className:e,...n}){return f.jsx("span",{className:fs("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 Kr({className:e,...n}){return f.jsx("div",{className:fs("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const P2n={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 Dd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:fs("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:fs("h-[7px] w-[7px] shrink-0 rounded-full bg-current",P2n[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const F2n=["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 zI(e,n){return fs(F2n,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function cS({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:zI(e,n),...r,children:t??f.jsx("span",{})})}function H2n({checked:e=!1,className:n,...t}){return f.jsx("span",{className:zI(e,n),...t,children:f.jsx("span",{})})}var oa=zO();const q2n=gm(oa);function U2n(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 G2n=e=>{switch(e){case"success":return W2n;case"info":return X2n;case"warning":return Q2n;case"error":return Y2n;default:return null}},V2n=Array(12).fill(0),K2n=({visible:e,className:n})=>tt.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},tt.createElement("div",{className:"sonner-spinner"},V2n.map((t,r)=>tt.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),W2n=tt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},tt.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"})),Q2n=tt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},tt.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"})),X2n=tt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},tt.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"})),Y2n=tt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},tt.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"})),Z2n=tt.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"},tt.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),tt.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),J2n=()=>{const[e,n]=tt.useState(document.hidden);return tt.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let ewn=1;const twn=100,oj=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:ewn++};class nwn{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-twn;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=oj(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],tt.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(swn(u)&&!u.ok){i=!1;const _=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 _=="object"&&!tt.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!tt.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!tt.isValidElement(_)?_:{message:_};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const h=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!tt.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:_,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=oj(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 Ni=new nwn,rwn=(e,n)=>Ni.message(e,n),swn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",iwn=rwn,awn=()=>Ni.toasts,own=()=>Ni.getActiveToasts(),cwn=Object.assign(iwn,{success:Ni.success,info:Ni.info,warning:Ni.warning,error:Ni.error,custom:Ni.custom,message:Ni.message,promise:Ni.promise,dismiss:Ni.dismiss,loading:Ni.loading},{getHistory:awn,getToasts:own});U2n("[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 a1(e){return e.label!==void 0}const lwn=3,uwn="24px",_wn="16px",cj=4e3,fwn=356,dwn=14,hwn=45,pwn=200;function Oo(...e){return e.filter(Boolean).join(" ")}function mwn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const gwn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:_,unstyled:p,interacting:m,setHeights:x,visibleToasts:k,heights:v,index:b,toasts:w,expanded:y,removeToast:C,defaultRichColors:N,closeButton:z,style:T,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:$,position:q,gap:H,expandByDefault:Q,classNames:V,icons:J,closeButtonAriaLabel:Z="Close toast"}=e,[B,L]=tt.useState(null),[F,U]=tt.useState(null),[K,ne]=tt.useState(!1),[ce,_e]=tt.useState(!1),[se,G]=tt.useState(!1),[oe,le]=tt.useState(!1),[fe,me]=tt.useState(!1),[Re,Oe]=tt.useState(0),[Qe,qe]=tt.useState(0),Se=tt.useRef(_.duration||$||cj),at=tt.useRef(null),et=tt.useRef(null),ct=b===0,wt=b+1<=k,$t=_.type,ht=$t??"default",dt=_.dismissible!==!1,Le=_.className||"",ge=_.descriptionClassName||"",Te=tt.useMemo(()=>v.findIndex(Ct=>Ct.toastId===_.id)||0,[v,_.id]),Fe=tt.useMemo(()=>{var Ct;return(Ct=_.closeButton)!=null?Ct:z},[_.closeButton,z]),st=tt.useMemo(()=>_.duration||$||cj,[_.duration,$]),_t=tt.useRef(0),mt=tt.useRef(0),Ue=tt.useRef(0),Gt=tt.useRef(null),[sn,jt]=q.split("-"),gt=tt.useMemo(()=>v.reduce((Ct,tn,vn)=>vn>=Te?Ct:Ct+tn.height,0),[v,Te]),$n=J2n(),Zt=tt.useMemo(()=>{var Ct;return(Ct=e.swipeDirections)!=null?Ct:mwn(q)},[e.swipeDirections,q]),gn=_.invert||h,mr=$t==="loading";mt.current=tt.useMemo(()=>Te*H+gt,[Te,gt]),tt.useEffect(()=>{Se.current=st},[st]),tt.useEffect(()=>{ne(!0)},[]),tt.useEffect(()=>{const Ct=et.current;if(Ct){const tn=Ct.getBoundingClientRect().height;return qe(tn),x(vn=>[{toastId:_.id,height:tn,position:_.position},...vn]),()=>x(vn=>vn.filter(on=>on.toastId!==_.id))}},[x,_.id]),tt.useLayoutEffect(()=>{if(!K)return;const Ct=et.current,tn=Ct.style.height;Ct.style.height="auto";const vn=Ct.getBoundingClientRect().height;Ct.style.height=tn,qe(vn),x(on=>on.find(bn=>bn.toastId===_.id)?on.map(bn=>bn.toastId===_.id?{...bn,height:vn}:bn):[{toastId:_.id,height:vn,position:_.position},...on])},[K,_.title,_.description,x,_.id,_.jsx,_.action,_.cancel]);const Bn=tt.useCallback(()=>{_e(!0),Oe(mt.current),x(Ct=>Ct.filter(tn=>tn.toastId!==_.id)),setTimeout(()=>{C(_)},pwn)},[_,C,x,mt]);tt.useEffect(()=>{if(_.promise&&$t==="loading"||_.duration===1/0||_.type==="loading")return;let Ct;return y||m||$n?(()=>{if(Ue.current<_t.current){const on=new Date().getTime()-_t.current;Se.current=Se.current-on}Ue.current=new Date().getTime()})():(()=>{Se.current!==1/0&&(_t.current=new Date().getTime(),Ct=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),Bn()},Se.current))})(),()=>clearTimeout(Ct)},[y,m,_,$t,$n,Bn]),tt.useEffect(()=>{_.delete&&(Bn(),_.onDismiss==null||_.onDismiss.call(_,_))},[Bn,_.delete]);function Nn(){var Ct;if(J!=null&&J.loading){var tn;return tt.createElement("div",{className:Oo(V==null?void 0:V.loader,_==null||(tn=_.classNames)==null?void 0:tn.loader,"sonner-loader"),"data-visible":$t==="loading"},J.loading)}return tt.createElement(K2n,{className:Oo(V==null?void 0:V.loader,_==null||(Ct=_.classNames)==null?void 0:Ct.loader),visible:$t==="loading"})}const zn=_.icon||(J==null?void 0:J[$t])||G2n($t);var Pn,jr;return tt.createElement("li",{tabIndex:0,ref:et,className:Oo(D,Le,V==null?void 0:V.toast,_==null||(n=_.classNames)==null?void 0:n.toast,V==null?void 0:V[ht],_==null||(t=_.classNames)==null?void 0:t[ht]),"data-sonner-toast":"","data-rich-colors":(Pn=_.richColors)!=null?Pn:N,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":K,"data-promise":!!_.promise,"data-swiped":fe,"data-removed":ce,"data-visible":wt,"data-y-position":sn,"data-x-position":jt,"data-index":b,"data-front":ct,"data-swiping":se,"data-dismissible":dt,"data-type":$t,"data-invert":gn,"data-swipe-out":oe,"data-swipe-direction":F,"data-expanded":!!(y||Q&&K),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ce?Re:mt.current}px`,"--initial-height":Q?"auto":`${Qe}px`,...T,..._.style},onDragEnd:()=>{G(!1),L(null),Gt.current=null},onPointerDown:Ct=>{Ct.button!==2&&(mr||!dt||(at.current=new Date,Oe(mt.current),Ct.target.setPointerCapture(Ct.pointerId),Ct.target.tagName!=="BUTTON"&&(G(!0),Gt.current={x:Ct.clientX,y:Ct.clientY})))},onPointerUp:()=>{var Ct,tn,vn;if(oe||!dt)return;Gt.current=null;const on=Number(((Ct=et.current)==null?void 0:Ct.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gr=Number(((tn=et.current)==null?void 0:tn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),bn=new Date().getTime()-((vn=at.current)==null?void 0:vn.getTime()),yn=B==="x"?on:gr,Hn=Math.abs(yn)/bn;if((B==="x"?Zt.includes(on>0?"right":"left"):Zt.includes(gr>0?"bottom":"top"))&&(Math.abs(yn)>=hwn||Hn>.11)){Oe(mt.current),_.onDismiss==null||_.onDismiss.call(_,_),U(B==="x"?on>0?"right":"left":gr>0?"down":"up"),Bn(),le(!0);return}else{var Ke,Cn;(Ke=et.current)==null||Ke.style.setProperty("--swipe-amount-x","0px"),(Cn=et.current)==null||Cn.style.setProperty("--swipe-amount-y","0px")}me(!1),G(!1),L(null)},onPointerMove:Ct=>{var tn,vn,on;if(!Gt.current||!dt||((tn=window.getSelection())==null?void 0:tn.toString().length)>0)return;const bn=Ct.clientY-Gt.current.y,yn=Ct.clientX-Gt.current.x;!B&&(Math.abs(yn)>1||Math.abs(bn)>1)&&L(Math.abs(yn)>Math.abs(bn)?"x":"y");let Hn={x:0,y:0};const Ie=Ke=>1/(1.5+Math.abs(Ke)/20);if(B==="y"){if(Zt.includes("top")||Zt.includes("bottom"))if(Zt.includes("top")&&bn<0||Zt.includes("bottom")&&bn>0)Hn.y=bn;else{const Ke=bn*Ie(bn);Hn.y=Math.abs(Ke)0)Hn.x=yn;else{const Ke=yn*Ie(yn);Hn.x=Math.abs(Ke)0||Math.abs(Hn.y)>0)&&me(!0),(vn=et.current)==null||vn.style.setProperty("--swipe-amount-x",`${Hn.x}px`),(on=et.current)==null||on.style.setProperty("--swipe-amount-y",`${Hn.y}px`)}},Fe&&!_.jsx&&$t!=="loading"?tt.createElement("button",{"aria-label":Z,"data-disabled":mr,"data-close-button":!0,onClick:mr||!dt?()=>{}:()=>{Bn(),_.onDismiss==null||_.onDismiss.call(_,_)},className:Oo(V==null?void 0:V.closeButton,_==null||(r=_.classNames)==null?void 0:r.closeButton)},(jr=J==null?void 0:J.close)!=null?jr:Z2n):null,($t||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[$t])!==null||_.icon)?tt.createElement("div",{"data-icon":"",className:Oo(V==null?void 0:V.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},$t==="loading"?_.icon||Nn():_.promise?Nn():null,$t!=="loading"?zn:null):null,tt.createElement("div",{"data-content":"",className:Oo(V==null?void 0:V.content,_==null||(i=_.classNames)==null?void 0:i.content)},tt.createElement("div",{"data-title":"",className:Oo(V==null?void 0:V.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?tt.createElement("div",{"data-description":"",className:Oo(I,ge,V==null?void 0:V.description,_==null||(o=_.classNames)==null?void 0:o.description)},typeof _.description=="function"?_.description():_.description):null),tt.isValidElement(_.cancel)?_.cancel:_.cancel&&a1(_.cancel)?tt.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:Ct=>{a1(_.cancel)&&dt&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,Ct),Bn())},className:Oo(V==null?void 0:V.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,tt.isValidElement(_.action)?_.action:_.action&&a1(_.action)?tt.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:Ct=>{a1(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,Ct),!Ct.defaultPrevented&&Bn())},className:Oo(V==null?void 0:V.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function lj(){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 vwn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?_wn:uwn;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(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]}):c(o)}),t}const bwn=tt.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:_,theme:p="light",richColors:m,duration:x,style:k,visibleToasts:v=lwn,toastOptions:b,dir:w=lj(),gap:y=dwn,icons:C,customAriaLabel:N,containerAriaLabel:z="Notifications"}=n,[T,j]=tt.useState([]),M=tt.useMemo(()=>r?T.filter(ne=>ne.toasterId===r):T.filter(ne=>!ne.toasterId),[T,r]),D=tt.useMemo(()=>Array.from(new Set([i].concat(M.filter(ne=>ne.position).map(ne=>ne.position)))),[M,i]),[I,$]=tt.useState([]),[q,H]=tt.useState(!1),[Q,V]=tt.useState(!1),[J,Z]=tt.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=tt.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=tt.useRef(null),U=tt.useRef(!1),K=tt.useCallback(ne=>{j(ce=>{var _e;return(_e=ce.find(se=>se.id===ne.id))!=null&&_e.delete||Ni.dismiss(ne.id),ce.filter(({id:se})=>se!==ne.id)})},[]);return tt.useEffect(()=>Ni.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{j(ce=>ce.map(_e=>_e.id===ne.id?{..._e,delete:!0}:_e))});return}setTimeout(()=>{q2n.flushSync(()=>{j(ce=>{const _e=ce.findIndex(se=>se.id===ne.id);return _e!==-1?[...ce.slice(0,_e),{...ce[_e],...ne},...ce.slice(_e+1)]:[ne,...ce]})})})}),[]),tt.useEffect(()=>{if(p!=="system"){Z(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:ce})=>{Z(ce?"dark":"light")})}catch{ne.addListener(({matches:_e})=>{try{Z(_e?"dark":"light")}catch(se){console.error(se)}})}},[p]),tt.useEffect(()=>{T.length<=1&&H(!1)},[T]),tt.useEffect(()=>{const ne=ce=>{var _e;if(a.length>0&&a.every(oe=>ce[oe]||ce.code===oe)){var G;H(!0),(G=B.current)==null||G.focus()}ce.code==="Escape"&&(document.activeElement===B.current||(_e=B.current)!=null&&_e.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[a]),tt.useEffect(()=>{if(B.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[B.current]),tt.createElement("section",{ref:t,"aria-label":N??`${z} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ne,ce)=>{var _e;const[se,G]=ne.split("-");return M.length?tt.createElement("ol",{key:ne,dir:w==="auto"?lj():w,tabIndex:-1,ref:B,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":se,"data-x-position":G,style:{"--front-toast-height":`${((_e=I[0])==null?void 0:_e.height)||0}px`,"--width":`${fwn}px`,"--gap":`${y}px`,...k,...vwn(h,_)},onBlur:oe=>{U.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},M.filter(oe=>!oe.position&&ce===0||oe.position===ne).map((oe,le)=>{var fe,me;return tt.createElement(gwn,{key:oe.id,icons:C,index:le,toast:oe,defaultRichColors:m,duration:(fe=b==null?void 0:b.duration)!=null?fe:x,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(me=b==null?void 0:b.closeButton)!=null?me:c,interacting:Q,position:ne,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:K,toasts:M.filter(Re=>Re.position==oe.position),heights:I.filter(Re=>Re.position==oe.position),setHeights:$,expandByDefault:o,gap:y,expanded:q,swipeDirections:n.swipeDirections})})):null}))});function ywn(e){const[n]=_I();return f.jsx(bwn,{theme:n,...e})}function mn(e,n,t){cwn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function lS({content:e,children:n,className:t}){const r=A.useRef(null),s=A.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),_=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${_}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return A.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),f.jsxs("span",{ref:r,className:fs("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 c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,f.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 xwn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Em(e,n,t="[data-initial-focus]"){const r=A.useRef(n);r.current=n,A.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(xwn)];(s.querySelector(t)??a()[0]??s).focus();const o=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const u=a(),h=u[0],_=u.at(-1);!h||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function jI({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=A.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?NCt():WCt({count:Wt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?J6t():f6t({count:Wt(n.pendingPermissionCount)})),o>0&&c.push(o===1?dCt():OCt({count:Wt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?yCt():FCt({count:Wt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?aCt():M6t({count:Wt(n.activeRunCount)})),Em(a,s),oa.createPortal(f.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:f.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":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:E6t({host:Ne(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:V6t()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(De,{disabled:r,onClick:s,children:W_()}),f.jsx(De,{variant:"danger",disabled:r,onClick:i,children:r?t7t():b6t()})]})]})}),document.body)}/** +स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,g_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f_n(e):t==="fa"?d_n(e):t==="ar"?h_n(e):t==="es"?p_n(e):t==="hi"?m_n(e):__n(e)}),v_n=()=>"Move data here",b_n=()=>"将数据移动到此处",y_n=()=>"انتقال داده به اینجا",x_n=()=>"نقل البيانات إلى هنا",w_n=()=>"Mover los datos aquí",k_n=()=>"डेटा यहाँ ले जाएं",S_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_n():t==="fa"?y_n():t==="ar"?x_n():t==="es"?w_n():t==="hi"?k_n():v_n()}),C_n=()=>"Moving…",E_n=()=>"正在移动…",N_n=()=>"در حال جابه‌جایی…",z_n=()=>"جارٍ النقل…",j_n=()=>"Moviendo…",T_n=()=>"स्थानांतरित हो रहा है…",A_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_n():t==="fa"?N_n():t==="ar"?z_n():t==="es"?j_n():t==="hi"?T_n():C_n()}),R_n=()=>"Preparing…",M_n=()=>"正在准备…",O_n=()=>"در حال آماده‌سازی…",D_n=()=>"جارٍ التحضير…",L_n=()=>"Preparando…",I_n=()=>"तैयार हो रहा है…",$_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M_n():t==="fa"?O_n():t==="ar"?D_n():t==="es"?L_n():t==="hi"?I_n():R_n()}),B_n=()=>" (same disk, instant)",P_n=()=>"(同一磁盘,可立即完成)",F_n=()=>" (روی همان دیسک، فوری)",H_n=()=>" (القرص نفسه، فوري)",q_n=()=>" (mismo disco, instantáneo)",U_n=()=>" (उसी डिस्क पर, तुरंत)",G_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P_n():t==="fa"?F_n():t==="ar"?H_n():t==="es"?q_n():t==="hi"?U_n():B_n()}),V_n=()=>"default location",K_n=()=>"默认位置",W_n=()=>"محل پیش‌فرض",Q_n=()=>"الموقع الافتراضي",X_n=()=>"ubicación predeterminada",Y_n=()=>"डिफ़ॉल्ट स्थान",Z_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_n():t==="fa"?W_n():t==="ar"?Q_n():t==="es"?X_n():t==="hi"?Y_n():V_n()}),J_n=()=>"ORX_DATA_DIR environment variable",efn=()=>"ORX_DATA_DIR 环境变量",tfn=()=>"متغیر محیطی ORX_DATA_DIR",nfn=()=>"متغيّر البيئة ORX_DATA_DIR",rfn=()=>"variable de entorno ORX_DATA_DIR",sfn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",ifn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?efn():t==="fa"?tfn():t==="ar"?nfn():t==="es"?rfn():t==="hi"?sfn():J_n()}),afn=()=>"your saved setting",ofn=()=>"已保存的设置",cfn=()=>"تنظیم ذخیره‌شدهٔ شما",lfn=()=>"إعدادك المحفوظ",ufn=()=>"tu ajuste guardado",_fn=()=>"आपकी सेव की गई सेटिंग",ffn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ofn():t==="fa"?cfn():t==="ar"?lfn():t==="es"?ufn():t==="hi"?_fn():afn()}),dfn=()=>"XDG_DATA_HOME",hfn=()=>"XDG_DATA_HOME",pfn=()=>"XDG_DATA_HOME",mfn=()=>"XDG_DATA_HOME",gfn=()=>"XDG_DATA_HOME",vfn=()=>"XDG_DATA_HOME",bfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hfn():t==="fa"?pfn():t==="ar"?mfn():t==="es"?gfn():t==="hi"?vfn():dfn()}),yfn=()=>"Verifying…",xfn=()=>"正在验证…",wfn=()=>"در حال بررسی…",kfn=()=>"جارٍ التحقق…",Sfn=()=>"Verificando…",Cfn=()=>"सत्यापित हो रहा है…",Efn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xfn():t==="fa"?wfn():t==="ar"?kfn():t==="es"?Sfn():t==="hi"?Cfn():yfn()}),Nfn=()=>"Loading…",zfn=()=>"正在加载…",jfn=()=>"در حال بارگیری…",Tfn=()=>"جارٍ التحميل…",Afn=()=>"Cargando…",Rfn=()=>"लोड हो रहा है…",Mfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zfn():t==="fa"?jfn():t==="ar"?Tfn():t==="es"?Afn():t==="hi"?Rfn():Nfn()}),Ofn=()=>"This sub-agent is no longer available.",Dfn=()=>"此子智能体已不可用。",Lfn=()=>"این عامل فرعی دیگر در دسترس نیست.",Ifn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",$fn=()=>"Este subagente ya no está disponible.",Bfn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",Pfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dfn():t==="fa"?Lfn():t==="ar"?Ifn():t==="es"?$fn():t==="hi"?Bfn():Ofn()}),Ffn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Hfn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,qfn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Ufn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,Gfn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Vfn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Kfn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hfn(e):t==="fa"?qfn(e):t==="ar"?Ufn(e):t==="es"?Gfn(e):t==="hi"?Vfn(e):Ffn(e)}),Wfn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Qfn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Xfn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Yfn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Zfn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,Jfn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,edn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qfn(e):t==="fa"?Xfn(e):t==="ar"?Yfn(e):t==="es"?Zfn(e):t==="hi"?Jfn(e):Wfn(e)}),tdn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",ndn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",rdn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",sdn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",idn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",adn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",odn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ndn():t==="fa"?rdn():t==="ar"?sdn():t==="es"?idn():t==="hi"?adn():tdn()}),cdn=()=>", a repo for training a mini-GPT from scratch.",ldn=()=>",一个从零训练迷你 GPT 的仓库。",udn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",_dn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",fdn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",ddn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",hdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ldn():t==="fa"?udn():t==="ar"?_dn():t==="es"?fdn():t==="hi"?ddn():cdn()}),pdn=()=>"Close",mdn=()=>"关闭",gdn=()=>"بستن",vdn=()=>"إغلاق",bdn=()=>"Cerrar",ydn=()=>"बंद करें",p3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mdn():t==="fa"?gdn():t==="ar"?vdn():t==="es"?bdn():t==="hi"?ydn():pdn()}),xdn=()=>"Create a new project",wdn=()=>"新建项目",kdn=()=>"ایجاد پروژهٔ جدید",Sdn=()=>"إنشاء مشروع جديد",Cdn=()=>"Crear un proyecto nuevo",Edn=()=>"नया प्रोजेक्ट बनाएं",Ndn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wdn():t==="fa"?kdn():t==="ar"?Sdn():t==="es"?Cdn():t==="hi"?Edn():xdn()}),zdn=()=>"Demo project",jdn=()=>"演示项目",Tdn=()=>"پروژهٔ نمایشی",Adn=()=>"مشروع توضيحي",Rdn=()=>"Proyecto de demostración",Mdn=()=>"डेमो प्रोजेक्ट",Odn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jdn():t==="fa"?Tdn():t==="ar"?Adn():t==="es"?Rdn():t==="hi"?Mdn():zdn()}),Ddn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Ldn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Idn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",$dn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Bdn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Pdn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Fdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ldn():t==="fa"?Idn():t==="ar"?$dn():t==="es"?Bdn():t==="hi"?Pdn():Ddn()}),Hdn=()=>"nanochat",qdn=()=>"nanochat",Udn=()=>"nanochat",Gdn=()=>"nanochat",Vdn=()=>"nanochat",Kdn=()=>"nanochat",Wdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qdn():t==="fa"?Udn():t==="ar"?Gdn():t==="es"?Vdn():t==="hi"?Kdn():Hdn()}),Qdn=()=>"Try the demo experiment",Xdn=()=>"试试演示实验",Ydn=()=>"آزمایش نمایشی را امتحان کنید",Zdn=()=>"جرّب التجربة التوضيحية",Jdn=()=>"Probar el experimento de demostración",ehn=()=>"डेमो प्रयोग आज़माएं",thn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xdn():t==="fa"?Ydn():t==="ar"?Zdn():t==="es"?Jdn():t==="hi"?ehn():Qdn()}),nhn=()=>"Couldn’t save your progress. Try again.",rhn=()=>"无法保存进度。请重试。",shn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",ihn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",ahn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",ohn=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",chn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rhn():t==="fa"?shn():t==="ar"?ihn():t==="es"?ahn():t==="hi"?ohn():nhn()}),lhn=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",uhn=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",_hn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",fhn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",dhn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",hhn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",phn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uhn():t==="fa"?_hn():t==="ar"?fhn():t==="es"?dhn():t==="hi"?hhn():lhn()}),mhn=()=>"Welcome to OpenResearch",ghn=()=>"欢迎使用 OpenResearch",vhn=()=>"به OpenResearch خوش آمدید",bhn=()=>"مرحبًا بك في OpenResearch",yhn=()=>"Te damos la bienvenida a OpenResearch",xhn=()=>"OpenResearch में आपका स्वागत है",whn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ghn():t==="fa"?vhn():t==="ar"?bhn():t==="es"?yhn():t==="hi"?xhn():mhn()}),khn=()=>"Baseline",Shn=()=>"基线",Chn=()=>"مبنا",Ehn=()=>"الأساس",Nhn=()=>"Base",zhn=()=>"बेसलाइन",jhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Shn():t==="fa"?Chn():t==="ar"?Ehn():t==="es"?Nhn():t==="hi"?zhn():khn()}),Thn=()=>"Experiment",Ahn=()=>"实验",Rhn=()=>"آزمایش",Mhn=()=>"تجربة",Ohn=()=>"Experimento",Dhn=()=>"प्रयोग",Vc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ahn():t==="fa"?Rhn():t==="ar"?Mhn():t==="es"?Ohn():t==="hi"?Dhn():Thn()}),Lhn=e=>`${e==null?void 0:e.count} experiments`,Ihn=e=>`${e==null?void 0:e.count} 个实验`,$hn=e=>`${e==null?void 0:e.count} آزمایش`,Bhn=e=>`التجارب: ${e==null?void 0:e.count}`,Phn=e=>`${e==null?void 0:e.count} experimentos`,Fhn=e=>`${e==null?void 0:e.count} प्रयोग`,Hhn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ihn(e):t==="fa"?$hn(e):t==="ar"?Bhn(e):t==="es"?Phn(e):t==="hi"?Fhn(e):Lhn(e)}),qhn=()=>"1 experiment",Uhn=()=>"1 个实验",Ghn=()=>"۱ آزمایش",Vhn=()=>"تجربة واحدة",Khn=()=>"1 experimento",Whn=()=>"1 प्रयोग",Qhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uhn():t==="fa"?Ghn():t==="ar"?Vhn():t==="es"?Khn():t==="hi"?Whn():qhn()}),Xhn=()=>"Running",Yhn=()=>"运行中",Zhn=()=>"در حال اجرا",Jhn=()=>"قيد التشغيل",epn=()=>"En ejecución",tpn=()=>"चल रहा है",npn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yhn():t==="fa"?Zhn():t==="ar"?Jhn():t==="es"?epn():t==="hi"?tpn():Xhn()}),rpn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",spn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",ipn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",apn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",opn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",cpn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",lpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?spn():t==="fa"?ipn():t==="ar"?apn():t==="es"?opn():t==="hi"?cpn():rpn()}),upn=()=>"Ask the agent in chat to create and run your first experiment.",_pn=()=>"在聊天中让智能体创建并运行你的第一个实验。",fpn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",dpn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",hpn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",ppn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",mpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pn():t==="fa"?fpn():t==="ar"?dpn():t==="es"?hpn():t==="hi"?ppn():upn()}),gpn=()=>"Code",vpn=()=>"代码",bpn=()=>"کد",ypn=()=>"الشيفرة",xpn=()=>"Código",wpn=()=>"कोड",kpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpn():t==="fa"?bpn():t==="ar"?ypn():t==="es"?xpn():t==="hi"?wpn():gpn()}),Spn=()=>"Logs",Cpn=()=>"日志",Epn=()=>"گزارش‌ها",Npn=()=>"السجلات",zpn=()=>"Logs",jpn=()=>"लॉग",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cpn():t==="fa"?Epn():t==="ar"?Npn():t==="es"?zpn():t==="hi"?jpn():Spn()}),Tpn=()=>"No experiments from the current task yet",Apn=()=>"当前任务尚无实验",Rpn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",Mpn=()=>"لا توجد تجارب من المهمة الحالية بعد",Opn=()=>"Aún no hay experimentos de la tarea actual",Dpn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Lpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Apn():t==="fa"?Rpn():t==="ar"?Mpn():t==="es"?Opn():t==="hi"?Dpn():Tpn()}),Ipn=()=>"No experiments yet",$pn=()=>"尚无实验",Bpn=()=>"هنوز آزمایشی وجود ندارد",Ppn=()=>"لا توجد تجارب بعد",Fpn=()=>"Aún no hay experimentos",Hpn=()=>"अभी तक कोई प्रयोग नहीं",qpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$pn():t==="fa"?Bpn():t==="ar"?Ppn():t==="es"?Fpn():t==="hi"?Hpn():Ipn()}),Upn=()=>"no runs",Gpn=()=>"无运行",Vpn=()=>"بدون اجرا",Kpn=()=>"لا عمليات تشغيل",Wpn=()=>"sin ejecuciones",Qpn=()=>"कोई रन नहीं",Xpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpn():t==="fa"?Vpn():t==="ar"?Kpn():t==="es"?Wpn():t==="hi"?Qpn():Upn()}),Ypn=()=>"Open logs",Zpn=()=>"打开日志",Jpn=()=>"باز کردن گزارش‌ها",e0n=()=>"فتح السجلات",t0n=()=>"Abrir logs",n0n=()=>"लॉग खोलें",r0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpn():t==="fa"?Jpn():t==="ar"?e0n():t==="es"?t0n():t==="hi"?n0n():Ypn()}),s0n=()=>"other tasks",i0n=()=>"其他任务",a0n=()=>"وظایف دیگر",o0n=()=>"مهام أخرى",c0n=()=>"otras tareas",l0n=()=>"अन्य टास्क",u0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0n():t==="fa"?a0n():t==="ar"?o0n():t==="es"?c0n():t==="hi"?l0n():s0n()}),_0n=()=>"Runs",f0n=()=>"运行",d0n=()=>"اجراها",h0n=()=>"عمليات التشغيل",p0n=()=>"Ejecuciones",m0n=()=>"रन",g0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f0n():t==="fa"?d0n():t==="ar"?h0n():t==="es"?p0n():t==="hi"?m0n():_0n()}),v0n=()=>"Switch to Entire project to see all experiments",b0n=()=>"切换到“整个项目”以查看所有实验",y0n=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",x0n=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",w0n=()=>"Cambia a Todo el proyecto para ver todos los experimentos",k0n=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",S0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b0n():t==="fa"?y0n():t==="ar"?x0n():t==="es"?w0n():t==="hi"?k0n():v0n()}),C0n=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,E0n=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,N0n=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,z0n=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,j0n=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,T0n=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,A0n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?E0n(e):t==="fa"?N0n(e):t==="ar"?z0n(e):t==="es"?j0n(e):t==="hi"?T0n(e):C0n(e)}),R0n=()=>"Dismiss",M0n=()=>"关闭",O0n=()=>"بستن",D0n=()=>"تجاهل",L0n=()=>"Descartar",I0n=()=>"खारिज करें",$0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M0n():t==="fa"?O0n():t==="ar"?D0n():t==="es"?L0n():t==="hi"?I0n():R0n()}),B0n=()=>"Restart now",P0n=()=>"立即重新启动",F0n=()=>"هم‌اکنون دوباره راه‌اندازی کن",H0n=()=>"أعد التشغيل الآن",q0n=()=>"Reiniciar ahora",U0n=()=>"अभी फिर से शुरू करें",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P0n():t==="fa"?F0n():t==="ar"?H0n():t==="es"?q0n():t==="hi"?U0n():B0n()}),G0n=e=>`Could not restart: ${e==null?void 0:e.error}`,V0n=e=>`无法重新启动:${e==null?void 0:e.error}`,K0n=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,W0n=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Q0n=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,X0n=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,LL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V0n(e):t==="fa"?K0n(e):t==="ar"?W0n(e):t==="es"?Q0n(e):t==="hi"?X0n(e):G0n(e)}),Y0n=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Z0n=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",J0n=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",emn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",tmn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",nmn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",rmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z0n():t==="fa"?J0n():t==="ar"?emn():t==="es"?tmn():t==="hi"?nmn():Y0n()}),smn=()=>"Restarting…",imn=()=>"正在重新启动…",amn=()=>"در حال راه‌اندازی مجدد…",omn=()=>"جارٍ إعادة التشغيل…",cmn=()=>"Reiniciando…",lmn=()=>"फिर से शुरू हो रहा है…",IL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?imn():t==="fa"?amn():t==="ar"?omn():t==="es"?cmn():t==="hi"?lmn():smn()}),umn=()=>"macOS app",_mn=()=>"macOS 应用",fmn=()=>"برنامهٔ macOS",dmn=()=>"تطبيق macOS",hmn=()=>"App de macOS",pmn=()=>"macOS ऐप",mmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_mn():t==="fa"?fmn():t==="ar"?dmn():t==="es"?hmn():t==="hi"?pmn():umn()}),gmn=()=>"Installed with cargo",vmn=()=>"通过 cargo 安装",bmn=()=>"نصب‌شده با cargo",ymn=()=>"مثبّت عبر cargo",xmn=()=>"Instalado con cargo",wmn=()=>"cargo से इंस्टॉल किया गया",kmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vmn():t==="fa"?bmn():t==="ar"?ymn():t==="es"?xmn():t==="hi"?wmn():gmn()}),Smn=()=>"Installed with Homebrew",Cmn=()=>"通过 Homebrew 安装",Emn=()=>"نصب‌شده با Homebrew",Nmn=()=>"مثبّت عبر Homebrew",zmn=()=>"Instalado con Homebrew",jmn=()=>"Homebrew से इंस्टॉल किया गया",Tmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cmn():t==="fa"?Emn():t==="ar"?Nmn():t==="es"?zmn():t==="hi"?jmn():Smn()}),Amn=()=>"Installed with the orx installer",Rmn=()=>"通过 orx 安装程序安装",Mmn=()=>"نصب‌شده با نصب‌کنندهٔ orx",Omn=()=>"مثبّت عبر مُثبّت orx",Dmn=()=>"Instalado con el instalador de orx",Lmn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",Imn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rmn():t==="fa"?Mmn():t==="ar"?Omn():t==="es"?Dmn():t==="hi"?Lmn():Amn()}),$mn=()=>"Managed by Nix",Bmn=()=>"由 Nix 管理",Pmn=()=>"مدیریت‌شده با Nix",Fmn=()=>"مُدار بواسطة Nix",Hmn=()=>"Gestionado por Nix",qmn=()=>"Nix द्वारा प्रबंधित",Umn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bmn():t==="fa"?Pmn():t==="ar"?Fmn():t==="es"?Hmn():t==="hi"?qmn():$mn()}),Gmn=()=>"Portable orx.exe",Vmn=()=>"便携版 orx.exe",Kmn=()=>"orx.exe قابل‌حمل",Wmn=()=>"‏orx.exe المحمول",Qmn=()=>"orx.exe portable",Xmn=()=>"पोर्टेबल orx.exe",Ymn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vmn():t==="fa"?Kmn():t==="ar"?Wmn():t==="es"?Qmn():t==="hi"?Xmn():Gmn()}),Zmn=()=>"Unknown install",Jmn=()=>"未知安装方式",egn=()=>"روش نصب نامشخص",tgn=()=>"تثبيت غير معروف",ngn=()=>"Instalación desconocida",rgn=()=>"अज्ञात इंस्टॉल",sgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jmn():t==="fa"?egn():t==="ar"?tgn():t==="es"?ngn():t==="hi"?rgn():Zmn()}),ign=()=>"Re-run your cargo install to update.",agn=()=>"重新运行 cargo 安装命令以更新。",ogn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",cgn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",lgn=()=>"Vuelve a ejecutar cargo install para actualizar.",ugn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",_gn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?agn():t==="fa"?ogn():t==="ar"?cgn():t==="es"?lgn():t==="hi"?ugn():ign()}),fgn=()=>"Run brew upgrade to update.",dgn=()=>"运行 brew upgrade 以更新。",hgn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",pgn=()=>"نفّذ brew upgrade للتحديث.",mgn=()=>"Ejecuta brew upgrade para actualizar.",ggn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",vgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dgn():t==="fa"?hgn():t==="ar"?pgn():t==="es"?mgn():t==="hi"?ggn():fgn()}),bgn=()=>"Update it through your Nix configuration.",ygn=()=>"通过 Nix 配置进行更新。",xgn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",wgn=()=>"حدّثه عبر إعداد Nix الخاص بك.",kgn=()=>"Actualízalo desde tu configuración de Nix.",Sgn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Cgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ygn():t==="fa"?xgn():t==="ar"?wgn():t==="es"?kgn():t==="hi"?Sgn():bgn()}),Egn=()=>"Active Experiments",Ngn=()=>"活跃实验",zgn=()=>"آزمایش‌های فعال",jgn=()=>"التجارب النشطة",Tgn=()=>"Experimentos activos",Agn=()=>"सक्रिय प्रयोग",Rgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ngn():t==="fa"?zgn():t==="ar"?jgn():t==="es"?Tgn():t==="hi"?Agn():Egn()}),Mgn=()=>"Default compute",Ogn=()=>"默认计算目标",Dgn=()=>"محاسبات پیش‌فرض",Lgn=()=>"الحوسبة الافتراضية",Ign=()=>"Cómputo predeterminado",$gn=()=>"डिफ़ॉल्ट कंप्यूट",Bgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ogn():t==="fa"?Dgn():t==="ar"?Lgn():t==="es"?Ign():t==="hi"?$gn():Mgn()}),Pgn=()=>"Terminal",Fgn=()=>"终端",Hgn=()=>"ترمینال",qgn=()=>"الطرفية",Ugn=()=>"Terminal",Ggn=()=>"टर्मिनल",Tv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fgn():t==="fa"?Hgn():t==="ar"?qgn():t==="es"?Ugn():t==="hi"?Ggn():Pgn()}),Vgn=()=>"The terminal disconnected.",Kgn=()=>"终端连接已断开。",Wgn=()=>"ارتباط ترمینال قطع شد.",Qgn=()=>"انقطعت الطرفية.",Xgn=()=>"La terminal se desconectó.",Ygn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kgn():t==="fa"?Wgn():t==="ar"?Qgn():t==="es"?Xgn():t==="hi"?Ygn():Vgn()}),Zgn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,Jgn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,e1n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,t1n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,n1n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,r1n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,s1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jgn(e):t==="fa"?e1n(e):t==="ar"?t1n(e):t==="es"?n1n(e):t==="hi"?r1n(e):Zgn(e)}),i1n=()=>"Restart shell",a1n=()=>"重新启动 Shell",o1n=()=>"راه‌اندازی دوباره پوسته",c1n=()=>"إعادة تشغيل Shell",l1n=()=>"Reiniciar shell",u1n=()=>"शेल फिर से शुरू करें",_1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a1n():t==="fa"?o1n():t==="ar"?c1n():t==="es"?l1n():t==="hi"?u1n():i1n()}),f1n=()=>"This worktree",d1n=()=>"当前工作树",h1n=()=>"این درخت کاری",p1n=()=>"شجرة العمل هذه",m1n=()=>"Este árbol de trabajo",g1n=()=>"यह वर्कट्री",v1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d1n():t==="fa"?h1n():t==="ar"?p1n():t==="es"?m1n():t==="hi"?g1n():f1n()}),b1n=()=>"Workspace",y1n=()=>"工作区",x1n=()=>"فضای کاری",w1n=()=>"مساحة العمل",k1n=()=>"Espacio de trabajo",S1n=()=>"वर्कस्पेस",ew=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y1n():t==="fa"?x1n():t==="ar"?w1n():t==="es"?k1n():t==="hi"?S1n():b1n()}),C1n=e=>`Current worktree · ${e==null?void 0:e.branch}`,E1n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,N1n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,z1n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,j1n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,T1n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,A1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?E1n(e):t==="fa"?N1n(e):t==="ar"?z1n(e):t==="es"?j1n(e):t==="hi"?T1n(e):C1n(e)}),R1n=e=>`Default branch · ${e==null?void 0:e.branch}`,M1n=e=>`默认分支 · ${e==null?void 0:e.branch}`,O1n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,D1n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,L1n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,I1n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,$1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M1n(e):t==="fa"?O1n(e):t==="ar"?D1n(e):t==="es"?L1n(e):t==="hi"?I1n(e):R1n(e)}),B1n=e=>`detached at ${e==null?void 0:e.branch}`,P1n=e=>`分离于 ${e==null?void 0:e.branch}`,F1n=e=>`جدا در ${e==null?void 0:e.branch}`,H1n=e=>`منفصل عند ${e==null?void 0:e.branch}`,q1n=e=>`desacoplado en ${e==null?void 0:e.branch}`,U1n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,G1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P1n(e):t==="fa"?F1n(e):t==="ar"?H1n(e):t==="es"?q1n(e):t==="hi"?U1n(e):B1n(e)}),V1n=()=>"Listing truncated.",K1n=()=>"列表已截断。",W1n=()=>"فهرست کوتاه شده است.",Q1n=()=>"القائمة مقتطعة.",X1n=()=>"Listado truncado.",Y1n=()=>"सूची छोटी की गई।",Z1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K1n():t==="fa"?W1n():t==="ar"?Q1n():t==="es"?X1n():t==="hi"?Y1n():V1n()}),J1n=()=>"Loading…",evn=()=>"正在加载…",tvn=()=>"در حال بارگیری…",nvn=()=>"جارٍ التحميل…",rvn=()=>"Cargando…",svn=()=>"लोड हो रहा है…",ivn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?evn():t==="fa"?tvn():t==="ar"?nvn():t==="es"?rvn():t==="hi"?svn():J1n()}),avn=()=>"No changes yet.",ovn=()=>"尚无更改。",cvn=()=>"هنوز تغییری وجود ندارد.",lvn=()=>"لا توجد تغييرات بعد.",uvn=()=>"Aún no hay cambios.",_vn=()=>"अभी तक कोई बदलाव नहीं।",fvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ovn():t==="fa"?cvn():t==="ar"?lvn():t==="es"?uvn():t==="hi"?_vn():avn()}),dvn=()=>"No files.",hvn=()=>"没有文件。",pvn=()=>"فایلی وجود ندارد.",mvn=()=>"لا توجد ملفات.",gvn=()=>"No hay archivos.",vvn=()=>"कोई फ़ाइल नहीं।",bvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hvn():t==="fa"?pvn():t==="ar"?mvn():t==="es"?gvn():t==="hi"?vvn():dvn()}),yvn=()=>"Refresh failed:",xvn=()=>"刷新失败:",wvn=()=>"تازه‌سازی ناموفق بود:",kvn=()=>"فشل التحديث:",Svn=()=>"Error al actualizar:",Cvn=()=>"रीफ़्रेश विफल:",Evn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xvn():t==="fa"?wvn():t==="ar"?kvn():t==="es"?Svn():t==="hi"?Cvn():yvn()}),ze=e=>`⁦${e}⁩`,Vi=e=>`⁨${e}⁩`,Xt=e=>new Intl.NumberFormat(E()).format(e),Bp="demo_nanochat_v1",Uc=e=>e.startsWith("demo_"),Ld="chat_demo_nanochat_v1",Tb="chat_demo_nanochat_figures_v1",Ab="chat_demo_nanochat_literature_v1",Nvn={[Ld]:"cpu_end_to_end",[Tb]:"figures",[Ab]:"literature"},tw="cpu-apple-silicon-pipeline-results.md",zvn={[Ld]:"msg_demo_nanochat_assistant_v1",[Tb]:"msg_demo_nanochat_figures_assistant_v1",[Ab]:"msg_demo_nanochat_literature_assistant_v1"},Bz="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 m3 extends Error{constructor(t,r,s){super(t);Fs(this,"currentVersion");Fs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Xi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const $L=new WeakMap;async function di(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 m3(s,a,i.exists)}}catch(i){if(i instanceof m3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=$L.get(e);if(t&&!An(t))throw new DOMException("Workspace changed","AbortError");return n}const At=(e,n)=>fetch(e,{signal:n}).then(t=>di(t));async function aa(e,n){const t=Ia(),r=await fetch(e,n);if(!An(t))throw new DOMException("Workspace changed","AbortError");return $L.set(r,t),r.ok&&uQ(e,t),r}const kt=(e,n,t=!1)=>aa(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>di(r)),hf=(e,n)=>aa(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>di(t)),BL=(e,n)=>aa(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>di(t)),jvn=e=>At("/api/projects",e).then(n=>n.projects),Tvn=e=>At("/api/projects/activity",e).then(n=>n.activity),Avn=e=>At("/api/settings/ui-state",e),Rvn=(e,n)=>At(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),Mvn=(e,n,t=!1)=>kt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),Ovn=(e,n=!1)=>kt("/api/settings/ui-state",{workspace:e},n),Dvn=e=>kt("/api/settings/ui-state",e),Lvn=(e,n)=>kt("/api/onboarding/complete",{...e,...n}),Ivn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return At(`/api/project-path/status${t}`,n)},$vn=()=>kt("/api/project-path/pick").then(e=>e.path),Bvn=e=>kt("/api/projects",e),Pvn=(e,n)=>At(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Fvn=e=>At("/api/github/account",e),Hvn=(e,n)=>At(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),qvn=(e,n,t)=>At(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),Uvn=(e,n)=>At(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Gvn=e=>kt("/api/projects/starter-prompts/prewarm",e),Vvn=(e,n,t,r,s)=>At(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Kvn=e=>kt(`/api/projects/${e}/open`).then(n=>n.project),Wvn=e=>aa(`/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})`)}cQ(e)}),Qvn=(e,n)=>At(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),Xvn=(e,n)=>At(`/api/projects/${e}/runs`,n).then(t=>t.runs),PL=e=>kt(`/api/runs/${e}/cancel`).then(()=>{}),Yvn=(e,n)=>At(`/api/runs/${e}/log?offset=${n}`),Zvn=(e,n)=>At(`/api/runs/${e}/diff`,n),Jvn=(e,n)=>At(`/api/experiments/${e}/diff`,n),Mu=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),ebn=(e,n,t={},r)=>At(`/api/projects/${e}/file?${Mu(t,new URLSearchParams({path:n}))}`,r),g3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Mu(t,new URLSearchParams({path:n}))}`,tbn=(e,n)=>At(`/api/files/abs?path=${encodeURIComponent(e)}`,n),FL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,nbn=(e,n,t,r)=>BL(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),rbn=(e,n,t,r={})=>hf(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),sbn=(e,n,t={})=>kt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),ibn=(e,n,t={})=>kt(`/api/projects/${e}/file/reveal`,{path:n,sessionId:t.sessionId}),abn=e=>At("/api/latex/engine",e),obn=(e,n,t={})=>kt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),cbn=e=>At("/api/overleaf/settings",e),HL=e=>kt("/api/overleaf/token",{token:e}),lbn=()=>aa("/api/overleaf/token",{method:"DELETE"}).then(e=>di(e)),qL=(e,n={})=>kt("/api/overleaf/session",{session:e,host:n.host}),ubn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>di(e)),_bn=(e={})=>kt("/api/overleaf/session/import",{host:e.host}),fbn=(e,n,t={})=>kt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),dbn=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Mu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>di(r)),hbn=(e,n,t={},r)=>At(`/api/projects/${e}/file/overleaf?${Mu(t,new URLSearchParams({path:n}))}`,r),pbn=(e,n,t)=>kt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),mbn=(e,n,t={})=>aa(`/api/projects/${e}/file/overleaf?${Mu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>di(r)),gbn=(e,n,t={})=>kt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),vbn=(e,n,t={},r)=>At(`/api/projects/${e}/file/overleaf/status?${Mu(t,new URLSearchParams({path:n}))}`,r),bbn=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Mu(t,new URLSearchParams({path:n}))}`,ybn=(e,n={},t)=>{const r=Mu(n).toString();return At(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},xbn=(e,n)=>At(`/api/chat/sessions/${e}/worktree`,n),Rb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,wbn=e=>At("/api/settings/hf",e),kbn=e=>kt("/api/settings/hf",{token:e}),Sbn=e=>At("/api/settings/tinker",e),Cbn=e=>kt("/api/settings/tinker",{key:e}),Ebn=e=>At("/api/update",e),Nbn=()=>kt("/api/update/apply"),zbn=()=>kt("/api/update/restart"),jbn=e=>kt("/api/update/auto",{enabled:e}),Tbn=(e=!1)=>kt("/api/update/install-cli",{force:e}),Abn=e=>At("/api/settings/k8s",e),Rbn=e=>kt("/api/settings/k8s",e),Mbn=e=>At("/api/settings/modal",e),Obn=(e,n)=>kt("/api/settings/modal",{tokenId:e,tokenSecret:n}),Dbn=e=>At("/api/settings/env",e).then(n=>n.vars),UL=(e,n)=>kt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),Lbn=e=>aa(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>di(n)).then(n=>n.vars),Ibn=e=>At("/api/settings/data-dir",e),$bn=e=>kt("/api/settings/data-dir/validate",{path:e}),Bbn=e=>kt("/api/settings/data-dir/move",{path:e}),Pbn=e=>At("/api/settings/ssh",e),Fbn=e=>kt("/api/settings/ssh",e),Hbn=e=>kt("/api/settings/ssh/default",{host:e}),qbn=(e,n)=>kt("/api/settings/ssh/preflight",{host:e,container:n}),Ubn=e=>At("/api/settings/ssh/config",e),Gbn=(e,n)=>BL("/api/settings/ssh/config",{content:e,previousContent:n}),Vbn=(e,n)=>At(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),Kbn=e=>At("/_orx/runtime",e),Wbn=e=>At("/api/remote/sessions",e).then(n=>n.sessions),Qbn=(e,n)=>kt("/api/remote/sessions",{host:e,uiPreferences:n}),Xbn=e=>kt("/_orx/install",e),Ybn=()=>kt("/_orx/reconnect"),GL=()=>kt("/_orx/disconnect"),Zbn=()=>kt("/_orx/start-host"),VL=()=>At("/_orx/stop-host"),KL=e=>kt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),Jbn=e=>At("/api/settings/slurm",e),eyn=e=>kt("/api/settings/slurm",e),tyn=e=>At("/api/settings/ray",e),nyn=e=>kt("/api/settings/ray",e),ryn=e=>kt("/api/settings/ray/preflight",{address:e??null}),syn=(e,n)=>At(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),iyn=e=>kt("/api/settings/compute/default",e),ayn=e=>At("/api/settings/local",e),oyn=e=>At("/api/settings/openresearch",e),cyn=(e,n)=>At(`/api/projects/${e}/files`,n),lyn=(e,n)=>aa(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>di(t)),uyn=(e,n,t)=>hf(`/api/projects/${e}/files`,{path:n,...t}),X_=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,WL=512e3,_yn=(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}}},fyn=(e,n,t)=>fetch(X_(e,n),{signal:t,headers:{Range:`bytes=0-${WL-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=>_yn(a,Number.isFinite(s)&&s>a.byteLength))}),dyn=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",hyn=(e,n,t)=>fetch(X_(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:dyn(s)?s:"download"}}),pyn=e=>At("/api/settings/profile",e),myn=e=>At("/api/settings/lit-sources",e),gyn=e=>kt("/api/settings/lit-sources",e),vyn=e=>At("/api/settings/projects",e),QL=(e,n)=>kt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),byn=(e,n)=>At(`/api/projects/${e}/git`,n),yyn=e=>kt(`/api/projects/${e}/git/init`),xyn=e=>kt(`/api/projects/${e}/github`),wyn=e=>kt(`/api/projects/${e}/github/disable`),kyn=e=>At("/api/settings/telemetry",e),Syn=e=>kt("/api/settings/telemetry",{enabled:e}),ru=e=>{kt("/api/telemetry/event",e).catch(()=>{})};function K1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??b3(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?Gk():n,r=b3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Av="default";function Mb(e,n){var a,o,c;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===Av)?Av:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:i}}const v3="default";function XL(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:v3,label:mEt(),description:lEt()},...t]:[]}function Rv(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=XL(e,n);return s.length===0?v3:t!=null&&s.some(a=>a.id===t)?t:v3}function YL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Mb(e,n);return r.length===0?Av:t&&r.some(i=>i.id===t)?t:s}const Cyn=e=>At("/api/harnesses/setup/commands",e),ZL=(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)},Eyn=(e,n)=>At(`/api/skills${n?`?harness=${encodeURIComponent(n)}`:""}`,e),Nyn=(e,n,t,r)=>At(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),zyn=e=>At("/api/latex-templates",e).then(n=>n.templates),jyn=e=>kt("/api/latex-templates",e).then(n=>n.template),Tyn=e=>aa(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>di(n)),Ayn=e=>At("/api/user-skills",e),Ryn=e=>kt("/api/user-skills",e).then(n=>n.skill),Myn=e=>aa(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>di(n));function b3(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 Oyn=(e,n)=>At(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),Dyn=e=>At("/api/chat/native-sessions",e).then(n=>n.chats),Lyn=(e,n)=>kt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),Iyn=e=>At("/api/chat/sessions?scope=all",e).then(n=>n.sessions),$yn=(e,n,t={})=>kt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Byn=e=>aa(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>di(n).then(t=>(zb(e),t))),Pyn=(e,n)=>hf(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Fyn=(e,n)=>hf(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),Hyn=(e,n)=>hf(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),qyn=(e,n)=>hf(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),Uyn=(e,n)=>hf(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Gyn=(e,n)=>At(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Vyn=(e,n)=>aa(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>di(t)),Kyn=(e,n)=>kt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),Wyn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,Pz=(e,n,t={},r,s,i,a)=>kt(`/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}),Qyn=e=>kt(`/api/chat/sessions/${e}/compact`,{}),Xyn=(e,n)=>kt(`/api/chat/sessions/${e}/shell`,{command:n}),Yyn=(e,n,t,r={})=>kt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),Zyn=(e,n,t)=>kt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Jyn=(e,n)=>kt(`/api/chat/sessions/${e}/branch`,{leafId:n}),exn=e=>kt(`/api/chat/sessions/${e}/interrupt`),txn=(e,n)=>kt(`/api/chat/sessions/${e}/respond`,n);function co(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(E(),{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 T0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return hOe({value:Xt(n)});const t=Math.floor(n/60);if(t<60)return oOe({value:Xt(t)});const r=Math.floor(t/60);return r<24?eOe({hours:Xt(r),minutes:Xt(t%60)}):KMe({days:Xt(Math.floor(r/24)),hours:Xt(r%24)})}function el(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rAt("/api/local-models",e),sxn=e=>kt("/api/local-models/discover",e),ixn=e=>kt("/api/local-models",e),axn=e=>kt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),oxn=e=>aa(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>di(n)),Fz=()=>({queryKey:Nt("getHfSettings"),queryFn:({signal:e})=>wbn(e),staleTime:3e5}),Hz=()=>({queryKey:Nt("getTinkerSettings"),queryFn:({signal:e})=>Sbn(e),staleTime:3e5}),qz=()=>({queryKey:Nt("getK8sSettings"),queryFn:({signal:e})=>Abn(e),staleTime:3e4}),Uz=()=>({queryKey:Nt("getModalSettings"),queryFn:({signal:e})=>Mbn(e),staleTime:3e5}),cxn=()=>({queryKey:Nt("getSlurmSettings"),queryFn:({signal:e})=>Jbn(e),staleTime:3e5}),lxn=()=>({queryKey:Nt("getRaySettings"),queryFn:({signal:e})=>tyn(e),staleTime:3e5}),JL=e=>({queryKey:Nt("getComputeSettings",e??null),queryFn:({signal:n})=>syn(e,n),staleTime:3e4}),uxn=()=>({queryKey:Nt("getLocalMachine"),queryFn:({signal:e})=>ayn(e),staleTime:3e5}),_xn=()=>({queryKey:Nt("getOpenResearchSettings"),queryFn:({signal:e})=>oyn(e),staleTime:3e4}),fxn=()=>({queryKey:Nt("getEnvVars"),queryFn:({signal:e})=>Dbn(e),staleTime:3e5}),dxn=()=>({queryKey:Nt("getDataDir"),queryFn:({signal:e})=>Ibn(e),staleTime:3e5}),eI=()=>({queryKey:Nt("getSshSettings"),queryFn:({signal:e})=>Pbn(e),staleTime:3e4}),hxn=()=>({queryKey:Nt("getSshConfig"),queryFn:({signal:e})=>Ubn(e),staleTime:3e5}),Gz=e=>({queryKey:Nt("getSshMasterStatus",e),queryFn:({signal:n})=>Vbn(e,n),staleTime:5e3}),pxn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>Kbn(e),staleTime:2e3}),mxn=()=>({queryKey:Nt("listRemoteSessions"),queryFn:({signal:e})=>Wbn(e),staleTime:3e4}),Mv=()=>({queryKey:Nt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Oh(n,t,()=>Ebn(e)),staleTime:3e4}),gxn=()=>({queryKey:Nt("getProfile"),queryFn:({signal:e})=>pyn(e),staleTime:3e5}),vxn=()=>({queryKey:Nt("getLitSources"),queryFn:({signal:e})=>myn(e),staleTime:3e5}),rS=()=>({queryKey:Nt("getProjectDefaults"),queryFn:({signal:e})=>vyn(e),staleTime:3e5}),bxn=e=>({queryKey:Nt("getProjectGitStatus",e),queryFn:({signal:n})=>byn(e,n),staleTime:3e4}),yxn=()=>({queryKey:Nt("getTelemetry"),queryFn:({signal:e})=>kyn(e),staleTime:3e5}),tI=()=>({queryKey:Nt("getHarnessSetupCommands"),queryFn:({signal:e})=>Cyn(e),staleTime:1/0}),ku=()=>({queryKey:Nt("getHarnesses"),queryFn:({signal:e})=>ZL(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),xxn=e=>({queryKey:Nt("getSkills",e??null),queryFn:({signal:n})=>Eyn(n,e),select:n=>n.skills,refetchInterval:n=>{var t;return(t=n.state.data)!=null&&t.importing?2e3:3e4},staleTime:3e5}),wxn=(e,n,t)=>({queryKey:Nt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>Nyn(e,n,r,t),staleTime:3e5}),kxn=()=>({queryKey:Nt("listLatexTemplates"),queryFn:({signal:e})=>zyn(e),refetchInterval:3e4,staleTime:3e5}),Sxn=()=>({queryKey:Nt("listUserSkills"),queryFn:({signal:e})=>Ayn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function Y_(e=!1,n=!1){const t=ku();if(!e&&!n)return tt.fetchQuery(t);await tt.cancelQueries(t);const r=await ZL(e,n);return An(t.queryKey)&&tt.setQueryData(t.queryKey,r),r}const Cxn=()=>({queryKey:Nt("getLocalModels"),queryFn:({signal:e})=>rxn(e),staleTime:3e4}),La=e=>({queryKey:Nt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Oh(t,r,async()=>{const s=await Oyn(e,n),i=t.getQueryData(r);return s.filter(a=>!ll.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(c=>c.id===a.id))==null?void 0:o.contextUsage)}})},ym),staleTime:3e4}),nI=()=>({queryKey:Nt("listNativeChats"),queryFn:({signal:e})=>Dyn(e),staleTime:0}),Exn=()=>({queryKey:Nt("listAllChatSessions"),queryFn:async({signal:e})=>(await Iyn(e)).filter(n=>!ll.has(n.id)),staleTime:0}),il=e=>({queryKey:Nt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Oh(t,r,()=>Gyn(e,n),(_,p,m)=>{if(!p)return _;const x=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:ym(_.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:_.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),c=s!==void 0&&i.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...c.filter(_=>!i.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),P_="local-",rI="bash";function Vz(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(P_)),n]}function Nxn(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(P_),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Vz(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:`${P_}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:rI,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?Vz(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:`${P_}${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 sI=0;function iI(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=>{iI(e)&&sI++});const zxn=e=>tt.getQueryCache().subscribe(n=>{iI(n)&&e()}),jxn=()=>sI;function Txn(e,n){const t=tt.getQueryData(La(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(il(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function aI(e,n,t=!1){if(n.type==="busy"){Za(tt,La(e).queryKey,n.sessionId),tt.setQueryData(La(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=il(n.sessionId);if(ll.has(n.sessionId))return;Za(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=Nxn(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 Axn(e,n){const t=!!n&&!ll.has(n??""),r=ut({...il(n??""),enabled:t,subscribed:t}),s=A.useSyncExternalStore(zxn,jxn),i=A.useMemo(()=>Txn(e,n),[e,n,s]),a=Ia()[1],o=A.useCallback(c=>{An(["workspace",a])&&aI(e,c)},[e,a]);return[i,o,r]}const W1=new Map;function Rxn(e,n){let t=W1.get(e);return t||(t=new Set,W1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&W1.delete(e)}}function Mxn(e){var n;(n=W1.get(e.runId))==null||n.forEach(t=>t(e))}const y3=new Set;function Ov(e){return y3.add(e),()=>{y3.delete(e)}}function Ic(e){y3.forEach(n=>n(e))}const x3=new Set;function Oxn(e){return x3.add(e),()=>{x3.delete(e)}}function $c(){x3.forEach(e=>e())}const w3=new Set;function Dxn(e){return w3.add(e),()=>{w3.delete(e)}}const k3=new Set;function Lxn(e){return k3.add(e),()=>{k3.delete(e)}}function Ixn(){k3.forEach(e=>e())}function Kz(e){w3.forEach(n=>n(e))}const S3=new Set;function oI(e){return S3.add(e),()=>{S3.delete(e)}}function nw(e){S3.forEach(n=>n(e))}const C3=new Set;function $xn(e){return C3.add(e),()=>{C3.delete(e)}}function Wz(e){C3.forEach(n=>n(e))}const E3=new Set;function Bxn(e){return E3.add(e),()=>{E3.delete(e)}}function Pxn(e){E3.forEach(n=>n(e))}let N3=!0;const z3=new Set;function Fxn(e){return z3.add(e),()=>{z3.delete(e)}}function Qz(){return N3}function Xz(e){e!==N3&&(N3=e,z3.forEach(n=>n()))}const Hxn=8e3,qxn=3e3;function Uxn(e){const n=A.useRef(e);n.current=e,A.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>Xz(!1),Hxn)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},qxn)))},c.onopen=()=>{var h,_;r||(window.clearTimeout(s),s=void 0,Xz(!0),a&&(Ic({type:"reconnected"}),$c(),Kz({harness:"*",authState:"unknown"}),(_=(h=n.current).onReconnect)==null||_.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,_;Ic({type:"reconnected"}),$c(),(_=(h=n.current).onReconnect)==null||_.call(h)}),c.addEventListener("run.updated",h=>{const _=u(h);_!=null&&_.run&&($c(),n.current.onRun(_.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const _=u(h);_!=null&&_.experiment&&($c(),(m=(p=n.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const _=u(h);_!=null&&_.project&&($c(),(m=(p=n.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",h=>{var p,m;const _=u(h);_!=null&&_.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",h=>{const _=u(h);_!=null&&_.runId&&Mxn(_)}),c.addEventListener("chat.session",h=>{const _=u(h);_!=null&&_.session&&($c(),Ic({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",h=>{const _=u(h);_!=null&&_.sessionId&&($c(),Ic({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",h=>{const _=u(h);_!=null&&_.message&&($c(),Ic({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",h=>{const _=u(h);_!=null&&_.sessionId&&($c(),Ic({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",h=>{const _=u(h);_!=null&&_.sessionId&&_.usage&&Ic({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",h=>{const _=u(h);_!=null&&_.sessionId&&Ic({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",h=>{const _=u(h);_!=null&&_.sessionId&&Ic({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const _=u(h);_!=null&&_.harness&&_.authState&&Kz(_)}),c.addEventListener("harness.catalog",()=>Ixn()),c.addEventListener("datadir.move.progress",h=>{const _=u(h);_&&nw({type:"progress",..._})}),c.addEventListener("datadir.move.done",h=>{const _=u(h);_&&nw({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const _=u(h);_&&nw({type:"error",error:_.error})}),c.addEventListener("update.status",h=>{const _=u(h);_&&Pxn(_)}),c.addEventListener("overleaf.live",h=>{const _=u(h);_!=null&&_.key&&_.status&&Wz({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",h=>{const _=u(h);_!=null&&_.key&&Array.isArray(_.paths)&&Wz({type:"pulled",key:_.key,paths:_.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Dv=new Set;function Gxn(e){const n=A.useRef(e);n.current=e,A.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 Dv.add(t),()=>{Dv.delete(t)}},[])}const Yz={onRun:e=>Dv.forEach(n=>n.onRun(e)),onReconnect:()=>Dv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},dh=()=>({queryKey:Nt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Oh(n,t,()=>jvn(e),ym),staleTime:3e4}),Vxn=()=>({queryKey:Nt("listProjectActivity"),queryFn:({signal:e})=>Tvn(e),staleTime:3e4}),Sm=()=>({queryKey:Nt("getUiState"),queryFn:({signal:e})=>Avn(e),staleTime:3e5}),sS=e=>({queryKey:Nt("getProjectUiState",e),queryFn:({signal:n})=>Rvn(e,n),staleTime:3e5}),f0=(e="")=>({queryKey:Nt("getProjectPathStatus",e),queryFn:({signal:n})=>Ivn(e,n),staleTime:3e4}),cI=e=>({queryKey:Nt("searchPapers",e),queryFn:({signal:n})=>Pvn(e,n),staleTime:3e5}),Kxn=()=>({queryKey:Nt("githubAccount"),queryFn:({signal:e})=>Fvn(e),staleTime:3e5}),Wxn=e=>({queryKey:Nt("githubProjectRepoPreview",e),queryFn:({signal:n})=>Hvn(e,n),staleTime:3e4}),Zz=(e,n)=>({queryKey:Nt("repoAccess",e,n),queryFn:({signal:t})=>qvn(e,n,t),staleTime:3e4}),j3=e=>({queryKey:Nt("resolvePaper",e),queryFn:({signal:n})=>Uvn(e,n),staleTime:36e5}),Qxn=(e,n,t,r)=>({queryKey:Nt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>Vvn(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),T3=e=>({queryKey:Nt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Oh(t,r,()=>Qvn(e,n),ym),staleTime:3e4}),mu=e=>({queryKey:Nt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Oh(t,r,()=>Xvn(e,n),ym),staleTime:3e4});function t1(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 Jz(){const e=Ia();return Uxn({onRun(n){var r;if(!An(e))return;const t=(r=tt.getQueryData(mu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Za(tt,mu(n.projectId).queryKey,n.id),tt.setQueryData(mu(n.projectId).queryKey,s=>t1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Ta(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Ta(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),Yz.onRun(n)},onExperiment(n){An(e)&&(Za(tt,T3(n.projectId).queryKey,n.id),tt.setQueryData(T3(n.projectId).queryKey,t=>t1(t,n)),Ta(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Ta(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Ta(["getRunDiff"],e,t=>{var r;return((r=tt.getQueryData(mu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){An(e)&&(Za(tt,dh().queryKey,n.id),tt.setQueryData(dh().queryKey,t=>t1(t,n)))},onArtifacts(n){An(e)&&(Ta(Ik,e,t=>t.queryKey[3]===n),Ta(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){An(e)&&(Ta(aQ,e),Yz.onReconnect())}}),A.useEffect(()=>{let n;const t=Oxn(()=>{n??(n=setTimeout(()=>{n=void 0,Ta(["listProjectActivity"],e)},100))}),r=oI(c=>{c.type==="done"&&Ta(["getDataDir"],e)}),s=Ov(c=>{An(e)&&(c.type==="session"?Za(tt,La(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&Za(tt,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&aI("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!ll.has(c.session.id)?tt.setQueryData(La(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(_=>_.id===c.session.id);return h?t1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?zb(c.sessionId):(c.type==="busy"||c.type==="usage")&&tt.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=Dxn(()=>{An(e)&&Y_(!0).catch(()=>{})}),a=Lxn(()=>{An(e)&&tt.fetchQuery({...ku(),staleTime:0}).catch(()=>{})}),o=Bxn(c=>{An(e)&&(Za(tt,Mv().queryKey),tt.setQueryData(Mv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const A3=new Set;function lI(e){if(e!==E()){fD(e,{reload:!1}),document.documentElement.lang=e;for(const n of A3)n()}}function Xxn(e){return A3.add(e),()=>A3.delete(e)}function pf(){return A.useSyncExternalStore(Xxn,E,E)}const uI="orx:theme";function Yxn(){try{const e=localStorage.getItem(uI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let hh=Yxn();const R3=new Set;function Zxn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function iS(){document.documentElement.dataset.theme=Zxn(hh)}function _I(e){hh=e;try{localStorage.setItem(uI,e)}catch{}iS();for(const n of R3)n()}function Jxn(){return hh}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{hh==="system"&&iS()});iS();function e2n(e){return R3.add(e),()=>R3.delete(e)}function fI(){return[A.useSyncExternalStore(e2n,()=>hh,()=>hh),_I]}const t2n=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),dI=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Lv="-",ej=[],r2n="arbitrary..",s2n=e=>{const n=a2n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return i2n(a);const o=a.split(Lv),c=o[0]===""&&o.length>1?1:0;return hI(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?t2n(u,c):c:u||ej}return t[a]||ej}}},hI=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=hI(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Lv):e.slice(n).join(Lv),c=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?r2n+r:void 0})(),a2n=e=>{const{theme:n,classGroups:t}=e;return o2n(t,n)},o2n=(e,n)=>{const t=dI();for(const r in e){const s=e[r];aS(s,t,r,n)}return t},aS=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){l2n(e,n,t);return}if(typeof e=="function"){u2n(e,n,t,r);return}_2n(e,n,t,r)},l2n=(e,n,t)=>{const r=e===""?n:pI(n,e);r.classGroupId=t},u2n=(e,n,t,r)=>{if(f2n(e)){aS(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(n2n(t,e))},_2n=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Lv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,d2n=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)}}},M3="!",tj=":",h2n=[],nj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),p2n=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return nj(i,m,p,x)};if(n){const s=n+tj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):nj(h2n,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},m2n=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}},g2n=e=>({cache:d2n(e.cacheSize),parseClassName:p2n(e),sortModifiers:m2n(e),postfixLookupClassGroupIds:v2n(e),...s2n(e)}),v2n=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=[],c=e.trim().split(b2n);let u="";for(let h=c.length-1;h>=0;h-=1){const _=c[h],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const T=k.substring(0,v);w=r(T);const j=w&&a[w]?r(k):void 0;j&&j!==w&&(w=j,b=!1)}else w=r(k);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=r(k),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?y+M3:y,N=C+w;if(o.indexOf(N)>-1)continue;o.push(N);const z=s(w,b);for(let T=0;T0?" "+u:u)}return u},x2n=(...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=c=>{const u=n.reduce((h,_)=>_(h),e());return t=g2n(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=y2n(c,t);return s(c,h),h};return i=a,(...c)=>i(x2n(...c))},w2n=[],hs=e=>{const n=t=>t[e]||w2n;return n.isThemeGetter=!0,n},gI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,k2n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,S2n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C2n=/\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$/,E2n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,N2n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,z2n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ql=e=>k2n.test(e),cn=e=>!!e&&!Number.isNaN(Number(e)),Mo=e=>!!e&&Number.isInteger(Number(e)),rw=e=>e.endsWith("%")&&cn(e.slice(0,-1)),Bc=e=>S2n.test(e),bI=()=>!0,j2n=e=>C2n.test(e)&&!E2n.test(e),oS=()=>!1,T2n=e=>N2n.test(e),A2n=e=>z2n.test(e),R2n=e=>!mt(e)&&!xt(e),M2n=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)),O2n=e=>Ou(e,wI,oS),mt=e=>gI.test(e),u_=e=>Ou(e,kI,j2n),sj=e=>Ou(e,H2n,cn),D2n=e=>Ou(e,CI,bI),L2n=e=>Ou(e,SI,oS),ij=e=>Ou(e,yI,oS),I2n=e=>Ou(e,xI,A2n),n1=e=>Ou(e,EI,T2n),xt=e=>vI.test(e),Pp=e=>mf(e,kI),$2n=e=>mf(e,SI),aj=e=>mf(e,yI),B2n=e=>mf(e,wI),P2n=e=>mf(e,xI),r1=e=>mf(e,EI,!0),F2n=e=>mf(e,CI,!0),Ou=(e,n,t)=>{const r=gI.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},mf=(e,n,t=!1)=>{const r=vI.exec(e);return r?r[1]?n(r[1]):t:!1},yI=e=>e==="position"||e==="percentage",xI=e=>e==="image"||e==="url",wI=e=>e==="length"||e==="size"||e==="bg-size",kI=e=>e==="length",H2n=e=>e==="number",SI=e=>e==="family-name",CI=e=>e==="number"||e==="weight",EI=e=>e==="shadow",oj=()=>{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"),c=hs("spacing"),u=hs("radius"),h=hs("shadow"),_=hs("inset-shadow"),p=hs("text-shadow"),m=hs("drop-shadow"),x=hs("blur"),k=hs("perspective"),v=hs("aspect"),b=hs("ease"),w=hs("animate"),y=()=>["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(),xt,mt],z=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],j=()=>[xt,mt,c],M=()=>[Ql,"full","auto",...j()],D=()=>[Mo,"none","subgrid",xt,mt],I=()=>["auto",{span:["full",Mo,xt,mt]},Mo,xt,mt],$=()=>[Mo,"auto",xt,mt],q=()=>["auto","min","max","fr",xt,mt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...j()],J=()=>[Ql,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Z=()=>[Ql,"screen","full","dvw","lvw","svw","min","max","fit",...j()],B=()=>[Ql,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],L=()=>[e,xt,mt],F=()=>[...C(),aj,ij,{position:[xt,mt]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",B2n,O2n,{size:[xt,mt]}],ne=()=>[rw,Pp,u_],ce=()=>["","none","full",u,xt,mt],_e=()=>["",cn,Pp,u_],se=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[cn,rw,aj,ij],le=()=>["","none",x,xt,mt],pe=()=>["none",cn,xt,mt],be=()=>["none",cn,xt,mt],Me=()=>[cn,xt,mt],we=()=>[Ql,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bc],breakpoint:[Bc],color:[bI],container:[Bc],"drop-shadow":[Bc],ease:["in","out","in-out"],font:[R2n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bc],shadow:[Bc],spacing:["px",cn],text:[Bc],"text-shadow":[Bc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ql,mt,xt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",xt,mt]}],"container-named":[M2n],columns:[{columns:[cn,mt,xt,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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:[Mo,"auto",xt,mt]}],basis:[{basis:[Ql,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[cn,Ql,"auto","initial","none",mt]}],grow:[{grow:["",cn,xt,mt]}],shrink:[{shrink:["",cn,xt,mt]}],order:[{order:[Mo,"first","last","none",xt,mt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[o,"screen",...J()]}],"min-w":[{"min-w":[o,"screen","none",...J()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,Pp,u_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,F2n,D2n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rw,mt]}],"font-family":[{font:[$2n,L2n,n]}],"font-features":[{"font-features":[mt]}],"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,xt,mt]}],"line-clamp":[{"line-clamp":[cn,"none",xt,sj]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",xt,mt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xt,mt]}],"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:[cn,"from-font","auto",xt,u_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[cn,"auto",xt,mt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[Mo,xt,mt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xt,mt]}],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",xt,mt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mo,xt,mt],radial:["",xt,mt],conic:[Mo,xt,mt]},P2n,I2n]}],"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:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:_e()}],"border-w-x":[{"border-x":_e()}],"border-w-y":[{"border-y":_e()}],"border-w-s":[{"border-s":_e()}],"border-w-e":[{"border-e":_e()}],"border-w-bs":[{"border-bs":_e()}],"border-w-be":[{"border-be":_e()}],"border-w-t":[{"border-t":_e()}],"border-w-r":[{"border-r":_e()}],"border-w-b":[{"border-b":_e()}],"border-w-l":[{"border-l":_e()}],"divide-x":[{"divide-x":_e()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_e()}],"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":[cn,xt,mt]}],"outline-w":[{outline:["",cn,Pp,u_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,r1,n1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,r1,n1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:_e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[cn,u_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":_e()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,r1,n1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[cn,xt,mt]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[cn]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"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":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"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":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"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":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"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":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"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":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"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":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[xt,mt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"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":[cn]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"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:F()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xt,mt]}],filter:[{filter:["","none",xt,mt]}],blur:[{blur:le()}],brightness:[{brightness:[cn,xt,mt]}],contrast:[{contrast:[cn,xt,mt]}],"drop-shadow":[{"drop-shadow":["","none",m,r1,n1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",cn,xt,mt]}],"hue-rotate":[{"hue-rotate":[cn,xt,mt]}],invert:[{invert:["",cn,xt,mt]}],saturate:[{saturate:[cn,xt,mt]}],sepia:[{sepia:["",cn,xt,mt]}],"backdrop-filter":[{"backdrop-filter":["","none",xt,mt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[cn,xt,mt]}],"backdrop-contrast":[{"backdrop-contrast":[cn,xt,mt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",cn,xt,mt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[cn,xt,mt]}],"backdrop-invert":[{"backdrop-invert":["",cn,xt,mt]}],"backdrop-opacity":[{"backdrop-opacity":[cn,xt,mt]}],"backdrop-saturate":[{"backdrop-saturate":[cn,xt,mt]}],"backdrop-sepia":[{"backdrop-sepia":["",cn,xt,mt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xt,mt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[cn,"initial",xt,mt]}],ease:[{ease:["linear","initial",b,xt,mt]}],delay:[{delay:[cn,xt,mt]}],animate:[{animate:["none",w,xt,mt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,xt,mt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[xt,mt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],zoom:[{zoom:[Mo,xt,mt]}],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",xt,mt]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",xt,mt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[cn,Pp,u_,sj]}],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"]}},q2n=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(xd(e,"cacheSize",n),xd(e,"prefix",t),xd(e,"experimentalParseClassName",r),s1(e.theme,i.theme),s1(e.classGroups,i.classGroups),s1(e.conflictingClassGroups,i.conflictingClassGroups),s1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),xd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),xd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),i1(e.theme,s.theme),i1(e.classGroups,s.classGroups),i1(e.conflictingClassGroups,s.conflictingClassGroups),i1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),O3(e,s,"postfixLookupClassGroups"),O3(e,s,"orderSensitiveModifiers"),e),xd=(e,n,t)=>{t!==void 0&&(e[n]=t)},s1=(e,n)=>{if(n)for(const t in n)xd(e,t,n[t])},i1=(e,n)=>{if(n)for(const t in n)O3(e,n,t)},O3=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},U2n=(e,...n)=>typeof e=="function"?rj(oj,e,...n):rj(()=>q2n(oj(),e),...n),G2n=U2n({extend:{theme:{text:["menu"]}}});function gs(...e){return G2n(...e)}const V2n={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 Ut({variant:e="default",size:n="default",className:t,...r}){return f.jsx("span",{className:gs("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",V2n[e],t),...r})}const K2n=["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(" "),W2n={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"},Q2n={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 NI(e,n,t,r){return gs(K2n,W2n[e],Q2n[n],t&&"active",r)}function De({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:NI(n,t,e,r),...s})}function ph({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:NI(n,t,e,r),...s})}const X2n=["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(" "),Y2n={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"},Z2n={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function zI(e,n,t,r,s){return gs(X2n,Y2n[e],Z2n[n],r==="circle"&&"rounded-full",t&&"active",s)}const It=A.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return f.jsx("button",{ref:o,className:zI(s,r,n,t,i),...a})});function Cm({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return f.jsx("a",{className:zI(r,t,e,n,s),...i})}const J2n={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 qr({variant:e="default",className:n,...t}){return f.jsx("input",{className:gs("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",J2n[e],n),...t})}function Xn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return f.jsx("button",{className:gs("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 zt({className:e,...n}){return f.jsx("span",{className:gs("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 Gr({className:e,...n}){return f.jsx("div",{className:gs("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const ewn={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 Id({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:gs("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:gs("h-[7px] w-[7px] shrink-0 rounded-full bg-current",ewn[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const twn=["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 jI(e,n){return gs(twn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function cS({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:jI(e,n),...r,children:t??f.jsx("span",{})})}function nwn({checked:e=!1,className:n,...t}){return f.jsx("span",{className:jI(e,n),...t,children:f.jsx("span",{})})}var oa=jO();const rwn=gm(oa);function swn(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 iwn=e=>{switch(e){case"success":return cwn;case"info":return uwn;case"warning":return lwn;case"error":return _wn;default:return null}},awn=Array(12).fill(0),own=({visible:e,className:n})=>et.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},et.createElement("div",{className:"sonner-spinner"},awn.map((t,r)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),cwn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),lwn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),uwn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),_wn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.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"})),fwn=et.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"},et.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),et.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dwn=()=>{const[e,n]=et.useState(document.hidden);return et.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let hwn=1;const pwn=100,cj=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:hwn++};class mwn{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-pwn;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=cj(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],et.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(vwn(u)&&!u.ok){i=!1;const _=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 _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const h=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:_,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=cj(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 Ni=new mwn,gwn=(e,n)=>Ni.message(e,n),vwn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",bwn=gwn,ywn=()=>Ni.toasts,xwn=()=>Ni.getActiveToasts(),wwn=Object.assign(bwn,{success:Ni.success,info:Ni.info,warning:Ni.warning,error:Ni.error,custom:Ni.custom,message:Ni.message,promise:Ni.promise,dismiss:Ni.dismiss,loading:Ni.loading},{getHistory:ywn,getToasts:xwn});swn("[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 a1(e){return e.label!==void 0}const kwn=3,Swn="24px",Cwn="16px",lj=4e3,Ewn=356,Nwn=14,zwn=45,jwn=200;function Oo(...e){return e.filter(Boolean).join(" ")}function Twn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const Awn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:_,unstyled:p,interacting:m,setHeights:x,visibleToasts:k,heights:v,index:b,toasts:w,expanded:y,removeToast:C,defaultRichColors:N,closeButton:z,style:T,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:$,position:q,gap:H,expandByDefault:Q,classNames:V,icons:J,closeButtonAriaLabel:Z="Close toast"}=e,[B,L]=et.useState(null),[F,U]=et.useState(null),[K,ne]=et.useState(!1),[ce,_e]=et.useState(!1),[se,G]=et.useState(!1),[oe,le]=et.useState(!1),[pe,be]=et.useState(!1),[Me,we]=et.useState(0),[qe,He]=et.useState(0),Ce=et.useRef(_.duration||$||lj),ot=et.useRef(null),Qe=et.useRef(null),it=b===0,Ct=b+1<=k,Ht=_.type,pt=Ht??"default",_t=_.dismissible!==!1,Le=_.className||"",me=_.descriptionClassName||"",Ae=et.useMemo(()=>v.findIndex(bt=>bt.toastId===_.id)||0,[v,_.id]),Be=et.useMemo(()=>{var bt;return(bt=_.closeButton)!=null?bt:z},[_.closeButton,z]),rt=et.useMemo(()=>_.duration||$||lj,[_.duration,$]),ft=et.useRef(0),St=et.useRef(0),gt=et.useRef(0),Kt=et.useRef(null),[en,Ke]=q.split("-"),vt=et.useMemo(()=>v.reduce((bt,ln,En)=>En>=Ae?bt:bt+ln.height,0),[v,Ae]),In=dwn(),tn=et.useMemo(()=>{var bt;return(bt=e.swipeDirections)!=null?bt:Twn(q)},[e.swipeDirections,q]),yn=_.invert||h,yr=Ht==="loading";St.current=et.useMemo(()=>Ae*H+vt,[Ae,vt]),et.useEffect(()=>{Ce.current=rt},[rt]),et.useEffect(()=>{ne(!0)},[]),et.useEffect(()=>{const bt=Qe.current;if(bt){const ln=bt.getBoundingClientRect().height;return He(ln),x(En=>[{toastId:_.id,height:ln,position:_.position},...En]),()=>x(En=>En.filter(on=>on.toastId!==_.id))}},[x,_.id]),et.useLayoutEffect(()=>{if(!K)return;const bt=Qe.current,ln=bt.style.height;bt.style.height="auto";const En=bt.getBoundingClientRect().height;bt.style.height=ln,He(En),x(on=>on.find(sn=>sn.toastId===_.id)?on.map(sn=>sn.toastId===_.id?{...sn,height:En}:sn):[{toastId:_.id,height:En,position:_.position},...on])},[K,_.title,_.description,x,_.id,_.jsx,_.action,_.cancel]);const Pn=et.useCallback(()=>{_e(!0),we(St.current),x(bt=>bt.filter(ln=>ln.toastId!==_.id)),setTimeout(()=>{C(_)},jwn)},[_,C,x,St]);et.useEffect(()=>{if(_.promise&&Ht==="loading"||_.duration===1/0||_.type==="loading")return;let bt;return y||m||In?(()=>{if(gt.current{Ce.current!==1/0&&(ft.current=new Date().getTime(),bt=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),Pn()},Ce.current))})(),()=>clearTimeout(bt)},[y,m,_,Ht,In,Pn]),et.useEffect(()=>{_.delete&&(Pn(),_.onDismiss==null||_.onDismiss.call(_,_))},[Pn,_.delete]);function $n(){var bt;if(J!=null&&J.loading){var ln;return et.createElement("div",{className:Oo(V==null?void 0:V.loader,_==null||(ln=_.classNames)==null?void 0:ln.loader,"sonner-loader"),"data-visible":Ht==="loading"},J.loading)}return et.createElement(own,{className:Oo(V==null?void 0:V.loader,_==null||(bt=_.classNames)==null?void 0:bt.loader),visible:Ht==="loading"})}const Fn=_.icon||(J==null?void 0:J[Ht])||iwn(Ht);var Yn,Dr;return et.createElement("li",{tabIndex:0,ref:Qe,className:Oo(D,Le,V==null?void 0:V.toast,_==null||(n=_.classNames)==null?void 0:n.toast,V==null?void 0:V[pt],_==null||(t=_.classNames)==null?void 0:t[pt]),"data-sonner-toast":"","data-rich-colors":(Yn=_.richColors)!=null?Yn:N,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":K,"data-promise":!!_.promise,"data-swiped":pe,"data-removed":ce,"data-visible":Ct,"data-y-position":en,"data-x-position":Ke,"data-index":b,"data-front":it,"data-swiping":se,"data-dismissible":_t,"data-type":Ht,"data-invert":yn,"data-swipe-out":oe,"data-swipe-direction":F,"data-expanded":!!(y||Q&&K),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ce?Me:St.current}px`,"--initial-height":Q?"auto":`${qe}px`,...T,..._.style},onDragEnd:()=>{G(!1),L(null),Kt.current=null},onPointerDown:bt=>{bt.button!==2&&(yr||!_t||(ot.current=new Date,we(St.current),bt.target.setPointerCapture(bt.pointerId),bt.target.tagName!=="BUTTON"&&(G(!0),Kt.current={x:bt.clientX,y:bt.clientY})))},onPointerUp:()=>{var bt,ln,En;if(oe||!_t)return;Kt.current=null;const on=Number(((bt=Qe.current)==null?void 0:bt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),dr=Number(((ln=Qe.current)==null?void 0:ln.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),sn=new Date().getTime()-((En=ot.current)==null?void 0:En.getTime()),gn=B==="x"?on:dr,Zn=Math.abs(gn)/sn;if((B==="x"?tn.includes(on>0?"right":"left"):tn.includes(dr>0?"bottom":"top"))&&(Math.abs(gn)>=zwn||Zn>.11)){we(St.current),_.onDismiss==null||_.onDismiss.call(_,_),U(B==="x"?on>0?"right":"left":dr>0?"down":"up"),Pn(),le(!0);return}else{var jt,zn;(jt=Qe.current)==null||jt.style.setProperty("--swipe-amount-x","0px"),(zn=Qe.current)==null||zn.style.setProperty("--swipe-amount-y","0px")}be(!1),G(!1),L(null)},onPointerMove:bt=>{var ln,En,on;if(!Kt.current||!_t||((ln=window.getSelection())==null?void 0:ln.toString().length)>0)return;const sn=bt.clientY-Kt.current.y,gn=bt.clientX-Kt.current.x;!B&&(Math.abs(gn)>1||Math.abs(sn)>1)&&L(Math.abs(gn)>Math.abs(sn)?"x":"y");let Zn={x:0,y:0};const yt=jt=>1/(1.5+Math.abs(jt)/20);if(B==="y"){if(tn.includes("top")||tn.includes("bottom"))if(tn.includes("top")&&sn<0||tn.includes("bottom")&&sn>0)Zn.y=sn;else{const jt=sn*yt(sn);Zn.y=Math.abs(jt)0)Zn.x=gn;else{const jt=gn*yt(gn);Zn.x=Math.abs(jt)0||Math.abs(Zn.y)>0)&&be(!0),(En=Qe.current)==null||En.style.setProperty("--swipe-amount-x",`${Zn.x}px`),(on=Qe.current)==null||on.style.setProperty("--swipe-amount-y",`${Zn.y}px`)}},Be&&!_.jsx&&Ht!=="loading"?et.createElement("button",{"aria-label":Z,"data-disabled":yr,"data-close-button":!0,onClick:yr||!_t?()=>{}:()=>{Pn(),_.onDismiss==null||_.onDismiss.call(_,_)},className:Oo(V==null?void 0:V.closeButton,_==null||(r=_.classNames)==null?void 0:r.closeButton)},(Dr=J==null?void 0:J.close)!=null?Dr:fwn):null,(Ht||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[Ht])!==null||_.icon)?et.createElement("div",{"data-icon":"",className:Oo(V==null?void 0:V.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},Ht==="loading"?_.icon||$n():_.promise?$n():null,Ht!=="loading"?Fn:null):null,et.createElement("div",{"data-content":"",className:Oo(V==null?void 0:V.content,_==null||(i=_.classNames)==null?void 0:i.content)},et.createElement("div",{"data-title":"",className:Oo(V==null?void 0:V.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?et.createElement("div",{"data-description":"",className:Oo(I,me,V==null?void 0:V.description,_==null||(o=_.classNames)==null?void 0:o.description)},typeof _.description=="function"?_.description():_.description):null),et.isValidElement(_.cancel)?_.cancel:_.cancel&&a1(_.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:bt=>{a1(_.cancel)&&_t&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,bt),Pn())},className:Oo(V==null?void 0:V.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,et.isValidElement(_.action)?_.action:_.action&&a1(_.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:bt=>{a1(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,bt),!bt.defaultPrevented&&Pn())},className:Oo(V==null?void 0:V.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function uj(){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 Rwn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?Cwn:Swn;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(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]}):c(o)}),t}const Mwn=et.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:_,theme:p="light",richColors:m,duration:x,style:k,visibleToasts:v=kwn,toastOptions:b,dir:w=uj(),gap:y=Nwn,icons:C,customAriaLabel:N,containerAriaLabel:z="Notifications"}=n,[T,j]=et.useState([]),M=et.useMemo(()=>r?T.filter(ne=>ne.toasterId===r):T.filter(ne=>!ne.toasterId),[T,r]),D=et.useMemo(()=>Array.from(new Set([i].concat(M.filter(ne=>ne.position).map(ne=>ne.position)))),[M,i]),[I,$]=et.useState([]),[q,H]=et.useState(!1),[Q,V]=et.useState(!1),[J,Z]=et.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=et.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=et.useRef(null),U=et.useRef(!1),K=et.useCallback(ne=>{j(ce=>{var _e;return(_e=ce.find(se=>se.id===ne.id))!=null&&_e.delete||Ni.dismiss(ne.id),ce.filter(({id:se})=>se!==ne.id)})},[]);return et.useEffect(()=>Ni.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{j(ce=>ce.map(_e=>_e.id===ne.id?{..._e,delete:!0}:_e))});return}setTimeout(()=>{rwn.flushSync(()=>{j(ce=>{const _e=ce.findIndex(se=>se.id===ne.id);return _e!==-1?[...ce.slice(0,_e),{...ce[_e],...ne},...ce.slice(_e+1)]:[ne,...ce]})})})}),[]),et.useEffect(()=>{if(p!=="system"){Z(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:ce})=>{Z(ce?"dark":"light")})}catch{ne.addListener(({matches:_e})=>{try{Z(_e?"dark":"light")}catch(se){console.error(se)}})}},[p]),et.useEffect(()=>{T.length<=1&&H(!1)},[T]),et.useEffect(()=>{const ne=ce=>{var _e;if(a.length>0&&a.every(oe=>ce[oe]||ce.code===oe)){var G;H(!0),(G=B.current)==null||G.focus()}ce.code==="Escape"&&(document.activeElement===B.current||(_e=B.current)!=null&&_e.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[a]),et.useEffect(()=>{if(B.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[B.current]),et.createElement("section",{ref:t,"aria-label":N??`${z} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ne,ce)=>{var _e;const[se,G]=ne.split("-");return M.length?et.createElement("ol",{key:ne,dir:w==="auto"?uj():w,tabIndex:-1,ref:B,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":se,"data-x-position":G,style:{"--front-toast-height":`${((_e=I[0])==null?void 0:_e.height)||0}px`,"--width":`${Ewn}px`,"--gap":`${y}px`,...k,...Rwn(h,_)},onBlur:oe=>{U.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},M.filter(oe=>!oe.position&&ce===0||oe.position===ne).map((oe,le)=>{var pe,be;return et.createElement(Awn,{key:oe.id,icons:C,index:le,toast:oe,defaultRichColors:m,duration:(pe=b==null?void 0:b.duration)!=null?pe:x,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(be=b==null?void 0:b.closeButton)!=null?be:c,interacting:Q,position:ne,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:K,toasts:M.filter(Me=>Me.position==oe.position),heights:I.filter(Me=>Me.position==oe.position),setHeights:$,expandByDefault:o,gap:y,expanded:q,swipeDirections:n.swipeDirections})})):null}))});function Own(e){const[n]=fI();return f.jsx(Mwn,{theme:n,...e})}function pn(e,n,t){wwn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function lS({content:e,children:n,className:t}){const r=A.useRef(null),s=A.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),_=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${_}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return A.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),f.jsxs("span",{ref:r,className:gs("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 c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,f.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 Dwn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Em(e,n,t="[data-initial-focus]"){const r=A.useRef(n);r.current=n,A.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(Dwn)];(s.querySelector(t)??a()[0]??s).focus();const o=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const u=a(),h=u[0],_=u.at(-1);!h||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function TI({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=A.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?FCt():c7t({count:Xt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?dCt():E6t({count:Xt(n.pendingPermissionCount)})),o>0&&c.push(o===1?NCt():WCt({count:Xt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?OCt():t7t({count:Xt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?yCt():K6t({count:Xt(n.activeRunCount)})),Em(a,s),oa.createPortal(f.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:f.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":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:P6t({host:ze(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:aCt()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(De,{disabled:r,onClick:s,children:Q_()}),f.jsx(De,{variant:"danger",disabled:r,onClick:i,children:r?p7t():M6t()})]})]})}),document.body)}/** * @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 TI=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** + */const AI=(...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 wwn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const Lwn=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 kwn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const Iwn=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 uj=e=>{const n=kwn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const _j=e=>{const n=Iwn(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. @@ -122,472 +122,472 @@ ${e==null?void 0:e.path} * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Swn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Cwn=A.createContext({}),Ewn=()=>A.useContext(Cwn),Nwn=A.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=Ewn()??{},x=r??_?Number(t??h)*24/Number(n??u):t??h;return A.createElement("svg",{ref:c,...sw,width:n??u??sw.width,height:n??u??sw.height,stroke:e??p,strokeWidth:x,className:TI("lucide",m,s),...!i&&!Swn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>A.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** + */const $wn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Bwn=A.createContext({}),Pwn=()=>A.useContext(Bwn),Fwn=A.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=Pwn()??{},x=r??_?Number(t??h)*24/Number(n??u):t??h;return A.createElement("svg",{ref:c,...sw,width:n??u??sw.width,height:n??u??sw.height,stroke:e??p,strokeWidth:x,className:AI("lucide",m,s),...!i&&!$wn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>A.createElement(k,v)),...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 ot=(e,n)=>{const t=A.forwardRef(({className:r,...s},i)=>A.createElement(Nwn,{ref:i,iconNode:n,className:TI(`lucide-${wwn(uj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=uj(e),t};/** + */const at=(e,n)=>{const t=A.forwardRef(({className:r,...s},i)=>A.createElement(Fwn,{ref:i,iconNode:n,className:AI(`lucide-${Lwn(_j(e))}`,`lucide-${e}`,r),...s}));return t.displayName=_j(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 zwn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],jwn=ot("arrow-down",zwn);/** + */const Hwn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],qwn=at("arrow-down",Hwn);/** * @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 Twn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],A0=ot("arrow-left",Twn);/** + */const Uwn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],A0=at("arrow-left",Uwn);/** * @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 Awn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Q1=ot("arrow-right",Awn);/** + */const Gwn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Q1=at("arrow-right",Gwn);/** * @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 Rwn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Mwn=ot("arrow-up-right",Rwn);/** + */const Vwn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Kwn=at("arrow-up-right",Vwn);/** * @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 Own=[["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"}]],AI=ot("blocks",Own);/** + */const Wwn=[["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"}]],RI=at("blocks",Wwn);/** * @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 Dwn=[["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"}]],RI=ot("book-open",Dwn);/** + */const Qwn=[["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"}]],MI=at("book-open",Qwn);/** * @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 Lwn=[["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"}]],Iwn=ot("calendar-days",Lwn);/** + */const Xwn=[["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"}]],Ywn=at("calendar-days",Xwn);/** * @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 $wn=[["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"}]],Bwn=ot("chart-spline",$wn);/** + */const Zwn=[["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"}]],Jwn=at("chart-spline",Zwn);/** * @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 Pwn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xi=ot("check",Pwn);/** + */const e4n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ai=at("check",e4n);/** * @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 Fwn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rc=ot("chevron-down",Fwn);/** + */const t4n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rc=at("chevron-down",t4n);/** * @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 Hwn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],MI=ot("chevron-left",Hwn);/** + */const n4n=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],OI=at("chevron-left",n4n);/** * @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 qwn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ba=ot("chevron-right",qwn);/** + */const r4n=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ba=at("chevron-right",r4n);/** * @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 Uwn=[["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"}]],uS=ot("circle-alert",Uwn);/** + */const s4n=[["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"}]],uS=at("circle-alert",s4n);/** * @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 Gwn=[["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"}]],Vwn=ot("circle-question-mark",Gwn);/** + */const i4n=[["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"}]],a4n=at("circle-question-mark",i4n);/** * @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 Kwn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],OI=ot("circle-stop",Kwn);/** + */const o4n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],DI=at("circle-stop",o4n);/** * @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 Wwn=[["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"}]],DI=ot("circle-x",Wwn);/** + */const c4n=[["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"}]],LI=at("circle-x",c4n);/** * @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 Qwn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Xwn=ot("clock-3",Qwn);/** + */const l4n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],u4n=at("clock-3",l4n);/** * @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 Ywn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Zwn=ot("clock",Ywn);/** + */const _4n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],f4n=at("clock",_4n);/** * @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 Jwn=[["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"}]],e4n=ot("cloud-upload",Jwn);/** + */const d4n=[["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"}]],h4n=at("cloud-upload",d4n);/** * @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 t4n=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],D3=ot("code",t4n);/** + */const p4n=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],D3=at("code",p4n);/** * @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 n4n=[["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"}]],Oh=ot("copy",n4n);/** + */const m4n=[["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"}]],gf=at("copy",m4n);/** * @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 r4n=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],LI=ot("corner-down-left",r4n);/** + */const g4n=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],II=at("corner-down-left",g4n);/** * @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 s4n=[["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"}]],_S=ot("cpu",s4n);/** + */const v4n=[["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"}]],_S=at("cpu",v4n);/** * @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 i4n=[["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"}]],fS=ot("download",i4n);/** + */const b4n=[["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"}]],fS=at("download",b4n);/** * @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 a4n=[["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"}]],dS=ot("ellipsis",a4n);/** + */const y4n=[["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"}]],dS=at("ellipsis",y4n);/** * @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 o4n=[["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"}]],Y_=ot("external-link",o4n);/** + */const x4n=[["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"}]],Z_=at("external-link",x4n);/** * @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 c4n=[["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"}]],II=ot("file-code",c4n);/** + */const w4n=[["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"}]],$I=at("file-code",w4n);/** * @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 l4n=[["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"}]],u4n=ot("file-output",l4n);/** + */const k4n=[["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"}]],S4n=at("file-output",k4n);/** * @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 _4n=[["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"}]],Ob=ot("file-text",_4n);/** + */const C4n=[["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"}]],Ob=at("file-text",C4n);/** * @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 f4n=[["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"}]],hh=ot("flask-conical",f4n);/** + */const E4n=[["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"}]],mh=at("flask-conical",E4n);/** * @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 d4n=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]],h4n=ot("fold-vertical",d4n);/** + */const N4n=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]],z4n=at("fold-vertical",N4n);/** * @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 p4n=[["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"}]],$I=ot("folder-git-2",p4n);/** + */const j4n=[["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"}]],BI=at("folder-git-2",j4n);/** * @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 m4n=[["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"}]],Su=ot("folder-open",m4n);/** + */const T4n=[["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"}]],Su=at("folder-open",T4n);/** * @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 g4n=[["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"}]],v4n=ot("folder-plus",g4n);/** + */const A4n=[["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"}]],R4n=at("folder-plus",A4n);/** * @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 b4n=[["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"}]],Db=ot("folder-tree",b4n);/** + */const M4n=[["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"}]],Db=at("folder-tree",M4n);/** * @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 y4n=[["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"}]],x4n=ot("funnel",y4n);/** + */const O4n=[["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"}]],D4n=at("funnel",O4n);/** * @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 w4n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],k4n=ot("gauge",w4n);/** + */const L4n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],I4n=at("gauge",L4n);/** * @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 S4n=[["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"}]],Nm=ot("git-branch",S4n);/** + */const $4n=[["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"}]],Nm=at("git-branch",$4n);/** * @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 C4n=[["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"}]],E4n=ot("git-commit-horizontal",C4n);/** + */const B4n=[["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"}]],P4n=at("git-commit-horizontal",B4n);/** * @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 N4n=[["path",{d:"M12 13V2l8 4-8 4",key:"5wlwwj"}],["path",{d:"M20.561 10.222a9 9 0 1 1-12.55-5.29",key:"1c0wjv"}],["path",{d:"M8.002 9.997a5 5 0 1 0 8.9 2.02",key:"gb1g7m"}]],BI=ot("goal",N4n);/** + */const F4n=[["path",{d:"M12 13V2l8 4-8 4",key:"5wlwwj"}],["path",{d:"M20.561 10.222a9 9 0 1 1-12.55-5.29",key:"1c0wjv"}],["path",{d:"M8.002 9.997a5 5 0 1 0 8.9 2.02",key:"gb1g7m"}]],PI=at("goal",F4n);/** * @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 z4n=[["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"}]],j4n=ot("globe",z4n);/** + */const H4n=[["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"}]],q4n=at("globe",H4n);/** * @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 T4n=[["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"}]],PI=ot("history",T4n);/** + */const U4n=[["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"}]],FI=at("history",U4n);/** * @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 A4n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hS=ot("info",A4n);/** + */const G4n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hS=at("info",G4n);/** * @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 R4n=[["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"}]],M4n=ot("laptop",R4n);/** + */const V4n=[["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"}]],K4n=at("laptop",V4n);/** * @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 O4n=[["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"}]],D4n=ot("lightbulb",O4n);/** + */const W4n=[["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"}]],Q4n=at("lightbulb",W4n);/** * @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 L4n=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],FI=ot("link-2",L4n);/** + */const X4n=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],HI=at("link-2",X4n);/** * @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 I4n=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],$4n=ot("list-checks",I4n);/** + */const Y4n=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Z4n=at("list-checks",Y4n);/** * @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 B4n=[["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"}]],_j=ot("lock",B4n);/** + */const J4n=[["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"}]],fj=at("lock",J4n);/** * @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 P4n=[["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"}]],F4n=ot("maximize-2",P4n);/** + */const e3n=[["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"}]],t3n=at("maximize-2",e3n);/** * @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 H4n=[["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"}]],HI=ot("message-square-quote",H4n);/** + */const n3n=[["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"}]],qI=at("message-square-quote",n3n);/** * @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 q4n=[["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"}]],U4n=ot("minimize-2",q4n);/** + */const r3n=[["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"}]],s3n=at("minimize-2",r3n);/** * @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 G4n=[["path",{d:"M5 12h14",key:"1ays0h"}]],V4n=ot("minus",G4n);/** + */const i3n=[["path",{d:"M5 12h14",key:"1ays0h"}]],a3n=at("minus",i3n);/** * @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 K4n=[["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"}]],W4n=ot("monitor",K4n);/** + */const o3n=[["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"}]],c3n=at("monitor",o3n);/** * @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 Q4n=[["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"}]],X4n=ot("moon",Q4n);/** + */const l3n=[["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"}]],u3n=at("moon",l3n);/** * @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 Y4n=[["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"}]],Z4n=ot("mouse-pointer-click",Y4n);/** + */const _3n=[["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"}]],f3n=at("mouse-pointer-click",_3n);/** * @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 J4n=[["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"}]],pS=ot("package",J4n);/** + */const d3n=[["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"}]],pS=at("package",d3n);/** * @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 e3n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],qI=ot("panel-left",e3n);/** + */const h3n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],UI=at("panel-left",h3n);/** * @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 t3n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],UI=ot("panel-right",t3n);/** + */const p3n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],GI=at("panel-right",p3n);/** * @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 n3n=[["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"}]],r3n=ot("paperclip",n3n);/** + */const m3n=[["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"}]],g3n=at("paperclip",m3n);/** * @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 s3n=[["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"}]],mS=ot("pencil",s3n);/** + */const v3n=[["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"}]],mS=at("pencil",v3n);/** * @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 i3n=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],a3n=ot("play",i3n);/** + */const b3n=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],y3n=at("play",b3n);/** * @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 o3n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Dh=ot("plus",o3n);/** + */const x3n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Lh=at("plus",x3n);/** * @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 c3n=[["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"}]],Pa=ot("refresh-cw",c3n);/** + */const w3n=[["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"}]],Pa=at("refresh-cw",w3n);/** * @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 l3n=[["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"}]],u3n=ot("rotate-cw",l3n);/** + */const k3n=[["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"}]],S3n=at("rotate-cw",k3n);/** * @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 _3n=[["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"}]],gS=ot("scroll-text",_3n);/** + */const C3n=[["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"}]],gS=at("scroll-text",C3n);/** * @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 f3n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],GI=ot("search",f3n);/** + */const E3n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],VI=at("search",E3n);/** * @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 d3n=[["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"}]],fj=ot("server",d3n);/** + */const N3n=[["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"}]],dj=at("server",N3n);/** * @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 h3n=[["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"}]],vS=ot("settings",h3n);/** + */const z3n=[["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"}]],vS=at("settings",z3n);/** * @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 p3n=[["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"}]],VI=ot("sliders-horizontal",p3n);/** + */const j3n=[["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"}]],KI=at("sliders-horizontal",j3n);/** * @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 m3n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],g3n=ot("square-pen",m3n);/** + */const T3n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],A3n=at("square-pen",T3n);/** * @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 v3n=[["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"}]],mf=ot("square-terminal",v3n);/** + */const R3n=[["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"}]],vf=at("square-terminal",R3n);/** * @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 b3n=[["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"}]],y3n=ot("sun",b3n);/** + */const M3n=[["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"}]],O3n=at("sun",M3n);/** * @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 x3n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],lo=ot("terminal",x3n);/** + */const D3n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],lo=at("terminal",D3n);/** * @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 w3n=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],k3n=ot("toggle-right",w3n);/** + */const L3n=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],I3n=at("toggle-right",L3n);/** * @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 S3n=[["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"}]],gf=ot("trash-2",S3n);/** + */const $3n=[["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"}]],bf=at("trash-2",$3n);/** * @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 C3n=[["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"}]],bS=ot("triangle-alert",C3n);/** + */const B3n=[["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"}]],bS=at("triangle-alert",B3n);/** * @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 E3n=[["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"}]],N3n=ot("upload",E3n);/** + */const P3n=[["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"}]],F3n=at("upload",P3n);/** * @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 z3n=[["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"}]],yS=ot("users",z3n);/** + */const H3n=[["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"}]],yS=at("users",H3n);/** * @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 j3n=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],T3n=ot("wand-sparkles",j3n);/** + */const q3n=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],U3n=at("wand-sparkles",q3n);/** * @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 A3n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],or=ot("x",A3n);/** + */const G3n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ur=at("x",G3n);/** * @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 R3n=[["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"}]],M3n=ot("zap",R3n);function yu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const O3n=["settings","harnesses","projects","compute","instances","environment","git","storage"],D3n=e=>O3n.some(n=>n===e),vf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Hi=e=>typeof e=="string"&&e.length>0,o1=e=>e==null||Hi(e);function xS(e){if(!vf(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"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Hi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&o1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Hi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Hi(e.path)&&o1(e.sessionId)&&o1(e.ref)&&o1(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}:{},...Hi(e.sessionId)?{sessionId:e.sessionId}:{},...Hi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Hi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Hi(e.experimentId)&&Hi(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")&&Hi(e.sessionId)&&Hi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Hi(e.sessionId)&&Hi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function Z_(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"&&D3n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Lb(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=Z_(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(!xS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function X1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const dj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function KI(e,n){let t,r,s=!1,i=!1,a;async function o(c=!1){if(clearTimeout(a),i||(i=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const h=i;i=!1;try{await e(u,h),r=void 0}catch(_){r=u,n(_)}finally{s=!1,t!==void 0&&o()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var iw={exports:{}},hj;function L3n(){return hj||(hj=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),c=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),_=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(_/i.css.cell.height))}}}})(),t})()))})(iw)),iw.exports}var I3n=L3n(),aw={exports:{}},pj;function $3n(){return pj||(pj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const _=new URL(h),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,_,p,m={}){this._terminal=h,this._regex=_,this._handler=p,this._options=m}provideLinks(h,_){const p=u.computeLink(h,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(h){return h.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:x}=_;this._options.hover(p,m,x)}},_)))}};class u{static computeLink(_,p,m,x){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const C=[];for(;y=k.exec(w);){const N=y[0];if(!c(N))continue;const[z,T]=u._mapStrIdx(m,b,0,y.index),[j,M]=u._mapStrIdx(m,z,T,N.length);if(z===-1||T===-1||j===-1||M===-1)continue;const D={start:{x:T+1,y:z+1},end:{x:M,y:j+1}};C.push({range:D,text:N,activate:x})}return C}static _getWindowedLineStrings(_,p){let m,x=_,k=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--x))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,x]}static _mapStrIdx(_,p,m,x){const k=_.buffer.active,v=k.getNullCell();let b=m;for(;x;){const w=k.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(h,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(h=u,_={}){this._handler=h,this._options=_}activate(h){this._terminal=h;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(aw)),aw.exports}var B3n=$3n(),ow={exports:{}},mj;function P3n(){return mj||(mj=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),x=c(4725),k=c(2585),v=c(3656);let b=o.AccessibilityManager=class extends m.Disposable{constructor(w,y,C,N){super(),this._terminal=w,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 z=0;zthis._handleBoundaryFocus(z,0),this._bottomBoundaryFocusListener=z=>this._handleBoundaryFocus(z,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((z=>this._handleResize(z.rows)))),this.register(this._terminal.onRender((z=>this._refreshRows(z.start,z.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((z=>this._handleChar(z)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` + */const V3n=[["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"}]],K3n=at("zap",V3n);function yu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const W3n=["settings","harnesses","projects","compute","instances","environment","git","storage"],Q3n=e=>W3n.some(n=>n===e),yf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),qi=e=>typeof e=="string"&&e.length>0,o1=e=>e==null||qi(e);function xS(e){if(!yf(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"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&qi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&o1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...qi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&qi(e.path)&&o1(e.sessionId)&&o1(e.ref)&&o1(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}:{},...qi(e.sessionId)?{sessionId:e.sessionId}:{},...qi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...qi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&qi(e.experimentId)&&qi(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")&&qi(e.sessionId)&&qi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&qi(e.sessionId)&&qi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function J_(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"&&Q3n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Lb(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=J_(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(!xS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function X1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const hj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function WI(e,n){let t,r,s=!1,i=!1,a;async function o(c=!1){if(clearTimeout(a),i||(i=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const h=i;i=!1;try{await e(u,h),r=void 0}catch(_){r=u,n(_)}finally{s=!1,t!==void 0&&o()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var iw={exports:{}},pj;function X3n(){return pj||(pj=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),c=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),_=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(_/i.css.cell.height))}}}})(),t})()))})(iw)),iw.exports}var Y3n=X3n(),aw={exports:{}},mj;function Z3n(){return mj||(mj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const _=new URL(h),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,_,p,m={}){this._terminal=h,this._regex=_,this._handler=p,this._options=m}provideLinks(h,_){const p=u.computeLink(h,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(h){return h.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:x}=_;this._options.hover(p,m,x)}},_)))}};class u{static computeLink(_,p,m,x){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const C=[];for(;y=k.exec(w);){const N=y[0];if(!c(N))continue;const[z,T]=u._mapStrIdx(m,b,0,y.index),[j,M]=u._mapStrIdx(m,z,T,N.length);if(z===-1||T===-1||j===-1||M===-1)continue;const D={start:{x:T+1,y:z+1},end:{x:M,y:j+1}};C.push({range:D,text:N,activate:x})}return C}static _getWindowedLineStrings(_,p){let m,x=_,k=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--x))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,x]}static _mapStrIdx(_,p,m,x){const k=_.buffer.active,v=k.getNullCell();let b=m;for(;x;){const w=k.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(h,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(h=u,_={}){this._handler=h,this._options=_}activate(h){this._terminal=h;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(aw)),aw.exports}var J3n=Z3n(),ow={exports:{}},gj;function e5n(){return gj||(gj=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),x=c(4725),k=c(2585),v=c(3656);let b=o.AccessibilityManager=class extends m.Disposable{constructor(w,y,C,N){super(),this._terminal=w,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 z=0;zthis._handleBoundaryFocus(z,0),this._bottomBoundaryFocusListener=z=>this._handleBoundaryFocus(z,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((z=>this._handleResize(z.rows)))),this.register(this._terminal.onRender((z=>this._refreshRows(z.start,z.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((z=>this._handleChar(z)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` `)))),this.register(this._terminal.onA11yTab((z=>this._handleTab(z)))),this.register(this._terminal.onKey((z=>this._handleKey(z.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.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(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){const C=this._terminal.buffer,N=C.lines.length.toString();for(let z=w;z<=y;z++){const T=C.lines.get(C.ydisp+z),j=[],M=(T==null?void 0:T.translateToString(!0,void 0,void 0,j))||"",D=(C.ydisp+z+1).toString(),I=this._rowElements[z];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,j)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){const C=w.target,N=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==N)return;let z,T;if(y===0?(z=C,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(z=this._rowElements.shift(),T=C,this._rowContainer.removeChild(z)),z.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},C={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.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 z=({node:D,offset:I})=>{const $=D instanceof Text?D.parentNode:D;let q=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get($);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=I=this._terminal.cols&&(++q,Q=0),{row:q,column:Q}},T=z(y),j=z(C);if(T&&j){if(T.row>j.row||T.row===j.row&&T.column>=j.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(j.row-T.row)*this._terminal.cols-T.column+j.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_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 w=0;w{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(p,m,x,k){p=u(p=c(p),x.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),m.value=""}function _(p,m,x){const k=x.getBoundingClientRect(),v=p.clientX-k.left-10,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}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=c,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,k){p.stopPropagation(),p.clipboardData&&h(p.clipboardData.getData("text/plain"),m,x,k)},o.paste=h,o.moveTextAreaUnderMouseCursor=_,o.rightClickHandler=function(p,m,x,k,v){_(p,m,x),v&&k.rightClickSelect(p),m.value=k.selectionText,m.select()}},7239:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=c(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(h,_,p){this._css.set(h,_,p)}getCss(h,_){return this._css.get(h,_)}setColor(h,_,p){this._color.set(h,_,p)}getColor(h,_){return this._color.get(h,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,u,h,_){c.addEventListener(u,h,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,_))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),x=c(2585),k=c(4725);let v=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,w,y,C,N){super(),this._element=b,this._mouseService=w,this._renderService=y,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 z;this._lastMouseEvent=void 0,(z=this._activeProviderReplies)==null||z.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const y=b.composedPath();for(let C=0;C{z==null||z.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[z,T]of this._linkProviderService.linkProviders.entries())w?(N=this._activeProviderReplies)!=null&&N.get(z)&&(y=this._checkLinkProviderResult(z,b,y)):T.provideLinks(b.y,(j=>{var D,I;if(this._isMouseOut)return;const M=j==null?void 0:j.map(($=>({link:$})));(D=this._activeProviderReplies)==null||D.set(z,M),y=this._checkLinkProviderResult(z,b,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const y=new Set;for(let C=0;Cb?this._bufferService.cols:T.link.range.end.x;for(let D=j;D<=M;D++){if(y.has(D)){N.splice(z--,1);break}y.add(D)}}}}_checkLinkProviderResult(b,w,y){var z;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(b);let N=!1;for(let T=0;Tthis._linkAtPosition(j.link,w)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;Tthis._linkAtPosition(M.link,w)));if(j){y=!0,this._handleNewLink(j);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,N,z;(C=this._currentLink)!=null&&C.state&&((z=(N=this._currentLink)==null?void 0:N.state)==null?void 0:z.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const z=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);z&&this._askForLink(z,!1)}}))))}_linkHover(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(b,w){const y=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(b,w){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=w.y*this._bufferService.cols+w.x;return y<=N&&N<=C}_positionFromMouseEvent(b,w,y){const C=y.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,y,C,N){return{x1:b,y1:w,x2:y,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,x.IBufferService),h(4,k.ILinkProviderService)],v)},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,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=o.OscLinkProvider=class{constructor(k,v,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const w=[],y=this._optionsService.rawOptions.linkHandler,C=new _.CellData,N=b.getTrimmedLength();let z=-1,T=-1,j=!1;for(let D=0;Dy?y.activate(H,Q,$):x(0,Q),hover:(H,Q)=>{var V;return(V=y==null?void 0:y.hover)==null?void 0:V.call(y,H,Q,$)},leave:(H,Q)=>{var V;return(V=y==null?void 0:y.leave)==null?void 0:V.call(y,H,Q,$)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(T=D,z=C.extended.urlId):(T=-1,z=-1)}}v(w)}};function x(k,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,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 c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),h=c(3656),_=c(3551),p=c(9042),m=c(3730),x=c(1680),k=c(3107),v=c(5744),b=c(2950),w=c(1296),y=c(428),C=c(4269),N=c(5114),z=c(8934),T=c(3230),j=c(9312),M=c(4725),D=c(6731),I=c(8055),$=c(8969),q=c(8460),H=c(844),Q=c(6114),V=c(8437),J=c(2584),Z=c(7399),B=c(5941),L=c(9074),F=c(2585),U=c(5435),K=c(4567),ne=c(779);class ce extends $.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=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ne.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(((G,oe)=>this.refresh(G,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,H.toDisposable)((()=>{var G,oe;this._customKeyEventHandler=void 0,(oe=(G=this.element)==null?void 0:G.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const G of se){let oe,le="";switch(G.index){case 256:oe="foreground",le="10";break;case 257:oe="background",le="11";break;case 258:oe="cursor",le="12";break;default:oe="ansi",le="4;"+G.index}switch(G.type){case 0:const fe=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,B.toRgbString)(fe)}${J.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((me=>me.ansi[G.index]=I.channels.toColor(...G.color)));else{const me=oe;this._themeService.modifyColors((Re=>Re[me]=I.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.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(K.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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(J.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,G=this.buffer.lines.get(se);if(!G)return;const oe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,fe=G.getWidth(oe),me=this._renderService.dimensions.css.cell.width*fe,Re=this.buffer.y*this._renderService.dimensions.css.cell.height,Oe=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Oe+"px",this.textarea.style.top=Re+"px",this.textarea.style.width=me+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,u.copyHandler)(G,this._selectionService)})));const se=G=>(0,u.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,u.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var oe;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"),((oe=this.element)==null?void 0:oe.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 G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.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(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.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(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(z.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(G);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((le=>this.scrollLines(le.amount,le.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(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),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(K.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,G=this.element;function oe(me){const Re=se._mouseService.getMouseReportCoords(me,se.screenElement);if(!Re)return!1;let Oe,Qe;switch(me.overrideType||me.type){case"mousemove":Qe=32,me.buttons===void 0?(Oe=3,me.button!==void 0&&(Oe=me.button<3?me.button:3)):Oe=1&me.buttons?0:4&me.buttons?1:2&me.buttons?2:3;break;case"mouseup":Qe=0,Oe=me.button<3?me.button:3;break;case"mousedown":Qe=1,Oe=me.button<3?me.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(me)===!1||se.viewport.getLinesScrolled(me)===0)return!1;Qe=me.deltaY<0?0:1,Oe=4;break;default:return!1}return!(Qe===void 0||Oe===void 0||Oe>4)&&se.coreMouseService.triggerMouseEvent({col:Re.col,row:Re.row,x:Re.x,y:Re.y,button:Oe,action:Qe,ctrl:me.ctrlKey,alt:me.altKey,shift:me.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},fe={mouseup:me=>(oe(me),me.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(me)),wheel:me=>(oe(me),this.cancel(me,!0)),mousedrag:me=>{me.buttons&&oe(me)},mousemove:me=>{me.buttons||oe(me)}};this.register(this.coreMouseService.onProtocolChange((me=>{me?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(me)),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&me?le.mousemove||(G.addEventListener("mousemove",fe.mousemove),le.mousemove=fe.mousemove):(G.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&me?le.wheel||(G.addEventListener("wheel",fe.wheel,{passive:!1}),le.wheel=fe.wheel):(G.removeEventListener("wheel",le.wheel),le.wheel=null),2&me?le.mouseup||(le.mouseup=fe.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&me?le.mousedrag||(le.mousedrag=fe.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(G,"mousedown",(me=>{if(me.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(me))return oe(me),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(me)}))),this.register((0,h.addDisposableDomListener)(G,"wheel",(me=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(me)===!1)return!1;if(!this.buffer.hasScrollback){const Re=this.viewport.getLinesScrolled(me);if(Re===0)return;const Oe=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(me.deltaY<0?"A":"B");let Qe="";for(let qe=0;qe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(me),this.cancel(me)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(G,"touchmove",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(me)?void 0:this.cancel(me)}),{passive:!1}))}refresh(se,G){var oe;(oe=this._renderService)==null||oe.refreshRows(se,G)}updateCursorStyle(se){var G;(G=this._selectionService)!=null&&G.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,G,oe=0){var le;oe===1?(super.scrollLines(se,G,oe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.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 G=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),G}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,G,oe){this._selectionService.setSelection(se,G,oe)}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,G){var oe;(oe=this._selectionService)==null||oe.selectLines(se,G)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!G&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,Z.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){const le=this.rows-1;return this.scrollLines(oe.type===2?-le:le),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.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):(oe.key!==J.C0.ETX&&oe.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,G){const oe=se.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||se.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||se.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?oe:oe&&(!G.keyCode||G.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)G=se.charCode;else if(se.which===null||se.which===void 0)G=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;G=se.which}return!(!G||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(G,!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 G=se.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(se),!0}return!1}resize(se,G){se!==this.cols||G!==this.rows?super.resize(se,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,G){var oe,le;(oe=this._charSizeService)==null||oe.measure(),(le=this.viewport)==null||le.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 G=1;G{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-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 c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),x=c(844),k=c(2585);let v=o.Viewport=class extends x.Disposable{constructor(b,w,y,C,N,z,T,j){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=C,this._charSizeService=N,this._renderService=z,this._coreBrowserService=T,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,_.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(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=$),C=""}}return{bufferElements:N,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let x=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,b,w,y){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,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 k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=k==null?void 0:k.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=k.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=x=u([h(1,m.IBufferService),h(2,_.ICoreBrowserService),h(3,m.IDecorationService),h(4,_.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(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,o,c){var u=this&&this.__decorate||function(y,C,N,z){var T,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,z);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,z){C(N,z,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),x=c(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,N,z,T,j,M){var I;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=N,this._decorationService=z,this._renderService=T,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new _.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 D=this._canvas.getContext("2d");if(!D)throw new Error("Ctx cannot be null");this._ctx=D,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var $;($=this._canvas)==null||$.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=C,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||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=w=u([h(2,x.IBufferService),h(3,x.IDecorationService),h(4,p.IRenderService),h(5,x.IOptionsService),h(6,p.ICoreBrowserService)],w)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let x=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,b,w,y,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,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(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=x=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,_.IRenderService)],x)},9806:(a,o)=>{function c(u,h,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),x=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-x,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,_,p,m,x,k,v,b){if(!x)return;const w=c(u,h,_);return w?(w[0]=Math.ceil((w[0]+(b?k/2:0))/k),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,w,y){const C=v-_(v,w),N=b-_(b,w),z=Math.abs(C-N)-(function(T,j,M){let D=0;const I=T-_(T,M),$=j-_(j,M);for(let q=0;q=0&&vb?"A":"B"}function m(v,b,w,y,C,N){let z=v,T=b,j="";for(;z!==w||T!==y;)z+=C?1:-1,C&&z>N.cols-1?(j+=N.buffer.translateBufferLineToString(T,!1,v,z),z=0,v=0,T++):!C&&z<0&&(j+=N.buffer.translateBufferLineToString(T,!1,0,v+1),z=N.cols-1,v=z,T--);return j+N.buffer.translateBufferLineToString(T,!1,v,z)}function x(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function k(v,b){v=Math.floor(v);let w="";for(let y=0;y0?I-_(I,$):M;const Q=I,V=(function(J,Z,B,L,F,U){let K;return K=h(B,L,F,U).length>0?L-_(L,F):Z,J=B&&Kv?"D":"C",k(Math.abs(C-v),x(z,y));z=N>b?"D":"C";const T=Math.abs(N-b);return k((function(j,M){return M.cols-j})(N>b?v:C,w)+(T-1)*w.cols+1+((N>b?C:v)-1),x(z,y))}},1296:function(a,o,c){var u=this&&this.__decorate||function(q,H,Q,V){var J,Z=arguments.length,B=Z<3?H:V===null?V=Object.getOwnPropertyDescriptor(H,Q):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(q,H,Q,V);else for(var L=q.length-1;L>=0;L--)(J=q[L])&&(B=(Z<3?J(B):Z>3?J(H,Q,B):J(H,Q))||B);return Z>3&&B&&Object.defineProperty(H,Q,B),B},h=this&&this.__param||function(q,H){return function(Q,V){H(Q,V,q)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),x=c(6171),k=c(6052),v=c(4725),b=c(8055),w=c(8460),y=c(844),C=c(2585),N="xterm-dom-renderer-owner-",z="xterm-rows",T="xterm-fg-",j="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,$=o.DomRenderer=class extends y.Disposable{constructor(q,H,Q,V,J,Z,B,L,F,U,K,ne,ce){super(),this._terminal=q,this._document=H,this._element=Q,this._screenElement=V,this._viewportElement=J,this._helperContainer=Z,this._linkifier2=B,this._charSizeService=F,this._optionsService=U,this._bufferService=K,this._coreBrowserService=ne,this._themeService=ce,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(z),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(D),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((_e=>this._injectCss(_e)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((_e=>this._handleLinkHover(_e)))),this.register(this._linkifier2.onHideLinkUnderline((_e=>this._handleLinkLeave(_e)))),this.register((0,y.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),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 Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${z} 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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${z} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${z} .xterm-dim { color: ${b.color.multiplyOpacity(q.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 Q=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${V} { 50% { box-shadow: none; }}`,H+=`@keyframes ${J} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,H+=`${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[Z,B]of q.ansi.entries())H+=`${this._terminalSelector} .${T}${Z} { color: ${B.css}; }${this._terminalSelector} .${T}${Z}.xterm-dim { color: ${b.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${j}${Z} { background-color: ${B.css}; }`;H+=`${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(q.background).css}; }${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,H){for(let Q=this._rowElements.length;Q<=H;Q++){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(q,H){this._refreshRowElements(q,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(q,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,H,Q),this.renderRows(0,this._bufferService.rows-1),!q||!H)return;this._selectionRenderModel.update(this._terminal,q,H,Q);const V=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,Z=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(Z>=this._bufferService.rows||B<0)return;const L=this._document.createDocumentFragment();if(Q){const F=q[0]>H[0];L.appendChild(this._createSelectionElement(Z,F?H[0]:q[0],F?q[0]:H[0],B-Z+1))}else{const F=V===Z?q[0]:0,U=Z===J?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Z,F,U));const K=B-Z-1;if(L.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,K)),Z!==B){const ne=J===B?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,0,ne))}}this._selectionContainer.appendChild(L)}_createSelectionElement(q,H,Q,V=1){const J=this._document.createElement("div"),Z=H*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(Q-H);return Z+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-Z),J.style.height=V*this.dimensions.css.cell.height+"px",J.style.top=q*this.dimensions.css.cell.height+"px",J.style.left=`${Z}px`,J.style.width=`${B}px`,J}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 q of this._rowElements)q.replaceChildren()}renderRows(q,H){const Q=this._bufferService.buffer,V=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=q;F<=H;F++){const U=F+Q.ydisp,K=this._rowElements[F],ne=Q.lines.get(U);if(!K||!ne)break;K.replaceChildren(...this._rowFactory.createRow(ne,U,U===V,B,L,J,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,H,Q,V,J,Z){Q<0&&(q=0),V<0&&(H=0);const B=this._bufferService.rows-1;Q=Math.max(Math.min(Q,B),0),V=Math.max(Math.min(V,B),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,U=Math.min(L.x,J-1),K=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let _e=Q;_e<=V;++_e){const se=_e+L.ydisp,G=this._rowElements[_e],oe=L.lines.get(se);if(!G||!oe)break;G.replaceChildren(...this._rowFactory.createRow(oe,se,se===F,ne,ce,U,K,this.dimensions.css.cell.width,this._widthCache,Z?_e===Q?q:0:-1,Z?(_e===V?H:J)-1:-1))}}};o.DomRenderer=$=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],$)},3787:function(a,o,c){var u=this&&this.__decorate||function(z,T,j,M){var D,I=arguments.length,$=I<3?T:M===null?M=Object.getOwnPropertyDescriptor(T,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(z,T,j,M);else for(var q=z.length-1;q>=0;q--)(D=z[q])&&($=(I<3?D($):I>3?D(T,j,$):D(T,j))||$);return I>3&&$&&Object.defineProperty(T,j,$),$},h=this&&this.__param||function(z,T){return function(j,M){T(j,M,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),x=c(2585),k=c(8055),v=c(4725),b=c(4269),w=c(6171),y=c(3734);let C=o.DomRendererRowFactory=class{constructor(z,T,j,M,D,I,$){this._document=z,this._characterJoinerService=T,this._optionsService=j,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=$,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(z,T,j){this._selectionStart=z,this._selectionEnd=T,this._columnSelectMode=j}createRow(z,T,j,M,D,I,$,q,H,Q,V){const J=[],Z=this._characterJoinerService.getJoinedCharacters(T),B=this._themeService.colors;let L,F=z.getNoBgTrimmedLength();j&&F0&&Re===Z[0][0]){Qe=!0;const Ue=Z.shift();Se=new b.JoinedCellData(this._workCell,z.translateToString(!0,Ue[0],Ue[1]),Ue[1]-Ue[0]),qe=Ue[1]-1,Oe=Se.getWidth()}const at=this._isCellInSelection(Re,T),et=j&&Re===I,ct=me&&Re>=Q&&Re<=V;let wt=!1;this._decorationService.forEachDecorationAtCell(Re,T,void 0,(Ue=>{wt=!0}));let $t=Se.getChars()||p.WHITESPACE_CELL_CHAR;if($t===" "&&(Se.isUnderline()||Se.isOverline())&&($t=" "),le=Oe*q-H.get($t,Se.isBold(),Se.isItalic()),L){if(U&&(at&&oe||!at&&!oe&&Se.bg===ne)&&(at&&oe&&B.selectionForeground||Se.fg===ce)&&Se.extended.ext===_e&&ct===se&&le===G&&!et&&!Qe&&!wt){Se.isInvisible()?K+=p.WHITESPACE_CELL_CHAR:K+=$t,U++;continue}U&&(L.textContent=K),L=this._document.createElement("span"),U=0,K=""}else L=this._document.createElement("span");if(ne=Se.bg,ce=Se.fg,_e=Se.extended.ext,se=ct,G=le,oe=at,Qe&&I>=Re&&I<=qe&&(I=Re),!this._coreService.isCursorHidden&&et&&this._coreService.isCursorInitialized){if(fe.push("xterm-cursor"),this._coreBrowserService.isFocused)$&&fe.push("xterm-cursor-blink"),fe.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":fe.push("xterm-cursor-outline");break;case"block":fe.push("xterm-cursor-block");break;case"bar":fe.push("xterm-cursor-bar");break;case"underline":fe.push("xterm-cursor-underline")}}if(Se.isBold()&&fe.push("xterm-bold"),Se.isItalic()&&fe.push("xterm-italic"),Se.isDim()&&fe.push("xterm-dim"),K=Se.isInvisible()?p.WHITESPACE_CELL_CHAR:Se.getChars()||p.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(fe.push(`xterm-underline-${Se.extended.underlineStyle}`),K===" "&&(K=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Ue=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Ue<8&&(Ue+=8),L.style.textDecorationColor=B.ansi[Ue].css}Se.isOverline()&&(fe.push("xterm-overline"),K===" "&&(K=" ")),Se.isStrikethrough()&&fe.push("xterm-strikethrough"),ct&&(L.style.textDecoration="underline");let ht=Se.getFgColor(),dt=Se.getFgColorMode(),Le=Se.getBgColor(),ge=Se.getBgColorMode();const Te=!!Se.isInverse();if(Te){const Ue=ht;ht=Le,Le=Ue;const Gt=dt;dt=ge,ge=Gt}let Fe,st,_t,mt=!1;switch(this._decorationService.forEachDecorationAtCell(Re,T,void 0,(Ue=>{Ue.options.layer!=="top"&&mt||(Ue.backgroundColorRGB&&(ge=50331648,Le=Ue.backgroundColorRGB.rgba>>8&16777215,Fe=Ue.backgroundColorRGB),Ue.foregroundColorRGB&&(dt=50331648,ht=Ue.foregroundColorRGB.rgba>>8&16777215,st=Ue.foregroundColorRGB),mt=Ue.options.layer==="top")})),!mt&&at&&(Fe=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,Le=Fe.rgba>>8&16777215,ge=50331648,mt=!0,B.selectionForeground&&(dt=50331648,ht=B.selectionForeground.rgba>>8&16777215,st=B.selectionForeground)),mt&&fe.push("xterm-decoration-top"),ge){case 16777216:case 33554432:_t=B.ansi[Le],fe.push(`xterm-bg-${Le}`);break;case 50331648:_t=k.channels.toColor(Le>>16,Le>>8&255,255&Le),this._addStyle(L,`background-color:#${N((Le>>>0).toString(16),"0",6)}`);break;default:Te?(_t=B.foreground,fe.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):_t=B.background}switch(Fe||Se.isDim()&&(Fe=k.color.multiplyOpacity(_t,.5)),dt){case 16777216:case 33554432:Se.isBold()&&ht<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ht+=8),this._applyMinimumContrast(L,_t,B.ansi[ht],Se,Fe,void 0)||fe.push(`xterm-fg-${ht}`);break;case 50331648:const Ue=k.channels.toColor(ht>>16&255,ht>>8&255,255&ht);this._applyMinimumContrast(L,_t,Ue,Se,Fe,st)||this._addStyle(L,`color:#${N(ht.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,_t,B.foreground,Se,Fe,st)||Te&&fe.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}fe.length&&(L.className=fe.join(" "),fe.length=0),et||Qe||wt?L.textContent=K:U++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Re=qe}return L&&U&&(L.textContent=K),J}_applyMinimumContrast(z,T,j,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const $=this._getContrastCache(M);let q;if(D||I||(q=$.getColor(T.rgba,j.rgba)),q===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);q=k.color.ensureContrastRatio(D||T,I||j,H),$.setColor((D||T).rgba,(I||j).rgba,q??null)}return!!q&&(this._addStyle(z,`color:${q.css}`),!0)}_getContrastCache(z){return z.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(z,T){z.setAttribute("style",`${z.getAttribute("style")||""}${T};`)}_isCellInSelection(z,T){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?z>=j[0]&&T>=j[1]&&z=j[1]&&z>=M[0]&&T<=M[1]:T>j[1]&&T=j[0]&&z=j[0])}};function N(z,T,j){for(;z.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 h=c.createElement("span");h.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[h,_,p,m],this._container.appendChild(h),this._container.appendChild(_),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(c,u,h,_){c===this._font&&u===this._fontSize&&h===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,h){let _=0;if(!u&&!h&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const x=this._measure(c,0);return x>0&&(this._flat[_]=x),x}let p=c;u&&(p+="B"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),h&&(x|=2),m=this._measure(c,x),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.offsetWidth/32}}},2223:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function c(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(x){return 57344<=x&&x<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(_){return 9472<=_&&_<=9631})(h)},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(h,_,p=0){return(h-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{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(h,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const x=h.buffers.active.ydisp,k=_[1]-x,v=p[1]-x,b=Math.max(k,0),w=Math.min(v,h.rows-1);b>=h.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(h,_,p){return!!this.hasSelection&&(p-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let x=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};o.CharSizeService=x=u([h(2,_.IOptionsService)],x);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class v extends k{constructor(y,C,N){super(),this._document=y,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 b extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),x=c(2585);class k extends _.AttributeData{constructor(w,y,C){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class WI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const $=this._getJoinedRanges(N,j,T,y,z);for(let q=0;q<$.length;q++)C.push($[q])}z=I,j=T,M=this._workCell.fg,D=this._workCell.bg}T+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-z>1){const I=this._getJoinedRanges(N,j,T,y,z);for(let $=0;${Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),_=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,h.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(k){this._window!==k&&(this._window=k,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(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new h.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(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=c(844);class h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(x,k,v,b){var w,y=arguments.length,C=y<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,k,v,b);else for(var N=x.length-1;N>=0;N--)(w=x[N])&&(C=(y<3?w(C):y>3?w(k,v,C):w(k,v))||C);return y>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(x,k){return function(v,b){k(v,b,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const _=c(4725),p=c(9806);let m=o.MouseService=class{constructor(x,k){this._renderService=x,this._charSizeService=k}getCoords(x,k,v,b,w){return(0,p.getCoords)(window,x,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(x,k){const v=(0,p.getCoordsRelativeToElement)(window,x,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([h(0,_.IRenderService),h(1,_.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),x=c(844),k=c(7226),v=c(2585);let b=o.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,C,N,z,T,j,M){super(),this._rowCount=w,this._charSizeService=N,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new k.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 _.RenderDebouncer(((D,I)=>this._renderRows(D,I)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var D;return(D=this._renderer.value)==null?void 0:D.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(z.onDecorationRegistered((()=>this._fullRefresh()))),this.register(z.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,y),this.register(j.onWindowChange((D=>this._registerIntersectionObserver(D,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const C=new w.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.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(w,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,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(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,C){var N;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(w,y,C)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(j,M,D,I){var $,q=arguments.length,H=q<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(j,M,D,I);else for(var Q=j.length-1;Q>=0;Q--)($=j[Q])&&(H=(q<3?$(H):q>3?$(M,D,H):$(M,D))||H);return q>3&&H&&Object.defineProperty(M,D,H),H},h=this&&this.__param||function(j,M){return function(D,I){M(D,I,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),x=c(4725),k=c(8460),v=c(844),b=c(6114),w=c(4841),y=c(511),C=c(2585),N=" ",z=new RegExp(N,"g");let T=o.SelectionService=class extends v.Disposable{constructor(j,M,D,I,$,q,H,Q,V){super(),this._element=j,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=$,this._mouseService=q,this._optionsService=H,this._renderService=Q,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.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 j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const $=j[0]$.replace(z," "))).join(b.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,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 c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),h=c(3656),_=c(3551),p=c(9042),m=c(3730),x=c(1680),k=c(3107),v=c(5744),b=c(2950),w=c(1296),y=c(428),C=c(4269),N=c(5114),z=c(8934),T=c(3230),j=c(9312),M=c(4725),D=c(6731),I=c(8055),$=c(8969),q=c(8460),H=c(844),Q=c(6114),V=c(8437),J=c(2584),Z=c(7399),B=c(5941),L=c(9074),F=c(2585),U=c(5435),K=c(4567),ne=c(779);class ce extends $.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=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ne.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(((G,oe)=>this.refresh(G,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,H.toDisposable)((()=>{var G,oe;this._customKeyEventHandler=void 0,(oe=(G=this.element)==null?void 0:G.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const G of se){let oe,le="";switch(G.index){case 256:oe="foreground",le="10";break;case 257:oe="background",le="11";break;case 258:oe="cursor",le="12";break;default:oe="ansi",le="4;"+G.index}switch(G.type){case 0:const pe=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,B.toRgbString)(pe)}${J.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((be=>be.ansi[G.index]=I.channels.toColor(...G.color)));else{const be=oe;this._themeService.modifyColors((Me=>Me[be]=I.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.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(K.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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(J.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,G=this.buffer.lines.get(se);if(!G)return;const oe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,pe=G.getWidth(oe),be=this._renderService.dimensions.css.cell.width*pe,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,we=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=we+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=be+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,u.copyHandler)(G,this._selectionService)})));const se=G=>(0,u.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,u.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var oe;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"),((oe=this.element)==null?void 0:oe.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 G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.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(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.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(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(z.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(G);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((le=>this.scrollLines(le.amount,le.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(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),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(K.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,G=this.element;function oe(be){const Me=se._mouseService.getMouseReportCoords(be,se.screenElement);if(!Me)return!1;let we,qe;switch(be.overrideType||be.type){case"mousemove":qe=32,be.buttons===void 0?(we=3,be.button!==void 0&&(we=be.button<3?be.button:3)):we=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":qe=0,we=be.button<3?be.button:3;break;case"mousedown":qe=1,we=be.button<3?be.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(be)===!1||se.viewport.getLinesScrolled(be)===0)return!1;qe=be.deltaY<0?0:1,we=4;break;default:return!1}return!(qe===void 0||we===void 0||we>4)&&se.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:we,action:qe,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:be=>(oe(be),be.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(be)),wheel:be=>(oe(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&oe(be)},mousemove:be=>{be.buttons||oe(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),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&be?le.mousemove||(G.addEventListener("mousemove",pe.mousemove),le.mousemove=pe.mousemove):(G.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&be?le.wheel||(G.addEventListener("wheel",pe.wheel,{passive:!1}),le.wheel=pe.wheel):(G.removeEventListener("wheel",le.wheel),le.wheel=null),2&be?le.mouseup||(le.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&be?le.mousedrag||(le.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(G,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return oe(be),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(be)}))),this.register((0,h.addDisposableDomListener)(G,"wheel",(be=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(be);if(Me===0)return;const we=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let qe="";for(let He=0;He{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(G,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(se,G){var oe;(oe=this._renderService)==null||oe.refreshRows(se,G)}updateCursorStyle(se){var G;(G=this._selectionService)!=null&&G.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,G,oe=0){var le;oe===1?(super.scrollLines(se,G,oe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.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 G=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),G}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,G,oe){this._selectionService.setSelection(se,G,oe)}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,G){var oe;(oe=this._selectionService)==null||oe.selectLines(se,G)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!G&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,Z.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){const le=this.rows-1;return this.scrollLines(oe.type===2?-le:le),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.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):(oe.key!==J.C0.ETX&&oe.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,G){const oe=se.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||se.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||se.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?oe:oe&&(!G.keyCode||G.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)G=se.charCode;else if(se.which===null||se.which===void 0)G=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;G=se.which}return!(!G||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(G,!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 G=se.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(se),!0}return!1}resize(se,G){se!==this.cols||G!==this.rows?super.resize(se,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,G){var oe,le;(oe=this._charSizeService)==null||oe.measure(),(le=this.viewport)==null||le.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 G=1;G{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-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 c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),x=c(844),k=c(2585);let v=o.Viewport=class extends x.Disposable{constructor(b,w,y,C,N,z,T,j){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=C,this._charSizeService=N,this._renderService=z,this._coreBrowserService=T,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,_.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(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=$),C=""}}return{bufferElements:N,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let x=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,b,w,y){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,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 k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=k==null?void 0:k.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=k.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=x=u([h(1,m.IBufferService),h(2,_.ICoreBrowserService),h(3,m.IDecorationService),h(4,_.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(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,o,c){var u=this&&this.__decorate||function(y,C,N,z){var T,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,z);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,z){C(N,z,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),x=c(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,N,z,T,j,M){var I;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=N,this._decorationService=z,this._renderService=T,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new _.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 D=this._canvas.getContext("2d");if(!D)throw new Error("Ctx cannot be null");this._ctx=D,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var $;($=this._canvas)==null||$.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=C,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||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=w=u([h(2,x.IBufferService),h(3,x.IDecorationService),h(4,p.IRenderService),h(5,x.IOptionsService),h(6,p.ICoreBrowserService)],w)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var z=k.length-1;z>=0;z--)(y=k[z])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let x=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,b,w,y,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,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(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=x=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,_.IRenderService)],x)},9806:(a,o)=>{function c(u,h,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),x=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-x,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,_,p,m,x,k,v,b){if(!x)return;const w=c(u,h,_);return w?(w[0]=Math.ceil((w[0]+(b?k/2:0))/k),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,w,y){const C=v-_(v,w),N=b-_(b,w),z=Math.abs(C-N)-(function(T,j,M){let D=0;const I=T-_(T,M),$=j-_(j,M);for(let q=0;q=0&&vb?"A":"B"}function m(v,b,w,y,C,N){let z=v,T=b,j="";for(;z!==w||T!==y;)z+=C?1:-1,C&&z>N.cols-1?(j+=N.buffer.translateBufferLineToString(T,!1,v,z),z=0,v=0,T++):!C&&z<0&&(j+=N.buffer.translateBufferLineToString(T,!1,0,v+1),z=N.cols-1,v=z,T--);return j+N.buffer.translateBufferLineToString(T,!1,v,z)}function x(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function k(v,b){v=Math.floor(v);let w="";for(let y=0;y0?I-_(I,$):M;const Q=I,V=(function(J,Z,B,L,F,U){let K;return K=h(B,L,F,U).length>0?L-_(L,F):Z,J=B&&Kv?"D":"C",k(Math.abs(C-v),x(z,y));z=N>b?"D":"C";const T=Math.abs(N-b);return k((function(j,M){return M.cols-j})(N>b?v:C,w)+(T-1)*w.cols+1+((N>b?C:v)-1),x(z,y))}},1296:function(a,o,c){var u=this&&this.__decorate||function(q,H,Q,V){var J,Z=arguments.length,B=Z<3?H:V===null?V=Object.getOwnPropertyDescriptor(H,Q):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(q,H,Q,V);else for(var L=q.length-1;L>=0;L--)(J=q[L])&&(B=(Z<3?J(B):Z>3?J(H,Q,B):J(H,Q))||B);return Z>3&&B&&Object.defineProperty(H,Q,B),B},h=this&&this.__param||function(q,H){return function(Q,V){H(Q,V,q)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),x=c(6171),k=c(6052),v=c(4725),b=c(8055),w=c(8460),y=c(844),C=c(2585),N="xterm-dom-renderer-owner-",z="xterm-rows",T="xterm-fg-",j="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,$=o.DomRenderer=class extends y.Disposable{constructor(q,H,Q,V,J,Z,B,L,F,U,K,ne,ce){super(),this._terminal=q,this._document=H,this._element=Q,this._screenElement=V,this._viewportElement=J,this._helperContainer=Z,this._linkifier2=B,this._charSizeService=F,this._optionsService=U,this._bufferService=K,this._coreBrowserService=ne,this._themeService=ce,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(z),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(D),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((_e=>this._injectCss(_e)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((_e=>this._handleLinkHover(_e)))),this.register(this._linkifier2.onHideLinkUnderline((_e=>this._handleLinkLeave(_e)))),this.register((0,y.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),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 Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${z} 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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${z} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${z} .xterm-dim { color: ${b.color.multiplyOpacity(q.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 Q=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${V} { 50% { box-shadow: none; }}`,H+=`@keyframes ${J} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,H+=`${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[Z,B]of q.ansi.entries())H+=`${this._terminalSelector} .${T}${Z} { color: ${B.css}; }${this._terminalSelector} .${T}${Z}.xterm-dim { color: ${b.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${j}${Z} { background-color: ${B.css}; }`;H+=`${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(q.background).css}; }${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,H){for(let Q=this._rowElements.length;Q<=H;Q++){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(q,H){this._refreshRowElements(q,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(q,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,H,Q),this.renderRows(0,this._bufferService.rows-1),!q||!H)return;this._selectionRenderModel.update(this._terminal,q,H,Q);const V=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,Z=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(Z>=this._bufferService.rows||B<0)return;const L=this._document.createDocumentFragment();if(Q){const F=q[0]>H[0];L.appendChild(this._createSelectionElement(Z,F?H[0]:q[0],F?q[0]:H[0],B-Z+1))}else{const F=V===Z?q[0]:0,U=Z===J?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Z,F,U));const K=B-Z-1;if(L.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,K)),Z!==B){const ne=J===B?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,0,ne))}}this._selectionContainer.appendChild(L)}_createSelectionElement(q,H,Q,V=1){const J=this._document.createElement("div"),Z=H*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(Q-H);return Z+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-Z),J.style.height=V*this.dimensions.css.cell.height+"px",J.style.top=q*this.dimensions.css.cell.height+"px",J.style.left=`${Z}px`,J.style.width=`${B}px`,J}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 q of this._rowElements)q.replaceChildren()}renderRows(q,H){const Q=this._bufferService.buffer,V=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=q;F<=H;F++){const U=F+Q.ydisp,K=this._rowElements[F],ne=Q.lines.get(U);if(!K||!ne)break;K.replaceChildren(...this._rowFactory.createRow(ne,U,U===V,B,L,J,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,H,Q,V,J,Z){Q<0&&(q=0),V<0&&(H=0);const B=this._bufferService.rows-1;Q=Math.max(Math.min(Q,B),0),V=Math.max(Math.min(V,B),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,U=Math.min(L.x,J-1),K=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let _e=Q;_e<=V;++_e){const se=_e+L.ydisp,G=this._rowElements[_e],oe=L.lines.get(se);if(!G||!oe)break;G.replaceChildren(...this._rowFactory.createRow(oe,se,se===F,ne,ce,U,K,this.dimensions.css.cell.width,this._widthCache,Z?_e===Q?q:0:-1,Z?(_e===V?H:J)-1:-1))}}};o.DomRenderer=$=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],$)},3787:function(a,o,c){var u=this&&this.__decorate||function(z,T,j,M){var D,I=arguments.length,$=I<3?T:M===null?M=Object.getOwnPropertyDescriptor(T,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(z,T,j,M);else for(var q=z.length-1;q>=0;q--)(D=z[q])&&($=(I<3?D($):I>3?D(T,j,$):D(T,j))||$);return I>3&&$&&Object.defineProperty(T,j,$),$},h=this&&this.__param||function(z,T){return function(j,M){T(j,M,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),x=c(2585),k=c(8055),v=c(4725),b=c(4269),w=c(6171),y=c(3734);let C=o.DomRendererRowFactory=class{constructor(z,T,j,M,D,I,$){this._document=z,this._characterJoinerService=T,this._optionsService=j,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=$,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(z,T,j){this._selectionStart=z,this._selectionEnd=T,this._columnSelectMode=j}createRow(z,T,j,M,D,I,$,q,H,Q,V){const J=[],Z=this._characterJoinerService.getJoinedCharacters(T),B=this._themeService.colors;let L,F=z.getNoBgTrimmedLength();j&&F0&&Me===Z[0][0]){qe=!0;const gt=Z.shift();Ce=new b.JoinedCellData(this._workCell,z.translateToString(!0,gt[0],gt[1]),gt[1]-gt[0]),He=gt[1]-1,we=Ce.getWidth()}const ot=this._isCellInSelection(Me,T),Qe=j&&Me===I,it=be&&Me>=Q&&Me<=V;let Ct=!1;this._decorationService.forEachDecorationAtCell(Me,T,void 0,(gt=>{Ct=!0}));let Ht=Ce.getChars()||p.WHITESPACE_CELL_CHAR;if(Ht===" "&&(Ce.isUnderline()||Ce.isOverline())&&(Ht=" "),le=we*q-H.get(Ht,Ce.isBold(),Ce.isItalic()),L){if(U&&(ot&&oe||!ot&&!oe&&Ce.bg===ne)&&(ot&&oe&&B.selectionForeground||Ce.fg===ce)&&Ce.extended.ext===_e&&it===se&&le===G&&!Qe&&!qe&&!Ct){Ce.isInvisible()?K+=p.WHITESPACE_CELL_CHAR:K+=Ht,U++;continue}U&&(L.textContent=K),L=this._document.createElement("span"),U=0,K=""}else L=this._document.createElement("span");if(ne=Ce.bg,ce=Ce.fg,_e=Ce.extended.ext,se=it,G=le,oe=ot,qe&&I>=Me&&I<=He&&(I=Me),!this._coreService.isCursorHidden&&Qe&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)$&&pe.push("xterm-cursor-blink"),pe.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if(Ce.isBold()&&pe.push("xterm-bold"),Ce.isItalic()&&pe.push("xterm-italic"),Ce.isDim()&&pe.push("xterm-dim"),K=Ce.isInvisible()?p.WHITESPACE_CELL_CHAR:Ce.getChars()||p.WHITESPACE_CELL_CHAR,Ce.isUnderline()&&(pe.push(`xterm-underline-${Ce.extended.underlineStyle}`),K===" "&&(K=" "),!Ce.isUnderlineColorDefault()))if(Ce.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Ce.getUnderlineColor()).join(",")})`;else{let gt=Ce.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ce.isBold()&><8&&(gt+=8),L.style.textDecorationColor=B.ansi[gt].css}Ce.isOverline()&&(pe.push("xterm-overline"),K===" "&&(K=" ")),Ce.isStrikethrough()&&pe.push("xterm-strikethrough"),it&&(L.style.textDecoration="underline");let pt=Ce.getFgColor(),_t=Ce.getFgColorMode(),Le=Ce.getBgColor(),me=Ce.getBgColorMode();const Ae=!!Ce.isInverse();if(Ae){const gt=pt;pt=Le,Le=gt;const Kt=_t;_t=me,me=Kt}let Be,rt,ft,St=!1;switch(this._decorationService.forEachDecorationAtCell(Me,T,void 0,(gt=>{gt.options.layer!=="top"&&St||(gt.backgroundColorRGB&&(me=50331648,Le=gt.backgroundColorRGB.rgba>>8&16777215,Be=gt.backgroundColorRGB),gt.foregroundColorRGB&&(_t=50331648,pt=gt.foregroundColorRGB.rgba>>8&16777215,rt=gt.foregroundColorRGB),St=gt.options.layer==="top")})),!St&&ot&&(Be=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,Le=Be.rgba>>8&16777215,me=50331648,St=!0,B.selectionForeground&&(_t=50331648,pt=B.selectionForeground.rgba>>8&16777215,rt=B.selectionForeground)),St&&pe.push("xterm-decoration-top"),me){case 16777216:case 33554432:ft=B.ansi[Le],pe.push(`xterm-bg-${Le}`);break;case 50331648:ft=k.channels.toColor(Le>>16,Le>>8&255,255&Le),this._addStyle(L,`background-color:#${N((Le>>>0).toString(16),"0",6)}`);break;default:Ae?(ft=B.foreground,pe.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):ft=B.background}switch(Be||Ce.isDim()&&(Be=k.color.multiplyOpacity(ft,.5)),_t){case 16777216:case 33554432:Ce.isBold()&&pt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(pt+=8),this._applyMinimumContrast(L,ft,B.ansi[pt],Ce,Be,void 0)||pe.push(`xterm-fg-${pt}`);break;case 50331648:const gt=k.channels.toColor(pt>>16&255,pt>>8&255,255&pt);this._applyMinimumContrast(L,ft,gt,Ce,Be,rt)||this._addStyle(L,`color:#${N(pt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,ft,B.foreground,Ce,Be,rt)||Ae&&pe.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}pe.length&&(L.className=pe.join(" "),pe.length=0),Qe||qe||Ct?L.textContent=K:U++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Me=He}return L&&U&&(L.textContent=K),J}_applyMinimumContrast(z,T,j,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const $=this._getContrastCache(M);let q;if(D||I||(q=$.getColor(T.rgba,j.rgba)),q===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);q=k.color.ensureContrastRatio(D||T,I||j,H),$.setColor((D||T).rgba,(I||j).rgba,q??null)}return!!q&&(this._addStyle(z,`color:${q.css}`),!0)}_getContrastCache(z){return z.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(z,T){z.setAttribute("style",`${z.getAttribute("style")||""}${T};`)}_isCellInSelection(z,T){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?z>=j[0]&&T>=j[1]&&z=j[1]&&z>=M[0]&&T<=M[1]:T>j[1]&&T=j[0]&&z=j[0])}};function N(z,T,j){for(;z.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 h=c.createElement("span");h.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[h,_,p,m],this._container.appendChild(h),this._container.appendChild(_),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(c,u,h,_){c===this._font&&u===this._fontSize&&h===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,h){let _=0;if(!u&&!h&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const x=this._measure(c,0);return x>0&&(this._flat[_]=x),x}let p=c;u&&(p+="B"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),h&&(x|=2),m=this._measure(c,x),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.offsetWidth/32}}},2223:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function c(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(x){return 57344<=x&&x<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(_){return 9472<=_&&_<=9631})(h)},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(h,_,p=0){return(h-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{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(h,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const x=h.buffers.active.ydisp,k=_[1]-x,v=p[1]-x,b=Math.max(k,0),w=Math.min(v,h.rows-1);b>=h.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(h,_,p){return!!this.hasSelection&&(p-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let x=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};o.CharSizeService=x=u([h(2,_.IOptionsService)],x);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class v extends k{constructor(y,C,N){super(),this._document=y,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 b extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,w,y,C){var N,z=arguments.length,T=z<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(z<3?N(T):z>3?N(w,y,T):N(w,y))||T);return z>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),x=c(2585);class k extends _.AttributeData{constructor(w,y,C){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class QI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const $=this._getJoinedRanges(N,j,T,y,z);for(let q=0;q<$.length;q++)C.push($[q])}z=I,j=T,M=this._workCell.fg,D=this._workCell.bg}T+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-z>1){const I=this._getJoinedRanges(N,j,T,y,z);for(let $=0;${Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),_=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,h.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(k){this._window!==k&&(this._window=k,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(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new h.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(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=c(844);class h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(x,k,v,b){var w,y=arguments.length,C=y<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,k,v,b);else for(var N=x.length-1;N>=0;N--)(w=x[N])&&(C=(y<3?w(C):y>3?w(k,v,C):w(k,v))||C);return y>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(x,k){return function(v,b){k(v,b,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const _=c(4725),p=c(9806);let m=o.MouseService=class{constructor(x,k){this._renderService=x,this._charSizeService=k}getCoords(x,k,v,b,w){return(0,p.getCoords)(window,x,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(x,k){const v=(0,p.getCoordsRelativeToElement)(window,x,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([h(0,_.IRenderService),h(1,_.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),x=c(844),k=c(7226),v=c(2585);let b=o.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,C,N,z,T,j,M){super(),this._rowCount=w,this._charSizeService=N,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new k.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 _.RenderDebouncer(((D,I)=>this._renderRows(D,I)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var D;return(D=this._renderer.value)==null?void 0:D.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(z.onDecorationRegistered((()=>this._fullRefresh()))),this.register(z.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,y),this.register(j.onWindowChange((D=>this._registerIntersectionObserver(D,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const C=new w.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.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(w,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,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(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,C){var N;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(w,y,C)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(j,M,D,I){var $,q=arguments.length,H=q<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(j,M,D,I);else for(var Q=j.length-1;Q>=0;Q--)($=j[Q])&&(H=(q<3?$(H):q>3?$(M,D,H):$(M,D))||H);return q>3&&H&&Object.defineProperty(M,D,H),H},h=this&&this.__param||function(j,M){return function(D,I){M(D,I,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),x=c(4725),k=c(8460),v=c(844),b=c(6114),w=c(4841),y=c(511),C=c(2585),N=" ",z=new RegExp(N,"g");let T=o.SelectionService=class extends v.Disposable{constructor(j,M,D,I,$,q,H,Q,V){super(),this._element=j,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=$,this._mouseService=q,this._optionsService=H,this._renderService=Q,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.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 j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const $=j[0]$.replace(z," "))).join(b.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&j&&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(j){const M=this._getMouseBufferCoords(j),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(j,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([j,M],D,I)}_areCoordsInSelection(j,M,D){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var $,q;const D=(q=($=this._linkifier.currentLink)==null?void 0:$.link)==null?void 0:q.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(j);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=D?0:(M>D&&(M-=D),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return b.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),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(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!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(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.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(j),!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 D=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(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);D?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,D)}_fireOnSelectionChange(j,M,D){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let D=M;for(let I=0;M>=I;I++){const $=j.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:$>1&&M!==I&&(D+=$-1)}return D}setSelection(j,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,D=!0,I=!0){if(j[0]>=this._bufferService.cols)return;const $=this._bufferService.buffer,q=$.lines.get(j[1]);if(!q)return;const H=$.translateBufferLineToString(j[1],!1);let Q=this._convertViewportColToCharacterIndex(q,j[0]),V=Q;const J=j[0]-Q;let Z=0,B=0,L=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;V1&&(F+=_e-1,V+=_e-1);ne>0&&Q>0&&!this._isCharWordSeparator(q.loadCell(ne-1,this._workCell));){q.loadCell(ne-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,ne--):se>1&&(L+=se-1,Q-=se-1),Q--,ne--}for(;ce1&&(F+=se-1,V+=se-1),V++,ce++}}V++;let U=Q+J-Z+L,K=Math.min(this._bufferService.cols,V-Q+Z+B-L-F);if(M||H.slice(Q,V).trim()!==""){if(D&&U===0&&q.getCodePoint(0)!==32){const ne=$.lines.get(j[1]-1);if(ne&&q.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(ce){const _e=this._bufferService.cols-ce.start;U-=_e,K+=_e}}}if(I&&U+K===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ne=$.lines.get(j[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const ce=this._getWordAt([0,j[1]+1],!1,!1,!0);ce&&(K+=ce.length)}}return{start:U,length:K}}}_selectWordAt(j,M){const D=this._getWordAt(j,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[D.start,j[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let D=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,D]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),D={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,w.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=T=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,x.IMouseService),h(6,C.IOptionsService),h(7,x.IRenderService),h(8,x.ICoreBrowserService)],T)},4725:(a,o,c)=>{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=c(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,c){var u=this&&this.__decorate||function(T,j,M,D){var I,$=arguments.length,q=$<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(T,j,M,D);else for(var H=T.length-1;H>=0;H--)(I=T[H])&&(q=($<3?I(q):$>3?I(j,M,q):I(j,M))||q);return $>3&&q&&Object.defineProperty(j,M,q),q},h=this&&this.__param||function(T,j){return function(M,D){j(M,D,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),x=c(844),k=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[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")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=j[M/36%6|0],I=j[M/6%6|0],$=j[M%6];T.push({css:p.channels.toCss(D,I,$),rgba:p.channels.toRgba(D,I,$)})}for(let M=0;M<24;M++){const D=8+10*M;T.push({css:p.channels.toCss(D,D,D),rgba:p.channels.toRgba(D,D,D)})}return T})());let N=o.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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(T={}){const j=this._colors;if(j.foreground=z(T.foreground,v),j.background=z(T.background,b),j.cursor=z(T.cursor,w),j.cursorAccent=z(T.cursorAccent,y),j.selectionBackgroundTransparent=z(T.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=z(T.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=T.selectionForeground?z(T.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=z(T.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=z(T.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=z(T.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=z(T.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=z(T.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=z(T.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=z(T.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=z(T.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=z(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=z(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=z(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=z(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=z(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=z(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=z(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=z(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const M=Math.min(j.ansi.length-16,T.extendedAnsi.length);for(let D=0;D{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),h=c(844);class _ extends h.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 k=0;kthis._length)for(let x=this._length;x=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,k){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let b=x-1;b>=0;b--)this.set(m+b+k,this.get(m+b));const v=m+x+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,h=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=h<=1?u[p]:u[p]&&c(u[p],h-1);return _}},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 c=0,u=0,h=0,_=0;var p,m,x,k,v;function b(y){const C=y.toString(16);return C.length<2?"0"+C:C}function w(y,C){return y>>0},y.toColor=function(C,N,z,T){return{css:y.toCss(C,N,z,T),rgba:y.toRgba(C,N,z,T)}}})(p||(o.channels=p={})),(function(y){function C(N,z){return _=Math.round(255*z),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,_),rgba:p.toRgba(c,u,h,_)}}y.blend=function(N,z){if(_=(255&z.rgba)/255,_===1)return{css:z.css,rgba:z.rgba};const T=z.rgba>>24&255,j=z.rgba>>16&255,M=z.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,$=N.rgba>>8&255;return c=D+Math.round((T-D)*_),u=I+Math.round((j-I)*_),h=$+Math.round((M-$)*_),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},y.isOpaque=function(N){return(255&N.rgba)==255},y.ensureContrastRatio=function(N,z,T){const j=v.ensureContrastRatio(N.rgba,z.rgba,T);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},y.opaque=function(N){const z=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(z),{css:p.toCss(c,u,h),rgba:z}},y.opacity=C,y.multiplyOpacity=function(N,z){return _=255&N.rgba,C(N,_*z/255)},y.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(y){let C,N;try{const z=document.createElement("canvas");z.width=1,z.height=1;const T=z.getContext("2d",{willReadFrequently:!0});T&&(C=T,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(z){if(z.match(/#[\da-f]{3,8}/i))switch(z.length){case 4:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),h=parseInt(z.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),h=parseInt(z.slice(3,4).repeat(2),16),_=parseInt(z.slice(4,5).repeat(2),16),p.toColor(c,u,h,_);case 7:return{css:z,rgba:(parseInt(z.slice(1),16)<<8|255)>>>0};case 9:return{css:z,rgba:parseInt(z.slice(1),16)>>>0}}const T=z.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return c=parseInt(T[1]),u=parseInt(T[2]),h=parseInt(T[3]),_=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),p.toColor(c,u,h,_);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=z,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,_),css:z}}})(x||(o.css=x={})),(function(y){function C(N,z,T){const j=N/255,M=z/255,D=T/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))}y.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},y.relativeLuminance2=C})(k||(o.rgb=k={})),(function(y){function C(z,T,j){const M=z>>24&255,D=z>>16&255,I=z>>8&255;let $=T>>24&255,q=T>>16&255,H=T>>8&255,Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));for(;Q0||q>0||H>0);)$-=Math.max(0,Math.ceil(.1*$)),q-=Math.max(0,Math.ceil(.1*q)),H-=Math.max(0,Math.ceil(.1*H)),Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));return($<<24|q<<16|H<<8|255)>>>0}function N(z,T,j){const M=z>>24&255,D=z>>16&255,I=z>>8&255;let $=T>>24&255,q=T>>16&255,H=T>>8&255,Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));for(;Q>>0}y.blend=function(z,T){if(_=(255&T)/255,_===1)return T;const j=T>>24&255,M=T>>16&255,D=T>>8&255,I=z>>24&255,$=z>>16&255,q=z>>8&255;return c=I+Math.round((j-I)*_),u=$+Math.round((M-$)*_),h=q+Math.round((D-q)*_),p.toRgba(c,u,h)},y.ensureContrastRatio=function(z,T,j){const M=k.relativeLuminance(z>>8),D=k.relativeLuminance(T>>8);if(w(M,D)>8));if(Hw(M,k.relativeLuminance(Q>>8))?q:Q}return q}const I=N(z,T,j),$=w(M,k.relativeLuminance(I>>8));if($w(M,k.relativeLuminance(q>>8))?I:q}return I}},y.reduceLuminance=C,y.increaseLuminance=N,y.toChannels=function(z){return[z>>24&255,z>>16&255,z>>8&255,255&z]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=w},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),_=c(4348),p=c(7866),m=c(744),x=c(7302),k=c(6975),v=c(8460),b=c(1753),w=c(1480),y=c(7994),C=c(9282),N=c(5435),z=c(5981),T=c(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var $;($=this._onScrollApi)==null||$.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 $ in I)this.optionsService.options[$]=I[$]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new x.OptionsService(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(h.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,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.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(($=>{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(($=>{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 z.WriteBuffer((($,q)=>this._inputHandler.parse($,q)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,$){this._writeBuffer.write(I,$)}writeSync(I,$){this._logService.logLevel<=h.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(I,$)}input(I,$=!0){this.coreService.triggerDataEvent(I,$)}resize(I,$){isNaN(I)||isNaN($)||(I=Math.max(I,m.MINIMUM_COLS),$=Math.max($,m.MINIMUM_ROWS),this._bufferService.resize(I,$))}scroll(I,$=!1){this._bufferService.scroll(I,$)}scrollLines(I,$,q){this._bufferService.scrollLines(I,$,q)}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 $=I-this._bufferService.buffer.ydisp;$!==0&&this.scrollLines($)}registerEscHandler(I,$){return this._inputHandler.registerEscHandler(I,$)}registerDcsHandler(I,$){return this._inputHandler.registerDcsHandler(I,$)}registerCsiHandler(I,$){return this._inputHandler.registerCsiHandler(I,$)}registerOscHandler(I,$){return this._inputHandler.registerOscHandler(I,$)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const $=this.optionsService.rawOptions.windowsPty;$&&$.buildNumber!==void 0&&$.buildNumber!==void 0?I=$.backend==="conpty"&&$.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 $ of I)$.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=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(Z,B,L,F){var U,K=arguments.length,ne=K<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(Z,B,L,F);else for(var ce=Z.length-1;ce>=0;ce--)(U=Z[ce])&&(ne=(K<3?U(ne):K>3?U(B,L,ne):U(B,L))||ne);return K>3&&ne&&Object.defineProperty(B,L,ne),ne},h=this&&this.__param||function(Z,B){return function(L,F){B(L,F,Z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),x=c(844),k=c(482),v=c(8437),b=c(8460),w=c(643),y=c(511),C=c(3734),N=c(2585),z=c(1480),T=c(6242),j=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function $(Z,B){if(Z>24)return B.setWinLines||!1;switch(Z){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var q;(function(Z){Z[Z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Z[Z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(o.WindowsOptionsReportType=q={}));let H=0;class Q extends x.Disposable{getAttrData(){return this._curAttrData}constructor(B,L,F,U,K,ne,ce,_e,se=new m.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=L,this._coreService=F,this._logService=U,this._optionsService=K,this._oscLinkService=ne,this._coreMouseService=ce,this._unicodeService=_e,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:oe.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,oe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:oe,data:le})})),this._parser.setDcsHandlerFallback(((G,oe,le)=>{oe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:oe,payload:le})})),this._parser.setPrintHandler(((G,oe,le)=>this.print(G,oe,le))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new T.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new T.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new T.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new T.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new T.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new T.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new T.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new T.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new T.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new T.OscHandler((G=>this.restoreCursorColor(G)))),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 G in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((G,oe)=>this.requestStatusString(G,oe))))}_preserveStack(B,L,F,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=U}_logSlowResolvingAsync(B){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([B,new Promise(((L,F)=>setTimeout((()=>F("#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(B,L){let F,U=this._activeBuffer.x,K=this._activeBuffer.y,ne=0;const ce=this._parseStack.paused;if(ce){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;U=this._parseStack.cursorStartX,K=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>I&&(ne=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(G=>String.fromCharCode(G))).join("")}"`),typeof B=="string"?B.split("").map((G=>G.charCodeAt(0))):B),this._parseBuffer.lengthI)for(let G=ne;G0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let fe=this._parser.precedingJoinState;for(let me=L;me_e){if(se){const qe=le;let Se=this._activeBuffer.x-Qe;for(this._activeBuffer.x=Qe,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Qe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(qe,Se,0,Qe,!1);Se<_e;)qe.setCellFromCodepoint(Se++,0,1,oe)}else if(this._activeBuffer.x=_e-1,K===2)continue}if(Oe&&this._activeBuffer.x){const qe=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-qe,U,K);for(let Se=K-Qe;--Se>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(G&&(le.insertCells(this._activeBuffer.x,K-Qe,this._activeBuffer.getNullCell(oe)),le.getWidth(_e-1)===2&&le.setCellFromCodepoint(_e-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),le.setCellFromCodepoint(this._activeBuffer.x++,U,K,oe),K>0)for(;--K;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=fe,this._activeBuffer.x<_e&&F-L>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,L){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,L):this._parser.registerCsiHandler(B,(F=>!$(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new j.DcsHandler(L))}registerEscHandler(B,L){return this._parser.registerEscHandler(B,L)}registerOscHandler(B,L){return this._parser.registerOscHandler(B,new T.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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=B,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+L)}cursorUp(B){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const L=B.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const L=B.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,L,F,U=!1,K=!1){const ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);ne.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),K),U&&(ne.isWrapped=!1)}_resetBufferLine(B,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),F.isWrapped=!1)}eraseInDisplay(B,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine(B,L=!1){switch(this._restrictCursor(this._bufferService.cols),B.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(B){this._restrictCursor();let L=B.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=_e;for(let G=1;G0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let L=0;LOe?1:2,fe=B.params[0];return me=fe,Re=L?fe===2?4:fe===4?le(ne.modes.insertMode):fe===12?3:fe===20?le(oe.convertEol):0:fe===1?le(F.applicationCursorKeys):fe===3?oe.windowOptions.setWinLines?_e===80?2:_e===132?1:0:0:fe===6?le(F.origin):fe===7?le(F.wraparound):fe===8?3:fe===9?le(U==="X10"):fe===12?le(oe.cursorBlink):fe===25?le(!ne.isCursorHidden):fe===45?le(F.reverseWraparound):fe===66?le(F.applicationKeypad):fe===67?4:fe===1e3?le(U==="VT200"):fe===1002?le(U==="DRAG"):fe===1003?le(U==="ANY"):fe===1004?le(F.sendFocus):fe===1005?4:fe===1006?le(K==="SGR"):fe===1015?4:fe===1016?le(K==="SGR_PIXELS"):fe===1048?1:fe===47||fe===1047||fe===1049?le(se===G):fe===2004?le(F.bracketedPasteMode):0,ne.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${me};${Re}$y`),!0;var me,Re}_updateAttrColor(B,L,F,U,K){return L===2?(B|=50331648,B&=-16777216,B|=C.AttributeData.fromColorRGB([F,U,K])):L===5&&(B&=-50331904,B|=33554432|255&F),B}_extractColor(B,L,F){const U=[0,0,-1,0,0,0];let K=0,ne=0;do{if(U[ne+K]=B.params[L+ne],B.hasSubParams(L+ne)){const ce=B.getSubParams(L+ne);let _e=0;do U[1]===5&&(K=1),U[ne+_e+1+K]=ce[_e];while(++_e=2||U[1]===2&&ne+K>=5)break;U[1]&&(K=1)}while(++ne+L5)&&(B=1),L.extended.underlineStyle=B,L.fg|=268435456,B===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(B){B.fg=v.DEFAULT_ATTR_DATA.fg,B.bg=v.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=B.length;let F;const U=this._curAttrData;for(let K=0;K=30&&F<=37?(U.fg&=-50331904,U.fg|=16777216|F-30):F>=40&&F<=47?(U.bg&=-50331904,U.bg|=16777216|F-40):F>=90&&F<=97?(U.fg&=-50331904,U.fg|=16777224|F-90):F>=100&&F<=107?(U.bg&=-50331904,U.bg|=16777224|F-100):F===0?this._processSGR0(U):F===1?U.fg|=134217728:F===3?U.bg|=67108864:F===4?(U.fg|=268435456,this._processUnderline(B.hasSubParams(K)?B.getSubParams(K)[0]:1,U)):F===5?U.fg|=536870912:F===7?U.fg|=67108864:F===8?U.fg|=1073741824:F===9?U.fg|=2147483648:F===2?U.bg|=134217728:F===21?this._processUnderline(2,U):F===22?(U.fg&=-134217729,U.bg&=-134217729):F===23?U.bg&=-67108865:F===24?(U.fg&=-268435457,this._processUnderline(0,U)):F===25?U.fg&=-536870913:F===27?U.fg&=-67108865:F===28?U.fg&=-1073741825:F===29?U.fg&=2147483647:F===39?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?K+=this._extractColor(B,K,U):F===53?U.bg|=1073741824:F===55?U.bg&=-1073741825:F===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):F===100?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.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(B){const L=B.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 F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(B){const L=B.params[0]||1;let F;return(B.length<2||(F=B.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(B){if(!$(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.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(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const L=[],F=B.split(";");for(;F.length>1;){const U=F.shift(),K=F.shift();if(/^\d+$/.exec(U)){const ne=parseInt(U);if(J(ne))if(K==="?")L.push({type:0,index:ne});else{const ce=(0,M.parseColor)(K);ce&&L.push({type:1,index:ne,color:ce})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(B){const L=B.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(B,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=B.split(":");let U;const K=F.findIndex((ne=>ne.startsWith("id=")));return K!==-1&&(U=F[K].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,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(B,L){const F=B.split(";");for(let U=0;U=this._specialColors.length);++U,++L)if(F[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const K=(0,M.parseColor)(F[U]);K&&this._onColor.fire([{type:1,index:this._specialColors[L],color:K}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const L=[],F=B.split(";");for(let U=0;U=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 B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${K}${_.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,L){this._dirtyRowTracker.markRangeDirty(B,L)}}o.InputHandler=Q;let V=class{constructor(Z){this._bufferService=Z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Z){Zthis.end&&(this.end=Z)}markRangeDirty(Z,B){Z>B&&(H=Z,Z=B,B=H),Zthis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(Z){return 0<=Z&&Z<256}V=u([h(0,N.IBufferService)],V)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(h,_,p){this._data[h]||(this._data[h]={}),this._data[h][_]=p}get(h,_){return this._data[h]?this._data[h][_]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,_,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(_,p,m)}get(u,h,_,p){var m;return(m=this._data.get(u,h))==null?void 0:m.get(_,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 c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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(c)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do h(this._array[c]);while(++c=h;){let p=h+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-x))}ms`),void this._start();v=b}this.clear()}}class _ extends h{_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=_,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(h){const _=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=_==null?void 0:_.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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 c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}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=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),h=c(7226),_=c(3734),p=c(8437),m=c(4634),x=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(w,y,C){this._hasScrollback=w,this._optionsService=y,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=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.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(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}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(w,y){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const z=this._getCorrectBufferLength(y);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,C)));else for(let j=this._rows;j>y;j--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=z}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let T=0;T.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,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(w,y,N.countRemoved)}}_reflowLargerAdjustViewport(w,y,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=C;for(;z-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;T--){let j=this.lines.get(T);if(!j||!j.isWrapped&&j.getTrimmedLength()<=w)continue;const M=[j];for(;j.isWrapped&&T>0;)j=this.lines.get(--T),M.unshift(j);const D=this.ybase+this.y;if(D>=T&&D0&&(N.push({start:T+M.length+z,newLines:Q}),z+=Q.length),M.push(...Q);let V=$.length-1,J=$[V];J===0&&(V--,J=$[V]);let Z=M.length-q-1,B=I;for(;Z>=0;){const F=Math.min(B,J);if(M[V]===void 0)break;if(M[V].copyCellsFrom(M[Z],B-F,J-F,F,!0),J-=F,J===0&&(V--,J=$[V]),B-=F,B===0){Z--;const U=Math.max(Z,0);B=(0,m.getWrappedLineTrimmedLength)(M,U,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const T=[],j=[];for(let V=0;V=0;V--)if($&&$.start>D+q){for(let J=$.newLines.length-1;J>=0;J--)this.lines.set(V--,$.newLines[J]);V++,T.push({index:D+1,amount:$.newLines.length}),q+=$.newLines.length,$=N[++I]}else this.lines.set(V,j[D--]);let H=0;for(let V=T.length-1;V>=0;V--)T[V].index+=H,this.lines.onInsertEmitter.fire(T[V]),H+=T[V].amount;const Q=Math.max(0,M+z-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(w,y,C=0,N){const z=this.lines.get(w);return z?z.translateToString(y,C,N):""}getWrappedRangeForLine(w){let y=w,C=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),_=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||h.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[z]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[z]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,C){const N=v._data;if(C)for(let T=y-1;T>=0;T--){for(let j=0;j<3;j++)this._data[3*(w+T)+j]=N[3*(b+T)+j];268435456&N[3*(b+T)+2]&&(this._extendedAttrs[w+T]=v._extendedAttrs[b+T])}else for(let T=0;T=b&&(this._combined[j-b+w]=v._combined[j])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;b>22||1}return y&&y.push(b),C}}o.BufferLine=x},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,o)=>{function c(u,h,_){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(_-1)&&u[h].getWidth(_-1)===1,m=u[h+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,h,_,p,m){const x=[];for(let k=0;k=k&&p0&&(j>y||w[j].getTrimmedLength()===0);j--)T++;T>0&&(x.push(k+w.length-T),x.push(T)),k+=w.length-1}return x},o.reflowLargerCreateNewLayout=function(u,h){const _=[];let p=0,m=h[p],x=0;for(let k=0;kc(u,w,h))).reduce(((b,w)=>b+w));let x=0,k=0,v=0;for(;vb&&(x-=b,k++);const w=u[k].getWidth(x-1)===2;w&&x--;const y=w?_-1:_;p.push(y),v+=y}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),_=c(9092);class p extends h.Disposable{constructor(x,k){super(),this._optionsService=x,this._bufferService=k,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 _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.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,k){this._normal.resize(x,k),this._alt.resize(x,k),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}o.BufferSet=p},511:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),h=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const k=new p;return k.setFromCharData(x),k}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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(x[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(x[h.CHAR_DATA_CHAR_INDEX].length===2){const v=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|x[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=x[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[h.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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),h=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._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,h.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=_,_._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 c,u,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&j&&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(j){const M=this._getMouseBufferCoords(j),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(j,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([j,M],D,I)}_areCoordsInSelection(j,M,D){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var $,q;const D=(q=($=this._linkifier.currentLink)==null?void 0:$.link)==null?void 0:q.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(j);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=D?0:(M>D&&(M-=D),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return b.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),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(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!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(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.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(j),!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 D=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(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);D?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,D)}_fireOnSelectionChange(j,M,D){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let D=M;for(let I=0;M>=I;I++){const $=j.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:$>1&&M!==I&&(D+=$-1)}return D}setSelection(j,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,D=!0,I=!0){if(j[0]>=this._bufferService.cols)return;const $=this._bufferService.buffer,q=$.lines.get(j[1]);if(!q)return;const H=$.translateBufferLineToString(j[1],!1);let Q=this._convertViewportColToCharacterIndex(q,j[0]),V=Q;const J=j[0]-Q;let Z=0,B=0,L=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;V1&&(F+=_e-1,V+=_e-1);ne>0&&Q>0&&!this._isCharWordSeparator(q.loadCell(ne-1,this._workCell));){q.loadCell(ne-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,ne--):se>1&&(L+=se-1,Q-=se-1),Q--,ne--}for(;ce1&&(F+=se-1,V+=se-1),V++,ce++}}V++;let U=Q+J-Z+L,K=Math.min(this._bufferService.cols,V-Q+Z+B-L-F);if(M||H.slice(Q,V).trim()!==""){if(D&&U===0&&q.getCodePoint(0)!==32){const ne=$.lines.get(j[1]-1);if(ne&&q.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(ce){const _e=this._bufferService.cols-ce.start;U-=_e,K+=_e}}}if(I&&U+K===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ne=$.lines.get(j[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const ce=this._getWordAt([0,j[1]+1],!1,!1,!0);ce&&(K+=ce.length)}}return{start:U,length:K}}}_selectWordAt(j,M){const D=this._getWordAt(j,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[D.start,j[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let D=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,D]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),D={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,w.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=T=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,x.IMouseService),h(6,C.IOptionsService),h(7,x.IRenderService),h(8,x.ICoreBrowserService)],T)},4725:(a,o,c)=>{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=c(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,c){var u=this&&this.__decorate||function(T,j,M,D){var I,$=arguments.length,q=$<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(T,j,M,D);else for(var H=T.length-1;H>=0;H--)(I=T[H])&&(q=($<3?I(q):$>3?I(j,M,q):I(j,M))||q);return $>3&&q&&Object.defineProperty(j,M,q),q},h=this&&this.__param||function(T,j){return function(M,D){j(M,D,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),x=c(844),k=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[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")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=j[M/36%6|0],I=j[M/6%6|0],$=j[M%6];T.push({css:p.channels.toCss(D,I,$),rgba:p.channels.toRgba(D,I,$)})}for(let M=0;M<24;M++){const D=8+10*M;T.push({css:p.channels.toCss(D,D,D),rgba:p.channels.toRgba(D,D,D)})}return T})());let N=o.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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(T={}){const j=this._colors;if(j.foreground=z(T.foreground,v),j.background=z(T.background,b),j.cursor=z(T.cursor,w),j.cursorAccent=z(T.cursorAccent,y),j.selectionBackgroundTransparent=z(T.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=z(T.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=T.selectionForeground?z(T.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=z(T.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=z(T.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=z(T.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=z(T.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=z(T.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=z(T.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=z(T.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=z(T.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=z(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=z(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=z(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=z(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=z(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=z(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=z(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=z(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const M=Math.min(j.ansi.length-16,T.extendedAnsi.length);for(let D=0;D{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),h=c(844);class _ extends h.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 k=0;kthis._length)for(let x=this._length;x=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,k){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let b=x-1;b>=0;b--)this.set(m+b+k,this.get(m+b));const v=m+x+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,h=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=h<=1?u[p]:u[p]&&c(u[p],h-1);return _}},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 c=0,u=0,h=0,_=0;var p,m,x,k,v;function b(y){const C=y.toString(16);return C.length<2?"0"+C:C}function w(y,C){return y>>0},y.toColor=function(C,N,z,T){return{css:y.toCss(C,N,z,T),rgba:y.toRgba(C,N,z,T)}}})(p||(o.channels=p={})),(function(y){function C(N,z){return _=Math.round(255*z),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,_),rgba:p.toRgba(c,u,h,_)}}y.blend=function(N,z){if(_=(255&z.rgba)/255,_===1)return{css:z.css,rgba:z.rgba};const T=z.rgba>>24&255,j=z.rgba>>16&255,M=z.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,$=N.rgba>>8&255;return c=D+Math.round((T-D)*_),u=I+Math.round((j-I)*_),h=$+Math.round((M-$)*_),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},y.isOpaque=function(N){return(255&N.rgba)==255},y.ensureContrastRatio=function(N,z,T){const j=v.ensureContrastRatio(N.rgba,z.rgba,T);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},y.opaque=function(N){const z=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(z),{css:p.toCss(c,u,h),rgba:z}},y.opacity=C,y.multiplyOpacity=function(N,z){return _=255&N.rgba,C(N,_*z/255)},y.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(y){let C,N;try{const z=document.createElement("canvas");z.width=1,z.height=1;const T=z.getContext("2d",{willReadFrequently:!0});T&&(C=T,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(z){if(z.match(/#[\da-f]{3,8}/i))switch(z.length){case 4:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),h=parseInt(z.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),h=parseInt(z.slice(3,4).repeat(2),16),_=parseInt(z.slice(4,5).repeat(2),16),p.toColor(c,u,h,_);case 7:return{css:z,rgba:(parseInt(z.slice(1),16)<<8|255)>>>0};case 9:return{css:z,rgba:parseInt(z.slice(1),16)>>>0}}const T=z.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return c=parseInt(T[1]),u=parseInt(T[2]),h=parseInt(T[3]),_=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),p.toColor(c,u,h,_);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=z,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,_),css:z}}})(x||(o.css=x={})),(function(y){function C(N,z,T){const j=N/255,M=z/255,D=T/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))}y.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},y.relativeLuminance2=C})(k||(o.rgb=k={})),(function(y){function C(z,T,j){const M=z>>24&255,D=z>>16&255,I=z>>8&255;let $=T>>24&255,q=T>>16&255,H=T>>8&255,Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));for(;Q0||q>0||H>0);)$-=Math.max(0,Math.ceil(.1*$)),q-=Math.max(0,Math.ceil(.1*q)),H-=Math.max(0,Math.ceil(.1*H)),Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));return($<<24|q<<16|H<<8|255)>>>0}function N(z,T,j){const M=z>>24&255,D=z>>16&255,I=z>>8&255;let $=T>>24&255,q=T>>16&255,H=T>>8&255,Q=w(k.relativeLuminance2($,q,H),k.relativeLuminance2(M,D,I));for(;Q>>0}y.blend=function(z,T){if(_=(255&T)/255,_===1)return T;const j=T>>24&255,M=T>>16&255,D=T>>8&255,I=z>>24&255,$=z>>16&255,q=z>>8&255;return c=I+Math.round((j-I)*_),u=$+Math.round((M-$)*_),h=q+Math.round((D-q)*_),p.toRgba(c,u,h)},y.ensureContrastRatio=function(z,T,j){const M=k.relativeLuminance(z>>8),D=k.relativeLuminance(T>>8);if(w(M,D)>8));if(Hw(M,k.relativeLuminance(Q>>8))?q:Q}return q}const I=N(z,T,j),$=w(M,k.relativeLuminance(I>>8));if($w(M,k.relativeLuminance(q>>8))?I:q}return I}},y.reduceLuminance=C,y.increaseLuminance=N,y.toChannels=function(z){return[z>>24&255,z>>16&255,z>>8&255,255&z]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=w},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),_=c(4348),p=c(7866),m=c(744),x=c(7302),k=c(6975),v=c(8460),b=c(1753),w=c(1480),y=c(7994),C=c(9282),N=c(5435),z=c(5981),T=c(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var $;($=this._onScrollApi)==null||$.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 $ in I)this.optionsService.options[$]=I[$]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new x.OptionsService(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(h.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,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.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(($=>{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(($=>{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 z.WriteBuffer((($,q)=>this._inputHandler.parse($,q)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,$){this._writeBuffer.write(I,$)}writeSync(I,$){this._logService.logLevel<=h.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(I,$)}input(I,$=!0){this.coreService.triggerDataEvent(I,$)}resize(I,$){isNaN(I)||isNaN($)||(I=Math.max(I,m.MINIMUM_COLS),$=Math.max($,m.MINIMUM_ROWS),this._bufferService.resize(I,$))}scroll(I,$=!1){this._bufferService.scroll(I,$)}scrollLines(I,$,q){this._bufferService.scrollLines(I,$,q)}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 $=I-this._bufferService.buffer.ydisp;$!==0&&this.scrollLines($)}registerEscHandler(I,$){return this._inputHandler.registerEscHandler(I,$)}registerDcsHandler(I,$){return this._inputHandler.registerDcsHandler(I,$)}registerCsiHandler(I,$){return this._inputHandler.registerCsiHandler(I,$)}registerOscHandler(I,$){return this._inputHandler.registerOscHandler(I,$)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const $=this.optionsService.rawOptions.windowsPty;$&&$.buildNumber!==void 0&&$.buildNumber!==void 0?I=$.backend==="conpty"&&$.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 $ of I)$.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=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(Z,B,L,F){var U,K=arguments.length,ne=K<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(Z,B,L,F);else for(var ce=Z.length-1;ce>=0;ce--)(U=Z[ce])&&(ne=(K<3?U(ne):K>3?U(B,L,ne):U(B,L))||ne);return K>3&&ne&&Object.defineProperty(B,L,ne),ne},h=this&&this.__param||function(Z,B){return function(L,F){B(L,F,Z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),x=c(844),k=c(482),v=c(8437),b=c(8460),w=c(643),y=c(511),C=c(3734),N=c(2585),z=c(1480),T=c(6242),j=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function $(Z,B){if(Z>24)return B.setWinLines||!1;switch(Z){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var q;(function(Z){Z[Z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Z[Z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(o.WindowsOptionsReportType=q={}));let H=0;class Q extends x.Disposable{getAttrData(){return this._curAttrData}constructor(B,L,F,U,K,ne,ce,_e,se=new m.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=L,this._coreService=F,this._logService=U,this._optionsService=K,this._oscLinkService=ne,this._coreMouseService=ce,this._unicodeService=_e,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:oe.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,oe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:oe,data:le})})),this._parser.setDcsHandlerFallback(((G,oe,le)=>{oe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:oe,payload:le})})),this._parser.setPrintHandler(((G,oe,le)=>this.print(G,oe,le))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new T.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new T.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new T.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new T.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new T.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new T.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new T.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new T.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new T.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new T.OscHandler((G=>this.restoreCursorColor(G)))),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 G in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((G,oe)=>this.requestStatusString(G,oe))))}_preserveStack(B,L,F,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=U}_logSlowResolvingAsync(B){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([B,new Promise(((L,F)=>setTimeout((()=>F("#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(B,L){let F,U=this._activeBuffer.x,K=this._activeBuffer.y,ne=0;const ce=this._parseStack.paused;if(ce){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;U=this._parseStack.cursorStartX,K=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>I&&(ne=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(G=>String.fromCharCode(G))).join("")}"`),typeof B=="string"?B.split("").map((G=>G.charCodeAt(0))):B),this._parseBuffer.lengthI)for(let G=ne;G0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let pe=this._parser.precedingJoinState;for(let be=L;be_e){if(se){const He=le;let Ce=this._activeBuffer.x-qe;for(this._activeBuffer.x=qe,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),qe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(He,Ce,0,qe,!1);Ce<_e;)He.setCellFromCodepoint(Ce++,0,1,oe)}else if(this._activeBuffer.x=_e-1,K===2)continue}if(we&&this._activeBuffer.x){const He=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-He,U,K);for(let Ce=K-qe;--Ce>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(G&&(le.insertCells(this._activeBuffer.x,K-qe,this._activeBuffer.getNullCell(oe)),le.getWidth(_e-1)===2&&le.setCellFromCodepoint(_e-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),le.setCellFromCodepoint(this._activeBuffer.x++,U,K,oe),K>0)for(;--K;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=pe,this._activeBuffer.x<_e&&F-L>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,L){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,L):this._parser.registerCsiHandler(B,(F=>!$(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new j.DcsHandler(L))}registerEscHandler(B,L){return this._parser.registerEscHandler(B,L)}registerOscHandler(B,L){return this._parser.registerOscHandler(B,new T.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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=B,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+L)}cursorUp(B){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const L=B.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const L=B.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,L,F,U=!1,K=!1){const ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);ne.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),K),U&&(ne.isWrapped=!1)}_resetBufferLine(B,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),F.isWrapped=!1)}eraseInDisplay(B,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine(B,L=!1){switch(this._restrictCursor(this._bufferService.cols),B.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(B){this._restrictCursor();let L=B.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=_e;for(let G=1;G0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let L=0;Lwe?1:2,pe=B.params[0];return be=pe,Me=L?pe===2?4:pe===4?le(ne.modes.insertMode):pe===12?3:pe===20?le(oe.convertEol):0:pe===1?le(F.applicationCursorKeys):pe===3?oe.windowOptions.setWinLines?_e===80?2:_e===132?1:0:0:pe===6?le(F.origin):pe===7?le(F.wraparound):pe===8?3:pe===9?le(U==="X10"):pe===12?le(oe.cursorBlink):pe===25?le(!ne.isCursorHidden):pe===45?le(F.reverseWraparound):pe===66?le(F.applicationKeypad):pe===67?4:pe===1e3?le(U==="VT200"):pe===1002?le(U==="DRAG"):pe===1003?le(U==="ANY"):pe===1004?le(F.sendFocus):pe===1005?4:pe===1006?le(K==="SGR"):pe===1015?4:pe===1016?le(K==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?le(se===G):pe===2004?le(F.bracketedPasteMode):0,ne.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${be};${Me}$y`),!0;var be,Me}_updateAttrColor(B,L,F,U,K){return L===2?(B|=50331648,B&=-16777216,B|=C.AttributeData.fromColorRGB([F,U,K])):L===5&&(B&=-50331904,B|=33554432|255&F),B}_extractColor(B,L,F){const U=[0,0,-1,0,0,0];let K=0,ne=0;do{if(U[ne+K]=B.params[L+ne],B.hasSubParams(L+ne)){const ce=B.getSubParams(L+ne);let _e=0;do U[1]===5&&(K=1),U[ne+_e+1+K]=ce[_e];while(++_e=2||U[1]===2&&ne+K>=5)break;U[1]&&(K=1)}while(++ne+L5)&&(B=1),L.extended.underlineStyle=B,L.fg|=268435456,B===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(B){B.fg=v.DEFAULT_ATTR_DATA.fg,B.bg=v.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=B.length;let F;const U=this._curAttrData;for(let K=0;K=30&&F<=37?(U.fg&=-50331904,U.fg|=16777216|F-30):F>=40&&F<=47?(U.bg&=-50331904,U.bg|=16777216|F-40):F>=90&&F<=97?(U.fg&=-50331904,U.fg|=16777224|F-90):F>=100&&F<=107?(U.bg&=-50331904,U.bg|=16777224|F-100):F===0?this._processSGR0(U):F===1?U.fg|=134217728:F===3?U.bg|=67108864:F===4?(U.fg|=268435456,this._processUnderline(B.hasSubParams(K)?B.getSubParams(K)[0]:1,U)):F===5?U.fg|=536870912:F===7?U.fg|=67108864:F===8?U.fg|=1073741824:F===9?U.fg|=2147483648:F===2?U.bg|=134217728:F===21?this._processUnderline(2,U):F===22?(U.fg&=-134217729,U.bg&=-134217729):F===23?U.bg&=-67108865:F===24?(U.fg&=-268435457,this._processUnderline(0,U)):F===25?U.fg&=-536870913:F===27?U.fg&=-67108865:F===28?U.fg&=-1073741825:F===29?U.fg&=2147483647:F===39?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?K+=this._extractColor(B,K,U):F===53?U.bg|=1073741824:F===55?U.bg&=-1073741825:F===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):F===100?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.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(B){const L=B.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 F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(B){const L=B.params[0]||1;let F;return(B.length<2||(F=B.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(B){if(!$(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.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(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const L=[],F=B.split(";");for(;F.length>1;){const U=F.shift(),K=F.shift();if(/^\d+$/.exec(U)){const ne=parseInt(U);if(J(ne))if(K==="?")L.push({type:0,index:ne});else{const ce=(0,M.parseColor)(K);ce&&L.push({type:1,index:ne,color:ce})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(B){const L=B.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(B,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=B.split(":");let U;const K=F.findIndex((ne=>ne.startsWith("id=")));return K!==-1&&(U=F[K].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,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(B,L){const F=B.split(";");for(let U=0;U=this._specialColors.length);++U,++L)if(F[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const K=(0,M.parseColor)(F[U]);K&&this._onColor.fire([{type:1,index:this._specialColors[L],color:K}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const L=[],F=B.split(";");for(let U=0;U=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 B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${K}${_.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,L){this._dirtyRowTracker.markRangeDirty(B,L)}}o.InputHandler=Q;let V=class{constructor(Z){this._bufferService=Z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Z){Zthis.end&&(this.end=Z)}markRangeDirty(Z,B){Z>B&&(H=Z,Z=B,B=H),Zthis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(Z){return 0<=Z&&Z<256}V=u([h(0,N.IBufferService)],V)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(h,_,p){this._data[h]||(this._data[h]={}),this._data[h][_]=p}get(h,_){return this._data[h]?this._data[h][_]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,_,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(_,p,m)}get(u,h,_,p){var m;return(m=this._data.get(u,h))==null?void 0:m.get(_,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 c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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(c)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do h(this._array[c]);while(++c=h;){let p=h+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-x))}ms`),void this._start();v=b}this.clear()}}class _ extends h{_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=_,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(h){const _=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=_==null?void 0:_.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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 c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}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=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),h=c(7226),_=c(3734),p=c(8437),m=c(4634),x=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(w,y,C){this._hasScrollback=w,this._optionsService=y,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=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.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(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}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(w,y){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const z=this._getCorrectBufferLength(y);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,C)));else for(let j=this._rows;j>y;j--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=z}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let T=0;T.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,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(w,y,N.countRemoved)}}_reflowLargerAdjustViewport(w,y,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=C;for(;z-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;T--){let j=this.lines.get(T);if(!j||!j.isWrapped&&j.getTrimmedLength()<=w)continue;const M=[j];for(;j.isWrapped&&T>0;)j=this.lines.get(--T),M.unshift(j);const D=this.ybase+this.y;if(D>=T&&D0&&(N.push({start:T+M.length+z,newLines:Q}),z+=Q.length),M.push(...Q);let V=$.length-1,J=$[V];J===0&&(V--,J=$[V]);let Z=M.length-q-1,B=I;for(;Z>=0;){const F=Math.min(B,J);if(M[V]===void 0)break;if(M[V].copyCellsFrom(M[Z],B-F,J-F,F,!0),J-=F,J===0&&(V--,J=$[V]),B-=F,B===0){Z--;const U=Math.max(Z,0);B=(0,m.getWrappedLineTrimmedLength)(M,U,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const T=[],j=[];for(let V=0;V=0;V--)if($&&$.start>D+q){for(let J=$.newLines.length-1;J>=0;J--)this.lines.set(V--,$.newLines[J]);V++,T.push({index:D+1,amount:$.newLines.length}),q+=$.newLines.length,$=N[++I]}else this.lines.set(V,j[D--]);let H=0;for(let V=T.length-1;V>=0;V--)T[V].index+=H,this.lines.onInsertEmitter.fire(T[V]),H+=T[V].amount;const Q=Math.max(0,M+z-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(w,y,C=0,N){const z=this.lines.get(w);return z?z.translateToString(y,C,N):""}getWrappedRangeForLine(w){let y=w,C=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),_=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||h.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[z]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[z]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,C){const N=v._data;if(C)for(let T=y-1;T>=0;T--){for(let j=0;j<3;j++)this._data[3*(w+T)+j]=N[3*(b+T)+j];268435456&N[3*(b+T)+2]&&(this._extendedAttrs[w+T]=v._extendedAttrs[b+T])}else for(let T=0;T=b&&(this._combined[j-b+w]=v._combined[j])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;b>22||1}return y&&y.push(b),C}}o.BufferLine=x},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,o)=>{function c(u,h,_){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(_-1)&&u[h].getWidth(_-1)===1,m=u[h+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,h,_,p,m){const x=[];for(let k=0;k=k&&p0&&(j>y||w[j].getTrimmedLength()===0);j--)T++;T>0&&(x.push(k+w.length-T),x.push(T)),k+=w.length-1}return x},o.reflowLargerCreateNewLayout=function(u,h){const _=[];let p=0,m=h[p],x=0;for(let k=0;kc(u,w,h))).reduce(((b,w)=>b+w));let x=0,k=0,v=0;for(;vb&&(x-=b,k++);const w=u[k].getWidth(x-1)===2;w&&x--;const y=w?_-1:_;p.push(y),v+=y}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),_=c(9092);class p extends h.Disposable{constructor(x,k){super(),this._optionsService=x,this._bufferService=k,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 _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.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,k){this._normal.resize(x,k),this._alt.resize(x,k),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}o.BufferSet=p},511:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),h=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const k=new p;return k.setFromCharData(x),k}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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(x[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(x[h.CHAR_DATA_CHAR_INDEX].length===2){const v=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|x[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=x[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[h.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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),h=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._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,h.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=_,_._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 c,u,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` `,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(o.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(o.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(h||(o.C1_ESCAPED=h={}))},7399:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),h={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(_,p,m,x){const k={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:k.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(k.key=u.C0.ESC+k.key);break;case 9:if(_.shiftKey){k.key=u.C0.ESC+"[Z";break}k.key=u.C0.HT,k.cancel=!0;break;case 13:k.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,k.cancel=!0;break;case 27:k.key=u.C0.ESC,_.altKey&&(k.key=u.C0.ESC+u.C0.ESC),k.cancel=!0;break;case 37:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"D",k.key===u.C0.ESC+"[1;3D"&&(k.key=u.C0.ESC+(m?"b":"[1;5D"))):k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"C",k.key===u.C0.ESC+"[1;3C"&&(k.key=u.C0.ESC+(m?"f":"[1;5C"))):k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"A",m||k.key!==u.C0.ESC+"[1;3A"||(k.key=u.C0.ESC+"[1;5A")):k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"B",m||k.key!==u.C0.ESC+"[1;3B"||(k.key=u.C0.ESC+"[1;5B")):k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(k.key=u.C0.ESC+"[2~");break;case 46:k.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:k.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:k.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?k.type=2:_.ctrlKey?k.key=u.C0.ESC+"[5;"+(v+1)+"~":k.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?k.type=3:_.ctrlKey?k.key=u.C0.ESC+"[6;"+(v+1)+"~":k.key=u.C0.ESC+"[6~";break;case 112:k.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:k.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:k.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:k.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:k.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:k.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:k.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:k.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:k.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:k.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:k.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:k.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!x||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?k.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(k.key=u.C0.US),_.key==="@"&&(k.key=u.C0.NUL)):_.keyCode===65&&(k.type=1);else{const b=h[_.keyCode],w=b==null?void 0:b[_.shiftKey?1:0];if(w)k.key=u.C0.ESC+w;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let C=String.fromCharCode(y);_.shiftKey&&(C=C.toUpperCase()),k.key=u.C0.ESC+C}else if(_.keyCode===32)k.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),k.key=u.C0.ESC+y,k.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?k.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?k.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?k.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?k.key=u.C0.DEL:_.keyCode===219?k.key=u.C0.ESC:_.keyCode===220?k.key=u.C0.FS:_.keyCode===221&&(k.key=u.C0.GS)}return k}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,u=0,h=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const h=c.length;if(!h)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=h)return this._interim=x,_;const k=c.charCodeAt(m);56320<=k&&k<=57343?u[_++]=1024*(x-55296)+k-56320+65536:(u[_++]=x,u[_++]=k)}else x!==65279&&(u[_++]=x)}return _}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const h=c.length;if(!h)return 0;let _,p,m,x,k=0,v=0,b=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let z,T=0;for(;(z=63&this.interim[++T])&&T<4;)N<<=6,N|=z;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=j-T;for(;b=h)return 0;if(z=c[b++],(192&z)!=128){b--,C=!0;break}this.interim[T++]=z,N<<=6,N|=63&z}C||(j===2?N<128?b--:u[k++]=N:j===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const w=h-4;let y=b;for(;y=h)return this.interim[0]=_,k;if(p=c[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[k++]=v}else if((240&_)==224){if(y>=h)return this.interim[0]=_,k;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=c[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[k++]=v}else if((248&_)==240){if(y>=h)return this.interim[0]=_,k;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,k;if(x=c[y++],(192&x)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&x,v<65536||v>1114111)continue;u[k++]=v}}return k}}},225:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=c(1480),h=[[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]],_=[[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;mk[w][1])return!1;for(;w>=b;)if(v=b+w>>1,x>k[v][1])b=v+1;else{if(!(x=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,x){let k=this.wcwidth(m),v=k===0&&x!==0;if(v){const b=u.UnicodeService.extractWidth(x);b===0?v=!1:b>k&&(k=b)}return u.UnicodeService.createPropertyValue(0,k,v)}}},5981:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=c(8460),h=c(844);class _ extends h.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 k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const v=this._callbacks.shift();v&&v()}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 k=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,x);if(b){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void b.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-k>=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=_},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\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 h(_,p){const m=_.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(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.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 k=0;k<3;++k){const v=parseInt(p.slice(m*k,m*k+m),16);x[k]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return x}},o.toRgbString=function(_,p=16){const[m,x,k]=_;return`rgb:${h(m,p)}/${h(x,p)}/${h(k,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=c(482),h=c(8742),_=c(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,k){this._handlers[x]===void 0&&(this._handlers[x]=[]);const v=this._handlers[x];return v.push(k),{dispose:()=>{const b=v.indexOf(k);b!==-1&&v.splice(b,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,k){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(x,k,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(x,k,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(x,k,v))}unhook(x,k=!0){if(this._active.length){let v=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=k,w=this._stack.fallThrough,this._stack.paused=!1),!w&&v===!1){for(;b>=0&&(v=this._active[b].unhook(x),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const m=new h.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,k,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(x,k,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let k=!1;if(this._hitLimit)k=!1;else if(x&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,k}}},2015:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=c(844),h=c(8742),_=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,y,C){this.table[w<<8|b]=y<<4|C}addMany(b,w,y,C){for(let N=0;Nj)),w=(T,j)=>b.slice(T,j),y=w(32,127),C=w(0,24);C.push(25),C.push.apply(C,w(28,32));const N=w(0,14);let z;for(z in v.setDefault(1,0),v.addMany(y,0,2,0),N)v.addMany([24,26,153,154],z,3,0),v.addMany(w(128,144),z,3,0),v.addMany(w(144,152),z,3,0),v.add(156,z,0,0),v.add(27,z,11,1),v.add(157,z,4,8),v.addMany([152,158,159],z,0,7),v.add(155,z,11,3),v.add(144,z,11,9);return v.addMany(C,0,3,0),v.addMany(C,1,3,1),v.add(127,1,0,1),v.addMany(C,8,0,8),v.addMany(C,3,3,3),v.add(127,3,0,3),v.addMany(C,4,3,4),v.add(127,4,0,4),v.addMany(C,6,3,6),v.addMany(C,5,3,5),v.add(127,5,0,5),v.addMany(C,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(w(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(C,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(w(64,127),3,7,0),v.addMany(w(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(w(48,60),4,8,4),v.addMany(w(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(w(32,64),6,0,6),v.add(127,6,0,6),v.addMany(w(64,127),6,0,0),v.addMany(w(32,48),3,9,5),v.addMany(w(32,48),5,9,5),v.addMany(w(48,64),5,0,6),v.addMany(w(64,127),5,7,0),v.addMany(w(32,48),4,9,5),v.addMany(w(32,48),1,9,2),v.addMany(w(32,48),2,9,2),v.addMany(w(48,127),2,10,0),v.addMany(w(48,80),1,10,0),v.addMany(w(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(w(96,127),1,10,0),v.add(80,1,11,9),v.addMany(C,9,0,9),v.add(127,9,0,9),v.addMany(w(28,32),9,0,9),v.addMany(w(32,48),9,9,12),v.addMany(w(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(w(32,128),11,0,11),v.addMany(w(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(w(28,32),10,0,10),v.addMany(w(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(w(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(w(28,32),12,0,12),v.addMany(w(32,48),12,9,12),v.addMany(w(48,64),12,0,11),v.addMany(w(64,127),12,12,13),v.addMany(w(64,127),10,12,13),v.addMany(w(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(x,0,2,0),v.add(x,8,5,8),v.add(x,6,0,6),v.add(x,11,0,11),v.add(x,13,13,13),v})();class k extends u.Disposable{constructor(b=o.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,C)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,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 _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;Nz||z>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=z}}if(b.final.length!==1)throw new Error("final must be a single byte");const C=b.final.charCodeAt(0);if(w[0]>C||C>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=C,y}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(w),{dispose:()=>{const N=C.indexOf(w);N!==-1&&C.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(w),{dispose:()=>{const N=C.indexOf(w);N!==-1&&C.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}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(b,w,y,C,N){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(b,w,y){let C,N=0,z=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,y),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,y),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=T;j>4){case 2:for(let q=j+1;;++q){if(q>=w||(N=b[q])<32||N>126&&N=w||(N=b[q])<32||N>126&&N=w||(N=b[q])<32||N>126&&N=w||(N=b[q])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,z,j),C;D<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(++j47&&N<60);j--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let $=I?I.length-1:-1;for(;$>=0&&(C=I[$](),C!==!0);$--)if(C instanceof Promise)return this._preserveStack(4,I,$,z,j),C;$<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 q=j+1;;++q)if(q>=w||(N=b[q])===24||N===26||N===27||N>127&&N=w||(N=b[q])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),h=c(482),_=[];o.OscParser=class{constructor(){this._state=0,this._active=_,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 k=x.indexOf(m);k!==-1&&x.splice(k,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=_}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=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,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 k=this._active.length-1;k>=0;k--)this._active[k].put(p,m,x);else this._handlerFb(this._id,"PUT",(0,h.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,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,x=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&x===!1){for(;k>=0&&(x=this._active[k].end(p),x!==!0);k--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,x;k--}for(;k>=0;k--)if(x=this._active[k].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=_,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,h.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 c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const x=_[m];if(Array.isArray(x))for(let k=0;k256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,x))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&(_[p]=this._subParams.slice(m,x))}return _}addDigit(_){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+_,c):_}}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 c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let h=0;h{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),h=c(511);o.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,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(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new h.CellData}}},3785:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,_){if(!(h<0||h>=this._line.length))return _?(this._line.loadCell(h,_),_):this._line.loadCell(h,new u.CellData)}translateToString(h,_,p){return this._line.translateToString(h,_,p)}}},8285:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),h=c(8460),_=c(844);class p extends _.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new h.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(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(h=>u(h.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((h,_)=>u(h,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,o,c){var u=this&&this.__decorate||function(v,b,w,y){var C,N=arguments.length,z=N<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,b,w,y);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(z=(N<3?C(z):N>3?C(b,w,z):C(b,w))||z);return N>3&&z&&Object.defineProperty(b,w,z),z},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),x=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const w=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=w.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const C=w.ybase+w.scrollTop,N=w.ybase+w.scrollBottom;if(w.scrollTop===0){const z=w.lines.isFull;N===w.lines.length-1?z?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(N+1,0,y.clone()),z?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const z=N-C+1;w.lines.shiftElements(C+1,z-1,-1),w.lines.set(N,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),C!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};o.BufferService=k=u([h(0,x.IOptionsService)],k)},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(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,o,c){var u=this&&this.__decorate||function(y,C,N,z){var T,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,z);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,z){C(N,z,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let N=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(N|=64,N|=y.action):(N|=3&y.button,4&y.button&&(N|=64),8&y.button&&(N|=128),y.action===32?N|=32:y.action!==0||C||(N|=3)),N}const v=String.fromCharCode,b={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let w=o.CoreMouseService=class extends m.Disposable{constructor(y,C){super(),this._bufferService=y,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(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,N){if(N){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};o.CoreMouseService=w=u([h(0,_.IBufferService),h(1,_.ICoreService)],w)},6975:function(a,o,c){var u=this&&this.__decorate||function(w,y,C,N){var z,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(z=w[M])&&(j=(T<3?z(j):T>3?z(y,C,j):z(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),x=c(2585),k=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=o.CoreService=class extends m.Disposable{constructor(w,y,C){super(),this._bufferService=w,this._logService=y,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,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(w))}};o.CoreService=b=u([h(0,x.IBufferService),h(1,x.ILogService),h(2,x.IOptionsService)],b)},9074:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),h=c(8460),_=c(844),p=c(6106);let m=0,x=0;class k extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const y=new v(w);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,C){let N=0,z=0;for(const T of this._decorations.getKeyIterator(y))N=T.options.x??0,z=N+(T.options.width??1),w>=N&&w{m=z.options.x??0,x=m+(z.options.width??1),w>=m&&w{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),h=c(8343);class _{constructor(...m){this._entries=new Map;for(const[x,k]of m)this.set(x,k)}set(m,x){const k=this._entries.get(m);return this._entries.set(m,x),k}forEach(m){for(const[x,k]of this._entries.entries())m(x,k)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=_,o.InstantiationService=class{constructor(){this._services=new _,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,h.getServiceDependencies)(p).sort(((b,w)=>b.index-w.index)),k=[];for(const b of x){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);k.push(w)}const v=x.length>0?x[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...k)}}},7866:function(a,o,c){var u=this&&this.__decorate||function(v,b,w,y){var C,N=arguments.length,z=N<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,b,w,y);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(z=(N<3?C(z):N>3?C(b,w,z):C(b,w))||z);return N>3&&z&&Object.defineProperty(b,w,z),z},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const _=c(844),p=c(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,k=o.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,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(v){for(let b=0;bJSON.stringify(z))).join(", ")})`);const N=y.apply(this,C);return x.trace(`GlyphRenderer#${y.name} return`,N),N}}},7302:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=c(8460),h=c(844),_=c(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:_.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 h.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const b in k)if(b in v)try{const w=k[b];v[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((b=>{b===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((b=>{k.indexOf(b)!==-1&&v()}))}_setupOptions(){const k=b=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,w)=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:k.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${k}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${k} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${k} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=m},2660:function(a,o,c){var u=this&&this.__decorate||function(m,x,k,v){var b,w=arguments.length,y=w<3?x:v===null?v=Object.getOwnPropertyDescriptor(x,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,x,k,v);else for(var C=m.length-1;C>=0;C--)(b=m[C])&&(y=(w<3?b(y):w>3?b(x,k,y):b(x,k))||y);return w>3&&y&&Object.defineProperty(x,k,y),y},h=this&&this.__param||function(m,x){return function(k,v){x(k,v,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const _=c(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 k=m,v=this._getEntryIdKey(k),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,x.ybase+x.y),b.id;const w=x.addMarker(x.ybase+x.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(y,w))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,x){const k=this._dataByLinkId.get(m);if(k&&k.lines.every((v=>v.line!==x))){const v=this._bufferService.buffer.addMarker(x);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}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 k=m.lines.indexOf(x);k!==-1&&(m.lines.splice(k,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([h(0,_.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(h){return h[u]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);const _=function(p,m,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,v,b){v[c]===v?v[u].push({id:k,index:b}):(v[u]=[{id:k,index:b}],v[c]=v)})(_,p,x)};return _.toString=()=>h,o.serviceRegistry.set(h,_),_}},2585:(a,o,c)=>{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=c(8343);var h;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(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(h||(o.LogLevelEnum=h={})),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,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=c(8460),h=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,x,k=!1){return(16777215&m)<<3|(3&x)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new h.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,k=0;const v=m.length;for(let b=0;b=v)return x+this.wcwidth(w);const N=m.charCodeAt(b);56320<=N&&N<=57343?w=1024*(w-55296)+N-56320+65536:x+=this.wcwidth(N)}const y=this.charProperties(w,k);let C=_.extractWidth(y);_.extractShouldJoin(y)&&(C-=_.extractWidth(k)),x+=C,k=y}return x}charProperties(m,x){return this._activeProvider.charProperties(m,x)}}o.UnicodeService=_}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var c=r[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),c=s(3236),u=s(844),h=s(5741),_=s(8285),p=s(7975),m=s(7090),x=["cols","rows"];class k extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const w=C=>this._core.options[C],y=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:w.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(b){if(x.includes(b))throw new Error(`Option "${b}" 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 _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,y){this._verifyIntegers(b,w,y),this._core.select(b,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r -`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(ow)),ow.exports}var QI=P3n();const F3n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function gj(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of F3n){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ib(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new QI.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:gj(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=gj(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new I3n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new B3n.WebLinksAddon((w,y)=>{let C;try{C=new URL(y)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,h=null;const _=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var j;const w=i.element,y=w==null?void 0:w.querySelector(".xterm-screen"),C=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let z=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=z;M--)if((j=N.getLine(N.viewportY+M))!=null&&j.translateToString(!0).trim()){z=M+1;break}const T=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(z,i.rows)*T/i.rows)}px`,w.style.overflow="hidden",C.style.height=`${T}px`},m=()=>{try{const w=o.proposeDimensions();w&&(i.resize(w.cols,Math.max(w.rows,n?1:40)),p())}catch{}};m();const x=new ResizeObserver(m);x.observe(e);const k=i.onWriteParsed(()=>{var y;const w=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),w){const C=(y=i.element)==null?void 0:y.querySelector(".xterm-screen");if(C instanceof HTMLElement){const N=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,N-e.clientHeight),h=e.scrollTop}}}),v=i.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function H3n(e){return vf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||YI(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function q3n(e){return vf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&YI(e.partitions)&&(e.error===null||typeof e.error=="string")}function U3n(e){return!vf(e)||e.type!=="complete"?null:e.backend==="ssh"&&H3n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&q3n(e.result)?{backend:"slurm",result:e.result}:null}function ZI(e){return vf(e)&&e.type==="complete"}function G3n(e){return vf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function wS({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 f.jsx($b,{path:`${t}?${a}`,label:zL({host:Ne(e)}),active:r,onError:i,onComplete:o=>{const c=U3n(o);return c?(s(c),!0):!1}})}function V3n({login:e,onComplete:n,onError:t}){return f.jsx($b,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>ZI(r)?(n(),!0):!1})}function K3n({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=A.useState("running");return f.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{className:"border-t-accent-amber"})," ",vzt()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(Xi,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",szt()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(or,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",_zt()]}):YNt()}),f.jsx("button",{type:"button",onClick:s,"aria-label":Cz(),title:Cz(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(or,{size:14})})]}),f.jsx($b,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>ZI(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function $b({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:c=!1,onComplete:u,onError:h,onClosed:_}){const p=A.useRef(null),m=A.useRef(null),x=A.useRef(u),k=A.useRef(h),v=A.useRef(_),[b,w]=A.useState(null);return x.current=u,k.current=h,v.current=_,A.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:C,dispose:N}=Ib(y,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const z=location.protocol==="https:"?"wss:":"ws:",T=new URL(e,`${z}//${location.host}`),j=new WebSocket(T);j.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const $=(Q,V)=>{var J;if(D){V||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(J=k.current)==null||J.call(k,Q,V),!(a&&!V)&&(C.options.disableStdin=!0,C.blur(),w(Q))},q=C.onData(Q=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(Q))}),H=C.onResize(({cols:Q,rows:V})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:Q,rows:V}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!0,C.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let V;try{V=JSON.parse(Q.data)}catch{return}if(x.current(V)){M=!0,a||j.close();return}const J=G3n(V);J&&(M?C.writeln(J):$(J,!a))},j.onerror=()=>$(jv(),!0),j.onclose=()=>{var Q;if(!M&&!D){$(jv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,q.dispose(),H.dispose(),j.close(),m.current=null,N()}},[e,t,c,i,a]),A.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?y.focus():y.blur())},[o,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[f.jsx("div",{className:`${r} ${s==="card"?XI:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function W3n({host:e,transcript:n}){const t=A.useRef(null);return A.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Ib(r,!0,!0);return s.write(n),i},[n]),f.jsx("div",{className:`mt-3 h-40 ${XI}`,role:"group","aria-label":zL({host:Ne(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Iv=null,t0=0;const kS=()=>Iv;function JI(){const e=t0;return KI(async(n,t)=>{if(e!==t0)return;const r=await yvn(n,t);e===t0&&nt.setQueryData(Sm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===t0&&mn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Vs(),onClick:()=>void Bb.retry()}})})}let Y1=JI();function Q3n(){t0++,Iv=null,Y1=JI()}const Bb={flush:(e=!1)=>Y1.flush(e),retry:()=>Y1.retry(),queue(e,n=0){const t=Iv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Iv=e,Y1.queue(e,n))}};window.addEventListener("pagehide",()=>void Bb.flush(!0));function tl(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 Ja(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 e$(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),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=>[At(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=At(e.rightTab);return{tabs:[...r,...a].map(u=>tl(u,At(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?tl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?At(e.previewTab):null,history:e.tabHistory.map(At),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[At(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function X3n(e,n){const t=CS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>At(Ja(a))===At(Ja(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=Ja(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[At(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(At(a))}const s=new Map(r.map(i=>{const a=Ja(i);return[At(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?Ja(n):e!=null&&e.active?Ja(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,n$(t,n)}const cw=(e,n)=>e.id===n.id&&e.view===n.view,__=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,SS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,As=(e,n,t)=>`${e}:${n??""}:${SS(t)}`,t$=e=>({...e,lineScrollRequest:void 0});function c1(e){return typeof e=="object"&&"path"in e?t$(e):e}const ud=(e,n)=>e.branch===n.branch;function At(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:${SS(e)}`:`experiment:${e.id}:${e.view}`}function Pp(e,n){const t=e.filter(r=>At(r)!==n);return t.length===e.length?e:t}function Y3n(e){return e!==void 0}function CS(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===Od&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===Tb){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(At),panelOpen:!0}}if(e===Ab){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(At),panelOpen:!0}}return t}function ES(e,n){const t=CS(e,n);return t.panelOpen?e$(t,{},{}):void 0}function n$(e,n){if(!n)return e;const t=Ja(n),r=At(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(c=>At(c)===r),i=(c,u)=>{const h=c.findIndex(_=>At(_)===r);return h<0?[...c,u]:JSON.stringify(tl(c[h]))===JSON.stringify(tl(u))?c:c.map((_,p)=>p===h?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!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&&At(o)===r&&JSON.stringify(tl(o))===JSON.stringify(tl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>At(c)!==r),t]),a}let eo=0;const R0=new Map,$v=new Map,L3=new Set,I3=()=>{for(const e of L3)e()},Z3n=e=>(L3.add(e),()=>{L3.delete(e)}),M0=new Map,to=new Map,r$=e=>to.get(e);function J3n(){eo++,to.clear(),M0.clear(),R0.clear(),$v.clear(),I3()}function e5n(e,n){const t=to.get(e);if(!(t!=null&&t.tasks.new)||yu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=Ja(o);if(typeof c=="string"||!("path"in c))return[];const u=As(e,null,c);return u in a?[[As(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,M0.set(e,n),to.set(e,{...t,tasks:i})}function t5n(e){let n=R0.get(e);if(!n){const t=eo;n=KI(async(r,s)=>{if(t!==eo)return;const i=await bvn(e,r,s);t===eo&&nt.setQueryData(sS(e).queryKey,i),t===eo&&$v.delete(e)&&I3()},r=>{t===eo&&($v.set(e,r instanceof Error?r.message:String(r)),I3())}),R0.set(e,n)}return n}function lw(e,n,t,r){const s=to.get(e);if(!s||t==="new"&&M0.has(e))return;const i=Lb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?yu(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const c={...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:{}});to.set(e,c),t5n(e).queue(c,u?250:0)}function vj(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>As(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=e$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?At(Ja(c)):null;return o.active=o.tabs.find(h=>At(Ja(h))===u)??null,o}function n5n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:_}=e,p=A.useRef(dj()),m=A.useSyncExternalStore(Z3n,()=>n?$v.get(n)??null:null),[x,k]=A.useState(null),[v,b]=A.useState(0),[w,y]=A.useState(null),[C,N]=A.useState(null),z=A.useRef(null),T=A.useRef(null),j=A.useRef(null),M=A.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),$=A.useCallback(()=>{const H=j.current;if(!H)return;const Q=vj({...M.current,state:H.state,pane:H.pane},yu(to.get(H.projectId),H.taskKey),H.projectId,H.taskKey);lw(H.projectId,H.location,H.taskKey,Q)},[]);A.useEffect(()=>{let H=!0;const Q=eo;if(k(null),y(null),!!n)return to.has(n)?y(n):nt.fetchQuery(sS(n)).then(V=>{!H||Q!==eo||(to.set(n,V??dj()),y(n))}).catch(V=>{H&&Q===eo&&k(V instanceof Error?V.message:String(V))}),()=>{H=!1}},[n,v]),A.useLayoutEffect(()=>{if(j.current&&j.current.scope!==D){const V=j.current.projectId;$(),M0.get(V)===t&&M0.delete(V),j.current=null}if(!n||w!==n)return;const H=to.get(n);if(!H)return;if(p.current=H,z.current!==D){if(z.current=D,T.current=I,i){const V=yu(H,t)??(Uc(n)?ES(t,a):void 0);c(X3n(V,s),V,!0)}N(D);return}if(C!==D)return;let Q=o;T.current!==I&&(T.current=I,i&&s&&(Q=n$(o,s),c(Q,void 0,!1))),i?(lw(n,r,t,vj({state:Q,pane:s,getScroll:u,sourceModes:h},yu(H,t),n,t)),j.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):lw(n,r),p.current=to.get(n)??H},[n,t,r,s,I,i,a,o,c,u,h,_,w,D,C,$]),A.useEffect(()=>{const H=eo,Q=J=>{if(H===eo){$();for(const Z of R0.values())Z.flush(J)}},V=()=>Q(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Q(!1)}},[$]);const q=A.useCallback(()=>{var H;n&&(x?b(Q=>Q+1):(H=R0.get(n))==null||H.retry())},[n,x]);return{ready:n===null||w===n&&C===D,loaded:n===null||w===n,error:x??m,retry:q,capture:$,workspace:p}}const r5n="data:image/svg+xml,"+encodeURIComponent(''),$3=A.createContext(null);function s5n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function s$(){const e=A.useContext($3);if(!e)throw new Error("Runtime is not connected");return e}function i5n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?r5n:"/favicon.svg")}function bj(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function a5n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!bj("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&uI(n),!bj("orx:locale")&&t&&fD(t)&&cI(t)}function o5n(e){return e.includes("ssh ")&&e.includes("failed")}function yj({host:e,overlay:n=!1}){return f.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:sL({host:Ne(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:o3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:I5t()})]})})}function xj({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=A.useState(s.installPaths),[o,c]=A.useState(!1),[u,h]=A.useState(null);A.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function _(){if(i){c(!0);try{await Lbn(i)}catch($){mn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}}async function p($=!1){r($?s.error:null),c(!0);try{await Ibn()}catch(q){mn(q instanceof Error?q.message:String(q),"error")}finally{c(!1)}}async function m(){c(!0);try{await UL()}catch($){mn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}async function x(){c(!0);try{h(await GL())}catch($){mn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await VL(u),h(null)}catch($){h(null),mn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}}async function v(){c(!0);try{await $bn()}catch($){mn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}const b=s.status==="applying"||o,w=s.status==="needsInstall",y=s.status==="needsUpdate",C=i&&w,N=["connecting","applying","reconnecting"].includes(s.status),z=s.status==="disconnected"&&s.error!==null&&o5n(s.error)&&t!==s.error&&!s.canStartNewHost,T=w?Ckt():y?x7t():s.status==="applying"?s3t({host:Ne(s.host)}):s.status==="reconnecting"?PSt({host:Ne(s.host)}):s.status==="disconnected"?s.error?T5t({host:Ne(s.host)}):s.canStartNewHost?Y5t({host:Ne(s.host)}):sL({host:Ne(s.host)}):$3t({host:Ne(s.host)}),j=s.error??(s.canStartNewHost?U5t():w?Vkt({user:Ne(s.user??""),host:Ne(s.host)}):y?h7t({host:Ne(s.host)}):s.status==="applying"?Y4t():s.status==="reconnecting"?MSt():s.status==="disconnected"?g5t():A3t());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[N&&f.jsx(Nt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:T}),!z&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),z&&f.jsx(wS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:vkt()}),[["binary",skt()],["database",_kt()]].map(([$,q])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[q,f.jsx(Ir,{value:i[$],onChange:H=>a({...i,[$]:H.target.value}),disabled:b,dir:"ltr"})]},$)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(De,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Rkt()]}):y?xz():mL()})})]}),y&&i&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(De,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",z7t()]}):xz()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(Nt,{}):null,s.error?bz():i6t()]}):f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Nt,{}):null,bz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(De,{disabled:o,onClick:()=>void m(),children:_3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(De,{disabled:o,onClick:()=>void m(),children:_3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?f.jsx(Nt,{}):null,vz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[o?f.jsx(Nt,{}):null,iL()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Nt,{}):null,vz()]})})]})}),u&&f.jsx(jI,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function c5n({children:e}){const n=A.useRef(null);return A.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),f.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 l5n(){A.useSyncExternalStore(Z9,JV),A.useEffect(()=>Z9(()=>{Q3n(),J3n()}),[]);const e=sQ({select:x=>x.pathname==="/remote-launch"}),[n,t]=A.useState(null),[r,s]=A.useState(null),i=A.useRef(!1),a=A.useRef(!1),o=A.useRef(!1),c=A.useRef(null),[u,h]=A.useState(null),_=ut({...txn(),enabled:!e,refetchInterval:x=>{var k;return x.state.status==="error"||((k=x.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(A.useEffect(()=>{var v,b;if(e)return;const x=_.data;if(!x){s(((v=_.error)==null?void 0:v.message)??null);return}const k=s5n(x);eK(k),c.current!==null&&c.current!==k&&(i.current=!1,a.current=!1,o.current=!1),c.current=k,x.kind==="ssh"&&(o.current||(o.current=!0,a5n(x)),x.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):x.session.status==="disconnected"&&x.session.error===null&&(a.current=!1)),t(x),s(((b=_.error)==null?void 0:b.message)??null)},[e,_.data,_.error]),A.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";i5n(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Nt,{})," ",ySt()]});if(!n)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:r}),f.jsx(De,{onClick:()=>location.reload(),children:Vs()})]}):f.jsx(Nt,{})});if(n.kind==="local")return f.jsxs($3,{value:n,children:[f.jsx(Zz,{}),f.jsx(C0,{})]},Ia()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(yj,{host:n.session.host}):f.jsx(xj,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});const m=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:m,children:f.jsxs($3,{value:n,children:[f.jsx(Zz,{}),f.jsx(C0,{})]},Ia()[1])}),m&&f.jsx(c5n,{children:r?f.jsx(yj,{host:n.session.host,overlay:!0}):f.jsx(xj,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const Pb=FW()({component:l5n}),NS="orx:demo-read-sessions";function i$(){try{const e=JSON.parse(sessionStorage.getItem(NS)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function u5n(e){try{const n=i$();n.add(e),sessionStorage.setItem(NS,JSON.stringify([...n]))}catch{}}function _5n(){try{sessionStorage.removeItem(NS)}catch{}}function a$(e,n){const t=Z_(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function f5n(e=nt){var i;const[n,t]=await Promise.all([e.fetchQuery(Sm()),e.fetchQuery(_h())]),r=Lb((i=kS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=Z_(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!a$(r,await e.fetchQuery(La(s.projectId)))?"/projects":r}async function d5n(e,n=nt){var h;const[t,r]=await Promise.all([n.fetchQuery(sS(e)),n.fetchQuery(La(e))]),s=r$(e)??t,i=Lb(s==null?void 0:s.lastLocation);if(i&&((h=Z_(i.split("?")[0]))==null?void 0:h.projectId)===e&&a$(i,r))return i;const a=r.find(_=>!_.archived),o=Uc(e)?ES(a==null?void 0:a.id,!(await n.fetchQuery(Sm())).tourCompleted):void 0,c=yu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return X1(e,(a==null?void 0:a.id)??null,u)}const Bv=360,h5n=272,p5n=380,m5n=h5n+56;function n0(){return Math.max(Bv,window.innerWidth-m5n-p5n)}function o$(){const e=n0();return Math.max(Bv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function zS(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.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 uw(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(zS,{}),"OpenResearch"]})}const wj="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";function g5n({cmd:e,onRun:n}){const[t,r]=A.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&f.jsx("button",{type:"button",className:`cmd-inline-run ${wj}`,onClick:n,"aria-label":PE({value:Ne(e)}),title:PE({value:Ne(e)}),children:f.jsx(a3n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${wj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?j0():zX({value:Ne(e)}),title:t?j0():Vk(),children:t?f.jsx(Xi,{size:11,strokeWidth:3}):f.jsx(Oh,{size:11})})]})}function ph(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?f.jsx(g5n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function mh({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.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"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.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"})})}function B3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function v5n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function kj(e,n){return n||e==="preview"}function b5n(e,n){if(!e||e.needsConfigRepair)return null;const t=B3(e);return t===n?null:t}function c$({harness:e,commands:n,onReady:t,onClose:r}){const s=A.useRef(null),i=A.useRef(!1),[a,o]=A.useState(()=>B3(e)),[c,u]=A.useState(0),[h,_]=A.useState(()=>v5n(e,B3(e))),[p,m]=A.useState(h==="running"),[x,k]=A.useState(e.needsConfigRepair),[v,b]=A.useState(e.needsConfigRepair?e.agentNote??null:null),w=h==="running"||h==="checking",y=n[a].includes(` -`)?void 0:n[a];A.useEffect(()=>{i.current=!1;const N=s.current;return N==null||N.showModal(),()=>{i.current=!0,N==null||N.close()}},[]);const C=async()=>{_("checking"),b(null);try{const N=await X_(!0,!0);if(i.current)return;const z=N.find(T=>T.id===e.id);if(k((z==null?void 0:z.needsConfigRepair)??!1),z!=null&&z.agentReady&&(a!=="login"||z.authenticated))t==null||t(z),_("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(z!=null&&z.installed)&&!z.installBroken&&!z.needsConfigRepair&&z.authState==="needsLogin")o("login"),m(!0),_("running");else{const T=b5n(z,a);T&&(o(T),m(!1)),b((z==null?void 0:z.agentNote)??FD()),_("error")}}catch(N){if(i.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 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":"harness-setup-title",onKeyDown:N=>{N.key==="Escape"&&w&&N.preventDefault()},onCancel:N=>{N.preventDefault(),w||r()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(mh,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:HN({agent:e.name})})]}),h==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?eWe({agent:e.name}):aQe({agent:e.name})}):y&&kj(h,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:ph(PWe({command:y}))}):null,h!=="running"&&h!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&f.jsx(Nt,{}),h==="success"?OKe({agent:e.name}):h==="error"?BD():NKe()]}),a==="install"&&n.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:MWe()}),kj(h,p)&&f.jsx($b,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:HN({agent:e.name}),command:y,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:ph(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&f.jsx(De,{variant:"ghost",onClick:()=>{b(null),C()},children:Nv()}),h==="error"&&!x&&f.jsx(De,{onClick:()=>{b(null),m(!0),_("running"),u(N=>N+1)},children:Vs()}),f.jsx(De,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?RL():w?yKe():z0()}),h==="preview"&&f.jsx(De,{variant:"primary",onClick:()=>{m(!0),_("running")},children:dKe()})]})]})}const y5n={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 O0({variant:e="list",className:n,...t}){return f.jsx("span",{className:fs("title",y5n[e],n),...t})}const Sj=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),F_=["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(" "),_w=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),l$=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),x5n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),w5n=[{id:"AI/ML",label:glt},{id:"Biology",label:Slt},{id:"Physics",label:$lt},{id:"Other",label:Alt}],k5n=["welcome","environment","profile"];function S5n({onDone:e,preferredAgent:n,remote:t}){var dt;const r=an({mutationFn:Le=>wvn(...Le)}),[s,i]=A.useState(0);A.useEffect(()=>{const Le=k5n[s];Le&&ru({name:"onboarding_step_viewed",step:Le})},[s]);const a=ut(ku()),o=ut(_0()),c=ut(eI()),[u,h]=A.useState(null),[_,p]=A.useState(!1),m=A.useRef(null),x=A.useRef(""),k=A.useRef(null),v=A.useRef(!1);A.useEffect(()=>()=>{var Le;return(Le=m.current)==null?void 0:Le.close()},[]);const b=a.data??null,w=(dt=o.data)==null?void 0:dt.gitVersion,[y,C]=A.useState(!1),[N,z]=A.useState(null),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,$]=A.useState(!1),[q,H]=A.useState([]),[Q,V]=A.useState(""),[J,Z]=A.useState(""),[B,L]=A.useState([]),[F,U]=A.useState(""),[K,ne]=A.useState([]),[ce,_e]=A.useState(!1),se=A.useRef(0),[G,oe]=A.useState(!1),[le,fe]=A.useState(!1),me=(b==null?void 0:b.some(Le=>Le.agentReady&&!Le.catalogPending))??!1,Re=(b==null?void 0:b.some(Le=>Le.catalogPending))??!1,Oe=w!=null,Qe=A.useRef(0),qe=(Le,ge=!1)=>{const Te=++Qe.current;$(!0),oe(!1),fe(!1);const Fe=()=>Te===Qe.current;Promise.allSettled([X_(Le,ge),nt.fetchQuery({..._0(),staleTime:Le?0:3e4})]).then(([st,_t])=>{Fe()&&(st.status==="rejected"&&oe(!0),_t.status==="rejected"&&fe(!0))}).finally(()=>Fe()&&$(!1))};A.useEffect(()=>qe(!1),[]),A.useEffect(()=>{if(b===null)return;const Le=b.filter(ge=>ge.agentReady&&!ge.catalogPending);D(ge=>{var Fe;if(ge&&Le.some(st=>st.id===ge))return ge;const Te=n&&Le.find(st=>st.id===n.harness);return(Te==null?void 0:Te.id)??((Fe=Le[0])==null?void 0:Fe.id)??null})},[b,n]),A.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),A.useEffect(()=>fe(o.isError),[o.isError,o.dataUpdatedAt]),A.useEffect(()=>{nt.fetchQuery(rxn()).then(Le=>{H(Le.researchAreas),V(Le.otherArea??""),Z(Le.background??""),L(Le.papers)}).catch(()=>{})},[]),A.useEffect(()=>{const Le=F.trim();if(Le.length<3){ne([]),_e(!1);return}const ge=++se.current;_e(!0);const Te=setTimeout(()=>{nt.fetchQuery(oI(Le)).then(Fe=>ge===se.current&&ne(Fe)).catch(()=>ge===se.current&&ne([])).finally(()=>ge===se.current&&_e(!1))},350);return()=>clearTimeout(Te)},[F]);const Se=Le=>{const ge=B.some(Te=>Te.paperId===Le.paperId);L(Te=>Te.some(Fe=>Fe.paperId===Le.paperId)?Te:[...Te,{paperId:Le.paperId,title:Cj(Le.title)}]),U(""),ne([]),ge||nt.fetchQuery(j3(Le.paperId)).then(Te=>{var st;const Fe=(st=Te.title)==null?void 0:st.trim();Fe&&L(_t=>_t.map(mt=>mt.paperId===Le.paperId?{...mt,title:Fe}:mt))}).catch(()=>{})},at=Le=>L(ge=>ge.filter(Te=>Te.paperId!==Le)),et=Le=>{H(ge=>ge.includes(Le)?ge.filter(Te=>Te!==Le):[...ge,Le])},ct=q.length>0&&(!q.includes("Other")||Q.trim().length>0),wt=()=>{if(k.current)return k.current;x.current="",v.current=!0,p(!0);const Le=(async()=>{await new Promise((Fe,st)=>{const _t=location.protocol==="https:"?"wss:":"ws:",mt=new WebSocket(`${_t}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);mt.binaryType="arraybuffer";const Ue=new TextDecoder,Gt=new QI.Terminal;Gt.onData(jt=>{mt.readyState===WebSocket.OPEN&&mt.send(new TextEncoder().encode(jt))}),m.current=mt;let sn=!1;mt.onmessage=jt=>{if(jt.data instanceof ArrayBuffer){Gt.write(new Uint8Array(jt.data)),x.current=(x.current+Ue.decode(jt.data,{stream:!0})).slice(-65536);return}if(typeof jt.data!="string")return;let gt;try{gt=JSON.parse(jt.data)}catch{return}typeof gt!="object"||gt===null||!("type"in gt)||(gt.type==="complete"?(sn=!0,mt.close(),Fe()):gt.type==="error"&&(mt.close(),st(new Error("error"in gt&&typeof gt.error=="string"?gt.error:BD()))))},mt.onerror=()=>{mt.close(),st(new Error(jv()))},mt.onclose=()=>{Gt.dispose(),m.current=null,sn||st(new Error(jv()))}});const Te=(await X_(!0,!0)).find(Fe=>Fe.id==="opencode"&&Fe.agentReady);if(!Te)throw new Error(vdt());return D("opencode"),Te})();return k.current=Le,Le.catch(()=>{}),Le};A.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Le=>Le.catalogPending)||!b.every(Le=>!Le.installed&&!Le.installBroken)||wt()},[b,t]),A.useEffect(()=>{s===1&&_&&i(2)},[s,_]);const $t=()=>{i(_?2:1)},ht=async(Le="complete")=>{var ge;if(!(y||Le==="complete"&&(!ct||!Oe))){C(!0),z(null),j("");try{const Te=_?await wt():b==null?void 0:b.find(_t=>_t.id===M&&_t.agentReady&&!_t.catalogPending);if(!Te)throw new Error(FD());if(Le==="setup")return;const Fe=E5n(Te,((ge=Te.models[0])==null?void 0:ge.id)??null),st=await r.mutateAsync([Fe,{researchAreas:q,otherArea:q.includes("Other")?Q:null,background:J||null,papers:B}]);e(st.project,st.selection)}catch(Te){_&&(k.current=null);const Fe=Te instanceof Error?Te.message:String(Te);z(Fe),j([x.current,Fe].filter(Boolean).join(` +`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(ow)),ow.exports}var XI=e5n();const t5n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function vj(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of t5n){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ib(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new XI.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:vj(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=vj(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new Y3n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new J3n.WebLinksAddon((w,y)=>{let C;try{C=new URL(y)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,h=null;const _=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var j;const w=i.element,y=w==null?void 0:w.querySelector(".xterm-screen"),C=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let z=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=z;M--)if((j=N.getLine(N.viewportY+M))!=null&&j.translateToString(!0).trim()){z=M+1;break}const T=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(z,i.rows)*T/i.rows)}px`,w.style.overflow="hidden",C.style.height=`${T}px`},m=()=>{try{const w=o.proposeDimensions();w&&(i.resize(w.cols,Math.max(w.rows,n?1:40)),p())}catch{}};m();const x=new ResizeObserver(m);x.observe(e);const k=i.onWriteParsed(()=>{var y;const w=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),w){const C=(y=i.element)==null?void 0:y.querySelector(".xterm-screen");if(C instanceof HTMLElement){const N=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,N-e.clientHeight),h=e.scrollTop}}}),v=i.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function n5n(e){return yf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||ZI(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function r5n(e){return yf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&ZI(e.partitions)&&(e.error===null||typeof e.error=="string")}function s5n(e){return!yf(e)||e.type!=="complete"?null:e.backend==="ssh"&&n5n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&r5n(e.result)?{backend:"slurm",result:e.result}:null}function JI(e){return yf(e)&&e.type==="complete"}function i5n(e){return yf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function wS({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 f.jsx($b,{path:`${t}?${a}`,label:jL({host:ze(e)}),active:r,onError:i,onComplete:o=>{const c=s5n(o);return c?(s(c),!0):!1}})}function a5n({login:e,onComplete:n,onError:t}){return f.jsx($b,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>JI(r)?(n(),!0):!1})}function o5n({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=A.useState("running");return f.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(zt,{className:"border-t-accent-amber"})," ",Rzt()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(Ai,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",vzt()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(ur,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",Czt()]}):_zt()}),f.jsx("button",{type:"button",onClick:s,"aria-label":Ez(),title:Ez(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(ur,{size:14})})]}),f.jsx($b,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>JI(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function $b({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:c=!1,onComplete:u,onError:h,onClosed:_}){const p=A.useRef(null),m=A.useRef(null),x=A.useRef(u),k=A.useRef(h),v=A.useRef(_),[b,w]=A.useState(null);return x.current=u,k.current=h,v.current=_,A.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:C,dispose:N}=Ib(y,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const z=location.protocol==="https:"?"wss:":"ws:",T=new URL(e,`${z}//${location.host}`),j=new WebSocket(T);j.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const $=(Q,V)=>{var J;if(D){V||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(J=k.current)==null||J.call(k,Q,V),!(a&&!V)&&(C.options.disableStdin=!0,C.blur(),w(Q))},q=C.onData(Q=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(Q))}),H=C.onResize(({cols:Q,rows:V})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:Q,rows:V}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!0,C.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let V;try{V=JSON.parse(Q.data)}catch{return}if(x.current(V)){M=!0,a||j.close();return}const J=i5n(V);J&&(M?C.writeln(J):$(J,!a))},j.onerror=()=>$(jv(),!0),j.onclose=()=>{var Q;if(!M&&!D){$(jv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,q.dispose(),H.dispose(),j.close(),m.current=null,N()}},[e,t,c,i,a]),A.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?y.focus():y.blur())},[o,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[f.jsx("div",{className:`${r} ${s==="card"?YI:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function c5n({host:e,transcript:n}){const t=A.useRef(null);return A.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Ib(r,!0,!0);return s.write(n),i},[n]),f.jsx("div",{className:`mt-3 h-40 ${YI}`,role:"group","aria-label":jL({host:ze(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Iv=null,n0=0;const kS=()=>Iv;function e$(){const e=n0;return WI(async(n,t)=>{if(e!==n0)return;const r=await Ovn(n,t);e===n0&&tt.setQueryData(Sm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===n0&&pn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Ws(),onClick:()=>void Bb.retry()}})})}let Y1=e$();function l5n(){n0++,Iv=null,Y1=e$()}const Bb={flush:(e=!1)=>Y1.flush(e),retry:()=>Y1.retry(),queue(e,n=0){const t=Iv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Iv=e,Y1.queue(e,n))}};window.addEventListener("pagehide",()=>void Bb.flush(!0));function tl(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 Ja(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 t$(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),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=>[Mt(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=Mt(e.rightTab);return{tabs:[...r,...a].map(u=>tl(u,Mt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?tl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Mt(e.previewTab):null,history:e.tabHistory.map(Mt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Mt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function u5n(e,n){const t=CS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>Mt(Ja(a))===Mt(Ja(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=Ja(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Mt(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(Mt(a))}const s=new Map(r.map(i=>{const a=Ja(i);return[Mt(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?Ja(n):e!=null&&e.active?Ja(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,r$(t,n)}const cw=(e,n)=>e.id===n.id&&e.view===n.view,__=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,SS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Os=(e,n,t)=>`${e}:${n??""}:${SS(t)}`,n$=e=>({...e,lineScrollRequest:void 0});function c1(e){return typeof e=="object"&&"path"in e?n$(e):e}const fd=(e,n)=>e.branch===n.branch;function Mt(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:${SS(e)}`:`experiment:${e.id}:${e.view}`}function Fp(e,n){const t=e.filter(r=>Mt(r)!==n);return t.length===e.length?e:t}function _5n(e){return e!==void 0}function CS(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===Ld&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===Tb){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(Mt),panelOpen:!0}}if(e===Ab){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Mt),panelOpen:!0}}return t}function ES(e,n){const t=CS(e,n);return t.panelOpen?t$(t,{},{}):void 0}function r$(e,n){if(!n)return e;const t=Ja(n),r=Mt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(c=>Mt(c)===r),i=(c,u)=>{const h=c.findIndex(_=>Mt(_)===r);return h<0?[...c,u]:JSON.stringify(tl(c[h]))===JSON.stringify(tl(u))?c:c.map((_,p)=>p===h?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!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&&Mt(o)===r&&JSON.stringify(tl(o))===JSON.stringify(tl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Mt(c)!==r),t]),a}let eo=0;const R0=new Map,$v=new Map,L3=new Set,I3=()=>{for(const e of L3)e()},f5n=e=>(L3.add(e),()=>{L3.delete(e)}),M0=new Map,to=new Map,s$=e=>to.get(e);function d5n(){eo++,to.clear(),M0.clear(),R0.clear(),$v.clear(),I3()}function h5n(e,n){const t=to.get(e);if(!(t!=null&&t.tasks.new)||yu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=Ja(o);if(typeof c=="string"||!("path"in c))return[];const u=Os(e,null,c);return u in a?[[Os(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,M0.set(e,n),to.set(e,{...t,tasks:i})}function p5n(e){let n=R0.get(e);if(!n){const t=eo;n=WI(async(r,s)=>{if(t!==eo)return;const i=await Mvn(e,r,s);t===eo&&tt.setQueryData(sS(e).queryKey,i),t===eo&&$v.delete(e)&&I3()},r=>{t===eo&&($v.set(e,r instanceof Error?r.message:String(r)),I3())}),R0.set(e,n)}return n}function lw(e,n,t,r){const s=to.get(e);if(!s||t==="new"&&M0.has(e))return;const i=Lb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?yu(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const c={...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:{}});to.set(e,c),p5n(e).queue(c,u?250:0)}function bj(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>Os(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=t$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Mt(Ja(c)):null;return o.active=o.tabs.find(h=>Mt(Ja(h))===u)??null,o}function m5n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:_}=e,p=A.useRef(hj()),m=A.useSyncExternalStore(f5n,()=>n?$v.get(n)??null:null),[x,k]=A.useState(null),[v,b]=A.useState(0),[w,y]=A.useState(null),[C,N]=A.useState(null),z=A.useRef(null),T=A.useRef(null),j=A.useRef(null),M=A.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),$=A.useCallback(()=>{const H=j.current;if(!H)return;const Q=bj({...M.current,state:H.state,pane:H.pane},yu(to.get(H.projectId),H.taskKey),H.projectId,H.taskKey);lw(H.projectId,H.location,H.taskKey,Q)},[]);A.useEffect(()=>{let H=!0;const Q=eo;if(k(null),y(null),!!n)return to.has(n)?y(n):tt.fetchQuery(sS(n)).then(V=>{!H||Q!==eo||(to.set(n,V??hj()),y(n))}).catch(V=>{H&&Q===eo&&k(V instanceof Error?V.message:String(V))}),()=>{H=!1}},[n,v]),A.useLayoutEffect(()=>{if(j.current&&j.current.scope!==D){const V=j.current.projectId;$(),M0.get(V)===t&&M0.delete(V),j.current=null}if(!n||w!==n)return;const H=to.get(n);if(!H)return;if(p.current=H,z.current!==D){if(z.current=D,T.current=I,i){const V=yu(H,t)??(Uc(n)?ES(t,a):void 0);c(u5n(V,s),V,!0)}N(D);return}if(C!==D)return;let Q=o;T.current!==I&&(T.current=I,i&&s&&(Q=r$(o,s),c(Q,void 0,!1))),i?(lw(n,r,t,bj({state:Q,pane:s,getScroll:u,sourceModes:h},yu(H,t),n,t)),j.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):lw(n,r),p.current=to.get(n)??H},[n,t,r,s,I,i,a,o,c,u,h,_,w,D,C,$]),A.useEffect(()=>{const H=eo,Q=J=>{if(H===eo){$();for(const Z of R0.values())Z.flush(J)}},V=()=>Q(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Q(!1)}},[$]);const q=A.useCallback(()=>{var H;n&&(x?b(Q=>Q+1):(H=R0.get(n))==null||H.retry())},[n,x]);return{ready:n===null||w===n&&C===D,loaded:n===null||w===n,error:x??m,retry:q,capture:$,workspace:p}}const g5n="data:image/svg+xml,"+encodeURIComponent(''),$3=A.createContext(null);function v5n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function i$(){const e=A.useContext($3);if(!e)throw new Error("Runtime is not connected");return e}function b5n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?g5n:"/favicon.svg")}function yj(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function y5n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!yj("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&_I(n),!yj("orx:locale")&&t&&dD(t)&&lI(t)}function x5n(e){return e.includes("ssh ")&&e.includes("failed")}function xj({host:e,overlay:n=!1}){return f.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:iL({host:ze(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:o3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Y5t()})]})})}function wj({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=A.useState(s.installPaths),[o,c]=A.useState(!1),[u,h]=A.useState(null);A.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function _(){if(i){c(!0);try{await Xbn(i)}catch($){pn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}}async function p($=!1){r($?s.error:null),c(!0);try{await Ybn()}catch(q){pn(q instanceof Error?q.message:String(q),"error")}finally{c(!1)}}async function m(){c(!0);try{await GL()}catch($){pn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}async function x(){c(!0);try{h(await VL())}catch($){pn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await KL(u),h(null)}catch($){h(null),pn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}}async function v(){c(!0);try{await Zbn()}catch($){pn($ instanceof Error?$.message:String($),"error")}finally{c(!1)}}const b=s.status==="applying"||o,w=s.status==="needsInstall",y=s.status==="needsUpdate",C=i&&w,N=["connecting","applying","reconnecting"].includes(s.status),z=s.status==="disconnected"&&s.error!==null&&x5n(s.error)&&t!==s.error&&!s.canStartNewHost,T=w?Bkt():y?D7t():s.status==="applying"?v3t({host:ze(s.host)}):s.status==="reconnecting"?e6t({host:ze(s.host)}):s.status==="disconnected"?s.error?U5t({host:ze(s.host)}):s.canStartNewHost?_kt({host:ze(s.host)}):iL({host:ze(s.host)}):Z3t({host:ze(s.host)}),j=s.error??(s.canStartNewHost?skt():w?aSt({user:ze(s.user??""),host:ze(s.host)}):y?z7t({host:ze(s.host)}):s.status==="applying"?_3t():s.status==="reconnecting"?KSt():s.status==="disconnected"?A5t():G3t());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[N&&f.jsx(zt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:T}),!z&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),z&&f.jsx(wS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:Rkt()}),[["binary",vkt()],["database",Ckt()]].map(([$,q])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[q,f.jsx(qr,{value:i[$],onChange:H=>a({...i,[$]:H.target.value}),disabled:b,dir:"ltr"})]},$)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(De,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",Vkt()]}):y?wz():gL()})})]}),y&&i&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(De,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",H7t()]}):wz()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(zt,{}):null,s.error?yz():b6t()]}):f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(zt,{}):null,yz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(De,{disabled:o,onClick:()=>void m(),children:_3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(De,{disabled:o,onClick:()=>void m(),children:_3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?f.jsx(zt,{}):null,bz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[o?f.jsx(zt,{}):null,aL()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(zt,{}):null,bz()]})})]})}),u&&f.jsx(TI,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function w5n({children:e}){const n=A.useRef(null);return A.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),f.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 k5n(){A.useSyncExternalStore(Z9,eK),A.useEffect(()=>Z9(()=>{l5n(),d5n()}),[]);const e=iQ({select:x=>x.pathname==="/remote-launch"}),[n,t]=A.useState(null),[r,s]=A.useState(null),i=A.useRef(!1),a=A.useRef(!1),o=A.useRef(!1),c=A.useRef(null),[u,h]=A.useState(null),_=ut({...pxn(),enabled:!e,refetchInterval:x=>{var k;return x.state.status==="error"||((k=x.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(A.useEffect(()=>{var v,b;if(e)return;const x=_.data;if(!x){s(((v=_.error)==null?void 0:v.message)??null);return}const k=v5n(x);tK(k),c.current!==null&&c.current!==k&&(i.current=!1,a.current=!1,o.current=!1),c.current=k,x.kind==="ssh"&&(o.current||(o.current=!0,y5n(x)),x.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):x.session.status==="disconnected"&&x.session.error===null&&(a.current=!1)),t(x),s(((b=_.error)==null?void 0:b.message)??null)},[e,_.data,_.error]),A.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";b5n(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(zt,{})," ",OSt()]});if(!n)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:r}),f.jsx(De,{onClick:()=>location.reload(),children:Ws()})]}):f.jsx(zt,{})});if(n.kind==="local")return f.jsxs($3,{value:n,children:[f.jsx(Jz,{}),f.jsx(E0,{})]},Ia()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(xj,{host:n.session.host}):f.jsx(wj,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});const m=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:m,children:f.jsxs($3,{value:n,children:[f.jsx(Jz,{}),f.jsx(E0,{})]},Ia()[1])}),m&&f.jsx(w5n,{children:r?f.jsx(xj,{host:n.session.host,overlay:!0}):f.jsx(wj,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const Pb=HW()({component:k5n}),NS="orx:demo-read-sessions";function a$(){try{const e=JSON.parse(sessionStorage.getItem(NS)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function S5n(e){try{const n=a$();n.add(e),sessionStorage.setItem(NS,JSON.stringify([...n]))}catch{}}function C5n(){try{sessionStorage.removeItem(NS)}catch{}}function o$(e,n){const t=J_(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function E5n(e=tt){var i;const[n,t]=await Promise.all([e.fetchQuery(Sm()),e.fetchQuery(dh())]),r=Lb((i=kS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=J_(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!o$(r,await e.fetchQuery(La(s.projectId)))?"/projects":r}async function N5n(e,n=tt){var h;const[t,r]=await Promise.all([n.fetchQuery(sS(e)),n.fetchQuery(La(e))]),s=s$(e)??t,i=Lb(s==null?void 0:s.lastLocation);if(i&&((h=J_(i.split("?")[0]))==null?void 0:h.projectId)===e&&o$(i,r))return i;const a=r.find(_=>!_.archived),o=Uc(e)?ES(a==null?void 0:a.id,!(await n.fetchQuery(Sm())).tourCompleted):void 0,c=yu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return X1(e,(a==null?void 0:a.id)??null,u)}const Bv=360,z5n=272,j5n=380,T5n=z5n+56;function r0(){return Math.max(Bv,window.innerWidth-T5n-j5n)}function c$(){const e=r0();return Math.max(Bv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function zS(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.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 uw(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(zS,{}),"OpenResearch"]})}const kj="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";function A5n({cmd:e,onRun:n}){const[t,r]=A.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&f.jsx("button",{type:"button",className:`cmd-inline-run ${kj}`,onClick:n,"aria-label":PE({value:ze(e)}),title:PE({value:ze(e)}),children:f.jsx(y3n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${kj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?K_():jX({value:ze(e)}),title:t?K_():Vk(),children:t?f.jsx(Ai,{size:11,strokeWidth:3}):f.jsx(gf,{size:11})})]})}function gh(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?f.jsx(A5n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function vh({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.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"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.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"})})}function B3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function R5n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function Sj(e,n){return n||e==="preview"}function M5n(e,n){if(!e||e.needsConfigRepair)return null;const t=B3(e);return t===n?null:t}function l$({harness:e,commands:n,onReady:t,onClose:r}){const s=A.useRef(null),i=A.useRef(!1),[a,o]=A.useState(()=>B3(e)),[c,u]=A.useState(0),[h,_]=A.useState(()=>R5n(e,B3(e))),[p,m]=A.useState(h==="running"),[x,k]=A.useState(e.needsConfigRepair),[v,b]=A.useState(e.needsConfigRepair?e.agentNote??null:null),w=h==="running"||h==="checking",y=n[a].includes(` +`)?void 0:n[a];A.useEffect(()=>{i.current=!1;const N=s.current;return N==null||N.showModal(),()=>{i.current=!0,N==null||N.close()}},[]);const C=async()=>{_("checking"),b(null);try{const N=await Y_(!0,!0);if(i.current)return;const z=N.find(T=>T.id===e.id);if(k((z==null?void 0:z.needsConfigRepair)??!1),z!=null&&z.agentReady&&(a!=="login"||z.authenticated))t==null||t(z),_("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(z!=null&&z.installed)&&!z.installBroken&&!z.needsConfigRepair&&z.authState==="needsLogin")o("login"),m(!0),_("running");else{const T=M5n(z,a);T&&(o(T),m(!1)),b((z==null?void 0:z.agentNote)??HD()),_("error")}}catch(N){if(i.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 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":"harness-setup-title",onKeyDown:N=>{N.key==="Escape"&&w&&N.preventDefault()},onCancel:N=>{N.preventDefault(),w||r()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(vh,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:qN({agent:e.name})})]}),h==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?hWe({agent:e.name}):yQe({agent:e.name})}):y&&Sj(h,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:gh(eQe({command:y}))}):null,h!=="running"&&h!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&f.jsx(zt,{}),h==="success"?WKe({agent:e.name}):h==="error"?PD():FKe()]}),a==="install"&&n.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:KWe()}),Sj(h,p)&&f.jsx($b,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:qN({agent:e.name}),command:y,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:gh(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&f.jsx(De,{variant:"ghost",onClick:()=>{b(null),C()},children:Nv()}),h==="error"&&!x&&f.jsx(De,{onClick:()=>{b(null),m(!0),_("running"),u(N=>N+1)},children:Ws()}),f.jsx(De,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?ML():w?OKe():j0()}),h==="preview"&&f.jsx(De,{variant:"primary",onClick:()=>{m(!0),_("running")},children:NKe()})]})]})}const O5n={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 O0({variant:e="list",className:n,...t}){return f.jsx("span",{className:gs("title",O5n[e],n),...t})}const Cj=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),F_=["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(" "),_w=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),u$=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),D5n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),L5n=[{id:"AI/ML",label:Alt},{id:"Biology",label:$lt},{id:"Physics",label:Zlt},{id:"Other",label:Glt}],I5n=["welcome","environment","profile"];function $5n({onDone:e,preferredAgent:n,remote:t}){var _t;const r=an({mutationFn:Le=>Lvn(...Le)}),[s,i]=A.useState(0);A.useEffect(()=>{const Le=I5n[s];Le&&ru({name:"onboarding_step_viewed",step:Le})},[s]);const a=ut(ku()),o=ut(f0()),c=ut(tI()),[u,h]=A.useState(null),[_,p]=A.useState(!1),m=A.useRef(null),x=A.useRef(""),k=A.useRef(null),v=A.useRef(!1);A.useEffect(()=>()=>{var Le;return(Le=m.current)==null?void 0:Le.close()},[]);const b=a.data??null,w=(_t=o.data)==null?void 0:_t.gitVersion,[y,C]=A.useState(!1),[N,z]=A.useState(null),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,$]=A.useState(!1),[q,H]=A.useState([]),[Q,V]=A.useState(""),[J,Z]=A.useState(""),[B,L]=A.useState([]),[F,U]=A.useState(""),[K,ne]=A.useState([]),[ce,_e]=A.useState(!1),se=A.useRef(0),[G,oe]=A.useState(!1),[le,pe]=A.useState(!1),be=(b==null?void 0:b.some(Le=>Le.agentReady&&!Le.catalogPending))??!1,Me=(b==null?void 0:b.some(Le=>Le.catalogPending))??!1,we=w!=null,qe=A.useRef(0),He=(Le,me=!1)=>{const Ae=++qe.current;$(!0),oe(!1),pe(!1);const Be=()=>Ae===qe.current;Promise.allSettled([Y_(Le,me),tt.fetchQuery({...f0(),staleTime:Le?0:3e4})]).then(([rt,ft])=>{Be()&&(rt.status==="rejected"&&oe(!0),ft.status==="rejected"&&pe(!0))}).finally(()=>Be()&&$(!1))};A.useEffect(()=>He(!1),[]),A.useEffect(()=>{if(b===null)return;const Le=b.filter(me=>me.agentReady&&!me.catalogPending);D(me=>{var Be;if(me&&Le.some(rt=>rt.id===me))return me;const Ae=n&&Le.find(rt=>rt.id===n.harness);return(Ae==null?void 0:Ae.id)??((Be=Le[0])==null?void 0:Be.id)??null})},[b,n]),A.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),A.useEffect(()=>pe(o.isError),[o.isError,o.dataUpdatedAt]),A.useEffect(()=>{tt.fetchQuery(gxn()).then(Le=>{H(Le.researchAreas),V(Le.otherArea??""),Z(Le.background??""),L(Le.papers)}).catch(()=>{})},[]),A.useEffect(()=>{const Le=F.trim();if(Le.length<3){ne([]),_e(!1);return}const me=++se.current;_e(!0);const Ae=setTimeout(()=>{tt.fetchQuery(cI(Le)).then(Be=>me===se.current&&ne(Be)).catch(()=>me===se.current&&ne([])).finally(()=>me===se.current&&_e(!1))},350);return()=>clearTimeout(Ae)},[F]);const Ce=Le=>{const me=B.some(Ae=>Ae.paperId===Le.paperId);L(Ae=>Ae.some(Be=>Be.paperId===Le.paperId)?Ae:[...Ae,{paperId:Le.paperId,title:Ej(Le.title)}]),U(""),ne([]),me||tt.fetchQuery(j3(Le.paperId)).then(Ae=>{var rt;const Be=(rt=Ae.title)==null?void 0:rt.trim();Be&&L(ft=>ft.map(St=>St.paperId===Le.paperId?{...St,title:Be}:St))}).catch(()=>{})},ot=Le=>L(me=>me.filter(Ae=>Ae.paperId!==Le)),Qe=Le=>{H(me=>me.includes(Le)?me.filter(Ae=>Ae!==Le):[...me,Le])},it=q.length>0&&(!q.includes("Other")||Q.trim().length>0),Ct=()=>{if(k.current)return k.current;x.current="",v.current=!0,p(!0);const Le=(async()=>{await new Promise((Be,rt)=>{const ft=location.protocol==="https:"?"wss:":"ws:",St=new WebSocket(`${ft}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);St.binaryType="arraybuffer";const gt=new TextDecoder,Kt=new XI.Terminal;Kt.onData(Ke=>{St.readyState===WebSocket.OPEN&&St.send(new TextEncoder().encode(Ke))}),m.current=St;let en=!1;St.onmessage=Ke=>{if(Ke.data instanceof ArrayBuffer){Kt.write(new Uint8Array(Ke.data)),x.current=(x.current+gt.decode(Ke.data,{stream:!0})).slice(-65536);return}if(typeof Ke.data!="string")return;let vt;try{vt=JSON.parse(Ke.data)}catch{return}typeof vt!="object"||vt===null||!("type"in vt)||(vt.type==="complete"?(en=!0,St.close(),Be()):vt.type==="error"&&(St.close(),rt(new Error("error"in vt&&typeof vt.error=="string"?vt.error:PD()))))},St.onerror=()=>{St.close(),rt(new Error(jv()))},St.onclose=()=>{Kt.dispose(),m.current=null,en||rt(new Error(jv()))}});const Ae=(await Y_(!0,!0)).find(Be=>Be.id==="opencode"&&Be.agentReady);if(!Ae)throw new Error(Rdt());return D("opencode"),Ae})();return k.current=Le,Le.catch(()=>{}),Le};A.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Le=>Le.catalogPending)||!b.every(Le=>!Le.installed&&!Le.installBroken)||Ct()},[b,t]),A.useEffect(()=>{s===1&&_&&i(2)},[s,_]);const Ht=()=>{i(_?2:1)},pt=async(Le="complete")=>{var me;if(!(y||Le==="complete"&&(!it||!we))){C(!0),z(null),j("");try{const Ae=_?await Ct():b==null?void 0:b.find(ft=>ft.id===M&&ft.agentReady&&!ft.catalogPending);if(!Ae)throw new Error(HD());if(Le==="setup")return;const Be=P5n(Ae,((me=Ae.models[0])==null?void 0:me.id)??null),rt=await r.mutateAsync([Be,{researchAreas:q,otherArea:q.includes("Other")?Q:null,background:J||null,papers:B}]);e(rt.project,rt.selection)}catch(Ae){_&&(k.current=null);const Be=Ae instanceof Error?Ae.message:String(Ae);z(Be),j([x.current,Be].filter(Boolean).join(` -`))}finally{C(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(c$,{harness:u,commands:c.data[u.id],onReady:Le=>{D(Le.id)},onClose:()=>{h(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.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:[f.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[f.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:f.jsx(uw,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:Yct()})]}),f.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[f.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),f.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:i_t()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Jpt()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:fft()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:vpt()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:V_t()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:F0t()})]})})]})]}),f.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:f.jsxs(De,{variant:"primary",size:"large",onClick:$t,disabled:I&&b===null,children:[I&&b===null?f.jsx(Nt,{}):null,cz()," ",f.jsx(Q1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(uw,{}),f.jsx("span",{children:Cpt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:gut()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:_dt()}),b!==null&&!me&&!Re&&f.jsx("p",{className:Sj,children:spt()}),b!==null&&me&&M===null&&f.jsx("p",{className:Sj,children:Sut()}),(w===null||le)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(Ej,{gitVersion:w,error:le}),le?f.jsx("p",{className:_w,children:Z2()}):f.jsx("p",{className:_w,children:lz()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Le=>{var ge;return f.jsx(z5n,{h:Le,remote:t,selected:M===Le.id,onSelect:()=>D(Le.id),commands:(ge=c.data)==null?void 0:ge[Le.id],onSetup:()=>h(Le)},Le.id)}):G?f.jsx("div",{className:F_,children:Z2()}):f.jsxs(Kr,{className:"py-2",children:[f.jsx(Nt,{})," ",C_t()]})}),c.isError&&f.jsxs("p",{className:F_,children:[oWe()," ",f.jsx(De,{variant:"ghost",onClick:()=>void c.refetch(),children:Vs()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(De,{variant:"ghost",onClick:()=>i(0),children:[f.jsx(A0,{size:12})," ",oz()]}),f.jsxs(De,{variant:"ghost",onClick:()=>qe(!0,!0),disabled:I,children:[f.jsx(Pa,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Nv()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(De,{variant:"primary",onClick:()=>i(2),disabled:I||!me||M===null||!Oe,title:I||!me&&Re?N0t():me?M===null?Zut():le?Udt():w===void 0?y0t():w===null?Eft():void 0:Yht(),children:[cz()," ",f.jsx(Q1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(uw,{}),!_&&f.jsx("span",{children:Rpt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:Bpt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:l$,children:[f.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:[f.jsx("legend",{children:O0t()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Gut()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:w5n.map(Le=>f.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:[f.jsx("input",{type:"checkbox",checked:q.includes(Le.id),onChange:()=>et(Le.id),disabled:y}),f.jsx("span",{children:Le.label()})]},Le.id))}),q.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:Le=>V(Le.target.value),disabled:y,placeholder:Vpt(),"aria-label":Cdt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:sht()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:J,onChange:Le=>Z(Le.target.value),disabled:y,rows:4,placeholder:R_t()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Ydt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:slt()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:F,onChange:Le=>U(Le.target.value),disabled:y,placeholder:ght()}),ce?f.jsx("div",{className:F_,children:Sht()}):K.length>0?f.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:K.map(Le=>f.jsxs("button",{type:"button",onClick:()=>Se(Le),disabled:y,children:[f.jsx(O0,{children:Cj(Le.title)}),f.jsx("span",{className:"id",children:Le.paperId})]},Le.paperId))}):null]}),B.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:B.map(Le=>f.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:[f.jsx(O0,{children:Le.title||Le.paperId}),f.jsx("span",{className:"id",children:Le.paperId}),f.jsx("button",{type:"button","aria-label":HZ({name:Ne(Le.paperId)}),onClick:()=>at(Le.paperId),disabled:y,children:f.jsx(or,{size:12})})]},Le.paperId))})]})}),!ct&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:q.length===0?$ut():v_t()}),_&&!Oe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(Ej,{gitVersion:w,error:le}),f.jsx("p",{className:_w,children:le?Z2():lz()}),f.jsx(De,{onClick:()=>qe(!0,!0),disabled:I,children:Nv()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(De,{variant:"ghost",onClick:()=>i(_?0:1),disabled:y,children:[f.jsx(A0,{size:12})," ",oz()]}),f.jsx("div",{className:"flex-1"}),f.jsx(De,{variant:"primary",onClick:()=>void ht(),disabled:y||!Oe||!_&&M===null||!ct,children:y?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Uht()]}):f.jsxs(f.Fragment,{children:[J_t()," ",f.jsx(Q1,{size:13})]})})]}),M===null&&!_&&f.jsx("p",{className:x5n,children:W0t()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(uS,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(De,{size:"small",onClick:()=>void ht(ct&&Oe?"complete":"setup"),disabled:y,children:Vs()}),_&&f.jsx(De,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:y,onClick:()=>{p(!1),z(null),i(1)},children:Aut()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:B_t()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:T||N})]})]})]})})]})}function Cj(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function C5n(e){return e.catalogPending?{tone:"warning",label:K_()}:e.agentReady?{tone:"success",label:e.authMethod==="local"||!e.authenticated?Wk():_pt()}:e.installed?e.installBroken?{tone:"warning",label:bft()}:e.authMethod==="local"?{tone:"warning",label:XD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:a0t()}:e.authState==="unsupported"?{tone:"warning",label:d0t()}:e.installed?{tone:"warning",label:QD()}:{tone:"neutral",label:uz()}:{tone:"neutral",label:uz()}}function E5n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Mb(e,n).defaultId}}function N5n({harness:e}){return f.jsx(mh,{harness:e,size:26})}function z5n({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var x;const a=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown")),o=!e.agentReady&&a,c=a&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),u=C5n(e),h=t?{tone:"success",label:Aht()}:u,_=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),p=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),m=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(N5n,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,c&&f.jsx(Dd,{tone:u.tone,className:"font-normal",children:u.label})]}),o&&!c&&f.jsx(Dd,{tone:h.tone,children:h.label})]})]}),o?f.jsxs(De,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:EWe(),children:[f.jsx(lo,{size:14}),!e.installed||e.installBroken?KKe():e.authState==="unsupported"?JWe():PD()]}):f.jsx(Dd,{tone:h.tone,children:h.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 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${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[m,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Mft()]}):f.jsxs(f.Fragment,{children:[e.account??(e.authMethod==="apiKey"?Kk():null),e.plan?` · ${e.plan}`:""]})}),p&&f.jsx("div",{className:F_,children:p})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 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:[m,e.authState==="unsupported"&&_&&f.jsx("div",{className:F_,children:_}),!o&&e.agentNote&&f.jsx("div",{className:`${F_} [&_code]:whitespace-pre-wrap break-words`,children:ph(e.agentNote)})]})}function Ej({gitVersion:e,error:n}){return f.jsxs("div",{className:l$,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:Pft()}),f.jsx(Dd,{tone:e?"success":n||e===null?"danger":"warning",children:e?Wk():n?Ylt():e===null?WD():K_()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:F_,children:e??uut()})]})}const j5n="/assets/slurm-logo-aGSXVZcE.svg",T5n="/assets/thinking-machines-BOdslTfm.png";function A5n(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 RD();case"tinker_job":return"Tinker";default:return e||"—"}}function R5n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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 M5n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.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"}),f.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)"}),f.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)"}),f.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"}),f.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"}),f.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)"}),f.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)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function O5n({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.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 D5n({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.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 L5n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.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 I5n({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:T5n,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 $5n({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:j5n,width:e,height:e,alt:"","aria-hidden":"true"})}function Fb({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.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 Lh({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(M5n,{size:n});case"hf_job":return f.jsx(R5n,{size:n});case"k8s_job":return f.jsx(O5n,{size:n});case"ssh_job":return f.jsx(fj,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx($5n,{size:n});case"ray_job":return f.jsx(D5n,{size:n});case"openresearch_job":return f.jsx(L5n,{size:n});case"tinker_job":return f.jsx(I5n,{size:n});case"local_job":return f.jsx(M4n,{size:n,strokeWidth:1.5});default:return f.jsx(fj,{size:n})}}function jS({backend:e}){const n=nS(e),t=Hyn(e);return n?f.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:[f.jsx(Lh,{kind:n}),f.jsx("span",{className:"backend-name",children:A5n(n)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.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 fw(e,n){const[t,r]=A.useState(e);return A.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function l1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function B5n(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 P5n(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 F5n(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function H5n({onCreated:e,onCancel:n,remote:t=!1}){var gr,bn,yn,Hn;const[r,s]=A.useState("blank"),[i,a]=A.useState(""),[o,c]=A.useState(!1),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(!1),[N,z]=A.useState(!1),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,$]=A.useState(!1),q=A.useRef(0),H=A.useRef(0),Q=A.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"?P5n(M==null?void 0:M.repoUrl):null,J=i.trim()?`~/OpenResearch/${l1(i,48)}`:"",Z=`~/OpenResearch/${l1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,B=r==="blank"&&!_?J:r==="paper"&&M&&!_?Z:u,L=fw(B.trim(),200),F=ut({..._0(L),enabled:!!L&&L===B.trim()}),U=L===B.trim()?F.data??null:null,K=L===B.trim()?((gr=F.error)==null?void 0:gr.message)??null:null,ne=!!B.trim()&&(L!==B.trim()||F.isFetching),ce=V??(r==="folder"&&(U!=null&&U.githubOwner)&&U.githubRepo?{owner:U.githubOwner,repo:U.githubRepo}:null),_e=ut(Mxn()),se=((bn=_e.data)==null?void 0:bn.login)??(_e.isPending?void 0:null),G=ut(rS()),oe=A.useRef(!1);A.useEffect(()=>{oe.current||!G.data||(oe.current=!0,z(G.data.githubForNewProjects))},[G.data]);const le=fw(i.trim(),150),fe=ut({...Oxn(le),enabled:le===i.trim()}),me=le===i.trim()?((yn=fe.data)==null?void 0:yn.repo)??l1(i,48):l1(i,48),Re=le!==i.trim()||fe.isFetching,Oe=ut({...Yz((ce==null?void 0:ce.owner)??"",(ce==null?void 0:ce.repo)??""),enabled:!!ce,subscribed:!!ce}),Qe=!!ce&&Oe.isFetching,qe=ce&&((Hn=Oe.data)!=null&&Hn.canPush)?`github.com/${ce.owner}/${ce.repo}`:null,Se=fw(T.trim(),350),at=B5n(Se),et=r==="paper"&&!M&&Se===T.trim(),ct=ut({...oI(Se),enabled:et&&!at&&Se.length>=3,subscribed:et&&!at&&Se.length>=3}),wt=ut({...j3(at??""),enabled:et&&!!at,subscribed:et&&!!at}),$t=et&&!at?ct.data??[]:[],ht=et&&ct.isSuccess?Se:"",dt=I||r==="paper"&&!M&&(Se!==T.trim()||(at?wt.isFetching:ct.isFetching));A.useEffect(()=>{var Ie;!et||!at||!wt.data||(D(wt.data),o||a(((Ie=wt.data.title)==null?void 0:Ie.trim())||wt.data.paperId))},[et,at,wt.data,o]),A.useEffect(()=>{const Ie=at?wt.error:ct.error;et&&Ie&&w(Ie.message)},[et,at,wt.error,ct.error]);const Le=an({mutationFn:Cvn});async function ge(Ie){var Cn;const Ke=++q.current;$(!0),w(null);try{const Zn=await nt.fetchQuery(j3(Ie));if(Ke!==q.current)return;D(Zn),o||a(((Cn=Zn.title)==null?void 0:Cn.trim())||Zn.paperId)}catch(Zn){Ke===q.current&&w(Zn instanceof Error?Zn.message:String(Zn))}finally{Ke===q.current&&$(!1)}}function Te(){q.current+=1,H.current+=1,D(null),j(""),$(!1),x(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function Fe(Ie){if(Ie===r)return;q.current+=1,H.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:_};const Ke=Q.current[Ie];s(Ie),w(null),$(!1),x(!1),a(Ke.name),c(Ke.nameTouched),h(Ke.path),p(Ke.pathTouched)}async function st(){if(m)return;const Ie=++H.current;x(!0),w(null);try{const Ke=await Svn();if(Ie!==H.current||!Ke)return;if(p(!0),h(Ke),nt.invalidateQueries(_0(Ke)),r==="folder"&&!o){const Cn=Ke.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Cn&&a(Cn)}}catch(Ke){Ie===H.current&&w(Ke instanceof Error?Ke.message:String(Ke))}finally{Ie===H.current&&x(!1)}}async function _t(Ie){if(Ie.preventDefault(),!!Ct){v(!0),w(null);try{const Ke=await nt.fetchQuery({..._0(B.trim()),staleTime:0});if(Ke.exists&&Ke.directory===!1)throw new Error(X2());if(r==="blank"&&Ke.exists)throw new Error(tz());if(r==="paper"&&Ke.empty===!1)throw new Error(az());N&&ce&&await nt.fetchQuery({...Yz(ce.owner,ce.repo),staleTime:0}).catch(()=>null);const Cn=await Le.mutateAsync({name:i.trim(),path:B.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:E(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(Cn.project,Cn.githubPublicationError)}catch(Ke){w(Ke instanceof Error?Ke.message:String(Ke))}finally{v(!1)}}}const mt=i.trim(),Ue=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Gt=r==="folder"&&(U==null?void 0:U.gitState)==="ready"?U.resolvedPath??null:null,sn=mt!==""&&(Ue!==null||Gt!==null);A.useEffect(()=>{if(!sn)return;const Ie=window.setTimeout(()=>{Avn({name:mt,paperId:Ue??void 0,path:Gt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(Ie)},[sn,mt,Ue,Gt]);const jt=(U==null?void 0:U.gitVersion)===null,gt=r==="folder"&&!!B.trim()&&U!==null&&U.exists===!1,$n=r==="blank"&&(U==null?void 0:U.exists)===!0,Zt=!!B.trim()&&(U==null?void 0:U.exists)===!0&&U.directory===!1,gn=r==="paper"&&!!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,mr=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,Bn=r==="folder"&&((U==null?void 0:U.gitState)==="detached"||(U==null?void 0:U.gitState)==="invalid"),Nn=_&&!B.trim()||Zt||gn||mr,zn=_&&!B.trim()||Zt||$n,Pn=_&&!B.trim()?iz():Zt?X2():$n?tz():null,jr=_&&!B.trim()?iz():Zt?X2():gn?az():mr?$rt():null,Ct=!!(i.trim()&&B.trim())&&!k&&!m&&!ne&&U!==null&&!K&&!jt&&!gt&&!$n&&!Zt&&!gn&&!mr&&!Bn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Re&&!Qe),tn=qe??`github.com/${se??"you"}/${me}`,vn=se===void 0||Re||Qe,on=r==="paper"&&!M&&T.trim().length>=3&&ht===T.trim()&&!dt&&$t.length===0&&!b;return f.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:_t,children:[f.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:[f.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>Fe("blank"),children:Xst()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>Fe("folder"),children:Iit()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>Fe("paper"),children:Yit()})]}),r==="paper"&&!M&&f.jsxs("label",{className:"!font-normal",children:[$at(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:T,onChange:Ie=>{w(null),j(Ie.target.value)},placeholder:rot()}),!on&&f.jsx("span",{className:"repo-hint",children:dt?Act():gct()}),on&&f.jsx("span",{className:"project-path-notice block",children:gat()}),$t.length>0&&f.jsx("div",{className:"paper-results",children:$t.map(Ie=>f.jsxs("button",{type:"button",onClick:()=>void ge(Ie.paperId),children:[f.jsx(O0,{children:Ie.title}),f.jsx("span",{className:"id",children:Ie.paperId})]},Ie.paperId))})]}),M&&r==="paper"&&f.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[f.jsxs("div",{className:"meta",children:[f.jsx(O0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&f.jsx("div",{className:"id",children:F5n(M.repoUrl)})]}),f.jsx(De,{size:"small",type:"button","aria-label":git(),onClick:Te,children:uit()})]}),!M.repoUrl&&f.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:[f.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[f.jsx(uS,{size:16})," ",Sat()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Aat()})]})]}),(r!=="paper"||M)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:sz()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:Ie=>{c(!0),a(Ie.target.value)},placeholder:rz()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?_st():Y2()}),f.jsx("input",{className:"text-sm font-normal",value:B,onChange:Ie=>{p(!0),h(Ie.target.value)},"aria-describedby":Nn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ne&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:nz()}),Nn&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:jr})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?Grt({path:Ne(u)}):JN(),disabled:m,title:u||void 0,onClick:()=>void st(),children:[f.jsx(Su,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:u?"text-sm":"placeholder",children:m?sst():u||JN()}),f.jsx(Ba,{className:"folder-picker-chevron",size:15})]}):r==="folder"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:Y2()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:Ie=>{p(!0),h(Ie.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:Y2()}),f.jsx("input",{className:"text-sm font-normal",value:B,onChange:Ie=>{p(!0),h(Ie.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":zn?"blank-destination-description":void 0,spellCheck:!1}),ne&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:nz()}),zn&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Pn})]}):null,r!=="blank"&&B&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:sz()}),f.jsx("input",{className:"text-sm font-normal",value:i,onChange:Ie=>{c(!0),a(Ie.target.value)},placeholder:rz()})]}),jt&&f.jsx("div",{className:"project-path-notice error",children:sat()}),!jt&&r==="folder"&&u.trim()&&!ne&&(U==null?void 0:U.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:got()}),!jt&&r==="folder"&&u.trim()&&!ne&&Zt&&f.jsx("div",{className:"project-path-notice error",children:Aot()}),!jt&&r==="folder"&&!ne&&(U==null?void 0:U.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:Sit()}),!jt&&r==="folder"&&!ne&&(U==null?void 0:U.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:Sot()}),K&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:K})]}),b&&f.jsx("div",{className:"error",role:"alert",children:b}),(r!=="paper"||M)&&B&&(r!=="blank"||i.trim())&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[f.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":y,"aria-controls":"new-project-advanced-settings",onClick:()=>C(Ie=>!Ie),children:[N?se===null?Srt():Art():KD(),f.jsx(rc,{className:y?"rotate-180":"",size:16})]}),y&&f.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[f.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[f.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:Ie=>z(Ie.target.checked),disabled:k}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:uot()})]}),f.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[f.jsx("span",{children:vn?$ot({repository:Ne(tn)}):qe?Zot({repository:Ne(tn)}):Got({repository:Ne(tn)})}),f.jsx("span",{children:Uit()}),se===null&&f.jsx("span",{children:Sct({command:Ne("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(De,{type:"button",onClick:n,children:rit()}),f.jsx(De,{variant:"primary",className:"ms-auto",disabled:!Ct,children:k?Ast():r==="paper"?M!=null&&M.repoUrl?vst():ez():r==="folder"?$ct():ez()})]})]})}function u$({onClose:e,onCreated:n,remote:t=!1}){const r=A.useRef(null),s=A.useRef(e);return s.current=e,A.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 c=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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const _=h[0],p=h[h.length-1];u.shiftKey&&document.activeElement===_?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),_.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),a==null||a.focus()}},[]),f.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:f.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:[f.jsx("h2",{id:"new-project-dialog-title",children:rL()}),f.jsx(H5n,{onCancel:e,onCreated:n,remote:t})]})})}function q5n({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=A.useRef(null),a=A.useRef(r),o=A.useRef(n);a.current=r,o.current=n,A.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(_()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const x=_();if(x.length===0){m.preventDefault(),u.focus();return}const k=x[0],v=x[x.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return f.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:f.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:[f.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:Z2t()}),f.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[f.jsx("p",{className:"m-0",children:v2t({name:Gi(e.name)})}),f.jsx("p",{className:"m-0",children:c?Cwt():Rwt()}),t&&f.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[f.jsx(De,{disabled:n,onClick:r,children:$2t()}),f.jsx(De,{variant:"danger",disabled:n,onClick:s,children:n?fwt():iwt()})]})]})})}function Nj(){return f.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 U5n({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=A.useState(!1),[o,c]=A.useState(null),[u,h]=A.useState(null),[_,p]=A.useState(null),m=ut(Rxn()),x=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await Ovn(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return f.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[f.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:[f.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:[f.jsx("h2",{children:i4t()}),f.jsxs(De,{onClick:()=>a(!0),children:[f.jsx(Dh,{size:15})," ",rL()]})]}),f.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:f.jsxs("div",{children:[f.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:[f.jsx("span",{children:Zwt()}),f.jsx("span",{children:hz()}),f.jsx("span",{children:pz()}),f.jsx("span",{children:mz()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:Gwt()}):[...e].sort((v,b)=>{var C,N;const w=((C=x[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=x[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-w||v.name.localeCompare(b.name)}).map(v=>{const b=x[v.id],w=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,y=w?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:w.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):zv(),C=b?b.activeAgents>0?s2t({count:Wt(b.activeAgents)}):v4t():"—",N=b?b.totalAgents===1?A4t():_2t({count:Wt(b.totalAgents)}):"—",z=b?b.runningExperiments>0?$4t({count:Wt(b.runningExperiments)}):b.totalExperiments===0?Yk():gz({count:Wt(b.totalExperiments)}):"—",T=b&&b.runningExperiments>0?gz({count:Wt(b.totalExperiments)}):null;return f.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:[f.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":WY({name:Gi(v.name)}),onClick:()=>n(v.id)}),f.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:[f.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),f.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[f.jsxs("span",{children:[G2t()," ",co(v.createdAt)]}),v.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&f.jsxs("span",{children:[A2t()," ",Ne(v.paperId)]}),f.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":r3({name:Gi(v.name)}),disabled:o===v.id,onClick:j=>{j.stopPropagation(),h(null),p(v)},children:f.jsx(gf,{size:14})})]})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:hz()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&f.jsx(Nj,{}),C]}),f.jsx("span",{className:"text-xs text-muted",children:N})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:pz()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&f.jsx(Nj,{}),z]}),T&&f.jsx("span",{className:"text-xs text-muted",children:T})]}),f.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[f.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:mz()}),w?f.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:w,target:"_blank",rel:"noreferrer","aria-label":Sv({name:Gi(v.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(Fb,{size:14})}),f.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ne(y)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:y})]})]},v.id)})]})})]}),i&&f.jsx(u$,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),_&&f.jsx(q5n,{project:_,deleting:o===_.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(_)})]})}function _$(){const e=A.useSyncExternalStore(Nxn,Wz,Wz);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":o3()}),!e&&f.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:[f.jsx(uS,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:o3()})]})]})}function G5n({onClose:e,onConfigureSsh:n}){var v,b,w;const t=an({mutationFn:y=>Dbn(...y)}),r=ut(JL()),s=ut(nxn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=A.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((w=s.error)==null?void 0:w.message)??null,[h,_]=A.useState(null),p=A.useRef(null);Em(p,e);async function m(y){const C=window.open("/remote-launch","_blank");if(!C){mn(dSt(),"error");return}_(y);try{const N=await t.mutateAsync([y,{theme:Bxn(),locale:E()}]);C.location.replace(N.gatewayUrl),e()}catch(N){C.close(),mn(N instanceof Error?N.message:String(N),"error")}finally{_(null)}}const x=i==null?void 0:i.filter(y=>y.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(y=>[y.host,y]));return oa.createPortal(f.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:f.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:[f.jsx(Lt,{className:"absolute end-3.5 top-3.5","aria-label":G3t(),onClick:e,children:f.jsx(or,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:u3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:Z3t()}),f.jsx(Ir,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:y=>c(y.target.value),placeholder:yz(),"aria-label":yz()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",xL()]}):(x==null?void 0:x.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:Bkt()}):x==null?void 0:x.map(y=>{const C=k.get(y.host);return f.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),h===y.host?f.jsx(Nt,{}):C?f.jsx("span",{className:"text-sm text-subtext",children:Jkt()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(VI,{size:15}),AL()]})})]})}),document.body)}function Pv({size:e=16,className:n}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[f.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"}),f.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"})]})}const V5n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",K5n="/assets/ollama-logo-Bt9O-2K_.png",W5n="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",f$={id:"lmstudio",label:"LM Studio",icon:V5n,url:"http://127.0.0.1:1234/v1"},Z1=[f$,{id:"omlx",label:"oMLX",icon:W5n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:K5n,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function d$({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,J;const s=ut({..._xn(),enabled:!t}),i=ut(ku()),a=(V=i.data)==null?void 0:V.find(Z=>Z.id==="opencode"),[o,c]=A.useState(t),u=()=>{c(!1),r==null||r()},[h,_]=A.useState("lmstudio"),p=Z1.find(Z=>Z.id===h)??f$,[m,x]=A.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:w,contextWindow:y,error:C}=k,N=p.id==="ollama"?"":k.apiKey,z=Z=>{x(B=>({...B,[p.id]:{...B[p.id]??k,...Z}}))},T=an({mutationFn:Uyn}),j=an({mutationFn:async Z=>{var F;const B=await Gyn(Z);if(!((F=(await X_(!0)).find(U=>U.id==="opencode"))!=null&&F.models.some(U=>U.id===B.model)))throw new Error(KZe());return B}}),M=an({mutationFn:Kyn}),D=Number(y),I=T.isPending||j.isPending,$=(Z={})=>z({models:[],model:null,error:null,...Z}),q=async()=>{$();try{const Z=await T.mutateAsync({baseUrl:v.trim(),apiKey:N});z({models:Z.models,model:Z.models[0]??null})}catch(Z){z({error:Z instanceof Error?Z.message:String(Z)})}},H=async()=>{if(w){z({error:null});try{const Z=await j.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:w,contextWindow:D});u(),n==null||n(Z.model)}catch(Z){z({error:Z instanceof Error?Z.message:String(Z)})}}},Q=async Z=>{try{await M.mutateAsync(Z)}catch(B){mn(B instanceof Error?B.message:String(B),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":QN(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:QN()}),f.jsxs(De,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(Dh,{size:14}),HD()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(Z=>f.jsx(Q5n,{connection:Z,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(B=>B.id))??[],checking:i.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:i.isError||!i.data,disabled:I||M.isPending,onRemove:()=>void Q(Z.id)},Z.id))})]}),o&&f.jsx(X5n,{busy:I,onClose:u,footer:f.jsxs(De,{variant:"primary",disabled:I||!e||b.length>0&&(!w||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?H():q()),children:[I&&f.jsx(Nt,{}),b.length>0?tet():OZe()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:FJe()}),f.jsx(dh,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:OJe()})]}),f.jsx(Yo,{choices:Z1,value:h,title:WN(),header:WN(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:Z=>f.jsxs(f.Fragment,{children:[Z.id==="openai-compatible"?Gk():Z.label,Z.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:qD()})]}),renderIcon:Z=>{var L;const B=(L=Z1.find(F=>F.id===Z.id))==null?void 0:L.icon;return B?f.jsx("img",{src:B,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${Z.id==="ollama"?" dark:invert":""}`}):f.jsx(FI,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:NZe()}),f.jsx(Ir,{value:v,disabled:I,onChange:Z=>{$({baseUrl:Z.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:_L()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?xet():WJe()}),f.jsx(Ir,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:Z=>$({apiKey:Z.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(Yo,{choices:b.map(Z=>({id:Z,label:Z})),value:w,searchPlaceholder:VD(),title:u0(),header:u0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:Z=>{z({model:Z})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:oJe()}),f.jsx(Ir,{type:"number",min:4096,step:1024,value:y,disabled:I,onChange:Z=>{z({contextWindow:Z.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:hJe()})]}),C&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function Q5n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=an({mutationFn:async()=>{try{await Vyn(e.id)}finally{await X_(!0)}}}),c=Z1.find(x=>x.label===e.name||x.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(x=>t.includes(`${e.id}/${x}`)),_=o.isPending||r,p=s,m=h;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(FI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?Gk():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:qD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Ht,{variant:_||p?"default":m?"success":"warning",children:_?ta():p?kL():m?eJe():ro()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(De,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[f.jsx(Pa,{size:14}),Nv()]}),f.jsx(Lt,{"aria-label":NJe({name:e.name}),disabled:i||o.isPending,onClick:a,children:f.jsx(gf,{size:14})})]})]})]}),o.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function X5n({busy:e,onClose:n,footer:t,children:r}){const s=A.useRef(null),i=()=>{e||n()};return Em(s,i,"input"),oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:HD()})}),f.jsx(Lt,{className:"absolute end-3.5 top-3.5","aria-label":W_(),onClick:i,disabled:e,children:f.jsx(or,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(De,{onClick:i,disabled:e,children:W_()}),t]})]})}),document.body)}const h$=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),zj=["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(" "),su={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function Y5n(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:Rv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Mb(n,t).defaultId}}function _o(e){const[n,t]=A.useState(!1),r=A.useRef(null);return A.useEffect(()=>{if(!n)return;const s=a=>{var o,c;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.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 Z5n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,lockHarness:u=!1,openRequest:h=0,className:_}){var le,fe,me,Re,Oe,Qe,qe;const{data:p=J5n}=ut(ku()),m=bm(),[x,k]=A.useState(!1),v=A.useRef(null),b=A.useRef(null),{open:w,setOpen:y,ref:C}=_o(v),[N,z]=A.useState(""),[T,j]=A.useState("root"),M=()=>{y(!1),j("root"),z("")},D=A.useRef(h);A.useEffect(()=>{h!==D.current&&(D.current=h,j("models"),z(""),y(!0))},[h,y]),A.useEffect(()=>{var Se;w&&(T==="reasoning"||T==="speed"||T==="permissions")&&((Se=b.current)==null||Se.focus())},[w,T]);const I=A.useMemo(()=>{const Se=N.trim().toLowerCase();return(u&&e?p.filter(et=>et.id===e.harness):p).map(et=>{let ct=et.models;return Se?ct=ct.filter(wt=>`${wt.id} ${K1(wt)}`.toLowerCase().includes(Se)):(et.id==="opencode"||et.id==="cursor"||et.id==="antigravity")&&(ct=ct.slice(0,5)),{harness:et,models:ct,hidden:Se?0:et.models.length-ct.length}})},[p,N,u,e]),$=(Se,at)=>{var ct;const et=(e==null?void 0:e.harness)===Se.id;n({harness:Se.id,model:at,serviceTier:Rv(Se,at,et?e==null?void 0:e.serviceTier:null),permissionMode:et?e.permissionMode:((ct=Se.options)==null?void 0:ct.defaultPermissionMode)??null,reasoningLevel:XL(Se,at,et?e.reasoningLevel:null)}),M()},q=(e==null?void 0:e.model)!=null?(le=p.find(Se=>Se.id===e.harness))==null?void 0:le.models.find(Se=>Se.id===e.model):void 0,H=e?e.model?q?K1(q):b3(e.model):XN():u0(),Q=(e==null?void 0:e.reasoningLevel)??o??((fe=a[0])==null?void 0:fe.id),V=(me=a.find(Se=>Se.id===Q))==null?void 0:me.label,J=(e==null?void 0:e.permissionMode)??s??((Re=r[0])==null?void 0:Re.id),Z=(Oe=r.find(Se=>Se.id===J))==null?void 0:Oe.label,B=(e==null?void 0:e.harness)==="opencode"?srt():Ptt(),L=p.find(Se=>Se.id===(e==null?void 0:e.harness)),F=QL(L,e==null?void 0:e.model),U=Rv(L,e==null?void 0:e.model,e==null?void 0:e.serviceTier),K=(Qe=F.find(Se=>Se.id===U))==null?void 0:Qe.label,ne=Se=>{c==null||c(Se),M()},ce=Se=>{i==null||i(Se),M()},_e=Se=>{e&&n({...e,serviceTier:Se}),M()},se=(Se,at,et)=>f.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:()=>j(et),children:[f.jsx("span",{className:"flex-1",children:Se}),at&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:at}),f.jsx(Ba,{size:14,className:"shrink-0 text-muted"})]}),G=Se=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Lt,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":nL(),onClick:()=>{j("root"),z("")},children:f.jsx(MI,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Se}),T==="models"&&f.jsx(Lt,{type:"button",size:"small","aria-label":d3(),onClick:()=>{M(),t()},children:f.jsx(vS,{size:15,"aria-hidden":"true"})})]}),oe=(Se,at,et,ct)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Se.map(wt=>f.jsxs(Yn,{onClick:()=>ct(wt.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[wt.label,wt.id===et&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",GD()]})]}),wt.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:wt.description})]}),wt.id===at&&f.jsx(Xi,{size:13})]},wt.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:C,children:[f.jsxs("button",{ref:v,type:"button",className:fs("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",_),title:eX({label:`${H}${V?` · ${V}`:""}${K?` · ${K}`:""}`}),"aria-haspopup":"menu","aria-expanded":w,onClick:()=>{w?M():(j("root"),y(!0))},children:[U==="priority"?f.jsx(M3n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(mh,{harness:e.harness,size:14}):null,U==="priority"&&f.jsxs("span",{className:"sr-only",children:[Ktt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[H,V&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:V})]}),f.jsx(rc,{size:14,className:"shrink-0 text-muted"})]}),w&&f.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:[T==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[se(u0(),H,"models"),a.length>0&&se(B,V,"reasoning"),F.length>0&&se(ZN(),K,"speed"),r.length>0&&se(YN(),Z,"permissions")]}),T==="models"&&f.jsxs(f.Fragment,{children:[G(u0()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:VD(),value:N,onChange:Se=>z(Se.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[I.map(({harness:Se,models:at,hidden:et})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:h$,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(mh,{harness:Se.id,size:14}),Se.name]}),!Se.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Se.catalogPending?K_():f.jsxs(f.Fragment,{children:[f.jsx(_j,{size:10})," ",ro()]})})]}),Se.agentReady?f.jsxs(f.Fragment,{children:[Se.models.length===0&&f.jsxs(Yn,{onClick:()=>$(Se,null),children:[f.jsxs("span",{children:[XN(),f.jsx("span",{className:"model-id",children:UD()})]}),(e==null?void 0:e.harness)===Se.id&&(e==null?void 0:e.model)===null&&f.jsx(Xi,{size:13})]}),at.map(ct=>f.jsxs(Yn,{title:ct.id,onClick:()=>$(Se,ct.id),children:[f.jsx("span",{children:K1(ct)}),(e==null?void 0:e.harness)===Se.id&&(e==null?void 0:e.model)===ct.id&&f.jsx(Xi,{size:13})]},ct.id)),N.trim().length>0&&!Se.models.some(ct=>ct.id===N.trim())&&f.jsx(Yn,{onClick:()=>$(Se,N.trim()),children:f.jsx("span",{children:Ynt({id:Ne(N.trim())})})})]}):f.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:Se.catalogPending?K_():Se.agentNote?ph(Se.agentNote):bnt()}),Se.id==="opencode"&&f.jsx(Yn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ct;M(),(ct=v.current)==null||ct.focus(),k(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[ctt(),f.jsx(Dh,{size:14,"aria-hidden":"true"})]})}),Se.agentReady&&et>0&&f.jsx("div",{className:zj,children:fnt({count:Wt(et)})})]},Se.id)),p.length===0&&f.jsx("div",{className:zj,children:Mtt()})]}),u&&e&&p.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(_j,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Rnt()]})]}),T==="reasoning"&&f.jsxs(f.Fragment,{children:[G(B),oe(a,Q,o,ne)]}),T==="permissions"&&f.jsxs(f.Fragment,{children:[G(YN()),oe(r,J,s,ce)]}),T==="speed"&&f.jsxs(f.Fragment,{children:[G(ZN()),oe(F,U??void 0,"default",_e)]})]}),x&&f.jsx(d$,{dialogOnly:!0,installed:((qe=p.find(Se=>Se.id==="opencode"))==null?void 0:qe.installed)??!1,onClose:()=>k(!1),onConnected:Se=>{var et;const at=(et=m.getQueryData(ku().queryKey))==null?void 0:et.find(ct=>ct.id==="opencode");at&&(!u||(e==null?void 0:e.harness)==="opencode")&&$(at,Se)}})]})}function Yo({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:c,numbered:u=!1,searchPlaceholder:h,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:x,className:k}){var Q,V;const v=A.useRef(null),{open:b,setOpen:w,ref:y}=_o(v),C=A.useRef(null),[N,z]=A.useState("");if(A.useLayoutEffect(()=>{var L;const J=C.current,Z=y.current;if(!b||!m||!J||!Z)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const B=()=>{const F=Z.getBoundingClientRect(),U=window.innerHeight-F.bottom-12,K=F.top-12,ne=Math.min(380,J.scrollHeight),ce=i?U>=ne||U>=K:KK;J.style.width=`${F.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ce?U:K))}px`,J.style.left=`${F.left}px`,J.style.top=`${ce?F.bottom+4:F.top-J.getBoundingClientRect().height-4}px`};return B(),window.addEventListener("resize",B),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,!0)}},[b,m,i,N,e.length,y]),e.length===0)return null;const T=n??t??((Q=e[0])==null?void 0:Q.id)??null,j=e.find(J=>J.id===T),M=e.find(J=>J.id===t),D=o==="bare"&&(M==null?void 0:M.id)===Av?M:void 0,$=(D?e.filter(J=>J.id!==D.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(N.toLowerCase())),q=(j==null?void 0:j.label)??((V=e[0])==null?void 0:V.label)??"",H=J=>{var Z;x(J),w(!1),(Z=v.current)==null||Z.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:fs(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"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{z(""),w(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(_==null?void 0:_(j)),f.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??q:q})]}),f.jsx(rc,{size:12})]}),b&&f.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,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(J=>J.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&f.jsx("div",{className:h$,children:r}),h&&f.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:J=>z(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&f.jsxs(f.Fragment,{children:[f.jsxs(Yn,{type:"button",onClick:()=>H(D.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,f.jsx("span",{className:"option-default text-muted font-normal",children:UD()})]})]}),T===D.id&&f.jsx(Xi,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),$.map((J,Z)=>f.jsxs(Yn,{type:"button",onClick:()=>H(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!D&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",GD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),T===J.id?f.jsx(Xi,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:Z+1})]},J.id))]})]})]})}const J5n=[];function P3({runtime:e,corner:n=!1}){const[t,r]=A.useState(!1),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[c,u]=A.useState(null),h=_o();async function _(){if(c){o(!0);try{await VL(c),u(null)}catch(p){u(null),mn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:h.ref,children:[h.open&&f.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:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:S3t({host:Ne(e.session.host),user:Ne(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(Yn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await UL(),h.setOpen(!1)}catch(p){mn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?g3t():_3()}),f.jsx(lS,{content:aSt(),className:"me-2 shrink-0 text-subtext",children:f.jsx(hS,{size:15})})]}),f.jsx(Yn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await GL()),h.setOpen(!1)}catch(p){mn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:iL()})]}),n?f.jsxs(De,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[f.jsx(Pv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:J2({host:Ne(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Lt,{size:"small","aria-label":J2({host:Ne(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:f.jsx(Pv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.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:J2({host:Ne(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]})]})]}),c&&f.jsx(jI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Fv="code-source-text",p$="code-source-wrap",m$="file-view-gutter text-right text-muted select-none";function g$(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const ekn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},tkn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function F3(e){const n=e.trim().toLowerCase();return ekn[n]??n}function TS(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=tkn[n];if(t)return F3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:F3(n.slice(r+1))}sc.displayName="clike";sc.aliases=[];function sc(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:/[{}[\];(),.:]/}}zm.displayName="c";zm.aliases=[];function zm(e){e.register(sc),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}Hb.displayName="cpp";Hb.aliases=[];function Hb(e){e.register(zm),(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)}AS.displayName="arduino";AS.aliases=["ino"];function AS(e){e.register(Hb),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}RS.displayName="bash";RS.aliases=["sh","shell"];function RS(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(U,K){return"(?:"+F[+K]+")"})}function r(L,F,U){return RegExp(t(L,F),"")}function s(L,F){for(var U=0;U>/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),c=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),h=a(i.type+" "+i.typeDeclaration+" "+i.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},z=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,T=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),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,[k]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,m]),inside:N}],keyword:c,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,k]),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,_]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),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,c.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:c,"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=T+"|"+z,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),$=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,q=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[$,q]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[$]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),Z=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,H]);function B(L,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,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:B(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[Z]),lookbehind:!0,greedy:!0,inside:B(Z,J)}],char:{pattern:RegExp(z),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}jm.displayName="markup";jm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function jm(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}Ih.displayName="css";Ih.aliases=[];function Ih(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)}OS.displayName="diff";OS.aliases=[];function OS(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 +`))}finally{C(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(l$,{harness:u,commands:c.data[u.id],onReady:Le=>{D(Le.id)},onClose:()=>{h(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.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:[f.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[f.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:f.jsx(uw,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:_lt()})]}),f.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[f.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),f.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:b_t()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:d0t()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Eft()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Rpt()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:aft()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:tmt()})]})})]})]}),f.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:f.jsxs(De,{variant:"primary",size:"large",onClick:Ht,disabled:I&&b===null,children:[I&&b===null?f.jsx(zt,{}):null,lz()," ",f.jsx(Q1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(uw,{}),f.jsx("span",{children:Bpt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Aut()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:Cdt()}),b!==null&&!be&&!Me&&f.jsx("p",{className:Cj,children:vpt()}),b!==null&&be&&M===null&&f.jsx("p",{className:Cj,children:$ut()}),(w===null||le)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(Nj,{gitVersion:w,error:le}),le?f.jsx("p",{className:_w,children:Z2()}):f.jsx("p",{className:_w,children:uz()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Le=>{var me;return f.jsx(H5n,{h:Le,remote:t,selected:M===Le.id,onSelect:()=>D(Le.id),commands:(me=c.data)==null?void 0:me[Le.id],onSetup:()=>h(Le)},Le.id)}):G?f.jsx("div",{className:F_,children:Z2()}):f.jsxs(Gr,{className:"py-2",children:[f.jsx(zt,{})," ",B_t()]})}),c.isError&&f.jsxs("p",{className:F_,children:[xWe()," ",f.jsx(De,{variant:"ghost",onClick:()=>void c.refetch(),children:Ws()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(De,{variant:"ghost",onClick:()=>i(0),children:[f.jsx(A0,{size:12})," ",cz()]}),f.jsxs(De,{variant:"ghost",onClick:()=>He(!0,!0),disabled:I,children:[f.jsx(Pa,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Nv()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(De,{variant:"primary",onClick:()=>i(2),disabled:I||!be||M===null||!we,title:I||!be&&Me?F0t():be?M===null?f_t():le?sht():w===void 0?O0t():w===null?Pft():void 0:_pt(),children:[lz()," ",f.jsx(Q1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(uw,{}),!_&&f.jsx("span",{children:Vpt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:Jpt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:u$,children:[f.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:[f.jsx("legend",{children:W0t()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:i_t()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:L5n.map(Le=>f.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:[f.jsx("input",{type:"checkbox",checked:q.includes(Le.id),onChange:()=>Qe(Le.id),disabled:y}),f.jsx("span",{children:Le.label()})]},Le.id))}),q.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:Le=>V(Le.target.value),disabled:y,placeholder:a0t(),"aria-label":Bdt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:vht()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:J,onChange:Le=>Z(Le.target.value),disabled:y,rows:4,placeholder:V_t()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:_ht()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:vlt()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:F,onChange:Le=>U(Le.target.value),disabled:y,placeholder:Aht()}),ce?f.jsx("div",{className:F_,children:$ht()}):K.length>0?f.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:K.map(Le=>f.jsxs("button",{type:"button",onClick:()=>Ce(Le),disabled:y,children:[f.jsx(O0,{children:Ej(Le.title)}),f.jsx("span",{className:"id",children:Le.paperId})]},Le.paperId))}):null]}),B.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:B.map(Le=>f.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:[f.jsx(O0,{children:Le.title||Le.paperId}),f.jsx("span",{className:"id",children:Le.paperId}),f.jsx("button",{type:"button","aria-label":qZ({name:ze(Le.paperId)}),onClick:()=>ot(Le.paperId),disabled:y,children:f.jsx(ur,{size:12})})]},Le.paperId))})]})}),!it&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:q.length===0?Zut():R_t()}),_&&!we&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(Nj,{gitVersion:w,error:le}),f.jsx("p",{className:_w,children:le?Z2():uz()}),f.jsx(De,{onClick:()=>He(!0,!0),disabled:I,children:Nv()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(De,{variant:"ghost",onClick:()=>i(_?0:1),disabled:y,children:[f.jsx(A0,{size:12})," ",cz()]}),f.jsx("div",{className:"flex-1"}),f.jsx(De,{variant:"primary",onClick:()=>void pt(),disabled:y||!we||!_&&M===null||!it,children:y?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",spt()]}):f.jsxs(f.Fragment,{children:[dft()," ",f.jsx(Q1,{size:13})]})})]}),M===null&&!_&&f.jsx("p",{className:D5n,children:cmt()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(uS,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(De,{size:"small",onClick:()=>void pt(it&&we?"complete":"setup"),disabled:y,children:Ws()}),_&&f.jsx(De,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:y,onClick:()=>{p(!1),z(null),i(1)},children:Gut()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:J_t()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:T||N})]})]})]})})]})}function Ej(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function B5n(e){return e.catalogPending?{tone:"warning",label:W_()}:e.agentReady?{tone:"success",label:e.authMethod==="local"||!e.authenticated?Wk():Cpt()}:e.installed?e.installBroken?{tone:"warning",label:Mft()}:e.authMethod==="local"?{tone:"warning",label:YD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:y0t()}:e.authState==="unsupported"?{tone:"warning",label:N0t()}:e.installed?{tone:"warning",label:XD()}:{tone:"neutral",label:_z()}:{tone:"neutral",label:_z()}}function P5n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Mb(e,n).defaultId}}function F5n({harness:e}){return f.jsx(vh,{harness:e,size:26})}function H5n({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var x;const a=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown")),o=!e.agentReady&&a,c=a&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),u=B5n(e),h=t?{tone:"success",label:Ght()}:u,_=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),p=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),m=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(F5n,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,c&&f.jsx(Id,{tone:u.tone,className:"font-normal",children:u.label})]}),o&&!c&&f.jsx(Id,{tone:h.tone,children:h.label})]})]}),o?f.jsxs(De,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:PWe(),children:[f.jsx(lo,{size:14}),!e.installed||e.installBroken?oWe():e.authState==="unsupported"?dQe():FD()]}):f.jsx(Id,{tone:h.tone,children:h.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 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${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[m,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",Kft()]}):f.jsxs(f.Fragment,{children:[e.account??(e.authMethod==="apiKey"?Kk():null),e.plan?` · ${e.plan}`:""]})}),p&&f.jsx("div",{className:F_,children:p})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 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:[m,e.authState==="unsupported"&&_&&f.jsx("div",{className:F_,children:_}),!o&&e.agentNote&&f.jsx("div",{className:`${F_} [&_code]:whitespace-pre-wrap break-words`,children:gh(e.agentNote)})]})}function Nj({gitVersion:e,error:n}){return f.jsxs("div",{className:u$,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:edt()}),f.jsx(Id,{tone:e?"success":n||e===null?"danger":"warning",children:e?Wk():n?_ut():e===null?QD():W_()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:F_,children:e??Sut()})]})}const q5n="/assets/slurm-logo-aGSXVZcE.svg",U5n="/assets/thinking-machines-BOdslTfm.png";function G5n(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 V5n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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 K5n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.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"}),f.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)"}),f.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)"}),f.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"}),f.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"}),f.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)"}),f.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)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function W5n({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.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 Q5n({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.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 X5n({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.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 Y5n({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:U5n,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 Z5n({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:q5n,width:e,height:e,alt:"","aria-hidden":"true"})}function Fb({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.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 Ih({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(K5n,{size:n});case"hf_job":return f.jsx(V5n,{size:n});case"k8s_job":return f.jsx(W5n,{size:n});case"ssh_job":return f.jsx(dj,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(Z5n,{size:n});case"ray_job":return f.jsx(Q5n,{size:n});case"openresearch_job":return f.jsx(X5n,{size:n});case"tinker_job":return f.jsx(Y5n,{size:n});case"local_job":return f.jsx(K4n,{size:n,strokeWidth:1.5});default:return f.jsx(dj,{size:n})}}function jS({backend:e}){const n=nS(e),t=nxn(e);return n?f.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:[f.jsx(Ih,{kind:n}),f.jsx("span",{className:"backend-name",children:G5n(n)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.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 fw(e,n){const[t,r]=A.useState(e);return A.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function l1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function J5n(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 ekn(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 tkn(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function nkn({onCreated:e,onCancel:n,remote:t=!1}){var dr,sn,gn,Zn;const[r,s]=A.useState("blank"),[i,a]=A.useState(""),[o,c]=A.useState(!1),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(!1),[N,z]=A.useState(!1),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,$]=A.useState(!1),q=A.useRef(0),H=A.useRef(0),Q=A.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"?ekn(M==null?void 0:M.repoUrl):null,J=i.trim()?`~/OpenResearch/${l1(i,48)}`:"",Z=`~/OpenResearch/${l1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,B=r==="blank"&&!_?J:r==="paper"&&M&&!_?Z:u,L=fw(B.trim(),200),F=ut({...f0(L),enabled:!!L&&L===B.trim()}),U=L===B.trim()?F.data??null:null,K=L===B.trim()?((dr=F.error)==null?void 0:dr.message)??null:null,ne=!!B.trim()&&(L!==B.trim()||F.isFetching),ce=V??(r==="folder"&&(U!=null&&U.githubOwner)&&U.githubRepo?{owner:U.githubOwner,repo:U.githubRepo}:null),_e=ut(Kxn()),se=((sn=_e.data)==null?void 0:sn.login)??(_e.isPending?void 0:null),G=ut(rS()),oe=A.useRef(!1);A.useEffect(()=>{oe.current||!G.data||(oe.current=!0,z(G.data.githubForNewProjects))},[G.data]);const le=fw(i.trim(),150),pe=ut({...Wxn(le),enabled:le===i.trim()}),be=le===i.trim()?((gn=pe.data)==null?void 0:gn.repo)??l1(i,48):l1(i,48),Me=le!==i.trim()||pe.isFetching,we=ut({...Zz((ce==null?void 0:ce.owner)??"",(ce==null?void 0:ce.repo)??""),enabled:!!ce,subscribed:!!ce}),qe=!!ce&&we.isFetching,He=ce&&((Zn=we.data)!=null&&Zn.canPush)?`github.com/${ce.owner}/${ce.repo}`:null,Ce=fw(T.trim(),350),ot=J5n(Ce),Qe=r==="paper"&&!M&&Ce===T.trim(),it=ut({...cI(Ce),enabled:Qe&&!ot&&Ce.length>=3,subscribed:Qe&&!ot&&Ce.length>=3}),Ct=ut({...j3(ot??""),enabled:Qe&&!!ot,subscribed:Qe&&!!ot}),Ht=Qe&&!ot?it.data??[]:[],pt=Qe&&it.isSuccess?Ce:"",_t=I||r==="paper"&&!M&&(Ce!==T.trim()||(ot?Ct.isFetching:it.isFetching));A.useEffect(()=>{var yt;!Qe||!ot||!Ct.data||(D(Ct.data),o||a(((yt=Ct.data.title)==null?void 0:yt.trim())||Ct.data.paperId))},[Qe,ot,Ct.data,o]),A.useEffect(()=>{const yt=ot?Ct.error:it.error;Qe&&yt&&w(yt.message)},[Qe,ot,Ct.error,it.error]);const Le=an({mutationFn:Bvn});async function me(yt){var zn;const jt=++q.current;$(!0),w(null);try{const xr=await tt.fetchQuery(j3(yt));if(jt!==q.current)return;D(xr),o||a(((zn=xr.title)==null?void 0:zn.trim())||xr.paperId)}catch(xr){jt===q.current&&w(xr instanceof Error?xr.message:String(xr))}finally{jt===q.current&&$(!1)}}function Ae(){q.current+=1,H.current+=1,D(null),j(""),$(!1),x(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function Be(yt){if(yt===r)return;q.current+=1,H.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:_};const jt=Q.current[yt];s(yt),w(null),$(!1),x(!1),a(jt.name),c(jt.nameTouched),h(jt.path),p(jt.pathTouched)}async function rt(){if(m)return;const yt=++H.current;x(!0),w(null);try{const jt=await $vn();if(yt!==H.current||!jt)return;if(p(!0),h(jt),tt.invalidateQueries(f0(jt)),r==="folder"&&!o){const zn=jt.replace(/[\\/]+$/,"").split(/[\\/]/).pop();zn&&a(zn)}}catch(jt){yt===H.current&&w(jt instanceof Error?jt.message:String(jt))}finally{yt===H.current&&x(!1)}}async function ft(yt){if(yt.preventDefault(),!!bt){v(!0),w(null);try{const jt=await tt.fetchQuery({...f0(B.trim()),staleTime:0});if(jt.exists&&jt.directory===!1)throw new Error(X2());if(r==="blank"&&jt.exists)throw new Error(nz());if(r==="paper"&&jt.empty===!1)throw new Error(oz());N&&ce&&await tt.fetchQuery({...Zz(ce.owner,ce.repo),staleTime:0}).catch(()=>null);const zn=await Le.mutateAsync({name:i.trim(),path:B.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:E(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(zn.project,zn.githubPublicationError)}catch(jt){w(jt instanceof Error?jt.message:String(jt))}finally{v(!1)}}}const St=i.trim(),gt=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Kt=r==="folder"&&(U==null?void 0:U.gitState)==="ready"?U.resolvedPath??null:null,en=St!==""&&(gt!==null||Kt!==null);A.useEffect(()=>{if(!en)return;const yt=window.setTimeout(()=>{Gvn({name:St,paperId:gt??void 0,path:Kt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(yt)},[en,St,gt,Kt]);const Ke=(U==null?void 0:U.gitVersion)===null,vt=r==="folder"&&!!B.trim()&&U!==null&&U.exists===!1,In=r==="blank"&&(U==null?void 0:U.exists)===!0,tn=!!B.trim()&&(U==null?void 0:U.exists)===!0&&U.directory===!1,yn=r==="paper"&&!!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,yr=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,Pn=r==="folder"&&((U==null?void 0:U.gitState)==="detached"||(U==null?void 0:U.gitState)==="invalid"),$n=_&&!B.trim()||tn||yn||yr,Fn=_&&!B.trim()||tn||In,Yn=_&&!B.trim()?az():tn?X2():In?nz():null,Dr=_&&!B.trim()?az():tn?X2():yn?oz():yr?Zrt():null,bt=!!(i.trim()&&B.trim())&&!k&&!m&&!ne&&U!==null&&!K&&!Ke&&!vt&&!In&&!tn&&!yn&&!yr&&!Pn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Me&&!qe),ln=He??`github.com/${se??"you"}/${be}`,En=se===void 0||Me||qe,on=r==="paper"&&!M&&T.trim().length>=3&&pt===T.trim()&&!_t&&Ht.length===0&&!b;return f.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:ft,children:[f.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:[f.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>Be("blank"),children:uit()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>Be("folder"),children:Yit()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>Be("paper"),children:_at()})]}),r==="paper"&&!M&&f.jsxs("label",{className:"!font-normal",children:[Zat(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:T,onChange:yt=>{w(null),j(yt.target.value)},placeholder:got()}),!on&&f.jsx("span",{className:"repo-hint",children:_t?Gct():Act()}),on&&f.jsx("span",{className:"project-path-notice block",children:Aat()}),Ht.length>0&&f.jsx("div",{className:"paper-results",children:Ht.map(yt=>f.jsxs("button",{type:"button",onClick:()=>void me(yt.paperId),children:[f.jsx(O0,{children:yt.title}),f.jsx("span",{className:"id",children:yt.paperId})]},yt.paperId))})]}),M&&r==="paper"&&f.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[f.jsxs("div",{className:"meta",children:[f.jsx(O0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&f.jsx("div",{className:"id",children:tkn(M.repoUrl)})]}),f.jsx(De,{size:"small",type:"button","aria-label":Ait(),onClick:Ae,children:Sit()})]}),!M.repoUrl&&f.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:[f.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[f.jsx(uS,{size:16})," ",$at()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Gat()})]})]}),(r!=="paper"||M)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:iz()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:yt=>{c(!0),a(yt.target.value)},placeholder:sz()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?Cst():Y2()}),f.jsx("input",{className:"text-sm font-normal",value:B,onChange:yt=>{p(!0),h(yt.target.value)},"aria-describedby":$n?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ne&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:rz()}),$n&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Dr})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?ist({path:ze(u)}):ez(),disabled:m,title:u||void 0,onClick:()=>void rt(),children:[f.jsx(Su,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:u?"text-sm":"placeholder",children:m?vst():u||ez()}),f.jsx(Ba,{className:"folder-picker-chevron",size:15})]}):r==="folder"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:Y2()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:yt=>{p(!0),h(yt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:Y2()}),f.jsx("input",{className:"text-sm font-normal",value:B,onChange:yt=>{p(!0),h(yt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Fn?"blank-destination-description":void 0,spellCheck:!1}),ne&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:rz()}),Fn&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Yn})]}):null,r!=="blank"&&B&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:iz()}),f.jsx("input",{className:"text-sm font-normal",value:i,onChange:yt=>{c(!0),a(yt.target.value)},placeholder:sz()})]}),Ke&&f.jsx("div",{className:"project-path-notice error",children:vat()}),!Ke&&r==="folder"&&u.trim()&&!ne&&(U==null?void 0:U.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:Aot()}),!Ke&&r==="folder"&&u.trim()&&!ne&&tn&&f.jsx("div",{className:"project-path-notice error",children:Got()}),!Ke&&r==="folder"&&!ne&&(U==null?void 0:U.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:$it()}),!Ke&&r==="folder"&&!ne&&(U==null?void 0:U.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:$ot()}),K&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:K})]}),b&&f.jsx("div",{className:"error",role:"alert",children:b}),(r!=="paper"||M)&&B&&(r!=="blank"||i.trim())&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[f.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":y,"aria-controls":"new-project-advanced-settings",onClick:()=>C(yt=>!yt),children:[N?se===null?$rt():Grt():WD(),f.jsx(rc,{className:y?"rotate-180":"",size:16})]}),y&&f.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[f.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[f.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:yt=>z(yt.target.checked),disabled:k}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Sot()})]}),f.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[f.jsx("span",{children:En?Zot({repository:ze(ln)}):He?fct({repository:ze(ln)}):ict({repository:ze(ln)})}),f.jsx("span",{children:sat()}),se===null&&f.jsx("span",{children:$ct({command:ze("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(De,{type:"button",onClick:n,children:git()}),f.jsx(De,{variant:"primary",className:"ms-auto",disabled:!bt,children:k?Gst():r==="paper"?M!=null&&M.repoUrl?Rst():tz():r==="folder"?Zct():tz()})]})]})}function _$({onClose:e,onCreated:n,remote:t=!1}){const r=A.useRef(null),s=A.useRef(e);return s.current=e,A.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 c=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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const _=h[0],p=h[h.length-1];u.shiftKey&&document.activeElement===_?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),_.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),a==null||a.focus()}},[]),f.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:f.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:[f.jsx("h2",{id:"new-project-dialog-title",children:sL()}),f.jsx(nkn,{onCancel:e,onCreated:n,remote:t})]})})}function rkn({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=A.useRef(null),a=A.useRef(r),o=A.useRef(n);a.current=r,o.current=n,A.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(_()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const x=_();if(x.length===0){m.preventDefault(),u.focus();return}const k=x[0],v=x[x.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return f.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:f.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:[f.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:fwt()}),f.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[f.jsx("p",{className:"m-0",children:R2t({name:Vi(e.name)})}),f.jsx("p",{className:"m-0",children:c?Bwt():Vwt()}),t&&f.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[f.jsx(De,{disabled:n,onClick:r,children:Z2t()}),f.jsx(De,{variant:"danger",disabled:n,onClick:s,children:n?Ewt():bwt()})]})]})})}function zj(){return f.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 skn({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=A.useState(!1),[o,c]=A.useState(null),[u,h]=A.useState(null),[_,p]=A.useState(null),m=ut(Vxn()),x=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await Wvn(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return f.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[f.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:[f.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:[f.jsx("h2",{children:b4t()}),f.jsxs(De,{onClick:()=>a(!0),children:[f.jsx(Lh,{size:15})," ",sL()]})]}),f.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:f.jsxs("div",{children:[f.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:[f.jsx("span",{children:f4t()}),f.jsx("span",{children:pz()}),f.jsx("span",{children:mz()}),f.jsx("span",{children:gz()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:i4t()}):[...e].sort((v,b)=>{var C,N;const w=((C=x[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=x[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-w||v.name.localeCompare(b.name)}).map(v=>{const b=x[v.id],w=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,y=w?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:w.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):zv(),C=b?b.activeAgents>0?v2t({count:Xt(b.activeAgents)}):R4t():"—",N=b?b.totalAgents===1?G4t():C2t({count:Xt(b.totalAgents)}):"—",z=b?b.runningExperiments>0?Z4t({count:Xt(b.runningExperiments)}):b.totalExperiments===0?Yk():vz({count:Xt(b.totalExperiments)}):"—",T=b&&b.runningExperiments>0?vz({count:Xt(b.totalExperiments)}):null;return f.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:[f.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":QY({name:Vi(v.name)}),onClick:()=>n(v.id)}),f.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:[f.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),f.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[f.jsxs("span",{children:[iwt()," ",co(v.createdAt)]}),v.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&f.jsxs("span",{children:[G2t()," ",ze(v.paperId)]}),f.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":r3({name:Vi(v.name)}),disabled:o===v.id,onClick:j=>{j.stopPropagation(),h(null),p(v)},children:f.jsx(bf,{size:14})})]})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:pz()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&f.jsx(zj,{}),C]}),f.jsx("span",{className:"text-xs text-muted",children:N})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:mz()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&f.jsx(zj,{}),z]}),T&&f.jsx("span",{className:"text-xs text-muted",children:T})]}),f.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[f.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:gz()}),w?f.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:w,target:"_blank",rel:"noreferrer","aria-label":Sv({name:Vi(v.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(Fb,{size:14})}),f.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:ze(y)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:y})]})]},v.id)})]})})]}),i&&f.jsx(_$,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),_&&f.jsx(rkn,{project:_,deleting:o===_.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(_)})]})}function f$(){const e=A.useSyncExternalStore(Fxn,Qz,Qz);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":o3()}),!e&&f.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:[f.jsx(uS,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:o3()})]})]})}function ikn({onClose:e,onConfigureSsh:n}){var v,b,w;const t=an({mutationFn:y=>Qbn(...y)}),r=ut(eI()),s=ut(mxn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=A.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((w=s.error)==null?void 0:w.message)??null,[h,_]=A.useState(null),p=A.useRef(null);Em(p,e);async function m(y){const C=window.open("/remote-launch","_blank");if(!C){pn(NSt(),"error");return}_(y);try{const N=await t.mutateAsync([y,{theme:Jxn(),locale:E()}]);C.location.replace(N.gatewayUrl),e()}catch(N){C.close(),pn(N instanceof Error?N.message:String(N),"error")}finally{_(null)}}const x=i==null?void 0:i.filter(y=>y.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(y=>[y.host,y]));return oa.createPortal(f.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:f.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:[f.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":i5t(),onClick:e,children:f.jsx(ur,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:u3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:f5t()}),f.jsx(qr,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:y=>c(y.target.value),placeholder:xz(),"aria-label":xz()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(zt,{})," ",wL()]}):(x==null?void 0:x.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:Jkt()}):x==null?void 0:x.map(y=>{const C=k.get(y.host);return f.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),h===y.host?f.jsx(zt,{}):C?f.jsx("span",{className:"text-sm text-subtext",children:dSt()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(KI,{size:15}),RL()]})})]})}),document.body)}function Pv({size:e=16,className:n}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[f.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"}),f.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"})]})}const akn="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",okn="/assets/ollama-logo-Bt9O-2K_.png",ckn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",d$={id:"lmstudio",label:"LM Studio",icon:akn,url:"http://127.0.0.1:1234/v1"},Z1=[d$,{id:"omlx",label:"oMLX",icon:ckn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:okn,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function h$({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,J;const s=ut({...Cxn(),enabled:!t}),i=ut(ku()),a=(V=i.data)==null?void 0:V.find(Z=>Z.id==="opencode"),[o,c]=A.useState(t),u=()=>{c(!1),r==null||r()},[h,_]=A.useState("lmstudio"),p=Z1.find(Z=>Z.id===h)??d$,[m,x]=A.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:w,contextWindow:y,error:C}=k,N=p.id==="ollama"?"":k.apiKey,z=Z=>{x(B=>({...B,[p.id]:{...B[p.id]??k,...Z}}))},T=an({mutationFn:sxn}),j=an({mutationFn:async Z=>{var F;const B=await ixn(Z);if(!((F=(await Y_(!0)).find(U=>U.id==="opencode"))!=null&&F.models.some(U=>U.id===B.model)))throw new Error(oJe());return B}}),M=an({mutationFn:oxn}),D=Number(y),I=T.isPending||j.isPending,$=(Z={})=>z({models:[],model:null,error:null,...Z}),q=async()=>{$();try{const Z=await T.mutateAsync({baseUrl:v.trim(),apiKey:N});z({models:Z.models,model:Z.models[0]??null})}catch(Z){z({error:Z instanceof Error?Z.message:String(Z)})}},H=async()=>{if(w){z({error:null});try{const Z=await j.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:w,contextWindow:D});u(),n==null||n(Z.model)}catch(Z){z({error:Z instanceof Error?Z.message:String(Z)})}}},Q=async Z=>{try{await M.mutateAsync(Z)}catch(B){pn(B instanceof Error?B.message:String(B),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":XN(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:XN()}),f.jsxs(De,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(Lh,{size:14}),qD()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(Z=>f.jsx(lkn,{connection:Z,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(B=>B.id))??[],checking:i.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:i.isError||!i.data,disabled:I||M.isPending,onRemove:()=>void Q(Z.id)},Z.id))})]}),o&&f.jsx(ukn,{busy:I,onClose:u,footer:f.jsxs(De,{variant:"primary",disabled:I||!e||b.length>0&&(!w||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?H():q()),children:[I&&f.jsx(zt,{}),b.length>0?met():WZe()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:tet()}),f.jsx(ph,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:WJe()})]}),f.jsx(Yo,{choices:Z1,value:h,title:QN(),header:QN(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:Z=>f.jsxs(f.Fragment,{children:[Z.id==="openai-compatible"?Gk():Z.label,Z.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:UD()})]}),renderIcon:Z=>{var L;const B=(L=Z1.find(F=>F.id===Z.id))==null?void 0:L.icon;return B?f.jsx("img",{src:B,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${Z.id==="ollama"?" dark:invert":""}`}):f.jsx(HI,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:FZe()}),f.jsx(qr,{value:v,disabled:I,onChange:Z=>{$({baseUrl:Z.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:fL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?Let():cet()}),f.jsx(qr,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:Z=>$({apiKey:Z.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(Yo,{choices:b.map(Z=>({id:Z,label:Z})),value:w,searchPlaceholder:KD(),title:_0(),header:_0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:Z=>{z({model:Z})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:xJe()}),f.jsx(qr,{type:"number",min:4096,step:1024,value:y,disabled:I,onChange:Z=>{z({contextWindow:Z.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:zJe()})]}),C&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function lkn({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=an({mutationFn:async()=>{try{await axn(e.id)}finally{await Y_(!0)}}}),c=Z1.find(x=>x.label===e.name||x.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(x=>t.includes(`${e.id}/${x}`)),_=o.isPending||r,p=s,m=h;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(HI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?Gk():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:UD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Ut,{variant:_||p?"default":m?"success":"warning",children:_?ta():p?SL():m?hJe():ro()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(De,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[f.jsx(Pa,{size:14}),Nv()]}),f.jsx(It,{"aria-label":FJe({name:e.name}),disabled:i||o.isPending,onClick:a,children:f.jsx(bf,{size:14})})]})]})]}),o.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function ukn({busy:e,onClose:n,footer:t,children:r}){const s=A.useRef(null),i=()=>{e||n()};return Em(s,i,"input"),oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:qD()})}),f.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":Q_(),onClick:i,disabled:e,children:f.jsx(ur,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(De,{onClick:i,disabled:e,children:Q_()}),t]})]})}),document.body)}const p$=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),jj=["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(" "),su={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function _kn(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:Rv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Mb(n,t).defaultId}}function _o(e){const[n,t]=A.useState(!1),r=A.useRef(null);return A.useEffect(()=>{if(!n)return;const s=a=>{var o,c;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.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 fkn({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,lockHarness:u=!1,openRequest:h=0,className:_}){var le,pe,be,Me,we,qe,He;const{data:p=dkn}=ut(ku()),m=bm(),[x,k]=A.useState(!1),v=A.useRef(null),b=A.useRef(null),{open:w,setOpen:y,ref:C}=_o(v),[N,z]=A.useState(""),[T,j]=A.useState("root"),M=()=>{y(!1),j("root"),z("")},D=A.useRef(h);A.useEffect(()=>{h!==D.current&&(D.current=h,j("models"),z(""),y(!0))},[h,y]),A.useEffect(()=>{var Ce;w&&(T==="reasoning"||T==="speed"||T==="permissions")&&((Ce=b.current)==null||Ce.focus())},[w,T]);const I=A.useMemo(()=>{const Ce=N.trim().toLowerCase();return(u&&e?p.filter(Qe=>Qe.id===e.harness):p).map(Qe=>{let it=Qe.models;return Ce?it=it.filter(Ct=>`${Ct.id} ${K1(Ct)}`.toLowerCase().includes(Ce)):(Qe.id==="opencode"||Qe.id==="cursor"||Qe.id==="antigravity")&&(it=it.slice(0,5)),{harness:Qe,models:it,hidden:Ce?0:Qe.models.length-it.length}})},[p,N,u,e]),$=(Ce,ot)=>{var it;const Qe=(e==null?void 0:e.harness)===Ce.id;n({harness:Ce.id,model:ot,serviceTier:Rv(Ce,ot,Qe?e==null?void 0:e.serviceTier:null),permissionMode:Qe?e.permissionMode:((it=Ce.options)==null?void 0:it.defaultPermissionMode)??null,reasoningLevel:YL(Ce,ot,Qe?e.reasoningLevel:null)}),M()},q=(e==null?void 0:e.model)!=null?(le=p.find(Ce=>Ce.id===e.harness))==null?void 0:le.models.find(Ce=>Ce.id===e.model):void 0,H=e?e.model?q?K1(q):b3(e.model):YN():_0(),Q=(e==null?void 0:e.reasoningLevel)??o??((pe=a[0])==null?void 0:pe.id),V=(be=a.find(Ce=>Ce.id===Q))==null?void 0:be.label,J=(e==null?void 0:e.permissionMode)??s??((Me=r[0])==null?void 0:Me.id),Z=(we=r.find(Ce=>Ce.id===J))==null?void 0:we.label,B=(e==null?void 0:e.harness)==="opencode"?vrt():ent(),L=p.find(Ce=>Ce.id===(e==null?void 0:e.harness)),F=XL(L,e==null?void 0:e.model),U=Rv(L,e==null?void 0:e.model,e==null?void 0:e.serviceTier),K=(qe=F.find(Ce=>Ce.id===U))==null?void 0:qe.label,ne=Ce=>{c==null||c(Ce),M()},ce=Ce=>{i==null||i(Ce),M()},_e=Ce=>{e&&n({...e,serviceTier:Ce}),M()},se=(Ce,ot,Qe)=>f.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:()=>j(Qe),children:[f.jsx("span",{className:"flex-1",children:Ce}),ot&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ot}),f.jsx(Ba,{size:14,className:"shrink-0 text-muted"})]}),G=Ce=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(It,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":rL(),onClick:()=>{j("root"),z("")},children:f.jsx(OI,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Ce}),T==="models"&&f.jsx(It,{type:"button",size:"small","aria-label":d3(),onClick:()=>{M(),t()},children:f.jsx(vS,{size:15,"aria-hidden":"true"})})]}),oe=(Ce,ot,Qe,it)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Ce.map(Ct=>f.jsxs(Xn,{onClick:()=>it(Ct.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Ct.label,Ct.id===Qe&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",VD()]})]}),Ct.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ct.description})]}),Ct.id===ot&&f.jsx(Ai,{size:13})]},Ct.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:C,children:[f.jsxs("button",{ref:v,type:"button",className:gs("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",_),title:tX({label:`${H}${V?` · ${V}`:""}${K?` · ${K}`:""}`}),"aria-haspopup":"menu","aria-expanded":w,onClick:()=>{w?M():(j("root"),y(!0))},children:[U==="priority"?f.jsx(K3n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(vh,{harness:e.harness,size:14}):null,U==="priority"&&f.jsxs("span",{className:"sr-only",children:[ont()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[H,V&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:V})]}),f.jsx(rc,{size:14,className:"shrink-0 text-muted"})]}),w&&f.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:[T==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[se(_0(),H,"models"),a.length>0&&se(B,V,"reasoning"),F.length>0&&se(JN(),K,"speed"),r.length>0&&se(ZN(),Z,"permissions")]}),T==="models"&&f.jsxs(f.Fragment,{children:[G(_0()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:KD(),value:N,onChange:Ce=>z(Ce.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[I.map(({harness:Ce,models:ot,hidden:Qe})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:p$,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(vh,{harness:Ce.id,size:14}),Ce.name]}),!Ce.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Ce.catalogPending?W_():f.jsxs(f.Fragment,{children:[f.jsx(fj,{size:10})," ",ro()]})})]}),Ce.agentReady?f.jsxs(f.Fragment,{children:[Ce.models.length===0&&f.jsxs(Xn,{onClick:()=>$(Ce,null),children:[f.jsxs("span",{children:[YN(),f.jsx("span",{className:"model-id",children:GD()})]}),(e==null?void 0:e.harness)===Ce.id&&(e==null?void 0:e.model)===null&&f.jsx(Ai,{size:13})]}),ot.map(it=>f.jsxs(Xn,{title:it.id,onClick:()=>$(Ce,it.id),children:[f.jsx("span",{children:K1(it)}),(e==null?void 0:e.harness)===Ce.id&&(e==null?void 0:e.model)===it.id&&f.jsx(Ai,{size:13})]},it.id)),N.trim().length>0&&!Ce.models.some(it=>it.id===N.trim())&&f.jsx(Xn,{onClick:()=>$(Ce,N.trim()),children:f.jsx("span",{children:_rt({id:ze(N.trim())})})})]}):f.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:Ce.catalogPending?W_():Ce.agentNote?gh(Ce.agentNote):Mnt()}),Ce.id==="opencode"&&f.jsx(Xn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var it;M(),(it=v.current)==null||it.focus(),k(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[wtt(),f.jsx(Lh,{size:14,"aria-hidden":"true"})]})}),Ce.agentReady&&Qe>0&&f.jsx("div",{className:jj,children:Ent({count:Xt(Qe)})})]},Ce.id)),p.length===0&&f.jsx("div",{className:jj,children:Ktt()})]}),u&&e&&p.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(fj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Vnt()]})]}),T==="reasoning"&&f.jsxs(f.Fragment,{children:[G(B),oe(a,Q,o,ne)]}),T==="permissions"&&f.jsxs(f.Fragment,{children:[G(ZN()),oe(r,J,s,ce)]}),T==="speed"&&f.jsxs(f.Fragment,{children:[G(JN()),oe(F,U??void 0,"default",_e)]})]}),x&&f.jsx(h$,{dialogOnly:!0,installed:((He=p.find(Ce=>Ce.id==="opencode"))==null?void 0:He.installed)??!1,onClose:()=>k(!1),onConnected:Ce=>{var Qe;const ot=(Qe=m.getQueryData(ku().queryKey))==null?void 0:Qe.find(it=>it.id==="opencode");ot&&(!u||(e==null?void 0:e.harness)==="opencode")&&$(ot,Ce)}})]})}function Yo({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:c,numbered:u=!1,searchPlaceholder:h,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:x,className:k}){var Q,V;const v=A.useRef(null),{open:b,setOpen:w,ref:y}=_o(v),C=A.useRef(null),[N,z]=A.useState("");if(A.useLayoutEffect(()=>{var L;const J=C.current,Z=y.current;if(!b||!m||!J||!Z)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const B=()=>{const F=Z.getBoundingClientRect(),U=window.innerHeight-F.bottom-12,K=F.top-12,ne=Math.min(380,J.scrollHeight),ce=i?U>=ne||U>=K:KK;J.style.width=`${F.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ce?U:K))}px`,J.style.left=`${F.left}px`,J.style.top=`${ce?F.bottom+4:F.top-J.getBoundingClientRect().height-4}px`};return B(),window.addEventListener("resize",B),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,!0)}},[b,m,i,N,e.length,y]),e.length===0)return null;const T=n??t??((Q=e[0])==null?void 0:Q.id)??null,j=e.find(J=>J.id===T),M=e.find(J=>J.id===t),D=o==="bare"&&(M==null?void 0:M.id)===Av?M:void 0,$=(D?e.filter(J=>J.id!==D.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(N.toLowerCase())),q=(j==null?void 0:j.label)??((V=e[0])==null?void 0:V.label)??"",H=J=>{var Z;x(J),w(!1),(Z=v.current)==null||Z.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:gs(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"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{z(""),w(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(_==null?void 0:_(j)),f.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??q:q})]}),f.jsx(rc,{size:12})]}),b&&f.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,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(J=>J.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&f.jsx("div",{className:p$,children:r}),h&&f.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:J=>z(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&f.jsxs(f.Fragment,{children:[f.jsxs(Xn,{type:"button",onClick:()=>H(D.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,f.jsx("span",{className:"option-default text-muted font-normal",children:GD()})]})]}),T===D.id&&f.jsx(Ai,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),$.map((J,Z)=>f.jsxs(Xn,{type:"button",onClick:()=>H(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!D&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",VD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),T===J.id?f.jsx(Ai,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:Z+1})]},J.id))]})]})]})}const dkn=[];function P3({runtime:e,corner:n=!1}){const[t,r]=A.useState(!1),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[c,u]=A.useState(null),h=_o();async function _(){if(c){o(!0);try{await KL(c),u(null)}catch(p){u(null),pn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:h.ref,children:[h.open&&f.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:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:$3t({host:ze(e.session.host),user:ze(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",ze(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(Xn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await GL(),h.setOpen(!1)}catch(p){pn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?A3t():_3()}),f.jsx(lS,{content:ySt(),className:"me-2 shrink-0 text-subtext",children:f.jsx(hS,{size:15})})]}),f.jsx(Xn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await VL()),h.setOpen(!1)}catch(p){pn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:aL()})]}),n?f.jsxs(De,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[f.jsx(Pv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:J2({host:ze(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(It,{size:"small","aria-label":J2({host:ze(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:f.jsx(Pv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.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:J2({host:ze(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",ze(e.session.version??"…")]})]})]})]}),c&&f.jsx(TI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Fv="code-source-text",m$="code-source-wrap",g$="file-view-gutter text-right text-muted select-none";function v$(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const hkn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},pkn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function F3(e){const n=e.trim().toLowerCase();return hkn[n]??n}function TS(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=pkn[n];if(t)return F3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:F3(n.slice(r+1))}sc.displayName="clike";sc.aliases=[];function sc(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:/[{}[\];(),.:]/}}zm.displayName="c";zm.aliases=[];function zm(e){e.register(sc),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}Hb.displayName="cpp";Hb.aliases=[];function Hb(e){e.register(zm),(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)}AS.displayName="arduino";AS.aliases=["ino"];function AS(e){e.register(Hb),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}RS.displayName="bash";RS.aliases=["sh","shell"];function RS(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(U,K){return"(?:"+F[+K]+")"})}function r(L,F,U){return RegExp(t(L,F),"")}function s(L,F){for(var U=0;U>/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),c=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),h=a(i.type+" "+i.typeDeclaration+" "+i.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},z=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,T=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),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,[k]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,m]),inside:N}],keyword:c,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,k]),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,_]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),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,c.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:c,"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=T+"|"+z,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),$=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,q=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[$,q]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[$]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),Z=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,H]);function B(L,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,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:B(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[Z]),lookbehind:!0,greedy:!0,inside:B(Z,J)}],char:{pattern:RegExp(z),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}jm.displayName="markup";jm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function jm(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}$h.displayName="css";$h.aliases=[];function $h(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)}OS.displayName="diff";OS.aliases=[];function OS(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)}DS.displayName="go";DS.aliases=[];function DS(e){e.register(sc),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"]}LS.displayName="ini";LS.aliases=[];function LS(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:/=/}}IS.displayName="java";IS.aliases=[];function IS(e){e.register(sc),(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)}$S.displayName="regex";$S.aliases=[];function $S(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),c={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":c}}],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}BS.displayName="json";BS.aliases=["webmanifest"];function BS(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}PS.displayName="kotlin";PS.aliases=["kt","kts"];function PS(e){e.register(sc),(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)}FS.displayName="less";FS.aliases=[];function FS(e){e.register(Ih),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"}})}HS.displayName="lua";HS.aliases=[];function HS(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:/[\[\](){},;]|\.+|:+/}}qS.displayName="makefile";qS.aliases=[];function qS(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:/[:;(){}]/}}US.displayName="yaml";US.aliases=["yml"];function US(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(c,u){u=(u||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}GS.displayName="markdown";GS.aliases=["md"];function GS(e){e.register(jm),(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(c){o!==c&&(n.languages.markdown[o].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var h=0,_=u.length;h<_;h++){var p=u[h];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],x=p.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var k=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase();var v="language-"+k;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}c(o.tokens)}),n.hooks.add("wrap",function(o){if(o.type==="code-block"){for(var c="",u=0,h=o.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}KS.displayName="perl";KS.aliases=[];function KS(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)}Ub.displayName="markup-templating";Ub.aliases=[];function Ub(e){e.register(jm),(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(c){if(typeof a=="function"&&!a(c))return c;for(var u=o.length,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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(c){for(var u=0;u=a.length);u++){var h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var _=a[i],p=r.tokenStack[_],m=typeof h=="string"?h:h.content,x=t(s,_),k=m.indexOf(x);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),w=m.substring(k+x.length),y=[];v&&y.push.apply(y,o([v])),y.push(b),w&&y.push.apply(y,o([w])),typeof h=="string"?c.splice.apply(c,[u,1].concat(y)):h.content=y}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}WS.displayName="php";WS.aliases=[];function WS(e){e.register(Ub),(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},c=[{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:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}QS.displayName="python";QS.aliases=["py"];function QS(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}XS.displayName="r";XS.aliases=[];function XS(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:/[(){}\[\],;]/}}YS.displayName="ruby";YS.aliases=["rb"];function YS(e){e.register(sc),(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)}ZS.displayName="rust";ZS.aliases=[];function ZS(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)}JS.displayName="sass";JS.aliases=[];function JS(e){e.register(Ih),(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)}e6.displayName="scss";e6.aliases=[];function e6(e){e.register(Ih),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}t6.displayName="sql";t6.aliases=[];function t6(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:/[;[\]()`,.]/}}n6.displayName="swift";n6.aliases=[];function n6(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})}r6.displayName="typescript";r6.aliases=["ts"];function r6(e){e.register(qb),(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)}Gb.displayName="basic";Gb.aliases=[];function Gb(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:/[,;:()]/}}s6.displayName="vbnet";s6.aliases=[];function s6(e){e.register(Gb),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 Tm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Tm.prototype.normal={};Tm.prototype.property={};Tm.prototype.space=void 0;function v$(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Tm(t,r,n)}function D0(e){return e.toLowerCase()}class Ai{constructor(n,t){this.attribute=t,this.property=n}}Ai.prototype.attribute="";Ai.prototype.booleanish=!1;Ai.prototype.boolean=!1;Ai.prototype.commaOrSpaceSeparated=!1;Ai.prototype.commaSeparated=!1;Ai.prototype.defined=!1;Ai.prototype.mustUseProperty=!1;Ai.prototype.number=!1;Ai.prototype.overloadedBoolean=!1;Ai.prototype.property="";Ai.prototype.spaceSeparated=!1;Ai.prototype.space=void 0;let nkn=0;const Kt=bf(),ts=bf(),H3=bf(),Ye=bf(),ar=bf(),H_=bf(),qi=bf();function bf(){return 2**++nkn}const q3=Object.freeze(Object.defineProperty({__proto__:null,boolean:Kt,booleanish:ts,commaOrSpaceSeparated:qi,commaSeparated:H_,number:Ye,overloadedBoolean:H3,spaceSeparated:ar},Symbol.toStringTag,{value:"Module"})),dw=Object.keys(q3);class i6 extends Ai{constructor(n,t,r,s){let i=-1;if(super(n,t),jj(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&okn.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(Tj,lkn);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!Tj.test(i)){let a=i.replace(akn,ckn);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=i6}return new s(r,n)}function ckn(e){return"-"+e.toLowerCase()}function lkn(e){return e.charAt(1).toUpperCase()}const E$=v$([b$,rkn,w$,k$,S$],"html"),Vb=v$([b$,skn,w$,k$,S$],"svg");function Aj(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 ukn(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Rj=/[#.]/g;function _kn(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function ykn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function xkn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function Lj(e){return xkn(e)||j$(e)}const Ij=document.createElement("i");function L0(e){const n="&"+e+";";Ij.innerHTML=n;const t=Ij.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const wkn=["","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 kkn(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let h=(c?c.line:0)||1,_=(c?c.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),_++;continue}const w=i+1;let y=w,C=w,N;if(b===35){C=++y;const q=e.charCodeAt(C);q===88||q===120?(N="hexadecimal",C=++y):N="decimal"}else N="named";let z="",T="",j="";const M=N==="named"?Lj:N==="decimal"?j$:ykn;for(C--;++C<=e.length;){const q=e.charCodeAt(C);if(!M(q))break;j+=String.fromCharCode(q),N==="named"&&bkn.includes(j)&&(z=j,T=L0(j))}let D=e.charCodeAt(C)===59;if(D){C++;const q=N==="named"?L0(j):!1;q&&(z=j,T=q)}let I=1+C-w,$="";if(!(!D&&t.nonTerminated===!1))if(!j)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!T)k(5,1);else if(z!==j&&(C=y+z.length,I=1+C-y,D=!1),!D){const q=z?1:3;if(t.attribute){const H=e.charCodeAt(C);H===61?(k(q,I),T=""):Lj(H)?T="":k(q,I)}else k(q,I)}$=T}else{D||k(2,I);let q=Number.parseInt(j,N==="hexadecimal"?16:10);if(Skn(q))k(7,I),$="�";else if(q in Dj)k(6,I),$=Dj[q];else{let H="";Ckn(q)&&k(6,I),q>65535&&(q-=65536,H+=String.fromCharCode(q>>>10|55296),q=56320|q&1023),$=H+String.fromCharCode(q)}}if($){v(),p=x(),i=C-1,_+=C-w+1,s.push($);const q=x();q.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,$,{start:p,end:q},e.slice(w-1,C)),p=q}else j=e.slice(w-1,C),o+=j,_+=j.length,i=C-1}else m===10&&(h++,a++,_=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),_++);return s.join("");function x(){return{line:h,column:_,offset:i+((c?c.offset:0)||0)}}function k(b,w){let y;t.warning&&(y=x(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,wkn[b],y,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:x()}),o="")}}function Skn(e){return e>=55296&&e<=57343||e>1114111}function Ckn(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 Ekn=0,u1={},ys={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Ekn}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(ys.util.type(n)){case"Object":if(s=ys.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=ys.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:u1,plaintext:u1,text:u1,txt:u1,extend:function(e,n){var t=ys.util.clone(ys.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||ys.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 c=r[e];return r[e]=i,ys.languages.DFS(ys.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=ys.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=ys.util.type(o);c==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):c==="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(ys.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=ys.tokenize(r.code,r.grammar),ys.hooks.run("after-tokenize",r),f0.stringify(ys.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 Nkn;return J1(s,s.head,e),T$(e,s,n,s.head,0),jkn(s)},hooks:{all:{},add:function(e,n){var t=ys.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=ys.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:f0};function f0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function $j(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 T$(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 c=0;c=i.reach);b+=v.value.length,v=v.next){var w=v.value;if(n.length>e.length)return;if(!(w instanceof f0)){var y=1,C;if(p){if(C=$j(k,b,e,_),!C||C.index>=e.length)break;var j=C.index,N=C.index+C[0].length,z=b;for(z+=v.value.length;j>=z;)v=v.next,z+=v.value.length;if(z-=v.value.length,b=z,v.value instanceof f0)continue;for(var T=v;T!==n.tail&&(zi.reach&&(i.reach=$);var q=v.prev;D&&(q=J1(n,q,D),b+=D.length),zkn(n,q,y);var H=new f0(a,h?ys.tokenize(M,h):M,m,M);if(v=J1(n,q,H),I&&J1(n,v,I),y>1){var Q={cause:a+","+c,reach:$};T$(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function Nkn(){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 J1(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 zkn(e,n,t){for(var r=n.next,s=0;st)return null;try{return Rt.highlight(e,n).children}catch{return null}}function O$(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(O$)},n)}function Ikn(e,n,t=3e5){var r;return((r=M$(e,n,t))==null?void 0:r.map(O$))??e}function D$(e,n,t=3e5){const r=M$(e,n,t);if(!r)return e.split(` +|(?![\\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)}DS.displayName="go";DS.aliases=[];function DS(e){e.register(sc),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"]}LS.displayName="ini";LS.aliases=[];function LS(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:/=/}}IS.displayName="java";IS.aliases=[];function IS(e){e.register(sc),(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)}$S.displayName="regex";$S.aliases=[];function $S(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),c={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":c}}],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}BS.displayName="json";BS.aliases=["webmanifest"];function BS(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}PS.displayName="kotlin";PS.aliases=["kt","kts"];function PS(e){e.register(sc),(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)}FS.displayName="less";FS.aliases=[];function FS(e){e.register($h),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"}})}HS.displayName="lua";HS.aliases=[];function HS(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:/[\[\](){},;]|\.+|:+/}}qS.displayName="makefile";qS.aliases=[];function qS(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:/[:;(){}]/}}US.displayName="yaml";US.aliases=["yml"];function US(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(c,u){u=(u||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}GS.displayName="markdown";GS.aliases=["md"];function GS(e){e.register(jm),(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(c){o!==c&&(n.languages.markdown[o].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var h=0,_=u.length;h<_;h++){var p=u[h];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],x=p.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var k=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase();var v="language-"+k;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}c(o.tokens)}),n.hooks.add("wrap",function(o){if(o.type==="code-block"){for(var c="",u=0,h=o.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}KS.displayName="perl";KS.aliases=[];function KS(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)}Ub.displayName="markup-templating";Ub.aliases=[];function Ub(e){e.register(jm),(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(c){if(typeof a=="function"&&!a(c))return c;for(var u=o.length,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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(c){for(var u=0;u=a.length);u++){var h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var _=a[i],p=r.tokenStack[_],m=typeof h=="string"?h:h.content,x=t(s,_),k=m.indexOf(x);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),w=m.substring(k+x.length),y=[];v&&y.push.apply(y,o([v])),y.push(b),w&&y.push.apply(y,o([w])),typeof h=="string"?c.splice.apply(c,[u,1].concat(y)):h.content=y}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}WS.displayName="php";WS.aliases=[];function WS(e){e.register(Ub),(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},c=[{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:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}QS.displayName="python";QS.aliases=["py"];function QS(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}XS.displayName="r";XS.aliases=[];function XS(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:/[(){}\[\],;]/}}YS.displayName="ruby";YS.aliases=["rb"];function YS(e){e.register(sc),(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)}ZS.displayName="rust";ZS.aliases=[];function ZS(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)}JS.displayName="sass";JS.aliases=[];function JS(e){e.register($h),(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)}e6.displayName="scss";e6.aliases=[];function e6(e){e.register($h),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}t6.displayName="sql";t6.aliases=[];function t6(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:/[;[\]()`,.]/}}n6.displayName="swift";n6.aliases=[];function n6(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})}r6.displayName="typescript";r6.aliases=["ts"];function r6(e){e.register(qb),(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)}Gb.displayName="basic";Gb.aliases=[];function Gb(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:/[,;:()]/}}s6.displayName="vbnet";s6.aliases=[];function s6(e){e.register(Gb),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 Tm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Tm.prototype.normal={};Tm.prototype.property={};Tm.prototype.space=void 0;function b$(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Tm(t,r,n)}function D0(e){return e.toLowerCase()}class Ri{constructor(n,t){this.attribute=t,this.property=n}}Ri.prototype.attribute="";Ri.prototype.booleanish=!1;Ri.prototype.boolean=!1;Ri.prototype.commaOrSpaceSeparated=!1;Ri.prototype.commaSeparated=!1;Ri.prototype.defined=!1;Ri.prototype.mustUseProperty=!1;Ri.prototype.number=!1;Ri.prototype.overloadedBoolean=!1;Ri.prototype.property="";Ri.prototype.spaceSeparated=!1;Ri.prototype.space=void 0;let mkn=0;const Qt=xf(),as=xf(),H3=xf(),Ye=xf(),lr=xf(),H_=xf(),Ui=xf();function xf(){return 2**++mkn}const q3=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qt,booleanish:as,commaOrSpaceSeparated:Ui,commaSeparated:H_,number:Ye,overloadedBoolean:H3,spaceSeparated:lr},Symbol.toStringTag,{value:"Module"})),dw=Object.keys(q3);class i6 extends Ri{constructor(n,t,r,s){let i=-1;if(super(n,t),Tj(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&xkn.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(Aj,kkn);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!Aj.test(i)){let a=i.replace(ykn,wkn);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=i6}return new s(r,n)}function wkn(e){return"-"+e.toLowerCase()}function kkn(e){return e.charAt(1).toUpperCase()}const N$=b$([y$,gkn,k$,S$,C$],"html"),Vb=b$([y$,vkn,k$,S$,C$],"svg");function Rj(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 Skn(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Mj=/[#.]/g;function Ckn(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function Okn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function Dkn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function Ij(e){return Dkn(e)||T$(e)}const $j=document.createElement("i");function L0(e){const n="&"+e+";";$j.innerHTML=n;const t=$j.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const Lkn=["","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 Ikn(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let h=(c?c.line:0)||1,_=(c?c.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),_++;continue}const w=i+1;let y=w,C=w,N;if(b===35){C=++y;const q=e.charCodeAt(C);q===88||q===120?(N="hexadecimal",C=++y):N="decimal"}else N="named";let z="",T="",j="";const M=N==="named"?Ij:N==="decimal"?T$:Okn;for(C--;++C<=e.length;){const q=e.charCodeAt(C);if(!M(q))break;j+=String.fromCharCode(q),N==="named"&&Mkn.includes(j)&&(z=j,T=L0(j))}let D=e.charCodeAt(C)===59;if(D){C++;const q=N==="named"?L0(j):!1;q&&(z=j,T=q)}let I=1+C-w,$="";if(!(!D&&t.nonTerminated===!1))if(!j)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!T)k(5,1);else if(z!==j&&(C=y+z.length,I=1+C-y,D=!1),!D){const q=z?1:3;if(t.attribute){const H=e.charCodeAt(C);H===61?(k(q,I),T=""):Ij(H)?T="":k(q,I)}else k(q,I)}$=T}else{D||k(2,I);let q=Number.parseInt(j,N==="hexadecimal"?16:10);if($kn(q))k(7,I),$="�";else if(q in Lj)k(6,I),$=Lj[q];else{let H="";Bkn(q)&&k(6,I),q>65535&&(q-=65536,H+=String.fromCharCode(q>>>10|55296),q=56320|q&1023),$=H+String.fromCharCode(q)}}if($){v(),p=x(),i=C-1,_+=C-w+1,s.push($);const q=x();q.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,$,{start:p,end:q},e.slice(w-1,C)),p=q}else j=e.slice(w-1,C),o+=j,_+=j.length,i=C-1}else m===10&&(h++,a++,_=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),_++);return s.join("");function x(){return{line:h,column:_,offset:i+((c?c.offset:0)||0)}}function k(b,w){let y;t.warning&&(y=x(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,Lkn[b],y,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:x()}),o="")}}function $kn(e){return e>=55296&&e<=57343||e>1114111}function Bkn(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 Pkn=0,u1={},ks={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Pkn}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(ks.util.type(n)){case"Object":if(s=ks.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=ks.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:u1,plaintext:u1,text:u1,txt:u1,extend:function(e,n){var t=ks.util.clone(ks.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||ks.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 c=r[e];return r[e]=i,ks.languages.DFS(ks.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=ks.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=ks.util.type(o);c==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):c==="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(ks.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=ks.tokenize(r.code,r.grammar),ks.hooks.run("after-tokenize",r),d0.stringify(ks.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 Fkn;return J1(s,s.head,e),A$(e,s,n,s.head,0),qkn(s)},hooks:{all:{},add:function(e,n){var t=ks.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=ks.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:d0};function d0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function Bj(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 A$(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 c=0;c=i.reach);b+=v.value.length,v=v.next){var w=v.value;if(n.length>e.length)return;if(!(w instanceof d0)){var y=1,C;if(p){if(C=Bj(k,b,e,_),!C||C.index>=e.length)break;var j=C.index,N=C.index+C[0].length,z=b;for(z+=v.value.length;j>=z;)v=v.next,z+=v.value.length;if(z-=v.value.length,b=z,v.value instanceof d0)continue;for(var T=v;T!==n.tail&&(zi.reach&&(i.reach=$);var q=v.prev;D&&(q=J1(n,q,D),b+=D.length),Hkn(n,q,y);var H=new d0(a,h?ks.tokenize(M,h):M,m,M);if(v=J1(n,q,H),I&&J1(n,v,I),y>1){var Q={cause:a+","+c,reach:$};A$(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function Fkn(){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 J1(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 Hkn(e,n,t){for(var r=n.next,s=0;st)return null;try{return Ot.highlight(e,n).children}catch{return null}}function D$(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(D$)},n)}function Ykn(e,n,t=3e5){var r;return((r=O$(e,n,t))==null?void 0:r.map(D$))??e}function L$(e,n,t=3e5){const r=O$(e,n,t);if(!r)return e.split(` `);const s=[];let i=[];const a=[];let o=0;const c=h=>{let _=h;for(let p=a.length-1;p>=0;p--)_=f.jsx("span",{className:a[p],children:_},o++);i.push(_)},u=h=>{var _;if(h.type==="text"){(h.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}h.type==="element"&&(a.push((((_=h.properties)==null?void 0:_.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function L$(e){return Array.isArray(e)?e.length===0:e===""}function I$({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:h}){const _=A.useMemo(()=>D$(e,TS(i)),[e,i]),{ruleCh:p,codeCh:m}=g$(_.length),x=A.useRef(null),k=A.useRef(null),v=()=>{const C=x.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=A.useRef(u);A.useLayoutEffect(()=>{const C=x.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.current.left,v())},[i]),A.useLayoutEffect(v,[e]),A.useLayoutEffect(()=>{var M;const C=x.current;if(!C||!a||o===void 0)return;const N=e.split(` -`),z=Math.min(Math.max(Math.trunc(a),1),N.length);let T=0;for(let D=0;D{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:z,selectionEnd:T}=N,j=e.slice(0,z)+" "+e.slice(T);n(j),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=z+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Fv} ${p$} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Fv}`,children:[f.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"}),f.jsx("div",{ref:k,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((C,N)=>f.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${m$} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),L$(C)?f.jsx("br",{}):C]},N))}),f.jsx("textarea",{ref:x,className:`file-view-editarea ${y} 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=>{v(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function $$({onClose:e,onSaved:n}){const t=exn(),r=ut(t),[s,i]=A.useState(()=>r.data??null),[a,o]=A.useState(()=>{var y;return((y=r.data)==null?void 0:y.content)??""}),c=!s&&r.error?r.error.message:null,u=an({mutationFn:({content:y,previous:C})=>Abn(y,C)}),[h,_]=A.useState(!1),p=A.useRef(null),m=A.useRef(e),x=s!==null&&a!==s.content,k=A.useRef(x),v=A.useRef(h);k.current=x,v.current=h,m.current=e,A.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(ycn())||m.current()};Em(p,b,"textarea");async function w(){if(!(!s||!x||h)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Rn(t.queryKey))return;Vr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),mn(Ocn(),"success")}catch(y){mn(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.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:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:Fcn()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Lt,{className:"absolute end-3.5 top-3.5","aria-label":dcn(),onClick:b,disabled:h,children:f.jsx(or,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Nt,{})," ",Ncn()]}):f.jsx(I$,{value:a,onChange:o,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(De,{onClick:b,disabled:h,children:W_()}),f.jsx(De,{variant:"primary",onClick:()=>void w(),disabled:!x||h,children:h?ia():nc()})]})]})}),document.body)}function B$({runtime:e,corner:n=!1}){const[t,r]=A.useState(null);return e.kind==="ssh"?f.jsx(P3,{runtime:e,corner:n}):f.jsxs(f.Fragment,{children:[n?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(De,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:u3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[f.jsx(Pv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:zv()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Lt,{size:"small","aria-label":u3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:f.jsx(Pv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:zv()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.version)]})]})]})}),t==="hosts"&&f.jsx(G5n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&f.jsx($$,{onClose:()=>r("hosts")})]})}function o6(e=!0){var r;const n=Mv(),t=ut({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Vr(n.queryKey,s)}}const $kn=6e4,Bkn=500;function P$(e){const[n,t]=A.useState(!1),[r,s]=A.useState(null),i=A.useRef(!1);A.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 c=Mv(),u=()=>i.current||!Rn(c.queryKey);t(!0),s(null),(async()=>{try{if(await hbn(),u())return;const h=Date.now()+$kn;for(;Date.now()setTimeout(p,Bkn)),u())return;const _=await nt.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(q0n())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function F$({status:e}){const[n,t]=A.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=P$(e);return!r||n===r?null:f.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:[f.jsx(Pa,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:i?DL({error:i}):g0n({version:Ne(r)})}),(e==null?void 0:e.canRestart)&&f.jsx(De,{type:"button",size:"small",disabled:s,onClick:a,children:s?LL():OL()}),f.jsx(Lt,{type:"button",size:"small",className:"ms-auto","aria-label":S0n(),disabled:s,onClick:()=>t(r),children:f.jsx(or,{size:13})})]})}function c6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Nt,{})})}function Pkn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:ro()}),f.jsx(Eb,{to:"/projects",children:l0()})]})}function l6({error:e,reset:n}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(De,{onClick:n,children:Vs()}),f.jsx(Eb,{to:"/projects",children:l0()})]})}function H$({projectId:e}){const{queryClient:n}=Lk({from:"__root__"}),t=Cb(),[r,s]=A.useState(null),[i,a]=A.useState(0);return A.useEffect(()=>{let o=!0;return s(null),(e?d5n(e,n):f5n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(IV(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?f.jsx(l6,{error:r,reset:()=>a(o=>o+1)}):f.jsx(c6,{})}function Fkn(){return f.jsx(H$,{})}function Hkn({projectId:e}){return f.jsx(H$,{projectId:e})}function qkn(){const e=s$(),n=Cb(),t=_h(),r=ut(t),s=ut(Sm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=o6(e.kind==="local");A.useEffect(()=>{document.title="OpenResearch",a&&Bb.queue({...kS()??a.workspace??{railOpen:!0,panelWidth:o$(),experimentsView:"table"},lastLocation:"/projects"})},[a]);const _=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(_$,{}),f.jsx(F$,{status:h})]}),c&&(!i||!a)?f.jsx(l6,{error:c,reset:u}):!i||!a?f.jsx(c6,{}):o?f.jsx(S5n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{_5n(),_(p.id)}}):f.jsx(U5n,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(p,m)=>{m?(mn(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):_(p.id)},onDeleted:p=>Vr(t.queryKey,m=>m==null?void 0:m.filter(x=>x.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&f.jsx(B$,{runtime:e,corner:!0})]})}const Ukn=tc()({component:Fkn}),Gkn=tc()({component:C0}),Vkn=tc()({}),Kkn=tc()({component:qkn}),Wkn=e=>({queryKey:St("getRunDiff",e),queryFn:({signal:n})=>$vn(e,n),staleTime:3e4}),q$=e=>({queryKey:St("getExperimentDiff",e),queryFn:({signal:n})=>Bvn(e,n),staleTime:3e4}),Hv=(e,n,t={})=>({queryKey:St("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>Pvn(e,n,t,r),staleTime:t.ref?uh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),U$=e=>({queryKey:St("getAbsoluteFile",e),queryFn:({signal:n})=>Fvn(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),G$=(e,n={})=>({queryKey:St("getCodeTree",e,{...n}),queryFn:({signal:t})=>abn(e,n,t),staleTime:n.ref&&uh(n.ref)?1/0:3e4}),qv=e=>({queryKey:St("getSessionWorktree",e),queryFn:({signal:n})=>obn(e,n),staleTime:3e4}),Qkn=e=>({queryKey:St("getArtifacts",e),queryFn:({signal:n})=>Wbn(e,n),staleTime:3e4}),u6=(e,n)=>({queryKey:St("getArtifactFileText",e,n),queryFn:({signal:t})=>Zbn(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),V$=(e,n)=>({queryKey:St("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>eyn(e,n,t),staleTime:2e3}),Xkn=()=>({queryKey:St("getLatexEngine"),queryFn:({signal:e})=>Vvn(e),staleTime:3e5}),Ykn=()=>({queryKey:St("getOverleafSettings"),queryFn:({signal:e})=>Wvn(e),staleTime:3e5}),Zkn=(e,n,t={})=>({queryKey:St("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>ebn(e,n,t,r),staleTime:3e5}),Jkn=(e,n,t={})=>({queryKey:St("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>sbn(e,n,t,r),staleTime:3e4}),K$=(e,n,t,r,s)=>({queryKey:St("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!uh(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},c=t==="abs",u=t==="artifacts",h=async()=>{const m=await o(V$(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&x?await o(u6(e,n)):null,v=m===null||x&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await o(Hv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(c?o(U$(n)).then(m=>({source:"absolute",file:m})):u?h().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await _();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):o(Hv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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 eSn(e,n,t,r,s){if(uh(s))return;const i=K$(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[U$(n).queryKey]:[Hv(e,n,{sessionId:r,ref:s}).queryKey,Hv(e,`artifacts/${n}`,{sessionId:r}).queryKey,u6(e,n).queryKey,V$(e,n).queryKey]];await Promise.all(a.map(o=>nt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>nt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await nt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function tSn(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 Bj={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 nSn(e){return Bj[e]??Bj.idle}const rSn={done:RL,failed:cun,running:wun,starting:jun,cancelling:Hln,cancelled:Dln,editing:tun,idle:pun};function _6(e){const n=rSn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function al({status:e,label:n,className:t}){const r=nSn(e);return f.jsx(Dd,{tone:r.tone,live:r.live,className:t,children:n??_6(e)})}const J_={local:RD,tinker:uRe,hf:lAe,modal:jAe,k8s:mAe,ssh:rRe,slurm:XAe,ray:qAe,openresearch:LAe};function Pj(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 On(e){for(var n=1;n=0||(h[c]=a[c]);return h})(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 Sn(e,n){return Q$(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,c,u=[],h=!0,_=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){_=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,n)||Kb(e,n)||Y$()}function W$(e){return Q$(e)||X$(e)||Kb(e)||Y$()}function Yi(e){return(function(n){if(Array.isArray(n))return K3(n)})(e)||X$(e)||Kb(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 Q$(e){if(Array.isArray(e))return e}function X$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kb(e,n){if(e){if(typeof e=="string")return K3(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)?K3(e,n):void 0}}function K3(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t{m>0&&(s.push(i),i=[]),p&&c(p)});return}h.type==="element"&&(a.push((((_=h.properties)==null?void 0:_.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function I$(e){return Array.isArray(e)?e.length===0:e===""}function $$({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:h}){const _=A.useMemo(()=>L$(e,TS(i)),[e,i]),{ruleCh:p,codeCh:m}=v$(_.length),x=A.useRef(null),k=A.useRef(null),v=()=>{const C=x.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=A.useRef(u);A.useLayoutEffect(()=>{const C=x.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.current.left,v())},[i]),A.useLayoutEffect(v,[e]),A.useLayoutEffect(()=>{var M;const C=x.current;if(!C||!a||o===void 0)return;const N=e.split(` +`),z=Math.min(Math.max(Math.trunc(a),1),N.length);let T=0;for(let D=0;D{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:z,selectionEnd:T}=N,j=e.slice(0,z)+" "+e.slice(T);n(j),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=z+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Fv} ${m$} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Fv}`,children:[f.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"}),f.jsx("div",{ref:k,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((C,N)=>f.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${g$} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),I$(C)?f.jsx("br",{}):C]},N))}),f.jsx("textarea",{ref:x,className:`file-view-editarea ${y} 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=>{v(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function B$({onClose:e,onSaved:n}){const t=hxn(),r=ut(t),[s,i]=A.useState(()=>r.data??null),[a,o]=A.useState(()=>{var y;return((y=r.data)==null?void 0:y.content)??""}),c=!s&&r.error?r.error.message:null,u=an({mutationFn:({content:y,previous:C})=>Gbn(y,C)}),[h,_]=A.useState(!1),p=A.useRef(null),m=A.useRef(e),x=s!==null&&a!==s.content,k=A.useRef(x),v=A.useRef(h);k.current=x,v.current=h,m.current=e,A.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(Ocn())||m.current()};Em(p,b,"textarea");async function w(){if(!(!s||!x||h)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!An(t.queryKey))return;Jr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),pn(Wcn(),"success")}catch(y){pn(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.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:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:tln()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":Ncn(),onClick:b,disabled:h,children:f.jsx(ur,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(zt,{})," ",Fcn()]}):f.jsx($$,{value:a,onChange:o,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(De,{onClick:b,disabled:h,children:Q_()}),f.jsx(De,{variant:"primary",onClick:()=>void w(),disabled:!x||h,children:h?ia():nc()})]})]})}),document.body)}function P$({runtime:e,corner:n=!1}){const[t,r]=A.useState(null);return e.kind==="ssh"?f.jsx(P3,{runtime:e,corner:n}):f.jsxs(f.Fragment,{children:[n?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(De,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:u3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[f.jsx(Pv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:zv()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(It,{size:"small","aria-label":u3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:f.jsx(Pv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:zv()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",ze(e.version)]})]})]})}),t==="hosts"&&f.jsx(ikn,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&f.jsx(B$,{onClose:()=>r("hosts")})]})}function o6(e=!0){var r;const n=Mv(),t=ut({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Jr(n.queryKey,s)}}const Zkn=6e4,Jkn=500;function F$(e){const[n,t]=A.useState(!1),[r,s]=A.useState(null),i=A.useRef(!1);A.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 c=Mv(),u=()=>i.current||!An(c.queryKey);t(!0),s(null),(async()=>{try{if(await zbn(),u())return;const h=Date.now()+Zkn;for(;Date.now()setTimeout(p,Jkn)),u())return;const _=await tt.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(rmn())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function H$({status:e}){const[n,t]=A.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=F$(e);return!r||n===r?null:f.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:[f.jsx(Pa,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:i?LL({error:i}):A0n({version:ze(r)})}),(e==null?void 0:e.canRestart)&&f.jsx(De,{type:"button",size:"small",disabled:s,onClick:a,children:s?IL():DL()}),f.jsx(It,{type:"button",size:"small",className:"ms-auto","aria-label":$0n(),disabled:s,onClick:()=>t(r),children:f.jsx(ur,{size:13})})]})}function c6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(zt,{})})}function eSn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:ro()}),f.jsx(Eb,{to:"/projects",children:u0()})]})}function l6({error:e,reset:n}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(De,{onClick:n,children:Ws()}),f.jsx(Eb,{to:"/projects",children:u0()})]})}function q$({projectId:e}){const{queryClient:n}=Lk({from:"__root__"}),t=Cb(),[r,s]=A.useState(null),[i,a]=A.useState(0);return A.useEffect(()=>{let o=!0;return s(null),(e?N5n(e,n):E5n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&($V(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?f.jsx(l6,{error:r,reset:()=>a(o=>o+1)}):f.jsx(c6,{})}function tSn(){return f.jsx(q$,{})}function nSn({projectId:e}){return f.jsx(q$,{projectId:e})}function rSn(){const e=i$(),n=Cb(),t=dh(),r=ut(t),s=ut(Sm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=o6(e.kind==="local");A.useEffect(()=>{document.title="OpenResearch",a&&Bb.queue({...kS()??a.workspace??{railOpen:!0,panelWidth:c$(),experimentsView:"table"},lastLocation:"/projects"})},[a]);const _=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(f$,{}),f.jsx(H$,{status:h})]}),c&&(!i||!a)?f.jsx(l6,{error:c,reset:u}):!i||!a?f.jsx(c6,{}):o?f.jsx($5n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{C5n(),_(p.id)}}):f.jsx(skn,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(p,m)=>{m?(pn(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):_(p.id)},onDeleted:p=>Jr(t.queryKey,m=>m==null?void 0:m.filter(x=>x.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&f.jsx(P$,{runtime:e,corner:!0})]})}const sSn=tc()({component:tSn}),iSn=tc()({component:E0}),aSn=tc()({}),oSn=tc()({component:rSn}),cSn=e=>({queryKey:Nt("getRunDiff",e),queryFn:({signal:n})=>Zvn(e,n),staleTime:3e4}),U$=e=>({queryKey:Nt("getExperimentDiff",e),queryFn:({signal:n})=>Jvn(e,n),staleTime:3e4}),Hv=(e,n,t={})=>({queryKey:Nt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>ebn(e,n,t,r),staleTime:t.ref?fh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),G$=e=>({queryKey:Nt("getAbsoluteFile",e),queryFn:({signal:n})=>tbn(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),V$=(e,n={})=>({queryKey:Nt("getCodeTree",e,{...n}),queryFn:({signal:t})=>ybn(e,n,t),staleTime:n.ref&&fh(n.ref)?1/0:3e4}),qv=e=>({queryKey:Nt("getSessionWorktree",e),queryFn:({signal:n})=>xbn(e,n),staleTime:3e4}),lSn=e=>({queryKey:Nt("getArtifacts",e),queryFn:({signal:n})=>cyn(e,n),staleTime:3e4}),u6=(e,n)=>({queryKey:Nt("getArtifactFileText",e,n),queryFn:({signal:t})=>fyn(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),K$=(e,n)=>({queryKey:Nt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>hyn(e,n,t),staleTime:2e3}),uSn=()=>({queryKey:Nt("getLatexEngine"),queryFn:({signal:e})=>abn(e),staleTime:3e5}),_Sn=()=>({queryKey:Nt("getOverleafSettings"),queryFn:({signal:e})=>cbn(e),staleTime:3e5}),fSn=(e,n,t={})=>({queryKey:Nt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>hbn(e,n,t,r),staleTime:3e5}),dSn=(e,n,t={})=>({queryKey:Nt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>vbn(e,n,t,r),staleTime:3e4}),W$=(e,n,t,r,s)=>({queryKey:Nt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!fh(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},c=t==="abs",u=t==="artifacts",h=async()=>{const m=await o(K$(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&x?await o(u6(e,n)):null,v=m===null||x&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await o(Hv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(c?o(G$(n)).then(m=>({source:"absolute",file:m})):u?h().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await _();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):o(Hv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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 hSn(e,n,t,r,s){if(fh(s))return;const i=W$(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[G$(n).queryKey]:[Hv(e,n,{sessionId:r,ref:s}).queryKey,Hv(e,`artifacts/${n}`,{sessionId:r}).queryKey,u6(e,n).queryKey,K$(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 pSn(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 Pj={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 mSn(e){return Pj[e]??Pj.idle}const gSn={done:ML,failed:wun,running:Lun,starting:qun,cancelling:nun,cancelled:Qln,editing:pun,idle:jun};function _6(e){const n=gSn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function al({status:e,label:n,className:t}){const r=mSn(e);return f.jsx(Id,{tone:r.tone,live:r.live,className:t,children:n??_6(e)})}const ef={local:MD,tinker:_Re,hf:uAe,modal:TAe,k8s:gAe,ssh:sRe,slurm:YAe,ray:UAe,openresearch:IAe};function Fj(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 Mn(e){for(var n=1;n=0||(h[c]=a[c]);return h})(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 Cn(e,n){return X$(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,c,u=[],h=!0,_=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){_=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,n)||Kb(e,n)||Z$()}function Q$(e){return X$(e)||Y$(e)||Kb(e)||Z$()}function Yi(e){return(function(n){if(Array.isArray(n))return K3(n)})(e)||Y$(e)||Kb(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 X$(e){if(Array.isArray(e))return e}function Y$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kb(e,n){if(e){if(typeof e=="string")return K3(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)?K3(e,n):void 0}}function K3(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(c){throw c},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 c=t.next();return a=c.done,c},e:function(c){o=!0,i=c},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var _1=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 Wi=Am((function(e){/*! +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 c=t.next();return a=c.done,c},e:function(c){o=!0,i=c},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var _1=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 Qi=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?b.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(y+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var z=b.slice(y+1).split(" "),T=z[0].split("..");a.oldRevision=T[0],a.newRevision=T[1],z[1]&&(a.oldMode=a.newMode=z[1]);break;case"copy":case"rename":var j=b.slice(y+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),w=C;break;case"---":var M=b.slice(y+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),w="add"):D==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var $=v.slice(0,1),q={content:v.slice(1)};switch($){case"+":q.type="insert",q.isInsert=!0,q.lineNumber=u,u++;break;case"-":q.type="delete",q.isDelete=!0,q.lineNumber=c,c++;break;case" ":q.type="normal",q.isNormal=!0,q.oldLineNumber=c,q.newLineNumber=u,c++,u++;break;case"\\":var H=o.changes[o.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}q.type&&o.changes.push(q)}k++}return _}};e.exports=s})()}));function Du(e){return e.type==="insert"}function Zi(e){return e.type==="delete"}function ul(e){return e.type==="normal"}function oSn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=Sn(i,3),u=c[0],h=c[1],_=c[2];return h?Du(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Zi(a)&&Zi(h)?_:o]):(u.push(a),[u,a,Zi(a)?o:-1])}),[[],null,-1]);return Sn(s,1)[0]})(e.changes):e.changes;return On(On({},e),{},{isPlain:!1,changes:t})}function W3(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(` +*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?b.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(y+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var z=b.slice(y+1).split(" "),T=z[0].split("..");a.oldRevision=T[0],a.newRevision=T[1],z[1]&&(a.oldMode=a.newMode=z[1]);break;case"copy":case"rename":var j=b.slice(y+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),w=C;break;case"---":var M=b.slice(y+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),w="add"):D==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var $=v.slice(0,1),q={content:v.slice(1)};switch($){case"+":q.type="insert",q.isInsert=!0,q.lineNumber=u,u++;break;case"-":q.type="delete",q.isDelete=!0,q.lineNumber=c,c++;break;case" ":q.type="normal",q.isNormal=!0,q.oldLineNumber=c,q.newLineNumber=u,c++,u++;break;case"\\":var H=o.changes[o.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}q.type&&o.changes.push(q)}k++}return _}};e.exports=s})()}));function Du(e){return e.type==="insert"}function Zi(e){return e.type==="delete"}function ul(e){return e.type==="normal"}function xSn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=Cn(i,3),u=c[0],h=c[1],_=c[2];return h?Du(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Zi(a)&&Zi(h)?_:o]):(u.push(a),[u,a,Zi(a)?o:-1])}),[[],null,-1]);return Cn(s,1)[0]})(e.changes):e.changes;return Mn(Mn({},e),{},{isPlain:!1,changes:t})}function W3(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),c=a.split(" ").slice(1,-3).join(" "),u=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(u),r.slice(i+1)].join(` -`)})(e.trimStart());return aSn.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return oSn(o,i)}));return On(On({},s),{},{hunks:a})})(r,n)}))}function cSn(e){return e[0]}function lSn(e){return e[e.length-1]}function Q3(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function I0(e){return e==="old"?function(n){return Du(n)?-1:ul(n)?n.oldLineNumber:n.lineNumber}:function(n){return Zi(n)?-1:ul(n)?n.newLineNumber:n.lineNumber}}function J$(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},gSn=function(e,n){var t=this.__data__,r=Wb(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function yd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var _=-1,p=!0,m=2&t?new e6n:void 0;for(i.set(e,n),i.set(n,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},pr={};pr["[object Float32Array]"]=pr["[object Float64Array]"]=pr["[object Int8Array]"]=pr["[object Int16Array]"]=pr["[object Int32Array]"]=pr["[object Uint8Array]"]=pr["[object Uint8ClampedArray]"]=pr["[object Uint16Array]"]=pr["[object Uint32Array]"]=!0,pr["[object Arguments]"]=pr["[object Array]"]=pr["[object ArrayBuffer]"]=pr["[object Boolean]"]=pr["[object DataView]"]=pr["[object Date]"]=pr["[object Error]"]=pr["[object Function]"]=pr["[object Map]"]=pr["[object Number]"]=pr["[object Object]"]=pr["[object RegExp]"]=pr["[object Set]"]=pr["[object String]"]=pr["[object WeakMap]"]=!1;var m6n=function(e){return gh(e)&&h6(e.length)&&!!pr[Bh(e)]},g6n=function(e){return function(n){return e(n)}},Wj=Am((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&nB.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})),Qj=Wj&&Wj.isTypedArray,p6=Qj?g6n(Qj):m6n,v6n=Object.prototype.hasOwnProperty,b6n=function(e,n){var t=na(e),r=!t&&Zb(e),s=!t&&!r&&Uv(e),i=!t&&!r&&!s&&p6(e),a=t||r||s||i,o=a?_6n(e.length,String):[],c=o.length;for(var u in e)!v6n.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cB(u,c))||o.push(u);return o},y6n=Object.prototype,lB=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||y6n)},x6n=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),w6n=Object.prototype.hasOwnProperty,uB=function(e){if(!lB(e))return x6n(e);var n=[];for(var t in Object(e))w6n.call(e,t)&&t!="constructor"&&n.push(t);return n},Jb=function(e){return e!=null&&h6(e.length)&&!sB(e)},m6=function(e){return Jb(e)?b6n(e):uB(e)},Xj=function(e){return a6n(e,m6,u6n)},k6n=Object.prototype.hasOwnProperty,S6n=function(e,n,t,r,s,i){var a=1&t,o=Xj(e),c=o.length;if(c!=Xj(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:k6n.call(n,h)))return!1}var _=i.get(e),p=i.get(n);if(_&&p)return _==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=Sn(e,1)[0];return n.type==="text"&&!n.value}return!0}function fCn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=Cu(e,uCn),a=s?function(o,c){return s(o,tT,c)}:tT;return f.jsx("td",On(On({},i),{},{"data-change-key":n,children:r?_Cn(r)?" ":r.map(a):t||" "}))}var vB=A.memo(fCn);function bB(e,n){return function(){var t=n==="old"?sy(e):iy(e);return t===-1?void 0:t}}function yB(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Gv(e,n){return n?function(t){e(),n(t)}:e}function nT(e,n,t,r){return A.useMemo((function(){var s=gB(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=Gv(t,s.onMouseEnter),s.onMouseLeave=Gv(r,s.onMouseLeave),s}),[e,t,r,n])}function rT(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:bB(n,r),wrapInAnchor:yB(s,i)};return f.jsx("td",On(On({className:e},a),{},{"data-change-key":t,children:c(u)}))}function dCn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,C=xu(s),N=(n=Sn(A.useState(!1),2),t=n[0],r=n[1],[t,A.useCallback((function(){return r(!0)}),[]),A.useCallback((function(){return r(!1)}),[])]),z=Sn(N,3),T=z[0],j=z[1],M=z[2],D=A.useMemo((function(){return{change:s}}),[s]),I=nT(_,D,j,M),$=nT(p,D,j,M),q=k(s),H=c({changes:[s],defaultGenerate:function(){return o}}),Q=Wi("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":i}),V=Wi("diff-code","diff-code-".concat(w),h,{"diff-code-selected":i});return f.jsxs("tr",{id:q,className:Wi("diff-line",H),children:[!m&&rT(Q,s,C,"old",x,q,I,T,b),!m&&rT(Q,s,C,"new",x,q,I,T,b),f.jsx(vB,On({className:V,changeKey:C,text:y,tokens:a,renderToken:v},$))]})}var hCn=A.memo(dCn);function pCn(e){var n=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var mCn=["hideGutter","selectedChanges","tokens","lineClassName"],gCn=["hunk","widgets","className"];function vCn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cu(e,gCn),i=(function(a,o){return a.reduce((function(c,u){var h=xu(u);c.push(["change",h,u]);var _=o[h];return _&&c.push(["widget",h,_]),c}),[])})(n.changes,t);return f.jsx("tbody",{className:Wi("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=Sn(o,3),h=u[0],_=u[1],p=u[2],m=c.hideGutter,x=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=Cu(c,mCn);if(h==="change"){var w=Zi(p)?"old":"new",y=Zi(p)?sy(p):iy(p),C=k?k[w][y-1]:null;return f.jsx(hCn,On({className:v,change:p,hideGutter:m,selected:x.includes(_),tokens:C},b),"change".concat(_))}return h==="widget"?f.jsx(pCn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var xB=0;function d1(e,n,t,r){var s=A.useCallback((function(){return n(e)}),[e,n]),i=A.useCallback((function(){return n("")}),[n]);return A.useMemo((function(){var a=gB(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=Gv(s,a.onMouseEnter),a.onMouseLeave=Gv(i,a.onMouseLeave),a}),[t,r,s,e,i])}function mw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,u=e.anchorID,h=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,k=e.renderGutter;if(!n){var v=Wi("diff-gutter","diff-gutter-omit",i),b=Wi("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=n.type,y=n.content,C=xu(n),N=t===xB?"old":"new",z=On({id:u||void 0,className:Wi("diff-gutter","diff-gutter-".concat(w),V3({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:bB(n,N),wrapInAnchor:yB(h,_)})},o),T=Wi("diff-code","diff-code-".concat(w),V3({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&f.jsx("td",On(On({},z),{},{"data-change-key":C}),"gutter"),f.jsx(vB,On({className:T,changeKey:C,text:y,tokens:s,renderToken:x},c),"code")]}function bCn(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,c=e.monotonous,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=Sn(A.useState(""),2),C=y[0],N=y[1],z=d1("old",N,t,_),T=d1("new",N,r,_),j=d1("old",N,t,p),M=d1("new",N,r,p),D=t&&x(t),I=r&&x(r),$=k({changes:[t,r],defaultGenerate:function(){return n}}),q={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},H=On(On({},q),{},{change:t,side:xB,selected:s,tokens:a,gutterEvents:z,codeEvents:j,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=On(On({},q),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:T,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return f.jsx("tr",{className:Wi("diff-line",$),children:mw(t?H:Q)});var V=(function(J,Z){return J&&!Z?"diff-line-old-only":!J&&Z?"diff-line-new-only":J===Z?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:Wi("diff-line",V,$),children:[mw(H),mw(Q)]})}var yCn=A.memo(bCn);function xCn(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var wCn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],kCn=["hunk","widgets","className"];function h1(e,n){return(e?xu(e):"00")+(n?xu(n):"00")}function SCn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cu(e,kCn),i=(function(a,o){for(var c=function(b){if(!b)return null;var w=xu(b);return o[w]||null},u=[],h=0;h=s&&r=i&&s-1},ASn=function(e,n){var t=this.__data__,r=Wb(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function wd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var _=-1,p=!0,m=2&t?new h6n:void 0;for(i.set(e,n),i.set(n,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},br={};br["[object Float32Array]"]=br["[object Float64Array]"]=br["[object Int8Array]"]=br["[object Int16Array]"]=br["[object Int32Array]"]=br["[object Uint8Array]"]=br["[object Uint8ClampedArray]"]=br["[object Uint16Array]"]=br["[object Uint32Array]"]=!0,br["[object Arguments]"]=br["[object Array]"]=br["[object ArrayBuffer]"]=br["[object Boolean]"]=br["[object DataView]"]=br["[object Date]"]=br["[object Error]"]=br["[object Function]"]=br["[object Map]"]=br["[object Number]"]=br["[object Object]"]=br["[object RegExp]"]=br["[object Set]"]=br["[object String]"]=br["[object WeakMap]"]=!1;var T6n=function(e){return bh(e)&&h6(e.length)&&!!br[Ph(e)]},A6n=function(e){return function(n){return e(n)}},Qj=Am((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&rB.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})),Xj=Qj&&Qj.isTypedArray,p6=Xj?A6n(Xj):T6n,R6n=Object.prototype.hasOwnProperty,M6n=function(e,n){var t=na(e),r=!t&&Zb(e),s=!t&&!r&&Uv(e),i=!t&&!r&&!s&&p6(e),a=t||r||s||i,o=a?C6n(e.length,String):[],c=o.length;for(var u in e)!R6n.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lB(u,c))||o.push(u);return o},O6n=Object.prototype,uB=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||O6n)},D6n=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),L6n=Object.prototype.hasOwnProperty,_B=function(e){if(!uB(e))return D6n(e);var n=[];for(var t in Object(e))L6n.call(e,t)&&t!="constructor"&&n.push(t);return n},Jb=function(e){return e!=null&&h6(e.length)&&!iB(e)},m6=function(e){return Jb(e)?M6n(e):_B(e)},Yj=function(e){return y6n(e,m6,S6n)},I6n=Object.prototype.hasOwnProperty,$6n=function(e,n,t,r,s,i){var a=1&t,o=Yj(e),c=o.length;if(c!=Yj(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:I6n.call(n,h)))return!1}var _=i.get(e),p=i.get(n);if(_&&p)return _==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=Cn(e,1)[0];return n.type==="text"&&!n.value}return!0}function ECn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=Cu(e,SCn),a=s?function(o,c){return s(o,nT,c)}:nT;return f.jsx("td",Mn(Mn({},i),{},{"data-change-key":n,children:r?CCn(r)?" ":r.map(a):t||" "}))}var bB=A.memo(ECn);function yB(e,n){return function(){var t=n==="old"?sy(e):iy(e);return t===-1?void 0:t}}function xB(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Gv(e,n){return n?function(t){e(),n(t)}:e}function rT(e,n,t,r){return A.useMemo((function(){var s=vB(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=Gv(t,s.onMouseEnter),s.onMouseLeave=Gv(r,s.onMouseLeave),s}),[e,t,r,n])}function sT(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:yB(n,r),wrapInAnchor:xB(s,i)};return f.jsx("td",Mn(Mn({className:e},a),{},{"data-change-key":t,children:c(u)}))}function NCn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,C=xu(s),N=(n=Cn(A.useState(!1),2),t=n[0],r=n[1],[t,A.useCallback((function(){return r(!0)}),[]),A.useCallback((function(){return r(!1)}),[])]),z=Cn(N,3),T=z[0],j=z[1],M=z[2],D=A.useMemo((function(){return{change:s}}),[s]),I=rT(_,D,j,M),$=rT(p,D,j,M),q=k(s),H=c({changes:[s],defaultGenerate:function(){return o}}),Q=Qi("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":i}),V=Qi("diff-code","diff-code-".concat(w),h,{"diff-code-selected":i});return f.jsxs("tr",{id:q,className:Qi("diff-line",H),children:[!m&&sT(Q,s,C,"old",x,q,I,T,b),!m&&sT(Q,s,C,"new",x,q,I,T,b),f.jsx(bB,Mn({className:V,changeKey:C,text:y,tokens:a,renderToken:v},$))]})}var zCn=A.memo(NCn);function jCn(e){var n=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var TCn=["hideGutter","selectedChanges","tokens","lineClassName"],ACn=["hunk","widgets","className"];function RCn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cu(e,ACn),i=(function(a,o){return a.reduce((function(c,u){var h=xu(u);c.push(["change",h,u]);var _=o[h];return _&&c.push(["widget",h,_]),c}),[])})(n.changes,t);return f.jsx("tbody",{className:Qi("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=Cn(o,3),h=u[0],_=u[1],p=u[2],m=c.hideGutter,x=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=Cu(c,TCn);if(h==="change"){var w=Zi(p)?"old":"new",y=Zi(p)?sy(p):iy(p),C=k?k[w][y-1]:null;return f.jsx(zCn,Mn({className:v,change:p,hideGutter:m,selected:x.includes(_),tokens:C},b),"change".concat(_))}return h==="widget"?f.jsx(jCn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var wB=0;function d1(e,n,t,r){var s=A.useCallback((function(){return n(e)}),[e,n]),i=A.useCallback((function(){return n("")}),[n]);return A.useMemo((function(){var a=vB(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=Gv(s,a.onMouseEnter),a.onMouseLeave=Gv(i,a.onMouseLeave),a}),[t,r,s,e,i])}function mw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,u=e.anchorID,h=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,k=e.renderGutter;if(!n){var v=Qi("diff-gutter","diff-gutter-omit",i),b=Qi("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=n.type,y=n.content,C=xu(n),N=t===wB?"old":"new",z=Mn({id:u||void 0,className:Qi("diff-gutter","diff-gutter-".concat(w),V3({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:yB(n,N),wrapInAnchor:xB(h,_)})},o),T=Qi("diff-code","diff-code-".concat(w),V3({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&f.jsx("td",Mn(Mn({},z),{},{"data-change-key":C}),"gutter"),f.jsx(bB,Mn({className:T,changeKey:C,text:y,tokens:s,renderToken:x},c),"code")]}function MCn(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,c=e.monotonous,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=Cn(A.useState(""),2),C=y[0],N=y[1],z=d1("old",N,t,_),T=d1("new",N,r,_),j=d1("old",N,t,p),M=d1("new",N,r,p),D=t&&x(t),I=r&&x(r),$=k({changes:[t,r],defaultGenerate:function(){return n}}),q={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},H=Mn(Mn({},q),{},{change:t,side:wB,selected:s,tokens:a,gutterEvents:z,codeEvents:j,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=Mn(Mn({},q),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:T,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return f.jsx("tr",{className:Qi("diff-line",$),children:mw(t?H:Q)});var V=(function(J,Z){return J&&!Z?"diff-line-old-only":!J&&Z?"diff-line-new-only":J===Z?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:Qi("diff-line",V,$),children:[mw(H),mw(Q)]})}var OCn=A.memo(MCn);function DCn(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var LCn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],ICn=["hunk","widgets","className"];function h1(e,n){return(e?xu(e):"00")+(n?xu(n):"00")}function $Cn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cu(e,ICn),i=(function(a,o){for(var c=function(b){if(!b)return null;var w=xu(b);return o[w]||null},u=[],h=0;h=(i==null?void 0:i.value.length))return[e];var o=function(_,p){var m=i.value.slice(_,p);return[].concat(Yi(s),[On(On({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(Ed(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(_,p){return[p].concat(Yi(Ed(_)))})(u,r):Ed(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,UCn);t.push(s);var i,a=f6(r);try{for(a.s();!(i=a.n()).done;)CB(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(Ed([].concat(Yi(t.slice(1)),[e])));return n}function GCn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=x6(c);return u.value.includes(` +`)})(n.oldSource,e),r=n.highlight?function(c){return n.refractor.highlight(c,n.language)}:function(c){return[{type:"text",value:c}]};return[p1(r(n.oldSource)),p1(r(t))]}var s=Cn(JCn(e),2),i=s[0],a=s[1],o=n.highlight?function(c){return p1(n.refractor.highlight(c,n.language))}:function(c){return p1([{type:"text",value:c}])};return[o(i),o(a)]}function zd(e){return e.map((function(n){return Mn({},n)}))}function t7n(e,n){return[].concat(Yi(zd(e.slice(0,-1))),[n])}function n7n(e){return e.type==="text"}function x6(e){var n=e[e.length-1];if(n7n(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function r7n(e,n,t,r){var s=e.slice(0,-1),i=x6(e),a=[];if(t<=0||n>=(i==null?void 0:i.value.length))return[e];var o=function(_,p){var m=i.value.slice(_,p);return[].concat(Yi(s),[Mn(Mn({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(zd(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(_,p){return[p].concat(Yi(zd(_)))})(u,r):zd(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,s7n);t.push(s);var i,a=f6(r);try{for(a.s();!(i=a.n()).done;)EB(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(zd([].concat(Yi(t.slice(1)),[e])));return n}function i7n(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=x6(c);return u.value.includes(` `)?u.value.split(` -`).map((function(h){return FCn(c,On(On({},u),{},{value:h}))})):[c]})(t),i=W$(s),a=i[0],o=i.slice(1);return[].concat(Yi(n.slice(0,-1)),[[].concat(Yi(r),[a])],Yi(o.map((function(c){return[c]}))))}),[[]])}function oT(e){return GCn(CB(e))}var VCn=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?ey(e,n,void 0,t):!!r},KCn=function(e,n){return ey(e,n)},WCn=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function QCn(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=WCn(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&VCn(t,r,(function(i,a,o){return o==="chlidren"||KCn(i,a)}))))?e.children[e.children.length-1]=(function(i,a){return"value"in i&&"value"in a?On(On({},i),{},{value:"".concat(i.value).concat(a.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function cT(e){var n,t={type:"root",children:[]},r=f6(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,c){return QCn(a,c===i.length-1?On({},o):On(On({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var XCn=Object.prototype.hasOwnProperty,YCn=kB((function(e,n,t){XCn.call(e,t)?e[t].push(n):b6(e,t,[n])})),ZCn=Object.prototype.hasOwnProperty,JCn=function(e){if(e==null)return!0;if(Jb(e)&&(na(e)||typeof e=="string"||typeof e.splice=="function"||Uv(e)||p6(e)||Zb(e)))return!e.length;var n=e5(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(lB(e))return!uB(e).length;for(var t in e)if(ZCn.call(e,t))return!1;return!0},e7n=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var c=Sn(a,2),u=c[0],h=c[1],_=h+x6(o).value.length;if(h>s||_r.length?t:r,c=t.length>r.length?r:t,u=o.indexOf(c);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,c),new n.Diff(1,o.substring(u+c.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var h=this.diff_halfMatch_(t,r);if(h){var _=h[0],p=h[1],m=h[2],x=h[3],k=h[4],v=this.diff_main(_,m,s,i),b=this.diff_main(p,x,s,i);return v.concat([new n.Diff(0,k)],b)}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 c=0,u=0,h=0,_="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;for(var m=this.diff_main(_,p,!1,s),x=m.length-1;x>=0;x--)o.splice(c,0,m[x]);c+=m.length}h=0,u=0,_="",p=""}c++}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),c=o,u=2*o,h=new Array(u),_=new Array(u),p=0;ps);y++){for(var C=-y+k;C<=y-v;C+=2){for(var N=c+C,z=(I=C==-y||C!=y&&h[N-1]i)v+=2;else if(z>a)k+=2;else if(x&&(M=c+m-C)>=0&&M=(j=i-_[M]))return this.diff_bisectSplit_(t,r,I,z,s)}for(var T=-y+b;T<=y-w;T+=2){for(var j,M=c+T,D=(j=T==-y||T!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-T;ji)w+=2;else if(D>a)b+=2;else if(!x&&(N=c+m-T)>=0&&N=(j=i-j))return this.diff_bisectSplit_(t,r,I,z,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),c=r.substring(0,i),u=t.substring(s),h=r.substring(i),_=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return _.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",_=0,p=-1,m=s.length;ps||_r.length?t:r,c=t.length>r.length?r:t,u=o.indexOf(c);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,c),new n.Diff(1,o.substring(u+c.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var h=this.diff_halfMatch_(t,r);if(h){var _=h[0],p=h[1],m=h[2],x=h[3],k=h[4],v=this.diff_main(_,m,s,i),b=this.diff_main(p,x,s,i);return v.concat([new n.Diff(0,k)],b)}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 c=0,u=0,h=0,_="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;for(var m=this.diff_main(_,p,!1,s),x=m.length-1;x>=0;x--)o.splice(c,0,m[x]);c+=m.length}h=0,u=0,_="",p=""}c++}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),c=o,u=2*o,h=new Array(u),_=new Array(u),p=0;ps);y++){for(var C=-y+k;C<=y-v;C+=2){for(var N=c+C,z=(I=C==-y||C!=y&&h[N-1]i)v+=2;else if(z>a)k+=2;else if(x&&(M=c+m-C)>=0&&M=(j=i-_[M]))return this.diff_bisectSplit_(t,r,I,z,s)}for(var T=-y+b;T<=y-w;T+=2){for(var j,M=c+T,D=(j=T==-y||T!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-T;ji)w+=2;else if(D>a)b+=2;else if(!x&&(N=c+m-T)>=0&&N=(j=i-j))return this.diff_bisectSplit_(t,r,I,z,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),c=r.substring(0,i),u=t.substring(s),h=r.substring(i),_=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return _.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",_=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=k.length?[w,y,C,N,j]:null}var c,u,h,_,p,m=o(s,i,Math.ceil(s.length/4)),x=o(s,i,Math.ceil(s.length/2));return m||x?(c=x?m&&m[4].length>x[4].length?m:x:m,t.length>r.length?(u=c[0],h=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],h=c[3]),[u,h,_,p,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,c=0,u=0,h=0,_=0;o0?s[i-1]:-1,c=0,u=0,h=0,_=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(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++):(k>=p.length/2||k>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,k))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-k),t[o+1][0]=-1,t[o+1][1]=p.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,v){if(!k||!v)return 6;var b=k.charAt(k.length-1),w=v.charAt(0),y=b.match(n.nonAlphaNumericRegex_),C=w.match(n.nonAlphaNumericRegex_),N=y&&b.match(n.whitespaceRegex_),z=C&&w.match(n.whitespaceRegex_),T=N&&b.match(n.linebreakRegex_),j=z&&w.match(n.linebreakRegex_),M=T&&k.match(n.blanklineEndRegex_),D=j&&v.match(n.blanklineStartRegex_);return M||D?5:T||j?4:y&&!N&&z?3:N||z?2:y||C?1:0}for(var s=1;s=m&&(m=x,h=i,_=a,p=o)}t[s-1][1]!=h&&(h?t[s-1][1]=h:(t.splice(s-1,1),s--),t[s][1]=_,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,c=!1,u=!1,h=!1,_=!1;o0?s[i-1]:-1,h=_=!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="",c="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(c,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(c,o))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.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++),c.length&&(t.splice(s,0,new n.Diff(1,c)),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="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,c=a;return t.length!=s&&t[s][0]===-1?c:c+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,c=0;c");switch(u){case 1:r[c]=''+h+"";break;case-1:r[c]=''+h+"";break;case 0:r[c]=""+h+""}}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(z,T){var j=z/r.length,M=Math.abs(s-T);return a.Match_Distance?j+M/a.Match_Distance:M?1:j}var c=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(c=Math.min(o(0,u),c),(u=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(o(0,u),c)));var h,_,p=1<=v;y--){var C=i[t.charAt(y-1)];if(w[y]=k===0?(w[y+1]<<1|1)&C:(w[y+1]<<1|1)&C|(m[y+1]|m[y])<<1|1|m[y+1],w[y]&p){var N=o(k,y-1);if(N<=c){if(c=N,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>c)break;m=w}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=[],c=new n.patch_obj,u=0,h=0,_=0,p=i,m=i,x=0;x=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),o.push(c),c=new n.patch_obj,u=0,p=m,h=_)}k!==1&&(h+=v.length),k!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),o.push(c)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(c=this.match_main(r,_.substring(0,this.Match_MaxBits),h))!=-1&&((p=this.match_main(r,_.substring(_.length-this.Match_MaxBits),h+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(r,_,h),c==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=c-h,_==(u=p==-1?r.substring(c,c+_.length):r.substring(c,p+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[o].diffs)+r.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var x,k=0,v=0;vo[0][1].length){var c=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}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&&(c=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,h=!1,u.diffs.push(new n.Diff(_,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,o+=p.length):h=!1,u.diffs.push(new n.Diff(_,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.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))),h||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"?a7n:o7n,r=y6(e.map((function(o){return o.changes})),EB).map(t).reduce((function(o,c){var u=Sn(o,2),h=u[0],_=u[1],p=Sn(c,2),m=p[0],x=p[1];return[h.concat(m),_.concat(x)]}),[[],[]]),s=Sn(r,2),i=s[0],a=s[1];return t7n(uT(i),uT(a))}var l7n=["enhancers"],hT=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=Sn(PCn(e,Cu(t,l7n)),2),a=i[0],o=i[1],c=[oT(a),oT(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=Sn(u,2),_=h[0],p=h[1],m=[_.map(cT),p.map(cT)],x=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:x.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const n5=["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.diff-unified]:table-fixed","[&_.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_.diff-line_>_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(" "),u7n=2e3,_7n={highlight(e,n){return Rt.highlight(e,n).children}};function f7n(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function oy(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 d7n(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function r5(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 h7n(e){const n=[c7n(e.hunks,{type:"line"})],t=TS(d7n(e));return t&&Rt.registered(t)?hT(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:_7n}):hT(e.hunks,{enhancers:n,highlight:!1})}function zB(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:W3(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:W3(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const p7n=({change:e,side:n})=>n==="old"?null:f7n(e);function jB({bytesRead:e,byteLimit:n}){return f.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:[f.jsx("h4",{children:$Ge()}),f.jsx("p",{children:BVe({limit:Ne(el(n)),read:Ne(el(e))})})]})}function TB({file:e,defaultExpanded:n}){const[t,r]=A.useState(n),{additions:s,deletions:i}=A.useMemo(()=>oy(e),[e]),a=t&&s+i<=u7n,o=A.useMemo(()=>{if(a)try{return h7n(e)}catch{return}},[e,a]);return f.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:[f.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(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(rc,{size:14}):f.jsx(Ba,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:r5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:fVe()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(TCn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:p7n,tokens:o,viewType:"unified"})}))]})}function m7n({files:e,className:n}){return f.jsx("div",{className:n?`${n5} ${n}`:n5,children:e.map((t,r)=>f.jsx(TB,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function g7n(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 AB({diff:e,partial:n=!1}){var p;const t=A.useMemo(()=>zB(e,n),[e,n]),r=t.files,s=A.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:oy(m)})),[r]),[i,a]=A.useState(null),[o,c]=A.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===h)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?iVe():RVe()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:ZGe()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.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:[f.jsx("strong",{className:"font-medium",children:n?s.length===1?CVe():GGe({count:Wt(s.length)}):s.length===1?$D():ID({count:Wt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?vGe():VVe()})]}),u?f.jsx(m7n,{files:r}):f.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:[f.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":AGe(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,onClick:()=>a(m.key),children:[f.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:g7n(m.file)}),f.jsx("code",{title:r5(m.file),children:r5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${n5} diff-explorer-preview min-w-0`,children:_&&f.jsx(TB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}function v7n({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:x}){var C,N;const k=tSn(n,t,c),v=ut({...ZL(a),enabled:e}),b=((C=v.data)==null?void 0:C.configuredDefaultBackend)??((N=v.data)==null?void 0:N.defaultBackend),w=b?J_[b]():v.isPending?"…":v.isError?ro():f3(),y=[{id:"files",label:s3(),Icon:Su,onClick:_},{id:"terminal",label:Tv(),Icon:lo,onClick:p},{id:"artifacts",label:vD(),Icon:pS,onClick:m},{id:"experiments",label:bD(),Icon:hh,onClick:x}];return f.jsx("div",{className:"workspace-tools absolute end-3.5 top-7 z-30",style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":ew(),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:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:ew()}),y.filter(z=>z.id!=="files"&&z.id!=="terminal").map(({id:z,label:T,Icon:j,onClick:M})=>f.jsx(Yn,{className:"min-h-7 py-1","data-onboarding":z==="artifacts"?"nav-artifacts":void 0,onClick:M,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(j,{size:15}),T]})},z)),f.jsx(Yn,{className:"py-1",onClick:o,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(_S,{size:15,className:"shrink-0"}),Cgn()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[b&&f.jsx(Lh,{kind:`${b}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:w})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:s1n()}),f.jsx(Yn,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Su,{size:15}),s3()]})}),f.jsx(Yn,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(lo,{size:15}),Tv()]})}),c&&f.jsx(b7n,{sessionId:c,busy:u,onChanges:h},c),k.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Dd,{tone:"success",live:!0})}),f.jsx("span",{children:vgn()})]}),k.map(z=>f.jsx(Yn,{className:"min-h-7 py-1",onClick:()=>r(z.experiment.id,z.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${z.experiment.title||z.experiment.slug} · ${_6(Qi(z.run))}`,children:z.experiment.title||z.experiment.slug})},z.run.id))]})]})]}):f.jsx("nav",{"aria-label":ew(),className:"flex items-center justify-end gap-3",children:y.map(({id:z,label:T,Icon:j,onClick:M})=>f.jsx(Lt,{active:i===z,className:"text-text [&.active]:text-text","data-tip":T,"data-tip-align":z==="experiments"?"end":void 0,"aria-label":T,"aria-pressed":i===z,onClick:M,children:f.jsx(j,{size:15})},z))})})}function b7n({sessionId:e,busy:n,onChanges:t}){var c,u;const r=ut({...qv(e),refetchInterval:n?5e3:!1}),s=A.useRef(n),{refetch:i}=r;A.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=A.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const h=zB(a.diff.diff,!1);return h.failed?null:h.files.map(oy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(Yn,{className:"min-h-7 py-1",onClick:t,title:a.branch??Xk(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(Nm,{size:15,className:"shrink-0"}),f.jsx("span",{children:jD()})]}),o?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",Wt(o.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",Wt(o.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?$D():ID({count:Wt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function y7n({projectId:e,sessionId:n,active:t}){const r=A.useRef(null),s=A.useRef(null),[i,a]=A.useState(null),[o,c]=A.useState(0);return A.useEffect(()=>{const u=r.current;if(!u)return;const h=Ib(u,!1,!0,"app"),{terminal:_,dispose:p}=h;s.current=h,a(null);const m=location.protocol==="https:"?"wss:":"ws:",x=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&x.searchParams.set("sessionId",n);const k=new WebSocket(x);k.binaryType="arraybuffer";let v=!1;const b=C=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r -${C}`),a(C))},w=_.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),y=_.onResize(({cols:C,rows:N})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:N}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){_.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let N;try{N=JSON.parse(C.data)}catch{return}vf(N)&&(N.type==="exit"?b(Ugn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(Iz()),k.onerror=()=>b(Iz()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,w.dispose(),y.dispose(),k.close(),s.current=null,p()}},[e,n,o]),A.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,_;(h=s.current)==null||h.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":Tv(),children:[f.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(De,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Ygn()})})]})}function w6(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function s5(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),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const h=u.startsWith("/"),_=h?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(h||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:i}}function x7n(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function k6(e){return/^[a-z]:[\\/]/i.test(e)}function RB(e){const n=k6(e);if(!n&&w6(e))return null;const t=s5("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function w7n(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 c=+i;if(Number.isInteger(c)&&c>=0&&cr[h]!==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 pT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const k7n=(e,n)=>Math.abs(e-n)<1.01,S7n=(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 Hp;const gw=()=>{if(Hp!==void 0)return Hp;if(typeof navigator>"u")return Hp=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Hp=!0;const e=navigator.maxTouchPoints;return Hp=navigator.platform==="MacIntel"&&e!==void 0&&e>0},mT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},C7n=e=>e,MB=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:c}=a;n({width:Math.round(o),height:Math.round(c)})};if(s(mT(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(mT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Vv={passive:!0},N7n=typeof window>"u"?!0:"onscrollend"in window,z7n=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&N7n;let a=0;const o=i?null:S7n(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(r),o==null||o(),n(a,_)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,Vv),i&&r.addEventListener("scrollend",h,Vv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},j7n=(e,n)=>z7n(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),T7n=(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"]},A7n=(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})},R7n=A7n;class M7n{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,c=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,h]of this.elementsCache)if(h===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,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:C7n,rangeExtractor:MB,onChange:()=>{},measureElement:T7n,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,c=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(),k=p>0?((r=x[0])==null?void 0:r.key)??a.getItemKey(0):null,v=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)!==k||i.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;y&&(o=[y.key,this.getScrollOffset()-y.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(c=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,_=0;if(o&&this.scrollOffset!==null){const[p,m]=o,x=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{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,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,!(!gw()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Vv),i.addEventListener("touchend",o,Vv),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,c]=s;i!==null&&!o&&(gw()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):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=_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,a,o,c,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:c,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:c,gap:u},h)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&N.set(w.subarray(0,p*2)),w=N,this._flatMeasurements=w}let y;if(p===0)y=r+s;else{const N=p-1;y=w[N*2]+w[N*2+1]+u}for(let N=p;N1){C=y;const D=x[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],$=x[0];for(let q=1;qthis.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=D7n(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,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,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,o=p.start,a=p.size}const h=this.itemSizeCache.get(c)??a,_=r-h;if(_!==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,v=!this.itemSizeCache.has(c)?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=OB(0,r.length-1,i?o=>s[o*2]:o=>pT(r[o]).start,t);return pT(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,c=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:c,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(gw()&&(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&&k7n(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,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const OB=(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 O7n(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 D7n(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=O7n(s,i,t);let h=u;const _=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;c_=0&&h.some(_=>_>=t);){const _=e[o];h[_.lane]=_.start,o--}o=Math.max(0,o-o%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:o,endIndex:c}}const vw=typeof document<"u"?A.useLayoutEffect:A.useEffect;function L7n({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=A.useReducer(h=>h+1,0)[1],i=A.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=h=>{const _=i.current;if(!_.enabled||!_.container)return;const p=h.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=h.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},o=h=>{const _=i.current;if(!_.enabled||!_.container)return;a(h);const p=!!h.options.horizontal,m=_.mode==="transform",x=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const w=b.start-k,y=h.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[x]=`${w}px`)}},c={...r,onChange:(h,_)=>{var p;const m=i.current;let x=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;x=!v||v.isScrolling!==h.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),x&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:h.isScrolling}:null)}x&&(e&&_?oa.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,_)}},[u]=A.useState(()=>{const h=new M7n(c);return Object.assign(h,{containerRef:_=>{const p=i.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const x=h.options.horizontal?"width":"height";_.style[x]=`${m}px`}}})});return u.setOptions(c),vw(()=>u._didMount(),[]),vw(()=>(a(u),u._willUpdate())),vw(()=>{o(u)}),u}function I7n(e){return L7n({observeElementRect:E7n,observeElementOffset:j7n,scrollToFn:R7n,...e})}function $7n(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 B7n(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 P7n(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 h=u.parentId??null,_=a.get(h);_?_.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=B7n(u,i,a),_=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:_,prevId:_>0?h[_-1].id:void 0,nextId:_=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function vh(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 Rm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function DB(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Rm(r)||!vh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function LB(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=DB(n.parts);return t?{messageId:n.id,toolId:t}:null}function H7n(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"||Rm(r)))return r.type==="text"&&!!r.text}return!1}function q7n(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(c=>c.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}function IB(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>vh(r))||!e.slice(0,t).some(r=>vh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function $B(e){return e.flatMap(n=>{var r;const t=n.type==="text"?(r=n.text)==null?void 0:r.trim():void 0;return t?[t]:[]}).join(` +`:"")+h.content]}),["",""]),t=Cn(n,2),r=Cn(zB(t[0],t[1]),2),s=r[0],i=r[1];if(s.length===0&&i.length===0)return[[],[]];var a=function(u){if(u&&!ul(u))return u.lineNumber},o=a(e.find(Zi)),c=a(e.find(Du));if(o===void 0||c===void 0)throw new Error("Could not find start line number for edit");return[hT(dT(s),o),hT(dT(i),c)]}function x7n(e){var n=e.reduce((function(r,s){var i=Cn(r,3),a=i[0],o=i[1],c=i[2];if(!c||!Zi(c)||!Du(s))return[a,o,s];var u=Cn(zB(c.content,s.content),2),h=u[0],_=u[1];return[a.concat(t5(h,c.lineNumber)),o.concat(t5(_,s.lineNumber)),s]}),[[],[],null]),t=Cn(n,2);return[t[0],t[1]]}function w7n(e){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?y7n:x7n,r=y6(e.map((function(o){return o.changes})),NB).map(t).reduce((function(o,c){var u=Cn(o,2),h=u[0],_=u[1],p=Cn(c,2),m=p[0],x=p[1];return[h.concat(m),_.concat(x)]}),[[],[]]),s=Cn(r,2),i=s[0],a=s[1];return p7n(_T(i),_T(a))}var k7n=["enhancers"],pT=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=Cn(e7n(e,Cu(t,k7n)),2),a=i[0],o=i[1],c=[cT(a),cT(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=Cn(u,2),_=h[0],p=h[1],m=[_.map(lT),p.map(lT)],x=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:x.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const n5=["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.diff-unified]:table-fixed","[&_.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_.diff-line_>_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(" "),S7n=2e3,C7n={highlight(e,n){return Ot.highlight(e,n).children}};function E7n(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function oy(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 N7n(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function r5(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 z7n(e){const n=[w7n(e.hunks,{type:"line"})],t=TS(N7n(e));return t&&Ot.registered(t)?pT(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:C7n}):pT(e.hunks,{enhancers:n,highlight:!1})}function jB(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:W3(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:W3(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const j7n=({change:e,side:n})=>n==="old"?null:E7n(e);function TB({bytesRead:e,byteLimit:n}){return f.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:[f.jsx("h4",{children:ZGe()}),f.jsx("p",{children:JVe({limit:ze(el(n)),read:ze(el(e))})})]})}function AB({file:e,defaultExpanded:n}){const[t,r]=A.useState(n),{additions:s,deletions:i}=A.useMemo(()=>oy(e),[e]),a=t&&s+i<=S7n,o=A.useMemo(()=>{if(a)try{return z7n(e)}catch{return}},[e,a]);return f.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:[f.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(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(rc,{size:14}):f.jsx(Ba,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:r5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:EVe()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(UCn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:j7n,tokens:o,viewType:"unified"})}))]})}function T7n({files:e,className:n}){return f.jsx("div",{className:n?`${n5} ${n}`:n5,children:e.map((t,r)=>f.jsx(AB,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function A7n(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 RB({diff:e,partial:n=!1}){var p;const t=A.useMemo(()=>jB(e,n),[e,n]),r=t.files,s=A.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:oy(m)})),[r]),[i,a]=A.useState(null),[o,c]=A.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===h)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?bVe():VVe()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:fVe()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.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:[f.jsx("strong",{className:"font-medium",children:n?s.length===1?BVe():iVe({count:Xt(s.length)}):s.length===1?BD():$D({count:Xt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?RGe():aKe()})]}),u?f.jsx(T7n,{files:r}):f.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:[f.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":GGe(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,onClick:()=>a(m.key),children:[f.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:A7n(m.file)}),f.jsx("code",{title:r5(m.file),children:r5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${n5} diff-explorer-preview min-w-0`,children:_&&f.jsx(AB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}function R7n({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:x}){var C,N;const k=pSn(n,t,c),v=ut({...JL(a),enabled:e}),b=((C=v.data)==null?void 0:C.configuredDefaultBackend)??((N=v.data)==null?void 0:N.defaultBackend),w=b?ef[b]():v.isPending?"…":v.isError?ro():f3(),y=[{id:"files",label:s3(),Icon:Su,onClick:_},{id:"terminal",label:Tv(),Icon:lo,onClick:p},{id:"artifacts",label:bD(),Icon:pS,onClick:m},{id:"experiments",label:yD(),Icon:mh,onClick:x}];return f.jsx("div",{className:"workspace-tools absolute end-3.5 top-7 z-30",style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":ew(),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:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:ew()}),y.filter(z=>z.id!=="files"&&z.id!=="terminal").map(({id:z,label:T,Icon:j,onClick:M})=>f.jsx(Xn,{className:"min-h-7 py-1","data-onboarding":z==="artifacts"?"nav-artifacts":void 0,onClick:M,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(j,{size:15}),T]})},z)),f.jsx(Xn,{className:"py-1",onClick:o,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(_S,{size:15,className:"shrink-0"}),Bgn()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[b&&f.jsx(Ih,{kind:`${b}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:w})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:v1n()}),f.jsx(Xn,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Su,{size:15}),s3()]})}),f.jsx(Xn,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(lo,{size:15}),Tv()]})}),c&&f.jsx(M7n,{sessionId:c,busy:u,onChanges:h},c),k.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Id,{tone:"success",live:!0})}),f.jsx("span",{children:Rgn()})]}),k.map(z=>f.jsx(Xn,{className:"min-h-7 py-1",onClick:()=>r(z.experiment.id,z.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${z.experiment.title||z.experiment.slug} · ${_6(Xi(z.run))}`,children:z.experiment.title||z.experiment.slug})},z.run.id))]})]})]}):f.jsx("nav",{"aria-label":ew(),className:"flex items-center justify-end gap-3",children:y.map(({id:z,label:T,Icon:j,onClick:M})=>f.jsx(It,{active:i===z,className:"text-text [&.active]:text-text","data-tip":T,"data-tip-align":z==="experiments"?"end":void 0,"aria-label":T,"aria-pressed":i===z,onClick:M,children:f.jsx(j,{size:15})},z))})})}function M7n({sessionId:e,busy:n,onChanges:t}){var c,u;const r=ut({...qv(e),refetchInterval:n?5e3:!1}),s=A.useRef(n),{refetch:i}=r;A.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=A.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const h=jB(a.diff.diff,!1);return h.failed?null:h.files.map(oy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(Xn,{className:"min-h-7 py-1",onClick:t,title:a.branch??Xk(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(Nm,{size:15,className:"shrink-0"}),f.jsx("span",{children:TD()})]}),o?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",Xt(o.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",Xt(o.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?BD():$D({count:Xt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function O7n({projectId:e,sessionId:n,active:t}){const r=A.useRef(null),s=A.useRef(null),[i,a]=A.useState(null),[o,c]=A.useState(0);return A.useEffect(()=>{const u=r.current;if(!u)return;const h=Ib(u,!1,!0,"app"),{terminal:_,dispose:p}=h;s.current=h,a(null);const m=location.protocol==="https:"?"wss:":"ws:",x=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&x.searchParams.set("sessionId",n);const k=new WebSocket(x);k.binaryType="arraybuffer";let v=!1;const b=C=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r +${C}`),a(C))},w=_.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),y=_.onResize(({cols:C,rows:N})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:N}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){_.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let N;try{N=JSON.parse(C.data)}catch{return}yf(N)&&(N.type==="exit"?b(s1n({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b($z()),k.onerror=()=>b($z()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,w.dispose(),y.dispose(),k.close(),s.current=null,p()}},[e,n,o]),A.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,_;(h=s.current)==null||h.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":Tv(),children:[f.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(De,{autoFocus:!0,onClick:()=>c(u=>u+1),children:_1n()})})]})}function w6(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function s5(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),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const h=u.startsWith("/"),_=h?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(h||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:i}}function D7n(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function k6(e){return/^[a-z]:[\\/]/i.test(e)}function MB(e){const n=k6(e);if(!n&&w6(e))return null;const t=s5("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function L7n(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 c=+i;if(Number.isInteger(c)&&c>=0&&cr[h]!==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 mT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const I7n=(e,n)=>Math.abs(e-n)<1.01,$7n=(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 qp;const gw=()=>{if(qp!==void 0)return qp;if(typeof navigator>"u")return qp=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return qp=!0;const e=navigator.maxTouchPoints;return qp=navigator.platform==="MacIntel"&&e!==void 0&&e>0},gT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},B7n=e=>e,OB=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:c}=a;n({width:Math.round(o),height:Math.round(c)})};if(s(gT(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(gT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Vv={passive:!0},F7n=typeof window>"u"?!0:"onscrollend"in window,H7n=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&F7n;let a=0;const o=i?null:$7n(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(r),o==null||o(),n(a,_)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,Vv),i&&r.addEventListener("scrollend",h,Vv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},q7n=(e,n)=>H7n(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),U7n=(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"]},G7n=(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})},V7n=G7n;class K7n{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,c=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,h]of this.elementsCache)if(h===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,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:B7n,rangeExtractor:OB,onChange:()=>{},measureElement:U7n,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,c=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(),k=p>0?((r=x[0])==null?void 0:r.key)??a.getItemKey(0):null,v=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)!==k||i.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;y&&(o=[y.key,this.getScrollOffset()-y.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(c=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,_=0;if(o&&this.scrollOffset!==null){const[p,m]=o,x=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=dd(()=>(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,!(!gw()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Vv),i.addEventListener("touchend",o,Vv),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,c]=s;i!==null&&!o&&(gw()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):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=dd(()=>[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,c,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:c,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:c,gap:u},h)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&N.set(w.subarray(0,p*2)),w=N,this._flatMeasurements=w}let y;if(p===0)y=r+s;else{const N=p-1;y=w[N*2]+w[N*2+1]+u}for(let N=p;N1){C=y;const D=x[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],$=x[0];for(let q=1;qthis.options.debug}),this.calculateRange=dd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=Q7n(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=dd(()=>{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,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,o=p.start,a=p.size}const h=this.itemSizeCache.get(c)??a,_=r-h;if(_!==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,v=!this.itemSizeCache.has(c)?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=DB(0,r.length-1,i?o=>s[o*2]:o=>mT(r[o]).start,t);return mT(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,c=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:c,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(gw()&&(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&&I7n(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,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const DB=(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 W7n(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 Q7n(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=W7n(s,i,t);let h=u;const _=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;c_=0&&h.some(_=>_>=t);){const _=e[o];h[_.lane]=_.start,o--}o=Math.max(0,o-o%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:o,endIndex:c}}const vw=typeof document<"u"?A.useLayoutEffect:A.useEffect;function X7n({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=A.useReducer(h=>h+1,0)[1],i=A.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=h=>{const _=i.current;if(!_.enabled||!_.container)return;const p=h.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=h.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},o=h=>{const _=i.current;if(!_.enabled||!_.container)return;a(h);const p=!!h.options.horizontal,m=_.mode==="transform",x=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const w=b.start-k,y=h.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[x]=`${w}px`)}},c={...r,onChange:(h,_)=>{var p;const m=i.current;let x=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;x=!v||v.isScrolling!==h.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),x&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:h.isScrolling}:null)}x&&(e&&_?oa.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,_)}},[u]=A.useState(()=>{const h=new K7n(c);return Object.assign(h,{containerRef:_=>{const p=i.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const x=h.options.horizontal?"width":"height";_.style[x]=`${m}px`}}})});return u.setOptions(c),vw(()=>u._didMount(),[]),vw(()=>(a(u),u._willUpdate())),vw(()=>{o(u)}),u}function Y7n(e){return X7n({observeElementRect:P7n,observeElementOffset:q7n,scrollToFn:V7n,...e})}function Z7n(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 J7n(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 e8n(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 h=u.parentId??null,_=a.get(h);_?_.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=J7n(u,i,a),_=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:_,prevId:_>0?h[_-1].id:void 0,nextId:_=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function yh(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 Rm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function LB(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Rm(r)||!yh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function IB(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=LB(n.parts);return t?{messageId:n.id,toolId:t}:null}function n8n(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"||Rm(r)))return r.type==="text"&&!!r.text}return!1}function r8n(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(c=>c.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}function $B(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>yh(r))||!e.slice(0,t).some(r=>yh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function BB(e){return e.flatMap(n=>{var r;const t=n.type==="text"?(r=n.text)==null?void 0:r.trim():void 0;return t?[t]:[]}).join(` -`)}function BB(e){return $B(IB(e.parts,!1).answer)}function U7n(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=BB(e[n]);if(t)return t}return""}function G7n(e,n,t){const r=n.flatMap(s=>{const i=$B(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} +`)}function PB(e){return BB($B(e.parts,!1).answer)}function s8n(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=PB(e[n]);if(t)return t}return""}function i8n(e,n,t){const r=n.flatMap(s=>{const i=BB(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} ${i}`]:[]});return r.length===0?null:[`# ${e}`,...r].join(` `)+` -`}function V7n(e){return`${e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").slice(0,80).replace(/^-+|-+$/g,"")||"chat"}.md`}function PB(e){var n,t;return e.type==="tool"&&e.tool==="error"&&/^(?:ActionRequiredError:\s*)?Named models unavailable\b/i.test(((t=(n=e.state)==null?void 0:n.error)==null?void 0:t.trim())??"")}function i5(e){var t,r,s;if(PB(e)||((r=(t=e.state)==null?void 0:t.input)==null?void 0:r.errorKind)==="claude_usage_limit")return!0;const n=e.type==="text"?e.text:e.tool==="error"?(s=e.state)==null?void 0:s.error:null;return e.type==="tool"&&e.tool==="error"&&n&&/usageLimitExceeded|rateLimitExceeded|insufficient_quota|(?:usage|rate|session) limit|(?:exceeded|exhausted) (?:your |the |current )*quota|insufficient (?:credits|balance)|(?:credit|quota)[ _-](?:exhausted|exceeded)/i.test(n)?!0:!!(n&&(/^(?:claude: )?you(?:'ve| have) reached your .+ limit\./i.test(n.trim())&&n.includes("claude.ai/settings/usage")||/^(?:claude: )?you(?:'ve| have) hit your session limit · resets /i.test(n.trim())))}const Lo=e=>new Intl.NumberFormat(E()).format(e);function K7n(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?p9t():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?t9t({attempt:Lo(e.attempt),maximum:Lo(e.maximum),seconds:Lo(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?W8t({attempt:Lo(e.attempt),maximum:Lo(e.maximum)}):typeof e.attempt=="number"&&t!=null?c9t({attempt:Lo(e.attempt),seconds:Lo(t)}):typeof e.attempt=="number"?F8t({attempt:Lo(e.attempt)}):t!=null?w9t({seconds:Lo(t)}):aL()}function W7n(e,n){if(typeof e!="number")return j9t();const t=Math.max(0,Math.ceil((e-n)/1e3));return L9t({seconds:Lo(t)})}function FB(e){return e==="retry"||e==="continue"?e:null}function Q7n(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}const bw={draft:"",attachments:[],annotations:[]};function X7n(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function Y7n(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function gT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function Z7n(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";if(t.includes("pubmed.ncbi.nlm.nih.gov")||t.includes("ncbi.nlm.nih.gov/pubmed")||t.startsWith("pmid:"))return"pubmed";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":/^\d{1,9}$/.test(n)?"pubmed":"alphaxiv"}function S6(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;anew Intl.NumberFormat(E()).format(e);function o8n(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?j9t():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?p9t({attempt:Lo(e.attempt),maximum:Lo(e.maximum),seconds:Lo(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?c9t({attempt:Lo(e.attempt),maximum:Lo(e.maximum)}):typeof e.attempt=="number"&&t!=null?w9t({attempt:Lo(e.attempt),seconds:Lo(t)}):typeof e.attempt=="number"?t9t({attempt:Lo(e.attempt)}):t!=null?L9t({seconds:Lo(t)}):oL()}function c8n(e,n){if(typeof e!="number")return q9t();const t=Math.max(0,Math.ceil((e-n)/1e3));return X9t({seconds:Lo(t)})}function HB(e){return e==="retry"||e==="continue"?e:null}function l8n(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}const bw={draft:"",attachments:[],annotations:[]};function u8n(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function _8n(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function vT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function f8n(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";if(t.includes("pubmed.ncbi.nlm.nih.gov")||t.includes("ncbi.nlm.nih.gov/pubmed")||t.startsWith("pmid:"))return"pubmed";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":/^\d{1,9}$/.test(n)?"pubmed":"alphaxiv"}function S6(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 J7n(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=S6(e);if(t.length===1)return t[0]}return e}function e8n(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 bh(e){return e8n(typeof e=="string"?S6(e):e)}function t8n(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 n8n(e,n){const t=bh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function r8n(e){var c;const n=bh(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 +`&&(t+=c,r=!0);continue}if(s){o===s?s=null:t+=o,r=!0;continue}if(o==='"'||o==="'"){s=o,r=!0;continue}if(o==="|"||o===";"||o===">"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function d8n(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=S6(e);if(t.length===1)return t[0]}return e}function h8n(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 xh(e){return h8n(typeof e=="string"?S6(e):e)}function p8n(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 m8n(e,n){const t=xh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function g8n(e){var c;const n=xh(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 -`,i8n='',a8n=` +`,b8n='',y8n=` -`,o8n=`Pm -`,HB={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},c8n={alphaxiv:s8n,openalex:a8n,biorxiv:i8n,pubmed:o8n};function qB({source:e,size:n=16,decorative:t=!1,className:r=""}){return f.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":HB[e]},dangerouslySetInnerHTML:{__html:c8n[e]}})}function l8n(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 u8n(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)}`}if(e==="pubmed"){const s=t.split(/[?#]/)[0],i=/^pmid:/i.test(s)?s.slice(5).trim():s.replace(/\/+$/,"").split("/").pop();if(i&&/^\d{1,9}$/.test(i))return`https://pubmed.ncbi.nlm.nih.gov/${i}/`}const r=l8n(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 _8n=["alphaxiv","openalex","biorxiv","pubmed"];function f8n(){const e=sxn(),{data:n}=ut(e),t=an({mutationFn:ryn,onSuccess:i=>Vr(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?f.jsx("div",{className:"flex flex-col",children:_8n.map(i=>{const a=n[i];return f.jsxs(Yn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(qB,{source:i,size:16,decorative:!0}),HB[i]]}),f.jsx(H2n,{checked:a,"aria-hidden":"true"})]},i)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:hZe()})}function yw(e,n){if(!e)throw new Error("Assertion Error")}function f_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function d8n(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 h8n(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function p8n(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 m8n(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function g8n(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const li=Lu(/[A-Za-z]/),Gs=Lu(/[\dA-Za-z]/),v8n=Lu(/[#-'*+\--9=?A-Z^-~]/);function Kv(e){return e!==null&&(e<32||e===127)}const a5=Lu(/\d/),b8n=Lu(/[\dA-Fa-f]/),y8n=Lu(/[!-/:-@[-`{-~]/);function Et(e){return e!==null&&e<-2}function cr(e){return e!==null&&(e<0||e===32)}function dn(e){return e===-2||e===-1||e===32}const cy=Lu(new RegExp("\\p{P}|\\p{S}","u")),ef=Lu(/\s/);function Lu(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ph(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 x8n(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=Ph(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 c={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,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function w8n(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 k8n(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function UB(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 S8n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return UB(e,n);const s={src:Ph(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 C8n(e,n){const t={src:Ph(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 E8n(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 N8n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return UB(e,n);const s={href:Ph(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 z8n(e,n){const t={href:Ph(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 j8n(e,n,t){const r=e.all(n),s=t?T8n(t):GB(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let _;h&&h.type==="element"&&h.tagName==="p"?_=h:(_={type:"element",tagName:"p",properties:{},children:[]},r.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++oPm +`,qB={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},w8n={alphaxiv:v8n,openalex:y8n,biorxiv:b8n,pubmed:x8n};function UB({source:e,size:n=16,decorative:t=!1,className:r=""}){return f.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":qB[e]},dangerouslySetInnerHTML:{__html:w8n[e]}})}function k8n(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 S8n(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)}`}if(e==="pubmed"){const s=t.split(/[?#]/)[0],i=/^pmid:/i.test(s)?s.slice(5).trim():s.replace(/\/+$/,"").split("/").pop();if(i&&/^\d{1,9}$/.test(i))return`https://pubmed.ncbi.nlm.nih.gov/${i}/`}const r=k8n(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 C8n=["alphaxiv","openalex","biorxiv","pubmed"];function E8n(){const e=vxn(),{data:n}=ut(e),t=an({mutationFn:gyn,onSuccess:i=>Jr(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?f.jsx("div",{className:"flex flex-col",children:C8n.map(i=>{const a=n[i];return f.jsxs(Xn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(UB,{source:i,size:16,decorative:!0}),qB[i]]}),f.jsx(nwn,{checked:a,"aria-hidden":"true"})]},i)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:zZe()})}function yw(e,n){if(!e)throw new Error("Assertion Error")}function f_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function N8n(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 z8n(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` +`}]}function j8n(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 T8n(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function A8n(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const ui=Lu(/[A-Za-z]/),Ks=Lu(/[\dA-Za-z]/),R8n=Lu(/[#-'*+\--9=?A-Z^-~]/);function Kv(e){return e!==null&&(e<32||e===127)}const a5=Lu(/\d/),M8n=Lu(/[\dA-Fa-f]/),O8n=Lu(/[!-/:-@[-`{-~]/);function Tt(e){return e!==null&&e<-2}function _r(e){return e!==null&&(e<0||e===32)}function mn(e){return e===-2||e===-1||e===32}const cy=Lu(new RegExp("\\p{P}|\\p{S}","u")),tf=Lu(/\s/);function Lu(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Fh(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 D8n(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=Fh(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 c={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,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function L8n(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 I8n(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function GB(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 $8n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return GB(e,n);const s={src:Fh(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 B8n(e,n){const t={src:Fh(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 P8n(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 F8n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return GB(e,n);const s={href:Fh(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 H8n(e,n){const t={href:Fh(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 q8n(e,n,t){const r=e.all(n),s=t?U8n(t):VB(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let _;h&&h.type==="element"&&h.tagName==="p"?_=h:(_={type:"element",tagName:"p",properties:{},children:[]},r.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.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 A8n(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 D8n(e){const n=C6(e),t=VB(e);if(n&&t)return{start:n,end:t}}function L8n(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=C6(n.children[1]),c=VB(n.children[n.children.length-1]);o&&c&&(a.position={start:o,end:c}),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 I8n(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 c=-1;const u=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(yT(n.slice(s),s>0,!1)),i.join("")}function yT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===vT||i===bT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===vT||i===bT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function P8n(e,n){const t={type:"text",value:B8n(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function F8n(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const H8n={blockquote:d8n,break:h8n,code:p8n,delete:m8n,emphasis:g8n,footnoteReference:x8n,heading:w8n,html:k8n,imageReference:S8n,image:C8n,inlineCode:E8n,linkReference:N8n,link:z8n,listItem:j8n,list:A8n,paragraph:R8n,root:M8n,strong:O8n,table:L8n,tableCell:$8n,tableRow:I8n,text:P8n,thematicBreak:F8n,toml:m1,yaml:m1,definition:m1,footnoteDefinition:m1};function m1(){}const WB=-1,ly=0,d0=1,Wv=2,E6=3,N6=4,z6=5,j6=6,QB=7,XB=8,q8n=typeof self=="object"?self:globalThis,xT=(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 q8n[e](n)},U8n=(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 ly:case WB:return t(a,s);case d0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case Wv:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case E6:return t(new Date(a),s);case N6:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case z6:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case j6:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case QB:{const{name:o,message:c}=a;return t(xT(o,c),s)}case XB: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(xT(i,a),s)};return r},wT=e=>U8n(new Map,e)(0),g_="",{toString:G8n}={},{keys:V8n}=Object,qp=e=>{const n=typeof e;if(n!=="object"||!e)return[ly,n];const t=G8n.call(e).slice(8,-1);switch(t){case"Array":return[d0,g_];case"Object":return[Wv,g_];case"Date":return[E6,g_];case"RegExp":return[N6,g_];case"Map":return[z6,g_];case"Set":return[j6,g_];case"DataView":return[d0,t]}return t.includes("Array")?[d0,t]:t.includes("Error")?[QB,t]:[Wv,t]},g1=([e,n])=>e===ly&&(n==="function"||n==="symbol"),K8n=(e,n,t,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return t.set(o,c),c},i=a=>{if(t.has(a))return t.get(a);let[o,c]=qp(a);switch(o){case ly:{let h=a;switch(c){case"bigint":o=XB,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([WB],a)}return s([o,h],a)}case d0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],_=s([o,h],a);for(const p of a)h.push(i(p));return _}case Wv:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const h=[],_=s([o,h],a);for(const p of V8n(a))(e||!g1(qp(a[p])))&&h.push([i(p),i(a[p])]);return _}case E6:return s([o,isNaN(a.getTime())?g_:a.toISOString()],a);case N6:{const{source:h,flags:_}=a;return s([o,{source:h,flags:_}],a)}case z6:{const h=[],_=s([o,h],a);for(const[p,m]of a)(e||!(g1(qp(p))||g1(qp(m))))&&h.push([i(p),i(m)]);return _}case j6:{const h=[],_=s([o,h],a);for(const p of a)(e||!g1(qp(p)))&&h.push(i(p));return _}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},kT=(e,{json:n,lossy:t}={})=>{const r=[];return K8n(!(n||t),!!n,new Map,r)(e),r},Qv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?wT(kT(e,n)):structuredClone(e):(e,n)=>wT(kT(e,n));function W8n(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 Q8n(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function X8n(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||W8n,r=e.options.footnoteBackLabel||Q8n,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&x.push({type:"text",value:" "});let w=typeof t=="string"?t:t(c,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else h.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Qv(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(n,u),e.applyData(n,u)}function U8n(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function G8n(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 Q8n(e){const n=C6(e),t=KB(e);if(n&&t)return{start:n,end:t}}function X8n(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=C6(n.children[1]),c=KB(n.children[n.children.length-1]);o&&c&&(a.position={start:o,end:c}),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 Y8n(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 c=-1;const u=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(xT(n.slice(s),s>0,!1)),i.join("")}function xT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===bT||i===yT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===bT||i===yT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function e9n(e,n){const t={type:"text",value:J8n(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function t9n(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const n9n={blockquote:N8n,break:z8n,code:j8n,delete:T8n,emphasis:A8n,footnoteReference:D8n,heading:L8n,html:I8n,imageReference:$8n,image:B8n,inlineCode:P8n,linkReference:F8n,link:H8n,listItem:q8n,list:G8n,paragraph:V8n,root:K8n,strong:W8n,table:X8n,tableCell:Z8n,tableRow:Y8n,text:e9n,thematicBreak:t9n,toml:m1,yaml:m1,definition:m1,footnoteDefinition:m1};function m1(){}const QB=-1,ly=0,h0=1,Wv=2,E6=3,N6=4,z6=5,j6=6,XB=7,YB=8,r9n=typeof self=="object"?self:globalThis,wT=(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 r9n[e](n)},s9n=(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 ly:case QB:return t(a,s);case h0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case Wv:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case E6:return t(new Date(a),s);case N6:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case z6:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case j6:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case XB:{const{name:o,message:c}=a;return t(wT(o,c),s)}case YB: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(wT(i,a),s)};return r},kT=e=>s9n(new Map,e)(0),g_="",{toString:i9n}={},{keys:a9n}=Object,Up=e=>{const n=typeof e;if(n!=="object"||!e)return[ly,n];const t=i9n.call(e).slice(8,-1);switch(t){case"Array":return[h0,g_];case"Object":return[Wv,g_];case"Date":return[E6,g_];case"RegExp":return[N6,g_];case"Map":return[z6,g_];case"Set":return[j6,g_];case"DataView":return[h0,t]}return t.includes("Array")?[h0,t]:t.includes("Error")?[XB,t]:[Wv,t]},g1=([e,n])=>e===ly&&(n==="function"||n==="symbol"),o9n=(e,n,t,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return t.set(o,c),c},i=a=>{if(t.has(a))return t.get(a);let[o,c]=Up(a);switch(o){case ly:{let h=a;switch(c){case"bigint":o=YB,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([QB],a)}return s([o,h],a)}case h0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],_=s([o,h],a);for(const p of a)h.push(i(p));return _}case Wv:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const h=[],_=s([o,h],a);for(const p of a9n(a))(e||!g1(Up(a[p])))&&h.push([i(p),i(a[p])]);return _}case E6:return s([o,isNaN(a.getTime())?g_:a.toISOString()],a);case N6:{const{source:h,flags:_}=a;return s([o,{source:h,flags:_}],a)}case z6:{const h=[],_=s([o,h],a);for(const[p,m]of a)(e||!(g1(Up(p))||g1(Up(m))))&&h.push([i(p),i(m)]);return _}case j6:{const h=[],_=s([o,h],a);for(const p of a)(e||!g1(Up(p)))&&h.push(i(p));return _}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},ST=(e,{json:n,lossy:t}={})=>{const r=[];return o9n(!(n||t),!!n,new Map,r)(e),r},Qv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?kT(ST(e,n)):structuredClone(e):(e,n)=>kT(ST(e,n));function c9n(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 l9n(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function u9n(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||c9n,r=e.options.footnoteBackLabel||l9n,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&x.push({type:"text",value:" "});let w=typeof t=="string"?t:t(c,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else h.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Qv(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 Mm=(function(e){if(e==null)return e9n;if(typeof e=="function")return uy(e);if(typeof e=="object")return Array.isArray(e)?Y8n(e):Z8n(e);if(typeof e=="string")return J8n(e);throw new Error("Expected function, string, or object as test")});function Y8n(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=YB,x,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=r9n(t(c,h)),m[0]===o5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==ZB)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k":""))+")"})}return p;function p(){let m=ZB,x,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=g9n(t(c,h)),m[0]===o5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==JB)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function ST(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function CT(e,n){const t=i9n(e,n),r=t.one(e,void 0),s=X8n(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function Xv(e,n){return e&&"run"in e?async function(t,r){const s=CT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return CT(t,{file:r,...e||n})}}function ET(e){if(e)throw e}var xw,NT;function u9n(){if(NT)return xw;NT=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 h=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return xw=function c(){var u,h,_,p,m,x,k=arguments[0],v=1,b=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const h=u;if(o&&t)throw h;return s(h)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}function h0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zT(e.position):"start"in e||"end"in e?zT(e):"line"in e||"column"in e?u5(e):""}function u5(e){return jT(e&&e.line)+":"+jT(e&&e.column)}function zT(e){return u5(e&&e.start)+"-"+u5(e&&e.end)}function jT(e){return e&&typeof e=="number"?e:1}class Ws 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 c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.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=h0(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}}Ws.prototype.file="";Ws.prototype.name="";Ws.prototype.reason="";Ws.prototype.message="";Ws.prototype.stack="";Ws.prototype.column=void 0;Ws.prototype.line=void 0;Ws.prototype.ancestors=void 0;Ws.prototype.cause=void 0;Ws.prototype.fatal=void 0;Ws.prototype.place=void 0;Ws.prototype.ruleId=void 0;Ws.prototype.source=void 0;const Io={basename:h9n,dirname:p9n,extname:m9n,join:g9n,sep:"/"};function h9n(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Om(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 p9n(e){if(Om(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 m9n(e){Om(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 g9n(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function b9n(e,n){let t="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),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 Om(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const y9n={cwd:x9n};function x9n(){return"/"}function _5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function w9n(e){if(typeof e=="string")e=new URL(e);else if(!_5(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 k9n(e)}function k9n(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]=h;const k=r[p][1];l5(k)&&l5(m)&&(m=ww(!0,k,m)),r[p]=[u,m,...x]}}}}const _y=new R6().freeze();function Ew(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zw(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 AT(e){if(!l5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function RT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function v1(e){return N9n(e)?e:new JB(e)}function N9n(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function z9n(e){return typeof e=="string"||j9n(e)}function j9n(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var MT=Object.prototype.hasOwnProperty;function OT(e,n,t){for(t of e.keys())if(p0(t,n))return t}function p0(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--&&p0(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=OT(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=OT(n,s),!s)||!p0(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(MT.call(e,t)&&++r&&!MT.call(n,t)||!(t in n)||!p0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const T9n=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,A9n=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R9n={};function DT(e,n){return(R9n.jsx?A9n:T9n).test(e)}const M9n=/[ \t\n\f\r]/g;function O9n(e){return typeof e=="object"?e.type==="text"?LT(e.value):!1:LT(e)}function LT(e){return e.replace(M9n,"")===""}var fd={},jw,IT;function D9n(){if(IT)return jw;IT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=` -`,u="/",h="*",_="",p="comment",m="declaration";function x(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function C(H){var Q=H.match(n);Q&&(w+=Q.length);var V=H.lastIndexOf(c);y=~V?H.length-V:y+H.length}function N(){var H={line:w,column:y};return function(Q){return Q.position=new z(H),M(),Q}}function z(H){this.start=H,this.end={line:w,column:y},this.source=b.source}z.prototype.content=v;function T(H){var Q=new Error(b.source+":"+w+":"+y+": "+H);if(Q.reason=H,Q.filename=b.source,Q.line=w,Q.column=y,Q.source=v,!b.silent)throw Q}function j(H){var Q=H.exec(v);if(Q){var V=Q[0];return C(V),v=v.slice(V.length),Q}}function M(){j(t)}function D(H){var Q;for(H=H||[];Q=I();)Q!==!1&&H.push(Q);return H}function I(){var H=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(h!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return T("End of comment missing");var V=v.slice(2,Q-2);return y+=2,C(V),v=v.slice(Q),y+=2,H({type:p,comment:V})}}function $(){var H=N(),Q=j(r);if(Q){if(I(),!j(s))return T("property missing ':'");var V=j(i),J=H({type:m,property:k(Q[0].replace(e,_)),value:V?k(V[0].replace(e,_)):_});return j(a),J}}function q(){var H=[];D(H);for(var Q;Q=$();)Q!==!1&&(H.push(Q),D(H));return H}return M(),q()}function k(v){return v?v.replace(o,_):_}return jw=x,jw}var $T;function L9n(){if($T)return fd;$T=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(D9n());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(c=>{if(c.type!=="declaration")return;const{property:u,value:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return fd}var Up={},BT;function I9n(){if(BT)return Up;BT=1,Object.defineProperty(Up,"__esModule",{value:!0}),Up.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Up.camelCase=c,Up}var Gp,PT;function $9n(){if(PT)return Gp;PT=1;var e=Gp&&Gp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(L9n()),t=I9n();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(a[(0,t.camelCase)(o,i)]=c)}),a}return r.default=r,Gp=r,Gp}var B9n=$9n();const P9n=gm(B9n),M6={}.hasOwnProperty,F9n=new Map,H9n=/[A-Z]/g,q9n=new Set(["table","tbody","thead","tfoot","tr"]),U9n=new Set(["td","th"]),eP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tP(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=Z9n(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=Y9n(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"?Vb:E$,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=nP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function nP(e,n,t){if(n.type==="element")return G9n(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return V9n(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return W9n(e,n,t);if(n.type==="mdxjsEsm")return K9n(e,n);if(n.type==="root")return Q9n(e,n,t);if(n.type==="text")return X9n(e,n)}function G9n(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Vb,e.schema=s),e.ancestors.push(n);const i=sP(e,n.tagName,!1),a=J9n(e,n);let o=D6(e,n);return q9n.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!O9n(c):!0})),rP(e,a,i,n),O6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function V9n(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)}F0(e,n.position)}function K9n(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);F0(e,n.position)}function W9n(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Vb,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:sP(e,n.name,!0),a=eEn(e,n),o=D6(e,n);return rP(e,a,i,n),O6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function Q9n(e,n,t){const r={};return O6(r,D6(e,n)),e.create(n,e.Fragment,r,t)}function X9n(e,n){return n.value}function rP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function O6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Y9n(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 Z9n(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=C6(r);return n(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function J9n(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&M6.call(n.properties,s)){const i=tEn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&U9n.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 eEn(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 F0(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 F0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function D6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:F9n;for(;++ry.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-h&&(z=s.length-(e.children.length-y)),z>=0&&(N=((b=s[z])==null?void 0:b.key)??N);N&&c.has(N)&&((w=s[z])==null?void 0:w.key)!==N;)N=`${N}+`;N&&c.add(N);const T=iP(C,s[z]??null,t,N);i.push(T),T.react!==void 0&&a.push(T.react)}const _=n!==null&&lEn(e,n.node);if(n&&n.key===r&&_&&s.length===i.length&&i.every((y,C)=>y===s[C]))return n;const p=e.type==="element"&&aEn.has(e.tagName)?a.filter(y=>typeof y!="string"||!oEn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let x=_?n==null?void 0:n.shell:null;if(!x){const y=tP({...e,children:[]},t);x={props:y.props,type:y.type}}return{children:i,key:r,node:e,react:f.jsx(x.type,{...x.props,children:m},r),shell:x}}function lEn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return p0(s,o)}function Ld(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?(Ji(e,e.length,0,n),e):n}const HT={}.hasOwnProperty;function oP(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 ao(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function ln(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return dn(c)?(e.enter(t),o(c)):n(c)}function o(c){return dn(c)&&i++a))return;const T=n.events.length;let j=T,M,D;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){D=n.events[j][1].end;break}M=!0}for(b(r),z=T;zy;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=y}function w(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function vEn(e,n,t){return ln(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function yh(e){if(e===null||cr(e)||ef(e))return 1;if(cy(e))return 2}function fy(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[r][1].end},p={...e[t][1].start};UT(_,-c),UT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>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=Ma(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ma(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ma(u,fy(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ma(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ma(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Ji(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&dn(z)?ln(e,w,"linePrefix",i+1)(z):w(z)}function w(z){return z===null||Et(z)?e.check(GT,k,C)(z):(e.enter("codeFlowValue"),y(z))}function y(z){return z===null||Et(z)?(e.exit("codeFlowValue"),w(z)):(e.consume(z),y)}function C(z){return e.exit("codeFenced"),n(z)}function N(z,T,j){let M=0;return D;function D(Q){return z.enter("lineEnding"),z.consume(Q),z.exit("lineEnding"),I}function I(Q){return z.enter("codeFencedFence"),dn(Q)?ln(z,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):$(Q)}function $(Q){return Q===o?(z.enter("codeFencedFenceSequence"),q(Q)):j(Q)}function q(Q){return Q===o?(M++,z.consume(Q),q):M>=a?(z.exit("codeFencedFenceSequence"),dn(Q)?ln(z,H,"whitespace")(Q):H(Q)):j(Q)}function H(Q){return Q===null||Et(Q)?(z.exit("codeFencedFence"),T(Q)):j(Q)}}}function TEn(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 Tw={name:"codeIndented",tokenize:REn},AEn={partial:!0,tokenize:MEn};function REn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),ln(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Et(u)?e.attempt(AEn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Et(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function MEn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):ln(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):Et(a)?s(a):t(a)}}const OEn={name:"codeText",previous:LEn,resolve:DEn,tokenize:IEn};function DEn(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&&Vp(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),Vp(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Vp(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 dP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return _;function _(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||Kv(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Et(b)?t(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||cr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||m===null||m===91||m===93&&!c||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):Et(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Et(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!dn(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,_):_(m)}}function pP(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,c):t(p)}function c(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),c(a)):p===null?t(p):Et(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ln(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Et(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:h)}function _(p){return p===a||p===92?(e.consume(p),h):h(p)}}function m0(e,n){let t;return r;function r(s){return Et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):dn(s)?ln(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const GEn={name:"definition",tokenize:KEn},VEn={partial:!0,tokenize:WEn};function KEn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return hP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=ao(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return cr(m)?m0(e,u)(m):u(m)}function u(m){return dP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(VEn,_,_)(m)}function _(m){return dn(m)?ln(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Et(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function WEn(e,n,t){return r;function r(o){return cr(o)?m0(e,s)(o):t(o)}function s(o){return pP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return dn(o)?ln(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Et(o)?n(o):t(o)}}const QEn={name:"hardBreakEscape",tokenize:XEn};function XEn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Et(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const YEn={name:"headingAtx",resolve:ZEn,tokenize:JEn};function ZEn(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"},Ji(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function JEn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||cr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Et(h)?(e.exit("atxHeading"),n(h)):dn(h)?ln(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||cr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const eNn=["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"],KT=["pre","script","style","textarea"],tNn={concrete:!0,name:"htmlFlow",resolveTo:sNn,tokenize:iNn},nNn={partial:!0,tokenize:oNn},rNn={partial:!0,tokenize:aNn};function sNn(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 iNn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(K){return h(K)}function h(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),_}function _(K){return K===33?(e.consume(K),p):K===47?(e.consume(K),i=!0,k):K===63?(e.consume(K),s=3,r.interrupt?n:L):li(K)?(e.consume(K),a=String.fromCharCode(K),v):t(K)}function p(K){return K===45?(e.consume(K),s=2,m):K===91?(e.consume(K),s=5,o=0,x):li(K)?(e.consume(K),s=4,r.interrupt?n:L):t(K)}function m(K){return K===45?(e.consume(K),r.interrupt?n:L):t(K)}function x(K){const ne="CDATA[";return K===ne.charCodeAt(o++)?(e.consume(K),o===ne.length?r.interrupt?n:$:x):t(K)}function k(K){return li(K)?(e.consume(K),a=String.fromCharCode(K),v):t(K)}function v(K){if(K===null||K===47||K===62||cr(K)){const ne=K===47,ce=a.toLowerCase();return!ne&&!i&&KT.includes(ce)?(s=1,r.interrupt?n(K):$(K)):eNn.includes(a.toLowerCase())?(s=6,ne?(e.consume(K),b):r.interrupt?n(K):$(K)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(K):i?w(K):y(K))}return K===45||Gs(K)?(e.consume(K),a+=String.fromCharCode(K),v):t(K)}function b(K){return K===62?(e.consume(K),r.interrupt?n:$):t(K)}function w(K){return dn(K)?(e.consume(K),w):D(K)}function y(K){return K===47?(e.consume(K),D):K===58||K===95||li(K)?(e.consume(K),C):dn(K)?(e.consume(K),y):D(K)}function C(K){return K===45||K===46||K===58||K===95||Gs(K)?(e.consume(K),C):N(K)}function N(K){return K===61?(e.consume(K),z):dn(K)?(e.consume(K),N):y(K)}function z(K){return K===null||K===60||K===61||K===62||K===96?t(K):K===34||K===39?(e.consume(K),c=K,T):dn(K)?(e.consume(K),z):j(K)}function T(K){return K===c?(e.consume(K),c=null,M):K===null||Et(K)?t(K):(e.consume(K),T)}function j(K){return K===null||K===34||K===39||K===47||K===60||K===61||K===62||K===96||cr(K)?N(K):(e.consume(K),j)}function M(K){return K===47||K===62||dn(K)?y(K):t(K)}function D(K){return K===62?(e.consume(K),I):t(K)}function I(K){return K===null||Et(K)?$(K):dn(K)?(e.consume(K),I):t(K)}function $(K){return K===45&&s===2?(e.consume(K),V):K===60&&s===1?(e.consume(K),J):K===62&&s===4?(e.consume(K),F):K===63&&s===3?(e.consume(K),L):K===93&&s===5?(e.consume(K),B):Et(K)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(nNn,U,q)(K)):K===null||Et(K)?(e.exit("htmlFlowData"),q(K)):(e.consume(K),$)}function q(K){return e.check(rNn,H,U)(K)}function H(K){return e.enter("lineEnding"),e.consume(K),e.exit("lineEnding"),Q}function Q(K){return K===null||Et(K)?q(K):(e.enter("htmlFlowData"),$(K))}function V(K){return K===45?(e.consume(K),L):$(K)}function J(K){return K===47?(e.consume(K),a="",Z):$(K)}function Z(K){if(K===62){const ne=a.toLowerCase();return KT.includes(ne)?(e.consume(K),F):$(K)}return li(K)&&a.length<8?(e.consume(K),a+=String.fromCharCode(K),Z):$(K)}function B(K){return K===93?(e.consume(K),L):$(K)}function L(K){return K===62?(e.consume(K),F):K===45&&s===2?(e.consume(K),L):$(K)}function F(K){return K===null||Et(K)?(e.exit("htmlFlowData"),U(K)):(e.consume(K),F)}function U(K){return e.exit("htmlFlow"),n(K)}}function aNn(e,n,t){const r=this;return s;function s(a){return Et(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 oNn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Dm,n,t)}}const cNn={name:"htmlText",tokenize:lNn};function lNn(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),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),y):li(L)?(e.consume(L),j):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,x):li(L)?(e.consume(L),w):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Et(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?V(L):L===45?p(L):_(L)}function x(L){const F="CDATA[";return L===F.charCodeAt(i++)?(e.consume(L),i===F.length?k:x):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Et(L)?(a=k,J(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?V(L):L===93?(e.consume(L),b):k(L)}function w(L){return L===null||L===62?V(L):Et(L)?(a=w,J(L)):(e.consume(L),w)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):Et(L)?(a=y,J(L)):(e.consume(L),y)}function C(L){return L===62?V(L):y(L)}function N(L){return li(L)?(e.consume(L),z):t(L)}function z(L){return L===45||Gs(L)?(e.consume(L),z):T(L)}function T(L){return Et(L)?(a=T,J(L)):dn(L)?(e.consume(L),T):V(L)}function j(L){return L===45||Gs(L)?(e.consume(L),j):L===47||L===62||cr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),V):L===58||L===95||li(L)?(e.consume(L),D):Et(L)?(a=M,J(L)):dn(L)?(e.consume(L),M):V(L)}function D(L){return L===45||L===46||L===58||L===95||Gs(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),$):Et(L)?(a=I,J(L)):dn(L)?(e.consume(L),I):M(L)}function $(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,q):Et(L)?(a=$,J(L)):dn(L)?(e.consume(L),$):(e.consume(L),H)}function q(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Et(L)?(a=q,J(L)):(e.consume(L),q)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||cr(L)?M(L):(e.consume(L),H)}function Q(L){return L===47||L===62||cr(L)?M(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),Z}function Z(L){return dn(L)?ln(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),a(L)}}const I6={name:"labelEnd",resolveAll:dNn,resolveTo:hNn,tokenize:pNn},uNn={tokenize:mNn},_Nn={tokenize:gNn},fNn={tokenize:vNn};function dNn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Et(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),dn(u)?ln(e,o,"whitespace")(u):o(u))}}const Ei={continuation:{tokenize:zNn},exit:TNn,name:"list",tokenize:NNn},CNn={partial:!0,tokenize:ANn},ENn={partial:!0,tokenize:jNn};function NNn(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:a5(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(nv,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return a5(m)&&++a<10?(e.consume(m),c):(!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(Dm,r.interrupt?t:h,e.attempt(CNn,p,_))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function _(m){return dn(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 zNn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Dm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ln(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!dn(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(ENn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ln(e,e.attempt(Ei,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function jNn(e,n,t){const r=this;return ln(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 TNn(e){e.exit(this.containerState.type)}function ANn(e,n,t){const r=this;return ln(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!dn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const WT={name:"setextUnderline",resolveTo:RNn,tokenize:MNn};function RNn(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 MNn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,_;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){_=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(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"),dn(u)?ln(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Et(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const ONn={tokenize:DNn};function DNn(e){const n=this,t=e.attempt(Dm,r,e.attempt(this.parser.constructs.flowInitial,s,ln(e,e.attempt(this.parser.constructs.flow,s,e.attempt(PEn,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 LNn={resolveAll:gP()},INn=mP("string"),$Nn=mP("text");function mP(e){return{resolveAll:gP(e==="text"?BNn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const _=s[h];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function gP(e){return n;function n(t,r){let s=-1,i;for(;++s<=t.length;)i===void 0?t[s]&&t[s][1].type==="data"&&(i=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(t,r):t}}function BNn(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],s=n.sliceStream(r);let i=s.length,a=-1,o=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const u={type:t===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const PNn={42:Ei,43:Ei,45:Ei,48:Ei,49:Ei,50:Ei,51:Ei,52:Ei,53:Ei,54:Ei,55:Ei,56:Ei,57:Ei,62:lP},FNn={91:GEn},HNn={[-2]:Tw,[-1]:Tw,32:Tw},qNn={35:YEn,42:nv,45:[WT,nv],60:tNn,61:WT,95:nv,96:VT,126:VT},UNn={38:_P,92:uP},GNn={[-5]:Aw,[-4]:Aw,[-3]:Aw,33:bNn,38:_P,42:f5,60:[xEn,cNn],91:xNn,92:[QEn,uP],93:I6,95:f5,96:OEn},VNn={null:[f5,LNn]},KNn={null:[42,95]},WNn={null:[]},QNn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:KNn,contentInitial:FNn,disable:WNn,document:PNn,flow:qNn,flowInitial:HNn,insideSpan:VNn,string:UNn,text:GNn},Symbol.toStringTag,{value:"Module"}));function XNn(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},i=[];let a=[],o=[];const c={attempt:T(N),check:T(z),consume:w,enter:y,exit:C,interrupt:T(z,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let h=n.tokenize.call(u,c);return n.resolveAll&&i.push(n),u;function _(I){return a=Ma(a,I),v(),a[a.length-1]!==null?[]:(j(n,0),u.events=fy(i,u.events,u),u.events)}function p(I,$){return ZNn(m(I),$)}function m(I){return YNn(a,I)}function x(){const{_bufferIndex:I,_index:$,line:q,column:H,offset:Q}=r;return{_bufferIndex:I,_index:$,line:q,column:H,offset:Q}}function k(I){s[I.line]=I.column,D()}function v(){let I;for(;r._index-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 ZNn(e,n){let t=-1;const r=[];let s;for(;++t"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return xw=function c(){var u,h,_,p,m,x,k=arguments[0],v=1,b=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const h=u;if(o&&t)throw h;return s(h)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}function p0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jT(e.position):"start"in e||"end"in e?jT(e):"line"in e||"column"in e?u5(e):""}function u5(e){return TT(e&&e.line)+":"+TT(e&&e.column)}function jT(e){return u5(e&&e.start)+"-"+u5(e&&e.end)}function TT(e){return e&&typeof e=="number"?e:1}class Xs 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 c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.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=p0(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}}Xs.prototype.file="";Xs.prototype.name="";Xs.prototype.reason="";Xs.prototype.message="";Xs.prototype.stack="";Xs.prototype.column=void 0;Xs.prototype.line=void 0;Xs.prototype.ancestors=void 0;Xs.prototype.cause=void 0;Xs.prototype.fatal=void 0;Xs.prototype.place=void 0;Xs.prototype.ruleId=void 0;Xs.prototype.source=void 0;const Io={basename:z9n,dirname:j9n,extname:T9n,join:A9n,sep:"/"};function z9n(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Om(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 j9n(e){if(Om(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 T9n(e){Om(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 A9n(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function M9n(e,n){let t="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),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 Om(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const O9n={cwd:D9n};function D9n(){return"/"}function _5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function L9n(e){if(typeof e=="string")e=new URL(e);else if(!_5(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 I9n(e)}function I9n(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]=h;const k=r[p][1];l5(k)&&l5(m)&&(m=ww(!0,k,m)),r[p]=[u,m,...x]}}}}const _y=new R6().freeze();function Ew(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zw(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 RT(e){if(!l5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function MT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function v1(e){return F9n(e)?e:new eP(e)}function F9n(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function H9n(e){return typeof e=="string"||q9n(e)}function q9n(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var OT=Object.prototype.hasOwnProperty;function DT(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=DT(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=DT(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(OT.call(e,t)&&++r&&!OT.call(n,t)||!(t in n)||!m0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const U9n=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G9n=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V9n={};function LT(e,n){return(V9n.jsx?G9n:U9n).test(e)}const K9n=/[ \t\n\f\r]/g;function W9n(e){return typeof e=="object"?e.type==="text"?IT(e.value):!1:IT(e)}function IT(e){return e.replace(K9n,"")===""}var hd={},jw,$T;function Q9n(){if($T)return jw;$T=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=` +`,u="/",h="*",_="",p="comment",m="declaration";function x(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function C(H){var Q=H.match(n);Q&&(w+=Q.length);var V=H.lastIndexOf(c);y=~V?H.length-V:y+H.length}function N(){var H={line:w,column:y};return function(Q){return Q.position=new z(H),M(),Q}}function z(H){this.start=H,this.end={line:w,column:y},this.source=b.source}z.prototype.content=v;function T(H){var Q=new Error(b.source+":"+w+":"+y+": "+H);if(Q.reason=H,Q.filename=b.source,Q.line=w,Q.column=y,Q.source=v,!b.silent)throw Q}function j(H){var Q=H.exec(v);if(Q){var V=Q[0];return C(V),v=v.slice(V.length),Q}}function M(){j(t)}function D(H){var Q;for(H=H||[];Q=I();)Q!==!1&&H.push(Q);return H}function I(){var H=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(h!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return T("End of comment missing");var V=v.slice(2,Q-2);return y+=2,C(V),v=v.slice(Q),y+=2,H({type:p,comment:V})}}function $(){var H=N(),Q=j(r);if(Q){if(I(),!j(s))return T("property missing ':'");var V=j(i),J=H({type:m,property:k(Q[0].replace(e,_)),value:V?k(V[0].replace(e,_)):_});return j(a),J}}function q(){var H=[];D(H);for(var Q;Q=$();)Q!==!1&&(H.push(Q),D(H));return H}return M(),q()}function k(v){return v?v.replace(o,_):_}return jw=x,jw}var BT;function X9n(){if(BT)return hd;BT=1;var e=hd&&hd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hd,"__esModule",{value:!0}),hd.default=t;const n=e(Q9n());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(c=>{if(c.type!=="declaration")return;const{property:u,value:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return hd}var Gp={},PT;function Y9n(){if(PT)return Gp;PT=1,Object.defineProperty(Gp,"__esModule",{value:!0}),Gp.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Gp.camelCase=c,Gp}var Vp,FT;function Z9n(){if(FT)return Vp;FT=1;var e=Vp&&Vp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(X9n()),t=Y9n();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(a[(0,t.camelCase)(o,i)]=c)}),a}return r.default=r,Vp=r,Vp}var J9n=Z9n();const eEn=gm(J9n),M6={}.hasOwnProperty,tEn=new Map,nEn=/[A-Z]/g,rEn=new Set(["table","tbody","thead","tfoot","tr"]),sEn=new Set(["td","th"]),tP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nP(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=fEn(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=_En(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"?Vb:N$,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=rP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function rP(e,n,t){if(n.type==="element")return iEn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return aEn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return cEn(e,n,t);if(n.type==="mdxjsEsm")return oEn(e,n);if(n.type==="root")return lEn(e,n,t);if(n.type==="text")return uEn(e,n)}function iEn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Vb,e.schema=s),e.ancestors.push(n);const i=iP(e,n.tagName,!1),a=dEn(e,n);let o=D6(e,n);return rEn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!W9n(c):!0})),sP(e,a,i,n),O6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function aEn(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)}F0(e,n.position)}function oEn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);F0(e,n.position)}function cEn(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Vb,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:iP(e,n.name,!0),a=hEn(e,n),o=D6(e,n);return sP(e,a,i,n),O6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function lEn(e,n,t){const r={};return O6(r,D6(e,n)),e.create(n,e.Fragment,r,t)}function uEn(e,n){return n.value}function sP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function O6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function _En(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 fEn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=C6(r);return n(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function dEn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&M6.call(n.properties,s)){const i=pEn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&sEn.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 hEn(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 F0(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 F0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function D6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:tEn;for(;++ry.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-h&&(z=s.length-(e.children.length-y)),z>=0&&(N=((b=s[z])==null?void 0:b.key)??N);N&&c.has(N)&&((w=s[z])==null?void 0:w.key)!==N;)N=`${N}+`;N&&c.add(N);const T=aP(C,s[z]??null,t,N);i.push(T),T.react!==void 0&&a.push(T.react)}const _=n!==null&&kEn(e,n.node);if(n&&n.key===r&&_&&s.length===i.length&&i.every((y,C)=>y===s[C]))return n;const p=e.type==="element"&&yEn.has(e.tagName)?a.filter(y=>typeof y!="string"||!xEn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let x=_?n==null?void 0:n.shell:null;if(!x){const y=nP({...e,children:[]},t);x={props:y.props,type:y.type}}return{children:i,key:r,node:e,react:f.jsx(x.type,{...x.props,children:m},r),shell:x}}function kEn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return m0(s,o)}function $d(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?(Ji(e,e.length,0,n),e):n}const qT={}.hasOwnProperty;function cP(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 ao(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function un(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return mn(c)?(e.enter(t),o(c)):n(c)}function o(c){return mn(c)&&i++a))return;const T=n.events.length;let j=T,M,D;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){D=n.events[j][1].end;break}M=!0}for(b(r),z=T;zy;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=y}function w(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function REn(e,n,t){return un(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wh(e){if(e===null||_r(e)||tf(e))return 1;if(cy(e))return 2}function fy(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[r][1].end},p={...e[t][1].start};GT(_,-c),GT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>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=Ma(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ma(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ma(u,fy(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ma(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ma(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Ji(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&mn(z)?un(e,w,"linePrefix",i+1)(z):w(z)}function w(z){return z===null||Tt(z)?e.check(VT,k,C)(z):(e.enter("codeFlowValue"),y(z))}function y(z){return z===null||Tt(z)?(e.exit("codeFlowValue"),w(z)):(e.consume(z),y)}function C(z){return e.exit("codeFenced"),n(z)}function N(z,T,j){let M=0;return D;function D(Q){return z.enter("lineEnding"),z.consume(Q),z.exit("lineEnding"),I}function I(Q){return z.enter("codeFencedFence"),mn(Q)?un(z,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):$(Q)}function $(Q){return Q===o?(z.enter("codeFencedFenceSequence"),q(Q)):j(Q)}function q(Q){return Q===o?(M++,z.consume(Q),q):M>=a?(z.exit("codeFencedFenceSequence"),mn(Q)?un(z,H,"whitespace")(Q):H(Q)):j(Q)}function H(Q){return Q===null||Tt(Q)?(z.exit("codeFencedFence"),T(Q)):j(Q)}}}function UEn(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 Tw={name:"codeIndented",tokenize:VEn},GEn={partial:!0,tokenize:KEn};function VEn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),un(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Tt(u)?e.attempt(GEn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Tt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function KEn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Tt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):un(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):Tt(a)?s(a):t(a)}}const WEn={name:"codeText",previous:XEn,resolve:QEn,tokenize:YEn};function QEn(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&&Kp(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),Kp(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Kp(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 hP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return _;function _(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||Kv(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Tt(b)?t(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||_r(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||m===null||m===91||m===93&&!c||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):Tt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Tt(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!mn(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,_):_(m)}}function mP(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,c):t(p)}function c(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),c(a)):p===null?t(p):Tt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),un(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Tt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:h)}function _(p){return p===a||p===92?(e.consume(p),h):h(p)}}function g0(e,n){let t;return r;function r(s){return Tt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):mn(s)?un(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const iNn={name:"definition",tokenize:oNn},aNn={partial:!0,tokenize:cNn};function oNn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return pP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=ao(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return _r(m)?g0(e,u)(m):u(m)}function u(m){return hP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(aNn,_,_)(m)}function _(m){return mn(m)?un(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Tt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function cNn(e,n,t){return r;function r(o){return _r(o)?g0(e,s)(o):t(o)}function s(o){return mP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return mn(o)?un(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Tt(o)?n(o):t(o)}}const lNn={name:"hardBreakEscape",tokenize:uNn};function uNn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Tt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const _Nn={name:"headingAtx",resolve:fNn,tokenize:dNn};function fNn(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"},Ji(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function dNn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||_r(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Tt(h)?(e.exit("atxHeading"),n(h)):mn(h)?un(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||_r(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const hNn=["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"],WT=["pre","script","style","textarea"],pNn={concrete:!0,name:"htmlFlow",resolveTo:vNn,tokenize:bNn},mNn={partial:!0,tokenize:xNn},gNn={partial:!0,tokenize:yNn};function vNn(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 bNn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(K){return h(K)}function h(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),_}function _(K){return K===33?(e.consume(K),p):K===47?(e.consume(K),i=!0,k):K===63?(e.consume(K),s=3,r.interrupt?n:L):ui(K)?(e.consume(K),a=String.fromCharCode(K),v):t(K)}function p(K){return K===45?(e.consume(K),s=2,m):K===91?(e.consume(K),s=5,o=0,x):ui(K)?(e.consume(K),s=4,r.interrupt?n:L):t(K)}function m(K){return K===45?(e.consume(K),r.interrupt?n:L):t(K)}function x(K){const ne="CDATA[";return K===ne.charCodeAt(o++)?(e.consume(K),o===ne.length?r.interrupt?n:$:x):t(K)}function k(K){return ui(K)?(e.consume(K),a=String.fromCharCode(K),v):t(K)}function v(K){if(K===null||K===47||K===62||_r(K)){const ne=K===47,ce=a.toLowerCase();return!ne&&!i&&WT.includes(ce)?(s=1,r.interrupt?n(K):$(K)):hNn.includes(a.toLowerCase())?(s=6,ne?(e.consume(K),b):r.interrupt?n(K):$(K)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(K):i?w(K):y(K))}return K===45||Ks(K)?(e.consume(K),a+=String.fromCharCode(K),v):t(K)}function b(K){return K===62?(e.consume(K),r.interrupt?n:$):t(K)}function w(K){return mn(K)?(e.consume(K),w):D(K)}function y(K){return K===47?(e.consume(K),D):K===58||K===95||ui(K)?(e.consume(K),C):mn(K)?(e.consume(K),y):D(K)}function C(K){return K===45||K===46||K===58||K===95||Ks(K)?(e.consume(K),C):N(K)}function N(K){return K===61?(e.consume(K),z):mn(K)?(e.consume(K),N):y(K)}function z(K){return K===null||K===60||K===61||K===62||K===96?t(K):K===34||K===39?(e.consume(K),c=K,T):mn(K)?(e.consume(K),z):j(K)}function T(K){return K===c?(e.consume(K),c=null,M):K===null||Tt(K)?t(K):(e.consume(K),T)}function j(K){return K===null||K===34||K===39||K===47||K===60||K===61||K===62||K===96||_r(K)?N(K):(e.consume(K),j)}function M(K){return K===47||K===62||mn(K)?y(K):t(K)}function D(K){return K===62?(e.consume(K),I):t(K)}function I(K){return K===null||Tt(K)?$(K):mn(K)?(e.consume(K),I):t(K)}function $(K){return K===45&&s===2?(e.consume(K),V):K===60&&s===1?(e.consume(K),J):K===62&&s===4?(e.consume(K),F):K===63&&s===3?(e.consume(K),L):K===93&&s===5?(e.consume(K),B):Tt(K)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(mNn,U,q)(K)):K===null||Tt(K)?(e.exit("htmlFlowData"),q(K)):(e.consume(K),$)}function q(K){return e.check(gNn,H,U)(K)}function H(K){return e.enter("lineEnding"),e.consume(K),e.exit("lineEnding"),Q}function Q(K){return K===null||Tt(K)?q(K):(e.enter("htmlFlowData"),$(K))}function V(K){return K===45?(e.consume(K),L):$(K)}function J(K){return K===47?(e.consume(K),a="",Z):$(K)}function Z(K){if(K===62){const ne=a.toLowerCase();return WT.includes(ne)?(e.consume(K),F):$(K)}return ui(K)&&a.length<8?(e.consume(K),a+=String.fromCharCode(K),Z):$(K)}function B(K){return K===93?(e.consume(K),L):$(K)}function L(K){return K===62?(e.consume(K),F):K===45&&s===2?(e.consume(K),L):$(K)}function F(K){return K===null||Tt(K)?(e.exit("htmlFlowData"),U(K)):(e.consume(K),F)}function U(K){return e.exit("htmlFlow"),n(K)}}function yNn(e,n,t){const r=this;return s;function s(a){return Tt(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 xNn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Dm,n,t)}}const wNn={name:"htmlText",tokenize:kNn};function kNn(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),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),y):ui(L)?(e.consume(L),j):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,x):ui(L)?(e.consume(L),w):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Tt(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?V(L):L===45?p(L):_(L)}function x(L){const F="CDATA[";return L===F.charCodeAt(i++)?(e.consume(L),i===F.length?k:x):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Tt(L)?(a=k,J(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?V(L):L===93?(e.consume(L),b):k(L)}function w(L){return L===null||L===62?V(L):Tt(L)?(a=w,J(L)):(e.consume(L),w)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):Tt(L)?(a=y,J(L)):(e.consume(L),y)}function C(L){return L===62?V(L):y(L)}function N(L){return ui(L)?(e.consume(L),z):t(L)}function z(L){return L===45||Ks(L)?(e.consume(L),z):T(L)}function T(L){return Tt(L)?(a=T,J(L)):mn(L)?(e.consume(L),T):V(L)}function j(L){return L===45||Ks(L)?(e.consume(L),j):L===47||L===62||_r(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),V):L===58||L===95||ui(L)?(e.consume(L),D):Tt(L)?(a=M,J(L)):mn(L)?(e.consume(L),M):V(L)}function D(L){return L===45||L===46||L===58||L===95||Ks(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),$):Tt(L)?(a=I,J(L)):mn(L)?(e.consume(L),I):M(L)}function $(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,q):Tt(L)?(a=$,J(L)):mn(L)?(e.consume(L),$):(e.consume(L),H)}function q(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Tt(L)?(a=q,J(L)):(e.consume(L),q)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||_r(L)?M(L):(e.consume(L),H)}function Q(L){return L===47||L===62||_r(L)?M(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),Z}function Z(L){return mn(L)?un(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),a(L)}}const I6={name:"labelEnd",resolveAll:NNn,resolveTo:zNn,tokenize:jNn},SNn={tokenize:TNn},CNn={tokenize:ANn},ENn={tokenize:RNn};function NNn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Tt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),mn(u)?un(e,o,"whitespace")(u):o(u))}}const Ei={continuation:{tokenize:HNn},exit:UNn,name:"list",tokenize:FNn},BNn={partial:!0,tokenize:GNn},PNn={partial:!0,tokenize:qNn};function FNn(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:a5(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(nv,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return a5(m)&&++a<10?(e.consume(m),c):(!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(Dm,r.interrupt?t:h,e.attempt(BNn,p,_))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function _(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 HNn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Dm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,un(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!mn(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(PNn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,un(e,e.attempt(Ei,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function qNn(e,n,t){const r=this;return un(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 UNn(e){e.exit(this.containerState.type)}function GNn(e,n,t){const r=this;return un(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!mn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const QT={name:"setextUnderline",resolveTo:VNn,tokenize:KNn};function VNn(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 KNn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,_;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){_=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(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"),mn(u)?un(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Tt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const WNn={tokenize:QNn};function QNn(e){const n=this,t=e.attempt(Dm,r,e.attempt(this.parser.constructs.flowInitial,s,un(e,e.attempt(this.parser.constructs.flow,s,e.attempt(eNn,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 XNn={resolveAll:vP()},YNn=gP("string"),ZNn=gP("text");function gP(e){return{resolveAll:vP(e==="text"?JNn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const _=s[h];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function vP(e){return n;function n(t,r){let s=-1,i;for(;++s<=t.length;)i===void 0?t[s]&&t[s][1].type==="data"&&(i=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(t,r):t}}function JNn(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],s=n.sliceStream(r);let i=s.length,a=-1,o=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const u={type:t===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const ezn={42:Ei,43:Ei,45:Ei,48:Ei,49:Ei,50:Ei,51:Ei,52:Ei,53:Ei,54:Ei,55:Ei,56:Ei,57:Ei,62:uP},tzn={91:iNn},nzn={[-2]:Tw,[-1]:Tw,32:Tw},rzn={35:_Nn,42:nv,45:[QT,nv],60:pNn,61:QT,95:nv,96:KT,126:KT},szn={38:fP,92:_P},izn={[-5]:Aw,[-4]:Aw,[-3]:Aw,33:MNn,38:fP,42:f5,60:[DEn,wNn],91:DNn,92:[lNn,_P],93:I6,95:f5,96:WEn},azn={null:[f5,XNn]},ozn={null:[42,95]},czn={null:[]},lzn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ozn,contentInitial:tzn,disable:czn,document:ezn,flow:rzn,flowInitial:nzn,insideSpan:azn,string:szn,text:izn},Symbol.toStringTag,{value:"Module"}));function uzn(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},i=[];let a=[],o=[];const c={attempt:T(N),check:T(z),consume:w,enter:y,exit:C,interrupt:T(z,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let h=n.tokenize.call(u,c);return n.resolveAll&&i.push(n),u;function _(I){return a=Ma(a,I),v(),a[a.length-1]!==null?[]:(j(n,0),u.events=fy(i,u.events,u),u.events)}function p(I,$){return fzn(m(I),$)}function m(I){return _zn(a,I)}function x(){const{_bufferIndex:I,_index:$,line:q,column:H,offset:Q}=r;return{_bufferIndex:I,_index:$,line:q,column:H,offset:Q}}function k(I){s[I.line]=I.column,D()}function v(){let I;for(;r._index-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 fzn(e,n){let t=-1;const r=[];let s;for(;++t0){const mt=Fe.tokenStack[Fe.tokenStack.length-1];(mt[1]||XT).call(Fe,void 0,mt[0])}for(Te.position={start:Xl(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:Xl(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},_t=-1;++_t0&&(Ge(this,hu,ue(this,hu)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=YT(t)),ue(this,hu)+yzn(t,r)}}hu=new WeakMap;const lzn=new Set(["*","**","_","__"]);function YT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;t0){const St=Be.tokenStack[Be.tokenStack.length-1];(St[1]||YT).call(Be,void 0,St[0])}for(Ae.position={start:Xl(me.length>0?me[0][1].start:{line:1,column:1,offset:0}),end:Xl(me.length>0?me[me.length-2][1].end:{line:1,column:1,offset:0})},ft=-1;++ft0&&(Ue(this,hu,ue(this,hu)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=ZT(t)),ue(this,hu)+Ozn(t,r)}}hu=new WeakMap;const kzn=new Set(["*","**","_","__"]);function ZT(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(bzn(n)){ZT(n,t,r);continue}const i=hzn(n,e,t);if(i>t){t=i-1;continue}const a=pzn(n,e,t);if(a>t){t=a-1;continue}oo(e,t)||ZT(n,t,r)}return n}function uzn(e,n,t){const r=n[t];return r==="`"?_zn(e,n,t):r==="$"?fzn(e,n,t):r==="~"?dzn(e,n,t):t}function _zn(e,n,t){const r=$6(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&Yv(n,t)&&!oo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!oo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||oo(n,t)?t+r:r>=3&&Yv(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function fzn(e,n,t){const r=$6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!oo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||oo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function dzn(e,n,t){const r=$6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Yv(n,t)&&!oo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Yv(n,t)||oo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function hzn(e,n,t){if(n[t]!=="<"||oo(n,t))return t;const r=n[t+1];if(r!==void 0&&!wP(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function pzn(e,n,t){const r=mzn(n,t);if(!r)return t;if(oo(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):(gzn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function mzn(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 gzn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!tA(s)||!tA(r)}function ZT(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 vzn(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 bzn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function yzn(e,n){n.pendingHtml!==null&&(e=e.slice(0,kzn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Do(xzn(e,t));const r=wzn(n);if(r)return Do(Nd(e,r));const s=Ezn(n);return s?s.kind==="delim"?Do(d5(e,s.start,s.token.length)?yP(e,s.token):e.slice(0,s.start)):d5(e,s.start,s.token.length)?s.kind==="fence"?Do(e):s.kind==="code"?Do(Nd(e,s.token)):s.token==="$$"?Do(Nd(e,(e.endsWith(` +`){Rzn(n),n.exclusive||(n.commitIndex=t+1);continue}const s=Szn(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(Mzn(n)){JT(n,t,r);continue}const i=zzn(n,e,t);if(i>t){t=i-1;continue}const a=jzn(n,e,t);if(a>t){t=a-1;continue}oo(e,t)||JT(n,t,r)}return n}function Szn(e,n,t){const r=n[t];return r==="`"?Czn(e,n,t):r==="$"?Ezn(e,n,t):r==="~"?Nzn(e,n,t):t}function Czn(e,n,t){const r=$6(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&Yv(n,t)&&!oo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!oo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||oo(n,t)?t+r:r>=3&&Yv(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Ezn(e,n,t){const r=$6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!oo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||oo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function Nzn(e,n,t){const r=$6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Yv(n,t)&&!oo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Yv(n,t)||oo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function zzn(e,n,t){if(n[t]!=="<"||oo(n,t))return t;const r=n[t+1];if(r!==void 0&&!kP(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function jzn(e,n,t){const r=Tzn(n,t);if(!r)return t;if(oo(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):(Azn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Tzn(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 Azn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!nA(s)||!nA(r)}function JT(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 Rzn(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 Mzn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function Ozn(e,n){n.pendingHtml!==null&&(e=e.slice(0,Izn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Do(Dzn(e,t));const r=Lzn(n);if(r)return Do(jd(e,r));const s=Pzn(n);return s?s.kind==="delim"?Do(d5(e,s.start,s.token.length)?xP(e,s.token):e.slice(0,s.start)):d5(e,s.start,s.token.length)?s.kind==="fence"?Do(e):s.kind==="code"?Do(jd(e,s.token)):s.token==="$$"?Do(jd(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?Do(e):Do(Nd(e,"$")):Do(s.kind==="fence"?e:e.slice(0,s.start)):Do(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function xzn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return d5(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 wzn(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(!lzn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function kzn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!Szn(e,s,r))break;t=s,r=s}return t}function Szn(e,n,t){if(e[t-1]!==">"||oo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!wP(r))return!1;for(let s=n+1;s"||i===` +`)+"$$")):/\s/.test(e[e.length-1]??"")?Do(e):Do(jd(e,"$")):Do(s.kind==="fence"?e:e.slice(0,s.start)):Do(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function Dzn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return d5(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 Lzn(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(!kzn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function Izn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!$zn(e,s,r))break;t=s,r=s}return t}function $zn(e,n,t){if(e[t-1]!==">"||oo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!kP(r))return!1;for(let s=n+1;s"||i===` `)return!1}return!0}function Do(e){var v;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=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(JT(a)<2&&!Nzn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:yP(a," |"),u=JT(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const _=i===-1?"":s.slice(i+1),p=eA(o,Array.from({length:h},()=>"-"));if(_.length===0)return r+c+` +`),a=i===-1?s:s.slice(0,i),o=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(eA(a)<2&&!Fzn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:xP(a," |"),u=eA(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const _=i===-1?"":s.slice(i+1),p=tA(o,Array.from({length:h},()=>"-"));if(_.length===0)return r+c+` `+p;const m=_.indexOf(` -`),x=m===-1?_:_.slice(0,m),k=m===-1?"":_.slice(m);if(zzn(x,o,h))return e;if(x.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(x.slice(o.length))){const b=xP(x,o).map(w=>{const y=w.trim();if(y.length===0)return"-";let C=0;for(let N=0;N1&&y.endsWith(":")?":":"")});for(;b.length{const y=w.trim();if(y.length===0)return"-";let C=0;for(let N=0;N1&&y.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function Ezn(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 JT(e){let n=0;for(let t=0;t0}function eA(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function xP(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function zzn(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=xP(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function $6(e,n){let t=n+1;for(;tn+t}function Yv(e,n){return n===0||e[n-1]===` -`}function oo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function tA(e){return!!e&&/[A-Za-z0-9]/.test(e)}function wP(e){return!!e&&/[A-Za-z]/.test(e)}const kP=_y().use(dy);var fm,sh,ih,L_,ah,dm,hm,pm,I_,mm,$_;class jzn{constructor(){lt(this,fm,kP);lt(this,sh,null);lt(this,ih,{});lt(this,L_,null);lt(this,ah,"");lt(this,dm,[]);lt(this,hm,[]);lt(this,pm,[]);lt(this,I_,0);lt(this,mm,[]);lt(this,$_,[])}reconfigure(n,t,r){ue(this,sh)!==null&&ue(this,fm)===n&&SP(ue(this,ih),r)&&!!ue(this,L_)===t||(Ge(this,fm,n),n.attachers.some(s=>s[0]===Xv)||(n=n(),n.use(Xv),n.freeze()),Ge(this,sh,n),Ge(this,ih,r),Ge(this,ah,""),Ge(this,dm,[]),Ge(this,hm,[]),Ge(this,pm,[]),Ge(this,I_,0),Ge(this,mm,[]),Ge(this,L_,t?new czn:null))}update(n){ue(this,L_)&&(n=ue(this,L_).update(n));let t=ue(this,ah);if(n===t)return ue(this,$_);const r=ue(this,dm),s=Tzn(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=f_(ue(this,sh)),c=ue(this,hm),u=c.slice(i).some(z=>z.some(h5));let h=o.parse(n.slice(a)),_=h.children.map(z=>f_(f_(z.position).start.offset)+a);Ge(this,ah,n),yw(r.length===c.length),r.splice(i,r.length-i,..._);{const z=Rw(h,_,a);yw(z.length===_.length),c.splice(i,c.length-i,...z)}if(u||h5(h)){i=0,a=0,h=o.parse(n),_=h.children.map(T=>f_(f_(T.position).start.offset)+a),r.splice(0,r.length,..._);const z=Rw(h,_,a);yw(z.length===_.length),c.splice(0,c.length,...z)}const p=Rw(o.runSync(h),_,a),m=ue(this,pm),x=ue(this,mm),k=ue(this,$_),v=x.length;let b=null,w=0;for(;wv&&(m.length=x.length=r.length);for(let z=r.length=C?M=v-(r.length-T):T=v){m[T]=String(ue(this,I_)),Ge(this,I_,ue(this,I_)+1),x[T]=null,b&&(b[T]=void 0);continue}m[T]=m[M]??String(Rp(this,I_)._++),x[T]=x[M]??null,b&&(b[T]=k[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||Izn.test(e.slice(0,n))?e:""}const Ow={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function qzn(e,n){return EP(e,{})||{type:"root",children:[]}}function EP(e,n){const t=Uzn(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function Uzn(e,n){switch(e.nodeType){case 1:return Wzn(e,n);case 3:return Vzn(e);case 8:return Kzn(e);case 9:return iA(e,n);case 10:return Gzn();case 11:return iA(e,n);default:return}}function iA(e,n){return{type:"root",children:NP(e,n)}}function Gzn(){return{type:"doctype"}}function Vzn(e){return{type:"text",value:e.nodeValue||""}}function Kzn(e){return{type:"comment",value:e.nodeValue||""}}function Wzn(e,n){const t=e.namespaceURI,r=t===Ow.svg?vkn:z$,s=t===Ow.html?e.tagName.toLowerCase():e.tagName,i=t===Ow.html&&s==="template"?e.content:e,a=e.getAttributeNames(),o={};let c=-1;for(;++cu&&(u=h):h&&(u!==void 0&&u>-1&&c.push(` -`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function jP(e,n,t){return e.type==="element"?sjn(e,n,t):e.type==="text"?t.whitespace==="normal"?TP(e,t):ijn(e):[]}function sjn(e,n,t){const r=AP(e,t),s=e.children||[];let i=-1,a=[];if(njn(e))return a;let o,c;for(p5(e)||uA(e)&&aA(n,e,uA)?c=` -`:tjn(e)?(o=2,c=2):zP(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(ujn,"-$1").toLowerCase(),fjn={"&":"&",">":">","<":"<",'"':""","'":"'"},djn=/[&><"']/g,Ks=e=>String(e).replace(djn,n=>fjn[n]),rv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?rv(e.body[0]):e:e.type==="font"?rv(e.body):e,hjn=new Set(["mathord","textord","atom"]),hl=e=>hjn.has(rv(e).type),pjn=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"},m5={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 mjn(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 gjn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return mjn(n)}function vjn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:gjn(r)}class P6{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(m5)){var r=m5[t];r&&vjn(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 Ze("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=pjn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Yl{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 qo[bjn[this.id]]}sub(){return qo[yjn[this.id]]}fracNum(){return qo[xjn[this.id]]}fracDen(){return qo[wjn[this.id]]}cramp(){return qo[kjn[this.id]]}text(){return qo[Sjn[this.id]]}isTight(){return this.size>=2}}var F6=0,Zv=1,Id=2,ol=3,H0=4,Oa=5,xh=6,ui=7,qo=[new Yl(F6,0,!1),new Yl(Zv,0,!0),new Yl(Id,1,!1),new Yl(ol,1,!0),new Yl(H0,2,!1),new Yl(Oa,2,!0),new Yl(xh,3,!1),new Yl(ui,3,!0)],bjn=[H0,Oa,H0,Oa,xh,ui,xh,ui],yjn=[Oa,Oa,Oa,Oa,ui,ui,ui,ui],xjn=[Id,ol,H0,Oa,xh,ui,xh,ui],wjn=[ol,ol,Oa,Oa,ui,ui,ui,ui],kjn=[Zv,Zv,ol,ol,Oa,Oa,ui,ui],Sjn=[F6,Zv,Id,ol,Id,ol,Id,ol],Qt={DISPLAY:qo[F6],TEXT:qo[Id],SCRIPT:qo[H0],SCRIPTSCRIPT:qo[xh]},g5=[{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 Cjn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var sv=[];g5.forEach(e=>e.blocks.forEach(n=>sv.push(...n)));function RP(e){for(var n=0;n=sv[n]&&e<=sv[n+1])return!0;return!1}var _s=e=>e+" "+e,dd=80,Ejn=function(n,t){return"M95,"+(622+n+t)+` +`+_}function jd(e,n){return e+n.slice(Bzn(e,n))}function xP(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 Bzn(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 Pzn(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 eA(e){let n=0;for(let t=0;t0}function tA(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function wP(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function Hzn(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=wP(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function $6(e,n){let t=n+1;for(;tn+t}function Yv(e,n){return n===0||e[n-1]===` +`}function oo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function nA(e){return!!e&&/[A-Za-z0-9]/.test(e)}function kP(e){return!!e&&/[A-Za-z]/.test(e)}const SP=_y().use(dy);var fm,ah,oh,L_,ch,dm,hm,pm,I_,mm,$_;class qzn{constructor(){lt(this,fm,SP);lt(this,ah,null);lt(this,oh,{});lt(this,L_,null);lt(this,ch,"");lt(this,dm,[]);lt(this,hm,[]);lt(this,pm,[]);lt(this,I_,0);lt(this,mm,[]);lt(this,$_,[])}reconfigure(n,t,r){ue(this,ah)!==null&&ue(this,fm)===n&&CP(ue(this,oh),r)&&!!ue(this,L_)===t||(Ue(this,fm,n),n.attachers.some(s=>s[0]===Xv)||(n=n(),n.use(Xv),n.freeze()),Ue(this,ah,n),Ue(this,oh,r),Ue(this,ch,""),Ue(this,dm,[]),Ue(this,hm,[]),Ue(this,pm,[]),Ue(this,I_,0),Ue(this,mm,[]),Ue(this,L_,t?new wzn:null))}update(n){ue(this,L_)&&(n=ue(this,L_).update(n));let t=ue(this,ch);if(n===t)return ue(this,$_);const r=ue(this,dm),s=Uzn(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=f_(ue(this,ah)),c=ue(this,hm),u=c.slice(i).some(z=>z.some(h5));let h=o.parse(n.slice(a)),_=h.children.map(z=>f_(f_(z.position).start.offset)+a);Ue(this,ch,n),yw(r.length===c.length),r.splice(i,r.length-i,..._);{const z=Rw(h,_,a);yw(z.length===_.length),c.splice(i,c.length-i,...z)}if(u||h5(h)){i=0,a=0,h=o.parse(n),_=h.children.map(T=>f_(f_(T.position).start.offset)+a),r.splice(0,r.length,..._);const z=Rw(h,_,a);yw(z.length===_.length),c.splice(0,c.length,...z)}const p=Rw(o.runSync(h),_,a),m=ue(this,pm),x=ue(this,mm),k=ue(this,$_),v=x.length;let b=null,w=0;for(;wv&&(m.length=x.length=r.length);for(let z=r.length=C?M=v-(r.length-T):T=v){m[T]=String(ue(this,I_)),Ue(this,I_,ue(this,I_)+1),x[T]=null,b&&(b[T]=void 0);continue}m[T]=m[M]??String(Mp(this,I_)._++),x[T]=x[M]??null,b&&(b[T]=k[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||Yzn.test(e.slice(0,n))?e:""}const Ow={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function rjn(e,n){return NP(e,{})||{type:"root",children:[]}}function NP(e,n){const t=sjn(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function sjn(e,n){switch(e.nodeType){case 1:return cjn(e,n);case 3:return ajn(e);case 8:return ojn(e);case 9:return aA(e,n);case 10:return ijn();case 11:return aA(e,n);default:return}}function aA(e,n){return{type:"root",children:zP(e,n)}}function ijn(){return{type:"doctype"}}function ajn(e){return{type:"text",value:e.nodeValue||""}}function ojn(e){return{type:"comment",value:e.nodeValue||""}}function cjn(e,n){const t=e.namespaceURI,r=t===Ow.svg?Rkn:j$,s=t===Ow.html?e.tagName.toLowerCase():e.tagName,i=t===Ow.html&&s==="template"?e.content:e,a=e.getAttributeNames(),o={};let c=-1;for(;++cu&&(u=h):h&&(u!==void 0&&u>-1&&c.push(` +`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function TP(e,n,t){return e.type==="element"?vjn(e,n,t):e.type==="text"?t.whitespace==="normal"?AP(e,t):bjn(e):[]}function vjn(e,n,t){const r=RP(e,t),s=e.children||[];let i=-1,a=[];if(mjn(e))return a;let o,c;for(p5(e)||_A(e)&&oA(n,e,_A)?c=` +`:pjn(e)?(o=2,c=2):jP(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(Sjn,"-$1").toLowerCase(),Ejn={"&":"&",">":">","<":"<",'"':""","'":"'"},Njn=/[&><"']/g,Qs=e=>String(e).replace(Njn,n=>Ejn[n]),rv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?rv(e.body[0]):e:e.type==="font"?rv(e.body):e,zjn=new Set(["mathord","textord","atom"]),hl=e=>zjn.has(rv(e).type),jjn=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"},m5={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 Tjn(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 Ajn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Tjn(n)}function Rjn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Ajn(r)}class P6{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(m5)){var r=m5[t];r&&Rjn(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 Ze("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=jjn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Yl{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 qo[Mjn[this.id]]}sub(){return qo[Ojn[this.id]]}fracNum(){return qo[Djn[this.id]]}fracDen(){return qo[Ljn[this.id]]}cramp(){return qo[Ijn[this.id]]}text(){return qo[$jn[this.id]]}isTight(){return this.size>=2}}var F6=0,Zv=1,Bd=2,ol=3,H0=4,Oa=5,kh=6,_i=7,qo=[new Yl(F6,0,!1),new Yl(Zv,0,!0),new Yl(Bd,1,!1),new Yl(ol,1,!0),new Yl(H0,2,!1),new Yl(Oa,2,!0),new Yl(kh,3,!1),new Yl(_i,3,!0)],Mjn=[H0,Oa,H0,Oa,kh,_i,kh,_i],Ojn=[Oa,Oa,Oa,Oa,_i,_i,_i,_i],Djn=[Bd,ol,H0,Oa,kh,_i,kh,_i],Ljn=[ol,ol,Oa,Oa,_i,_i,_i,_i],Ijn=[Zv,Zv,ol,ol,Oa,Oa,_i,_i],$jn=[F6,Zv,Bd,ol,Bd,ol,Bd,ol],Yt={DISPLAY:qo[F6],TEXT:qo[Bd],SCRIPT:qo[H0],SCRIPTSCRIPT:qo[kh]},g5=[{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 Bjn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var sv=[];g5.forEach(e=>e.blocks.forEach(n=>sv.push(...n)));function MP(e){for(var n=0;n=sv[n]&&e<=sv[n+1])return!0;return!1}var ms=e=>e+" "+e,pd=80,Pjn=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 @@ -771,7 +771,7 @@ 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"},Njn=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 +M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Fjn=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+` @@ -781,7 +781,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5, 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"},zjn=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Hjn=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 @@ -790,7 +790,7 @@ 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"},jjn=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},qjn=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 @@ -800,18 +800,18 @@ 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"},Tjn=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},Ujn=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"},Ajn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Rjn=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` +606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},Gjn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Vjn=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"},Mjn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Ejn(t,dd);break;case"sqrtSize1":s=Njn(t,dd);break;case"sqrtSize2":s=zjn(t,dd);break;case"sqrtSize3":s=jjn(t,dd);break;case"sqrtSize4":s=Tjn(t,dd);break;case"sqrtTall":s=Rjn(t,dd,r)}return s},Ojn=function(n,t){switch(n){case"⎜":return _s("M291 0 H417 V"+t+" H291z");case"∣":return _s("M145 0 H188 V"+t+" H145z");case"∥":return _s("M145 0 H188 V"+t+" H145z")+_s("M367 0 H410 V"+t+" H367z");case"⎟":return _s("M457 0 H583 V"+t+" H457z");case"⎢":return _s("M319 0 H403 V"+t+" H319z");case"⎥":return _s("M263 0 H347 V"+t+" H263z");case"⎪":return _s("M384 0 H504 V"+t+" H384z");case"⏐":return _s("M312 0 H355 V"+t+" H312z");case"‖":return _s("M257 0 H300 V"+t+" H257z")+_s("M478 0 H521 V"+t+" H478z");default:return""}},_A={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},Kjn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Pjn(t,pd);break;case"sqrtSize1":s=Fjn(t,pd);break;case"sqrtSize2":s=Hjn(t,pd);break;case"sqrtSize3":s=qjn(t,pd);break;case"sqrtSize4":s=Ujn(t,pd);break;case"sqrtTall":s=Vjn(t,pd,r)}return s},Wjn=function(n,t){switch(n){case"⎜":return ms("M291 0 H417 V"+t+" H291z");case"∣":return ms("M145 0 H188 V"+t+" H145z");case"∥":return ms("M145 0 H188 V"+t+" H145z")+ms("M367 0 H410 V"+t+" H367z");case"⎟":return ms("M457 0 H583 V"+t+" H457z");case"⎢":return ms("M319 0 H403 V"+t+" H319z");case"⎥":return ms("M263 0 H347 V"+t+" H263z");case"⎪":return ms("M384 0 H504 V"+t+" H384z");case"⏐":return ms("M312 0 H355 V"+t+" H312z");case"‖":return ms("M257 0 H300 V"+t+" H257z")+ms("M478 0 H521 V"+t+" H478z");default:return""}},fA={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 @@ -857,10 +857,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 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:_s("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:_s("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:_s("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:_s("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:ms("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:ms("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:ms("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:ms("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:_s("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:ms("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 @@ -909,7 +909,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown 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:_s("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:_s("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:_s("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 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:ms("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:ms("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:ms("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 @@ -982,7 +982,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` 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`},Djn=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Qjn=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 @@ -1010,44 +1010,44 @@ 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 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 Ljn(e){return"toText"in e}class Fh{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(Ljn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var v5={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},Ijn={ex:!0,em:!0,mu:!0},MP=function(n){return typeof n!="string"&&(n=n.unit),n in v5||n in Ijn||n==="ex"},zr=function(n,t){var r;if(n.unit in v5)r=v5[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 Ze("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},rt=function(n){return+n.toFixed(4)+"em"},Eu=function(n){return n.filter(t=>t).join(" ")},H6=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=_jn(r)+":"+s+";")}return t},OP=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)}},DP=function(n){var t=document.createElement(n);t.className=Eu(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]/,LP=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Ks(Eu(this.classes))+'"');var r=H6(this.style);r&&(t+=' style="'+Ks(r)+'"');for(var s of Object.keys(this.attributes)){if($jn.test(s))throw new Ze("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Ks(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class Hh{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,OP.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return DP.call(this,"span")}toMarkup(){return LP.call(this,"span")}}class hy{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,OP.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 DP.call(this,"a")}toMarkup(){return LP.call(this,"a")}}class Bjn{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=''+Ks(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=rt(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Eu(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:"+rt(this.italic)+";"),r+=H6(this.style),r&&(n=!0,t+=' style="'+Ks(r)+'"');var s=Ks(this.text);return n?(t+=">",t+=s,t+="",t):s}}class _l{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 b5{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 qjn=e=>e instanceof Hh||e instanceof hy||e instanceof Fh,Go={"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]}},b1={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]},fA={Å:"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 Ujn(e,n){Go[e]=n}function q6(e,n,t){if(!Go[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Go[n][r];if(!s&&e[0]in fA&&(r=fA[e[0]].charCodeAt(0),s=Go[n][r]),!s&&t==="text"&&RP(r)&&(s=Go[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Dw={};function Gjn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!Dw[n]){var t=Dw[n]={cssEmPerMu:b1.quad[n]/18};for(var r in b1)b1.hasOwnProperty(r)&&(t[r]=b1[r][n])}return Dw[n]}var xr={math:{},text:{}};function P(e,n,t,r,s,i){xr[e][s]={font:n,group:t,replace:r},i&&r&&(xr[e][r]=xr[e][s])}var W="math",Ve="text",ee="main",de="ams",kr="accent-token",pt="bin",di="close",qh="inner",Pt="mathord",ss="op-token",ca="open",Lm="punct",he="rel",pl="spacing",ye="textord";P(W,ee,he,"≡","\\equiv",!0);P(W,ee,he,"≺","\\prec",!0);P(W,ee,he,"≻","\\succ",!0);P(W,ee,he,"∼","\\sim",!0);P(W,ee,he,"⊥","\\perp");P(W,ee,he,"⪯","\\preceq",!0);P(W,ee,he,"⪰","\\succeq",!0);P(W,ee,he,"≃","\\simeq",!0);P(W,ee,he,"∣","\\mid",!0);P(W,ee,he,"≪","\\ll",!0);P(W,ee,he,"≫","\\gg",!0);P(W,ee,he,"≍","\\asymp",!0);P(W,ee,he,"∥","\\parallel");P(W,ee,he,"⋈","\\bowtie",!0);P(W,ee,he,"⌣","\\smile",!0);P(W,ee,he,"⊑","\\sqsubseteq",!0);P(W,ee,he,"⊒","\\sqsupseteq",!0);P(W,ee,he,"≐","\\doteq",!0);P(W,ee,he,"⌢","\\frown",!0);P(W,ee,he,"∋","\\ni",!0);P(W,ee,he,"∝","\\propto",!0);P(W,ee,he,"⊢","\\vdash",!0);P(W,ee,he,"⊣","\\dashv",!0);P(W,ee,he,"∋","\\owns");P(W,ee,Lm,".","\\ldotp");P(W,ee,Lm,"⋅","\\cdotp");P(W,ee,Lm,"⋅","·");P(Ve,ee,ye,"⋅","·");P(W,ee,ye,"#","\\#");P(Ve,ee,ye,"#","\\#");P(W,ee,ye,"&","\\&");P(Ve,ee,ye,"&","\\&");P(W,ee,ye,"ℵ","\\aleph",!0);P(W,ee,ye,"∀","\\forall",!0);P(W,ee,ye,"ℏ","\\hbar",!0);P(W,ee,ye,"∃","\\exists",!0);P(W,ee,ye,"∇","\\nabla",!0);P(W,ee,ye,"♭","\\flat",!0);P(W,ee,ye,"ℓ","\\ell",!0);P(W,ee,ye,"♮","\\natural",!0);P(W,ee,ye,"♣","\\clubsuit",!0);P(W,ee,ye,"℘","\\wp",!0);P(W,ee,ye,"♯","\\sharp",!0);P(W,ee,ye,"♢","\\diamondsuit",!0);P(W,ee,ye,"ℜ","\\Re",!0);P(W,ee,ye,"♡","\\heartsuit",!0);P(W,ee,ye,"ℑ","\\Im",!0);P(W,ee,ye,"♠","\\spadesuit",!0);P(W,ee,ye,"§","\\S",!0);P(Ve,ee,ye,"§","\\S");P(W,ee,ye,"¶","\\P",!0);P(Ve,ee,ye,"¶","\\P");P(W,ee,ye,"†","\\dag");P(Ve,ee,ye,"†","\\dag");P(Ve,ee,ye,"†","\\textdagger");P(W,ee,ye,"‡","\\ddag");P(Ve,ee,ye,"‡","\\ddag");P(Ve,ee,ye,"‡","\\textdaggerdbl");P(W,ee,di,"⎱","\\rmoustache",!0);P(W,ee,ca,"⎰","\\lmoustache",!0);P(W,ee,di,"⟯","\\rgroup",!0);P(W,ee,ca,"⟮","\\lgroup",!0);P(W,ee,pt,"∓","\\mp",!0);P(W,ee,pt,"⊖","\\ominus",!0);P(W,ee,pt,"⊎","\\uplus",!0);P(W,ee,pt,"⊓","\\sqcap",!0);P(W,ee,pt,"∗","\\ast");P(W,ee,pt,"⊔","\\sqcup",!0);P(W,ee,pt,"◯","\\bigcirc",!0);P(W,ee,pt,"∙","\\bullet",!0);P(W,ee,pt,"‡","\\ddagger");P(W,ee,pt,"≀","\\wr",!0);P(W,ee,pt,"⨿","\\amalg");P(W,ee,pt,"&","\\And");P(W,ee,he,"⟵","\\longleftarrow",!0);P(W,ee,he,"⇐","\\Leftarrow",!0);P(W,ee,he,"⟸","\\Longleftarrow",!0);P(W,ee,he,"⟶","\\longrightarrow",!0);P(W,ee,he,"⇒","\\Rightarrow",!0);P(W,ee,he,"⟹","\\Longrightarrow",!0);P(W,ee,he,"↔","\\leftrightarrow",!0);P(W,ee,he,"⟷","\\longleftrightarrow",!0);P(W,ee,he,"⇔","\\Leftrightarrow",!0);P(W,ee,he,"⟺","\\Longleftrightarrow",!0);P(W,ee,he,"↦","\\mapsto",!0);P(W,ee,he,"⟼","\\longmapsto",!0);P(W,ee,he,"↗","\\nearrow",!0);P(W,ee,he,"↩","\\hookleftarrow",!0);P(W,ee,he,"↪","\\hookrightarrow",!0);P(W,ee,he,"↘","\\searrow",!0);P(W,ee,he,"↼","\\leftharpoonup",!0);P(W,ee,he,"⇀","\\rightharpoonup",!0);P(W,ee,he,"↙","\\swarrow",!0);P(W,ee,he,"↽","\\leftharpoondown",!0);P(W,ee,he,"⇁","\\rightharpoondown",!0);P(W,ee,he,"↖","\\nwarrow",!0);P(W,ee,he,"⇌","\\rightleftharpoons",!0);P(W,de,he,"≮","\\nless",!0);P(W,de,he,"","\\@nleqslant");P(W,de,he,"","\\@nleqq");P(W,de,he,"⪇","\\lneq",!0);P(W,de,he,"≨","\\lneqq",!0);P(W,de,he,"","\\@lvertneqq");P(W,de,he,"⋦","\\lnsim",!0);P(W,de,he,"⪉","\\lnapprox",!0);P(W,de,he,"⊀","\\nprec",!0);P(W,de,he,"⋠","\\npreceq",!0);P(W,de,he,"⋨","\\precnsim",!0);P(W,de,he,"⪹","\\precnapprox",!0);P(W,de,he,"≁","\\nsim",!0);P(W,de,he,"","\\@nshortmid");P(W,de,he,"∤","\\nmid",!0);P(W,de,he,"⊬","\\nvdash",!0);P(W,de,he,"⊭","\\nvDash",!0);P(W,de,he,"⋪","\\ntriangleleft");P(W,de,he,"⋬","\\ntrianglelefteq",!0);P(W,de,he,"⊊","\\subsetneq",!0);P(W,de,he,"","\\@varsubsetneq");P(W,de,he,"⫋","\\subsetneqq",!0);P(W,de,he,"","\\@varsubsetneqq");P(W,de,he,"≯","\\ngtr",!0);P(W,de,he,"","\\@ngeqslant");P(W,de,he,"","\\@ngeqq");P(W,de,he,"⪈","\\gneq",!0);P(W,de,he,"≩","\\gneqq",!0);P(W,de,he,"","\\@gvertneqq");P(W,de,he,"⋧","\\gnsim",!0);P(W,de,he,"⪊","\\gnapprox",!0);P(W,de,he,"⊁","\\nsucc",!0);P(W,de,he,"⋡","\\nsucceq",!0);P(W,de,he,"⋩","\\succnsim",!0);P(W,de,he,"⪺","\\succnapprox",!0);P(W,de,he,"≆","\\ncong",!0);P(W,de,he,"","\\@nshortparallel");P(W,de,he,"∦","\\nparallel",!0);P(W,de,he,"⊯","\\nVDash",!0);P(W,de,he,"⋫","\\ntriangleright");P(W,de,he,"⋭","\\ntrianglerighteq",!0);P(W,de,he,"","\\@nsupseteqq");P(W,de,he,"⊋","\\supsetneq",!0);P(W,de,he,"","\\@varsupsetneq");P(W,de,he,"⫌","\\supsetneqq",!0);P(W,de,he,"","\\@varsupsetneqq");P(W,de,he,"⊮","\\nVdash",!0);P(W,de,he,"⪵","\\precneqq",!0);P(W,de,he,"⪶","\\succneqq",!0);P(W,de,he,"","\\@nsubseteqq");P(W,de,pt,"⊴","\\unlhd");P(W,de,pt,"⊵","\\unrhd");P(W,de,he,"↚","\\nleftarrow",!0);P(W,de,he,"↛","\\nrightarrow",!0);P(W,de,he,"⇍","\\nLeftarrow",!0);P(W,de,he,"⇏","\\nRightarrow",!0);P(W,de,he,"↮","\\nleftrightarrow",!0);P(W,de,he,"⇎","\\nLeftrightarrow",!0);P(W,de,he,"△","\\vartriangle");P(W,de,ye,"ℏ","\\hslash");P(W,de,ye,"▽","\\triangledown");P(W,de,ye,"◊","\\lozenge");P(W,de,ye,"Ⓢ","\\circledS");P(W,de,ye,"®","\\circledR");P(Ve,de,ye,"®","\\circledR");P(W,de,ye,"∡","\\measuredangle",!0);P(W,de,ye,"∄","\\nexists");P(W,de,ye,"℧","\\mho");P(W,de,ye,"Ⅎ","\\Finv",!0);P(W,de,ye,"⅁","\\Game",!0);P(W,de,ye,"‵","\\backprime");P(W,de,ye,"▲","\\blacktriangle");P(W,de,ye,"▼","\\blacktriangledown");P(W,de,ye,"■","\\blacksquare");P(W,de,ye,"⧫","\\blacklozenge");P(W,de,ye,"★","\\bigstar");P(W,de,ye,"∢","\\sphericalangle",!0);P(W,de,ye,"∁","\\complement",!0);P(W,de,ye,"ð","\\eth",!0);P(Ve,ee,ye,"ð","ð");P(W,de,ye,"╱","\\diagup");P(W,de,ye,"╲","\\diagdown");P(W,de,ye,"□","\\square");P(W,de,ye,"□","\\Box");P(W,de,ye,"◊","\\Diamond");P(W,de,ye,"¥","\\yen",!0);P(Ve,de,ye,"¥","\\yen",!0);P(W,de,ye,"✓","\\checkmark",!0);P(Ve,de,ye,"✓","\\checkmark");P(W,de,ye,"ℶ","\\beth",!0);P(W,de,ye,"ℸ","\\daleth",!0);P(W,de,ye,"ℷ","\\gimel",!0);P(W,de,ye,"ϝ","\\digamma",!0);P(W,de,ye,"ϰ","\\varkappa");P(W,de,ca,"┌","\\@ulcorner",!0);P(W,de,di,"┐","\\@urcorner",!0);P(W,de,ca,"└","\\@llcorner",!0);P(W,de,di,"┘","\\@lrcorner",!0);P(W,de,he,"≦","\\leqq",!0);P(W,de,he,"⩽","\\leqslant",!0);P(W,de,he,"⪕","\\eqslantless",!0);P(W,de,he,"≲","\\lesssim",!0);P(W,de,he,"⪅","\\lessapprox",!0);P(W,de,he,"≊","\\approxeq",!0);P(W,de,pt,"⋖","\\lessdot");P(W,de,he,"⋘","\\lll",!0);P(W,de,he,"≶","\\lessgtr",!0);P(W,de,he,"⋚","\\lesseqgtr",!0);P(W,de,he,"⪋","\\lesseqqgtr",!0);P(W,de,he,"≑","\\doteqdot");P(W,de,he,"≓","\\risingdotseq",!0);P(W,de,he,"≒","\\fallingdotseq",!0);P(W,de,he,"∽","\\backsim",!0);P(W,de,he,"⋍","\\backsimeq",!0);P(W,de,he,"⫅","\\subseteqq",!0);P(W,de,he,"⋐","\\Subset",!0);P(W,de,he,"⊏","\\sqsubset",!0);P(W,de,he,"≼","\\preccurlyeq",!0);P(W,de,he,"⋞","\\curlyeqprec",!0);P(W,de,he,"≾","\\precsim",!0);P(W,de,he,"⪷","\\precapprox",!0);P(W,de,he,"⊲","\\vartriangleleft");P(W,de,he,"⊴","\\trianglelefteq");P(W,de,he,"⊨","\\vDash",!0);P(W,de,he,"⊪","\\Vvdash",!0);P(W,de,he,"⌣","\\smallsmile");P(W,de,he,"⌢","\\smallfrown");P(W,de,he,"≏","\\bumpeq",!0);P(W,de,he,"≎","\\Bumpeq",!0);P(W,de,he,"≧","\\geqq",!0);P(W,de,he,"⩾","\\geqslant",!0);P(W,de,he,"⪖","\\eqslantgtr",!0);P(W,de,he,"≳","\\gtrsim",!0);P(W,de,he,"⪆","\\gtrapprox",!0);P(W,de,pt,"⋗","\\gtrdot");P(W,de,he,"⋙","\\ggg",!0);P(W,de,he,"≷","\\gtrless",!0);P(W,de,he,"⋛","\\gtreqless",!0);P(W,de,he,"⪌","\\gtreqqless",!0);P(W,de,he,"≖","\\eqcirc",!0);P(W,de,he,"≗","\\circeq",!0);P(W,de,he,"≜","\\triangleq",!0);P(W,de,he,"∼","\\thicksim");P(W,de,he,"≈","\\thickapprox");P(W,de,he,"⫆","\\supseteqq",!0);P(W,de,he,"⋑","\\Supset",!0);P(W,de,he,"⊐","\\sqsupset",!0);P(W,de,he,"≽","\\succcurlyeq",!0);P(W,de,he,"⋟","\\curlyeqsucc",!0);P(W,de,he,"≿","\\succsim",!0);P(W,de,he,"⪸","\\succapprox",!0);P(W,de,he,"⊳","\\vartriangleright");P(W,de,he,"⊵","\\trianglerighteq");P(W,de,he,"⊩","\\Vdash",!0);P(W,de,he,"∣","\\shortmid");P(W,de,he,"∥","\\shortparallel");P(W,de,he,"≬","\\between",!0);P(W,de,he,"⋔","\\pitchfork",!0);P(W,de,he,"∝","\\varpropto");P(W,de,he,"◀","\\blacktriangleleft");P(W,de,he,"∴","\\therefore",!0);P(W,de,he,"∍","\\backepsilon");P(W,de,he,"▶","\\blacktriangleright");P(W,de,he,"∵","\\because",!0);P(W,de,he,"⋘","\\llless");P(W,de,he,"⋙","\\gggtr");P(W,de,pt,"⊲","\\lhd");P(W,de,pt,"⊳","\\rhd");P(W,de,he,"≂","\\eqsim",!0);P(W,ee,he,"⋈","\\Join");P(W,de,he,"≑","\\Doteq",!0);P(W,de,pt,"∔","\\dotplus",!0);P(W,de,pt,"∖","\\smallsetminus");P(W,de,pt,"⋒","\\Cap",!0);P(W,de,pt,"⋓","\\Cup",!0);P(W,de,pt,"⩞","\\doublebarwedge",!0);P(W,de,pt,"⊟","\\boxminus",!0);P(W,de,pt,"⊞","\\boxplus",!0);P(W,de,pt,"⋇","\\divideontimes",!0);P(W,de,pt,"⋉","\\ltimes",!0);P(W,de,pt,"⋊","\\rtimes",!0);P(W,de,pt,"⋋","\\leftthreetimes",!0);P(W,de,pt,"⋌","\\rightthreetimes",!0);P(W,de,pt,"⋏","\\curlywedge",!0);P(W,de,pt,"⋎","\\curlyvee",!0);P(W,de,pt,"⊝","\\circleddash",!0);P(W,de,pt,"⊛","\\circledast",!0);P(W,de,pt,"⋅","\\centerdot");P(W,de,pt,"⊺","\\intercal",!0);P(W,de,pt,"⋒","\\doublecap");P(W,de,pt,"⋓","\\doublecup");P(W,de,pt,"⊠","\\boxtimes",!0);P(W,de,he,"⇢","\\dashrightarrow",!0);P(W,de,he,"⇠","\\dashleftarrow",!0);P(W,de,he,"⇇","\\leftleftarrows",!0);P(W,de,he,"⇆","\\leftrightarrows",!0);P(W,de,he,"⇚","\\Lleftarrow",!0);P(W,de,he,"↞","\\twoheadleftarrow",!0);P(W,de,he,"↢","\\leftarrowtail",!0);P(W,de,he,"↫","\\looparrowleft",!0);P(W,de,he,"⇋","\\leftrightharpoons",!0);P(W,de,he,"↶","\\curvearrowleft",!0);P(W,de,he,"↺","\\circlearrowleft",!0);P(W,de,he,"↰","\\Lsh",!0);P(W,de,he,"⇈","\\upuparrows",!0);P(W,de,he,"↿","\\upharpoonleft",!0);P(W,de,he,"⇃","\\downharpoonleft",!0);P(W,ee,he,"⊶","\\origof",!0);P(W,ee,he,"⊷","\\imageof",!0);P(W,de,he,"⊸","\\multimap",!0);P(W,de,he,"↭","\\leftrightsquigarrow",!0);P(W,de,he,"⇉","\\rightrightarrows",!0);P(W,de,he,"⇄","\\rightleftarrows",!0);P(W,de,he,"↠","\\twoheadrightarrow",!0);P(W,de,he,"↣","\\rightarrowtail",!0);P(W,de,he,"↬","\\looparrowright",!0);P(W,de,he,"↷","\\curvearrowright",!0);P(W,de,he,"↻","\\circlearrowright",!0);P(W,de,he,"↱","\\Rsh",!0);P(W,de,he,"⇊","\\downdownarrows",!0);P(W,de,he,"↾","\\upharpoonright",!0);P(W,de,he,"⇂","\\downharpoonright",!0);P(W,de,he,"⇝","\\rightsquigarrow",!0);P(W,de,he,"⇝","\\leadsto");P(W,de,he,"⇛","\\Rrightarrow",!0);P(W,de,he,"↾","\\restriction");P(W,ee,ye,"‘","`");P(W,ee,ye,"$","\\$");P(Ve,ee,ye,"$","\\$");P(Ve,ee,ye,"$","\\textdollar");P(W,ee,ye,"%","\\%");P(Ve,ee,ye,"%","\\%");P(W,ee,ye,"_","\\_");P(Ve,ee,ye,"_","\\_");P(Ve,ee,ye,"_","\\textunderscore");P(W,ee,ye,"∠","\\angle",!0);P(W,ee,ye,"∞","\\infty",!0);P(W,ee,ye,"′","\\prime");P(W,ee,ye,"△","\\triangle");P(W,ee,ye,"Γ","\\Gamma",!0);P(W,ee,ye,"Δ","\\Delta",!0);P(W,ee,ye,"Θ","\\Theta",!0);P(W,ee,ye,"Λ","\\Lambda",!0);P(W,ee,ye,"Ξ","\\Xi",!0);P(W,ee,ye,"Π","\\Pi",!0);P(W,ee,ye,"Σ","\\Sigma",!0);P(W,ee,ye,"Υ","\\Upsilon",!0);P(W,ee,ye,"Φ","\\Phi",!0);P(W,ee,ye,"Ψ","\\Psi",!0);P(W,ee,ye,"Ω","\\Omega",!0);P(W,ee,ye,"A","Α");P(W,ee,ye,"B","Β");P(W,ee,ye,"E","Ε");P(W,ee,ye,"Z","Ζ");P(W,ee,ye,"H","Η");P(W,ee,ye,"I","Ι");P(W,ee,ye,"K","Κ");P(W,ee,ye,"M","Μ");P(W,ee,ye,"N","Ν");P(W,ee,ye,"O","Ο");P(W,ee,ye,"P","Ρ");P(W,ee,ye,"T","Τ");P(W,ee,ye,"X","Χ");P(W,ee,ye,"¬","\\neg",!0);P(W,ee,ye,"¬","\\lnot");P(W,ee,ye,"⊤","\\top");P(W,ee,ye,"⊥","\\bot");P(W,ee,ye,"∅","\\emptyset");P(W,de,ye,"∅","\\varnothing");P(W,ee,Pt,"α","\\alpha",!0);P(W,ee,Pt,"β","\\beta",!0);P(W,ee,Pt,"γ","\\gamma",!0);P(W,ee,Pt,"δ","\\delta",!0);P(W,ee,Pt,"ϵ","\\epsilon",!0);P(W,ee,Pt,"ζ","\\zeta",!0);P(W,ee,Pt,"η","\\eta",!0);P(W,ee,Pt,"θ","\\theta",!0);P(W,ee,Pt,"ι","\\iota",!0);P(W,ee,Pt,"κ","\\kappa",!0);P(W,ee,Pt,"λ","\\lambda",!0);P(W,ee,Pt,"μ","\\mu",!0);P(W,ee,Pt,"ν","\\nu",!0);P(W,ee,Pt,"ξ","\\xi",!0);P(W,ee,Pt,"ο","\\omicron",!0);P(W,ee,Pt,"π","\\pi",!0);P(W,ee,Pt,"ρ","\\rho",!0);P(W,ee,Pt,"σ","\\sigma",!0);P(W,ee,Pt,"τ","\\tau",!0);P(W,ee,Pt,"υ","\\upsilon",!0);P(W,ee,Pt,"ϕ","\\phi",!0);P(W,ee,Pt,"χ","\\chi",!0);P(W,ee,Pt,"ψ","\\psi",!0);P(W,ee,Pt,"ω","\\omega",!0);P(W,ee,Pt,"ε","\\varepsilon",!0);P(W,ee,Pt,"ϑ","\\vartheta",!0);P(W,ee,Pt,"ϖ","\\varpi",!0);P(W,ee,Pt,"ϱ","\\varrho",!0);P(W,ee,Pt,"ς","\\varsigma",!0);P(W,ee,Pt,"φ","\\varphi",!0);P(W,ee,pt,"∗","*",!0);P(W,ee,pt,"+","+");P(W,ee,pt,"−","-",!0);P(W,ee,pt,"⋅","\\cdot",!0);P(W,ee,pt,"∘","\\circ",!0);P(W,ee,pt,"÷","\\div",!0);P(W,ee,pt,"±","\\pm",!0);P(W,ee,pt,"×","\\times",!0);P(W,ee,pt,"∩","\\cap",!0);P(W,ee,pt,"∪","\\cup",!0);P(W,ee,pt,"∖","\\setminus",!0);P(W,ee,pt,"∧","\\land");P(W,ee,pt,"∨","\\lor");P(W,ee,pt,"∧","\\wedge",!0);P(W,ee,pt,"∨","\\vee",!0);P(W,ee,ye,"√","\\surd");P(W,ee,ca,"⟨","\\langle",!0);P(W,ee,ca,"∣","\\lvert");P(W,ee,ca,"∥","\\lVert");P(W,ee,di,"?","?");P(W,ee,di,"!","!");P(W,ee,di,"⟩","\\rangle",!0);P(W,ee,di,"∣","\\rvert");P(W,ee,di,"∥","\\rVert");P(W,ee,he,"=","=");P(W,ee,he,":",":");P(W,ee,he,"≈","\\approx",!0);P(W,ee,he,"≅","\\cong",!0);P(W,ee,he,"≥","\\ge");P(W,ee,he,"≥","\\geq",!0);P(W,ee,he,"←","\\gets");P(W,ee,he,">","\\gt",!0);P(W,ee,he,"∈","\\in",!0);P(W,ee,he,"","\\@not");P(W,ee,he,"⊂","\\subset",!0);P(W,ee,he,"⊃","\\supset",!0);P(W,ee,he,"⊆","\\subseteq",!0);P(W,ee,he,"⊇","\\supseteq",!0);P(W,de,he,"⊈","\\nsubseteq",!0);P(W,de,he,"⊉","\\nsupseteq",!0);P(W,ee,he,"⊨","\\models");P(W,ee,he,"←","\\leftarrow",!0);P(W,ee,he,"≤","\\le");P(W,ee,he,"≤","\\leq",!0);P(W,ee,he,"<","\\lt",!0);P(W,ee,he,"→","\\rightarrow",!0);P(W,ee,he,"→","\\to");P(W,de,he,"≱","\\ngeq",!0);P(W,de,he,"≰","\\nleq",!0);P(W,ee,pl," ","\\ ");P(W,ee,pl," ","\\space");P(W,ee,pl," ","\\nobreakspace");P(Ve,ee,pl," ","\\ ");P(Ve,ee,pl," "," ");P(Ve,ee,pl," ","\\space");P(Ve,ee,pl," ","\\nobreakspace");P(W,ee,pl,"","\\nobreak");P(W,ee,pl,"","\\allowbreak");P(W,ee,Lm,",",",");P(W,ee,Lm,";",";");P(W,de,pt,"⊼","\\barwedge",!0);P(W,de,pt,"⊻","\\veebar",!0);P(W,ee,pt,"⊙","\\odot",!0);P(W,ee,pt,"⊕","\\oplus",!0);P(W,ee,pt,"⊗","\\otimes",!0);P(W,ee,ye,"∂","\\partial",!0);P(W,ee,pt,"⊘","\\oslash",!0);P(W,de,pt,"⊚","\\circledcirc",!0);P(W,de,pt,"⊡","\\boxdot",!0);P(W,ee,pt,"△","\\bigtriangleup");P(W,ee,pt,"▽","\\bigtriangledown");P(W,ee,pt,"†","\\dagger");P(W,ee,pt,"⋄","\\diamond");P(W,ee,pt,"⋆","\\star");P(W,ee,pt,"◃","\\triangleleft");P(W,ee,pt,"▹","\\triangleright");P(W,ee,ca,"{","\\{");P(Ve,ee,ye,"{","\\{");P(Ve,ee,ye,"{","\\textbraceleft");P(W,ee,di,"}","\\}");P(Ve,ee,ye,"}","\\}");P(Ve,ee,ye,"}","\\textbraceright");P(W,ee,ca,"{","\\lbrace");P(W,ee,di,"}","\\rbrace");P(W,ee,ca,"[","\\lbrack",!0);P(Ve,ee,ye,"[","\\lbrack",!0);P(W,ee,di,"]","\\rbrack",!0);P(Ve,ee,ye,"]","\\rbrack",!0);P(W,ee,ca,"(","\\lparen",!0);P(W,ee,di,")","\\rparen",!0);P(Ve,ee,ye,"<","\\textless",!0);P(Ve,ee,ye,">","\\textgreater",!0);P(W,ee,ca,"⌊","\\lfloor",!0);P(W,ee,di,"⌋","\\rfloor",!0);P(W,ee,ca,"⌈","\\lceil",!0);P(W,ee,di,"⌉","\\rceil",!0);P(W,ee,ye,"\\","\\backslash");P(W,ee,ye,"∣","|");P(W,ee,ye,"∣","\\vert");P(Ve,ee,ye,"|","\\textbar",!0);P(W,ee,ye,"∥","\\|");P(W,ee,ye,"∥","\\Vert");P(Ve,ee,ye,"∥","\\textbardbl");P(Ve,ee,ye,"~","\\textasciitilde");P(Ve,ee,ye,"\\","\\textbackslash");P(Ve,ee,ye,"^","\\textasciicircum");P(W,ee,he,"↑","\\uparrow",!0);P(W,ee,he,"⇑","\\Uparrow",!0);P(W,ee,he,"↓","\\downarrow",!0);P(W,ee,he,"⇓","\\Downarrow",!0);P(W,ee,he,"↕","\\updownarrow",!0);P(W,ee,he,"⇕","\\Updownarrow",!0);P(W,ee,ss,"∐","\\coprod");P(W,ee,ss,"⋁","\\bigvee");P(W,ee,ss,"⋀","\\bigwedge");P(W,ee,ss,"⨄","\\biguplus");P(W,ee,ss,"⋂","\\bigcap");P(W,ee,ss,"⋃","\\bigcup");P(W,ee,ss,"∫","\\int");P(W,ee,ss,"∫","\\intop");P(W,ee,ss,"∬","\\iint");P(W,ee,ss,"∭","\\iiint");P(W,ee,ss,"∏","\\prod");P(W,ee,ss,"∑","\\sum");P(W,ee,ss,"⨂","\\bigotimes");P(W,ee,ss,"⨁","\\bigoplus");P(W,ee,ss,"⨀","\\bigodot");P(W,ee,ss,"∮","\\oint");P(W,ee,ss,"∯","\\oiint");P(W,ee,ss,"∰","\\oiiint");P(W,ee,ss,"⨆","\\bigsqcup");P(W,ee,ss,"∫","\\smallint");P(Ve,ee,qh,"…","\\textellipsis");P(W,ee,qh,"…","\\mathellipsis");P(Ve,ee,qh,"…","\\ldots",!0);P(W,ee,qh,"…","\\ldots",!0);P(W,ee,qh,"⋯","\\@cdots",!0);P(W,ee,qh,"⋱","\\ddots",!0);P(W,ee,ye,"⋮","\\varvdots");P(Ve,ee,ye,"⋮","\\varvdots");P(W,ee,kr,"ˊ","\\acute");P(W,ee,kr,"ˋ","\\grave");P(W,ee,kr,"¨","\\ddot");P(W,ee,kr,"~","\\tilde");P(W,ee,kr,"ˉ","\\bar");P(W,ee,kr,"˘","\\breve");P(W,ee,kr,"ˇ","\\check");P(W,ee,kr,"^","\\hat");P(W,ee,kr,"⃗","\\vec");P(W,ee,kr,"˙","\\dot");P(W,ee,kr,"˚","\\mathring");P(W,ee,Pt,"","\\@imath");P(W,ee,Pt,"","\\@jmath");P(W,ee,ye,"ı","ı");P(W,ee,ye,"ȷ","ȷ");P(Ve,ee,ye,"ı","\\i",!0);P(Ve,ee,ye,"ȷ","\\j",!0);P(Ve,ee,ye,"ß","\\ss",!0);P(Ve,ee,ye,"æ","\\ae",!0);P(Ve,ee,ye,"œ","\\oe",!0);P(Ve,ee,ye,"ø","\\o",!0);P(Ve,ee,ye,"Æ","\\AE",!0);P(Ve,ee,ye,"Œ","\\OE",!0);P(Ve,ee,ye,"Ø","\\O",!0);P(Ve,ee,kr,"ˊ","\\'");P(Ve,ee,kr,"ˋ","\\`");P(Ve,ee,kr,"ˆ","\\^");P(Ve,ee,kr,"˜","\\~");P(Ve,ee,kr,"ˉ","\\=");P(Ve,ee,kr,"˘","\\u");P(Ve,ee,kr,"˙","\\.");P(Ve,ee,kr,"¸","\\c");P(Ve,ee,kr,"˚","\\r");P(Ve,ee,kr,"ˇ","\\v");P(Ve,ee,kr,"¨",'\\"');P(Ve,ee,kr,"˝","\\H");P(Ve,ee,kr,"◯","\\textcircled");var IP={"--":!0,"---":!0,"``":!0,"''":!0};P(Ve,ee,ye,"–","--",!0);P(Ve,ee,ye,"–","\\textendash");P(Ve,ee,ye,"—","---",!0);P(Ve,ee,ye,"—","\\textemdash");P(Ve,ee,ye,"‘","`",!0);P(Ve,ee,ye,"‘","\\textquoteleft");P(Ve,ee,ye,"’","'",!0);P(Ve,ee,ye,"’","\\textquoteright");P(Ve,ee,ye,"“","``",!0);P(Ve,ee,ye,"“","\\textquotedblleft");P(Ve,ee,ye,"”","''",!0);P(Ve,ee,ye,"”","\\textquotedblright");P(W,ee,ye,"°","\\degree",!0);P(Ve,ee,ye,"°","\\degree");P(Ve,ee,ye,"°","\\textdegree",!0);P(W,ee,ye,"£","\\pounds");P(W,ee,ye,"£","\\mathsterling",!0);P(Ve,ee,ye,"£","\\pounds");P(Ve,ee,ye,"£","\\textsterling",!0);P(W,de,ye,"✠","\\maltese");P(Ve,de,ye,"✠","\\maltese");var dA='0123456789/@."';for(var Lw=0;Lw{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 kA[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return Kjn[i]}else{if(r===120485||r===120486)return kA[0];if(120486{if(Eu(e.classes)!==Eu(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},$P=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},We=function(n,t,r,s){var i=new Hh(n,t,r,s);return G6(i),i},zu=(e,n,t,r)=>new Hh(e,n,t,r),wh=function(n,t,r){var s=We([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=rt(s.height),s.maxFontSize=1,s},Yjn=function(n,t,r,s){var i=new hy(n,t,r,s);return G6(i),i},ml=function(n){var t=new Fh(n);return G6(t),t},kh=function(n,t){return n instanceof Fh?We([],[n],t):n},Zjn=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=We(["mspace"],[],n),r=zr(e,n);return t.style.marginRight=rt(r),t},w1=(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},C5={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"}},PP={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},FP=function(n,t){var[r,s,i]=PP[n],a=new Nu(r),o=new _l([a],{width:rt(s),height:rt(i),style:"width:"+rt(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=zu(["overlay"],[o],t);return c.height=i,c.style.height=rt(i),c.style.width=rt(s),c},Er={number:3,unit:"mu"},h_={number:4,unit:"mu"},Pc={number:5,unit:"mu"},Jjn={mord:{mop:Er,mbin:h_,mrel:Pc,minner:Er},mop:{mord:Er,mop:Er,mrel:Pc,minner:Er},mbin:{mord:h_,mop:h_,mopen:h_,minner:h_},mrel:{mord:Pc,mop:Pc,mopen:Pc,minner:Pc},mopen:{},mclose:{mop:Er,mbin:h_,mrel:Pc,minner:Er},mpunct:{mord:Er,mop:Er,mrel:Pc,mopen:Er,mclose:Er,mpunct:Er,minner:Er},minner:{mord:Er,mop:Er,mbin:h_,mrel:Pc,mopen:Er,mpunct:Er,minner:Er}},eTn={mord:{mop:Er},mop:{mord:Er,mop:Er},mbin:{},mrel:{},mopen:{},mclose:{mop:Er},mpunct:{},minner:{mop:Er}},HP={},eb={},tb={};function ft(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},c=0;c{var v=k.classes[0],b=x.classes[0];v==="mbin"&&nTn.has(b)?k.classes[0]="mord":b==="mbin"&&tTn.has(v)&&(x.classes[0]="mord")},{node:_},p,m),E5(i,(x,k)=>{var v,b,w=z5(k),y=z5(x),C=w&&y?x.hasClass("mtight")?(v=eTn[w])==null?void 0:v[y]:(b=Jjn[w])==null?void 0:b[y]:null;if(C)return BP(C,u)},{node:_},p,m),i},E5=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(_+1,0,p),a++})(a)}s&&n.pop()},qP=function(n){return n instanceof Fh||n instanceof hy||n instanceof Hh&&n.hasClass("enclosing")?n:null},N5=function(n,t){var r=qP(n);if(r){var s=r.children;if(s.length){if(t==="right")return N5(s[s.length-1],"right");if(t==="left")return N5(s[0],"left")}}return n},z5=function(n,t){if(!n)return null;t&&(n=N5(n,t));var r=n.classes[0];return sTn[r]||null},q0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return We(t.concat(r))},In=function(n,t,r){if(!n)return We();if(eb[n.type]){var s=eb[n.type](n,t);if(r&&t.size!==r.size){s=We(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Ze("Got group of unknown type: '"+n.type+"'")};function k1(e,n){var t=We(["base"],e,n),r=We(["strut"]);return r.style.height=rt(t.height+t.depth),t.depth&&(r.style.verticalAlign=rt(-t.depth)),t.children.unshift(r),t}function j5(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=ds(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(k1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(k1(a,n));var u;t?(u=k1(ds(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=We(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=rt(h.height+h.depth),h.depth&&(_.style.verticalAlign=rt(-h.depth))}return h}function UP(e){return new Fh(e)}class Je{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=Eu(this.classes));for(var r=0;r0&&(n+=' class ="'+Ks(Eu(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 Ks(this.toText())}toText(){return this.text}}class GP{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",rt(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iTn=new Set(["\\imath","\\jmath"]),aTn=new Set(["mrow","mtable"]),$a=function(n,t,r){return xr[t][n]&&xr[t][n].replace&&n.charCodeAt(0)!==55349&&!(IP.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=xr[t][n].replace),new rs(n)},V6=function(n){return n.length===1?n[0]:new Je("mrow",n)},oTn={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"},K6=(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=oTn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(iTn.has(i))return null;if(xr[r][i]){var a=xr[r][i].replace;a&&(i=a)}var o=C5[t].fontName;return q6(i,o,r)?C5[t].variant:null};function Pw(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 la=function(n,t,r){if(n.length===1){var s=lr(n[0],t);return r&&s instanceof Je&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Pw(a))){var u=c.children[0];u instanceof Je&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof rs&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof rs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),i.pop())}}}i.push(c),a=c}return i},ju=function(n,t,r){return V6(la(n,t,r))},lr=function(n,t){if(!n)return new Je("mrow");if(tb[n.type])return tb[n.type](n,t);throw new Ze("Got group of unknown type: '"+n.type+"'")};function SA(e,n,t,r,s){var i=la(e,t),a;i.length===1&&i[0]instanceof Je&&aTn.has(i[0].type)?a=i[0]:a=new Je("mrow",i);var o=new Je("annotation",[new rs(n)]);o.setAttribute("encoding","application/x-tex");var c=new Je("semantics",[a,o]),u=new Je("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return We([h],[u])}var cTn=[[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]],CA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],EA=function(n,t){return t.size<2?n:cTn[n-1][t.size-1]};class Kc{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||Kc.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=CA[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 Kc(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:EA(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:CA[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=EA(Kc.BASESIZE,n);return this.size===t&&this.textSize===Kc.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!==Kc.BASESIZE?["sizing","reset-size"+this.size,"size"+Kc.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Gjn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Kc.BASESIZE=6;var VP=function(n){return new Kc({style:n.displayMode?Qt.DISPLAY:Qt.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},KP=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=We(r,[n])}return n},lTn=function(n,t,r){var s=VP(r),i;if(r.output==="mathml")return SA(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=j5(n,s);i=We(["katex"],[a])}else{var o=SA(n,t,s,r.displayMode,!1),c=j5(n,s);i=We(["katex"],[o,c])}return KP(i,r)},uTn=function(n,t,r){var s=VP(r),i=j5(n,s),a=We(["katex"],[i]);return KP(a,r)},_Tn={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":"="},gy=function(n){var t=new Je("mo",[new rs(_Tn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},fTn={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]},dTn=new Set(["widehat","widecheck","widetilde","utilde"]),vy=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(dTn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,_,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,_=c+"4"):(h=312,o=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][m],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var x=new Nu(_),k=new _l([x],{width:"100%",height:rt(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:zu([],[k],t),minWidth:0,height:p}}else{var v=[],b=fTn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[w,y,C]=b,N=C/1e3,z=w.length,T,j;if(z===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');T=["hide-tail"],j=[b[3]]}else if(z===2)T=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(z===3)T=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+z+" children.");for(var M=0;M0&&(s.style.minWidth=rt(i)),s},hTn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=We(["stretchy",t],[],i),t==="fbox"){var c=i.color&&i.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new b5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new b5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new _l(u,{width:"100%",height:rt(o)});a=zu([],[h],i)}return a.height=o,a.style.height=rt(o),a},pTn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},mTn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function gTn(e){return e in pTn}function rn(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 by(e){var n=yy(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 yy(e){return e&&(e.type==="atom"||mTn.hasOwnProperty(e.type))?e:null}var WP=e=>{if(e instanceof ra)return e;if(qjn(e)&&e.children.length===1)return WP(e.children[0])},W6=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=rn(e.base,"accent"),t=r.base,e.base=t,s=Hjn(In(e,n)),e.base=r):(r=rn(e,"accent"),t=r.base);var i=In(t,n.havingCrampedStyle()),a=r.isShifty&&hl(t),o=0;if(a){var c,u;o=(c=(u=WP(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",_=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=vy(r,n),p=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+rt(2*o)+")",marginLeft:rt(2*o)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=FP("vec",n),x=PP.vec[1]):(m=my({mode:r.mode,text:r.label},n,"textord"),m=Fjn(m),m.italic=0,x=m.width,h&&(_+=m.depth)),p=We(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),_=i.height);var v=o;k||(v-=x/2),p.style.left=rt(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=We(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},QP=(e,n)=>{var t=e.isStretchy?gy(e.label):new Je("mo",[$a(e.label,e.mode)]),r=new Je("mover",[lr(e.base,n),t]);return r.setAttribute("accent","true"),r},vTn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ft({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=nb(n[0]),r=!vTn.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:W6,mathmlBuilder:QP});ft({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:W6,mathmlBuilder:QP});ft({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=vy(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 We(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=gy(e.label),r=new Je("munder",[lr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var S1=e=>{var n=new Je("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};ft({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=kh(In(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=kh(In(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=vy(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var h;if(a){var _=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=Dn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else h=Dn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return We(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=gy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=S1(lr(e.body,n));if(e.below){var i=S1(lr(e.below,n));r=new Je("munderover",[t,i,s])}else r=new Je("mover",[t,s])}else if(e.below){var a=S1(lr(e.below,n));r=new Je("munder",[t,a])}else r=S1(),r=new Je("mover",[t,r]);return r}});function XP(e,n){var t=ds(e.body,n,!0);return We([e.mclass],t,n)}function YP(e,n){var t,r=la(e.body,n);return e.mclass==="minner"?t=new Je("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Je("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Je("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}ft({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:hl(s)}},htmlBuilder:XP,mathmlBuilder:YP});var xy=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"};ft({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:xy(n[0]),body:ns(n[1]),isCharacterBox:hl(n[1])}}});ft({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=xy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ns(s)},c={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:[c],isCharacterBox:hl(c)}},htmlBuilder:XP,mathmlBuilder:YP});ft({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:xy(n[0]),body:ns(n[0])}},htmlBuilder(e,n){var t=ds(e.body,n,!0),r=We([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=la(e.body,n),r=new Je("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var bTn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},NA=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),zA=e=>e.type==="textord"&&e.text==="@",yTn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function xTn(e,n,t){var r=bTn[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]],[]),c={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[c],[])}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 wTn(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 Ze("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var x=xTn(u,h,e),k={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(k),o=NA()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=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:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}ft({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=kh(In(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=rt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Je("mrow",[lr(e.label,n)]);return t=new Je("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Je("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});ft({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=kh(In(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Je("mrow",[lr(e.fragment,n)])}});ft({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=rn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Ze("\\@char with invalid code point "+i);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var ZP=(e,n)=>{var t=ds(e.body,n.withColor(e.color),!1);return ml(t)},JP=(e,n)=>{var t=la(e.body,n.withColor(e.color)),r=new Je("mstyle",t);return r.setAttribute("mathcolor",e.color),r};ft({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=rn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ns(s)}},htmlBuilder:ZP,mathmlBuilder:JP});ft({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=rn(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:ZP,mathmlBuilder:JP});ft({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&&rn(s,"size").value}},htmlBuilder(e,n){var t=We(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=rt(zr(e.size,n)))),t},mathmlBuilder(e,n){var t=new Je("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",rt(zr(e.size,n)))),t}});var T5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},eF=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ze("Expected a control sequence",e);return n},kTn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},tF=(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)};ft({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(T5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=T5[r.text]),rn(n.parseFunction(),"internal");throw new Ze("Invalid token after macro prefix",r)}});ft({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 Ze("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 Ze('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Ze('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Ze("Expected a macro definition");o[i].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:i,delimiters:o},t===T5[t]),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eF(n.gullet.popToken());n.gullet.consumeSpaces();var s=kTn(n);return tF(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eF(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return tF(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var r0=function(n,t,r){var s=xr.math[n]&&xr.math[n].replace,i=q6(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},Q6=function(n,t,r,s){var i=r.havingBaseStyle(t),a=We(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},nF=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=rt(i),n.height-=i,n.depth+=i},STn=function(n,t,r,s,i,a){var o=ci(n,"Main-Regular",i,s),c=Q6(o,t,s,a);return nF(c,s,t),c},CTn=function(n,t,r,s){return ci(n,"Size"+t+"-Regular",r,s)},rF=function(n,t,r,s,i,a){var o=CTn(n,t,i,s),c=Q6(We(["delimsizing","size"+t],[o],s),Qt.TEXT,s,a);return r&&nF(c,s,Qt.TEXT),c},Fw=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=We(["delimsizinginner",s],[We([],[ci(n,t,r)])]);return{type:"elem",elem:i}},Hw=function(n,t,r){var s=Go["Size4-Regular"][n.charCodeAt(0)]?Go["Size4-Regular"][n.charCodeAt(0)][4]:Go["Size1-Regular"][n.charCodeAt(0)][4],i=new Nu("inner",Ojn(n,Math.round(1e3*t))),a=new _l([i],{width:rt(s),height:rt(t),style:"width:"+rt(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=zu([],[a],r);return o.height=t,o.style.height=rt(t),o.style.width=rt(s),{type:"elem",elem:o}},A5=.008,C1={type:"kern",size:-1*A5},ETn=new Set(["|","\\lvert","\\rvert","\\vert"]),NTn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),sF=function(n,t,r,s,i,a){var o,c,u,h,_="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):ETn.has(n)?(u="∣",_="vert",p=333):NTn.has(n)?(u="∥",_="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",_="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",_="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",_="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",_="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",_="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",_="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",_="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",_="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var x=r0(o,m,i),k=x.height+x.depth,v=r0(u,m,i),b=v.height+v.depth,w=r0(h,m,i),y=w.height+w.depth,C=0,N=1;if(c!==null){var z=r0(c,m,i);C=z.height+z.depth,N=2}var T=k+y+C,j=Math.max(0,Math.ceil((t-T)/(N*b))),M=T+j*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,$=[];if(_.length>0){var q=M-k-y,H=Math.round(M*1e3),Q=Djn(_,Math.round(q*1e3)),V=new Nu(_,Q),J=rt(p/1e3),Z=rt(H/1e3),B=new _l([V],{width:J,height:Z,viewBox:"0 0 "+p+" "+H}),L=zu([],[B],s);L.height=H/1e3,L.style.width=J,L.style.height=Z,$.push({type:"elem",elem:L})}else{if($.push(Fw(h,m,i)),$.push(C1),c===null){var F=M-k-y+2*A5;$.push(Hw(u,F,s))}else{var U=(M-k-y-C)/2+2*A5;$.push(Hw(u,U,s)),$.push(C1),$.push(Fw(c,m,i)),$.push(C1),$.push(Hw(u,U,s))}$.push(C1),$.push(Fw(o,m,i))}var K=s.havingBaseStyle(Qt.TEXT),ne=Dn({positionType:"bottom",positionData:I,children:$});return Q6(We(["delimsizing","mult"],[ne],K),Qt.TEXT,s,a)},qw=80,Uw=.08,Gw=function(n,t,r,s,i){var a=Mjn(n,s,r),o=new Nu(n,a),c=new _l([o],{width:"400em",height:rt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return zu(["hide-tail"],[c],i)},zTn=function(n,t){var r=t.havingBaseSizing(),s=lF("\\surd",n*r.sizeMultiplier,cF,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,_;return s.type==="small"?(h=1e3+1e3*a+qw,n<1?i=1:n<1.4&&(i=.7),c=(1+a+Uw)/i,u=(1+a)/i,o=Gw("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",_=.833/i):s.type==="large"?(h=(1e3+qw)*g0[s.size],u=(g0[s.size]+a)/i,c=(g0[s.size]+a+Uw)/i,o=Gw("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",_=1/i):(c=n+a+Uw,u=n+a,h=Math.floor(1e3*n+a)+qw,o=Gw("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",_=1.056),o.height=u,o.style.height=rt(c),{span:o,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},iF=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),jTn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),aF=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),g0=[0,1.2,1.8,2.4,3],oF=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),iF.has(n)||aF.has(n))return rF(n,t,!1,r,s,i);if(jTn.has(n))return sF(n,g0[t],!1,r,s,i);throw new Ze("Illegal delimiter: '"+n+"'")},TTn=[{type:"small",style:Qt.SCRIPTSCRIPT},{type:"small",style:Qt.SCRIPT},{type:"small",style:Qt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ATn=[{type:"small",style:Qt.SCRIPTSCRIPT},{type:"small",style:Qt.SCRIPT},{type:"small",style:Qt.TEXT},{type:"stack"}],cF=[{type:"small",style:Qt.SCRIPTSCRIPT},{type:"small",style:Qt.SCRIPT},{type:"small",style:Qt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],RTn=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.")},lF=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]},R5=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;aF.has(n)?o=TTn:iF.has(n)?o=cF:o=ATn;var c=lF(n,t,o,s);return c.type==="small"?STn(n,c.style,r,s,i,a):c.type==="large"?rF(n,c.size,r,s,i,a):sF(n,t,r,s,i,a)},Vw=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),_=Math.max(h/500*c,2*h-u);return R5(n,_,!0,s,i,a)},jA={"\\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}},MTn=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 TA(e){return"isMiddle"in e}function wy(e,n){var t=yy(e);if(t&&MTn.has(t.text))return t;throw t?new Ze("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ze("Invalid delimiter type '"+e.type+"'",e)}ft({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=wy(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:jA[e.funcName].size,mclass:jA[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?We([e.mclass]):oF(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push($a(e.delim,e.mode));var t=new Je("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=rt(g0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function AA(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ft({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 Ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:wy(n[0],e).text,color:t}}});ft({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=wy(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=rn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{AA(e);for(var t=ds(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{AA(e);var t=la(e.body,n);if(e.left!=="."){var r=new Je("mo",[$a(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Je("mo",[$a(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return V6(t)}});ft({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=wy(n[0],e);if(!e.parser.leftrightDepth)throw new Ze("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=q0(n,[]):(t=oF(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?$a("|","text"):$a(e.delim,e.mode),r=new Je("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var ky=(e,n)=>{var t=kh(In(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=hl(e.body);if(r==="sout")i=We(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=zr({number:.6,unit:"pt"},n),u=zr({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=rt(_/2+c);var p=Math.floor(1e3*_*s),m=Ajn(p),x=new _l([new Nu("phase",m)],{width:"400em",height:rt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=zu(["hide-tail"],[x],n),i.style.height=rt(_),a=t.depth+c+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=hTn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=rt(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=rt(b),i.style.borderRightWidth=rt(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Dn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];w=Dn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:y}]})}return/cancel/.test(r)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(r)&&!o?We(["mord","cancel-lap"],[w],n):We(["mord"],[w],n)},Sy=(e,n)=>{var t,r=new Je(e.label.includes("colorbox")?"mpadded":"menclose",[lr(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: "+rt(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ft({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=rn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:ky,mathmlBuilder:Sy});ft({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=rn(n[0],"color-token").color,a=rn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:ky,mathmlBuilder:Sy});ft({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]}}});ft({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:ky,mathmlBuilder:Sy});ft({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:ky,mathmlBuilder:Sy});ft({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 uF={};function ic(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},c=0;c{var n=e.parser.settings;if(!n.displayMode)throw new Ze("{"+e.envName+"} can be used only in display mode.")},OTn=new Set(["gather","gather*"]);function X6(e){if(!e.includes("ed"))return!e.includes("*")}function Iu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,maxNumCols:_,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 Ze("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],k=[x],v=[],b=[],w=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new ea("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(RA(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:N};t&&(z={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[z]}),x.push(z);var T=e.fetch().text;if(T==="&"){if(_&&x.length===_){if(u||o)throw new Ze("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(T==="\\end"){C(),x.length===1&&z.type==="styling"&&z.body.length===1&&z.body[0].type==="ordgroup"&&z.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Fe[st]})}for(C(a[0]),r=0;r0&&(I+=w,TFe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var le,fe;oe=(le=(fe=K)==null?void 0:fe.pregap)!=null?le:p,oe!==0&&(Q=We(["arraycolsep"],[]),Q.style.width=rt(oe),H.push(Q))}var me=[];for(r=0;r0){for(var wt=wh("hline",t,h),$t=wh("hdashline",t,h),ht=[{type:"elem",elem:ct,shift:0}];u.length>0;){var dt=u.pop(),Le=dt.pos-$;dt.isDashed?ht.push({type:"elem",elem:$t,shift:Le}):ht.push({type:"elem",elem:wt,shift:Le})}ct=Dn({positionType:"individualShift",children:ht})}if(J.length===0)return We(["mord"],[ct],t);var ge=Dn({positionType:"individualShift",children:J}),Te=We(["tag"],[ge],t);return ml([ct,Te])},DTn={c:"center ",l:"left ",r:"right "},oc=function(n,t){for(var r=[],s=new Je("mtd",[],["mtr-glue"]),i=new Je("mtd",[],["mml-eqn-num"]),a=0;a0){var x=n.cols,k="",v=!1,b=0,w=x.length;x[0].type==="separator"&&(p+="top ",b=1),x[x.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var D=1;D0&&m&&(v=1),r[x]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};ic({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=yy(n[0]),r=t?[n[0]]:rn(n[0],"ordgroup").body,s=r.map(function(a){var o=by(a),c=o.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new Ze("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Iu(e.parser,i,Y6(e.envName))},htmlBuilder:ac,mathmlBuilder:oc});ic({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 Ze("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=Iu(e.parser,r,Y6(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:ac,mathmlBuilder:oc});ic({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Iu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=yy(n[0]),r=t?[n[0]]:rn(n[0],"ordgroup").body,s=r.map(function(o){var c=by(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Ze("Unknown column alignment: "+u,o)});if(s.length>1)throw new Ze("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=Iu(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ze("{subarray} can contain only one column");return a},htmlBuilder:ac,mathmlBuilder:oc});ic({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=Iu(e.parser,n,Y6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fF,htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){OTn.has(e.envName)&&Cy(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:X6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Iu(e.parser,n,"display")},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fF,htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Cy(e);var n={autoTag:X6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Iu(e.parser,n,"display")},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Cy(e),wTn(e.parser)},htmlBuilder:ac,mathmlBuilder:oc});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");ft({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ze(e.funcName+" valid only within array environment")}});var MA=uF;ft({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 Ze("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return In(e.body,r)},hF=(e,n)=>{var t=e.font,r=n.withFont(t);return lr(e.body,r)},OA={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ft({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=nb(n[0]),i=r;return i in OA&&(i=OA[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:dF,mathmlBuilder:hF});ft({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:xy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:hl(r)}}});ft({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:dF,mathmlBuilder:hF});var LTn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=In(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?x=3*p:x=7*p,k=n.fontMetrics().denom1):(_>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),k=n.fontMetrics().denom2);var v;if(h){var w=n.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new Je("mfrac",[lr(e.numer,n),lr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=zr(e.barSize,n);t.setAttribute("linethickness",rt(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Je("mo",[new rs(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Je("mo",[new rs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return V6(s)}return t},pF=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};ft({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,c=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="(",c=")";break;case"\\\\bracefrac":a=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),pF({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:LTn,mathmlBuilder:ITn});ft({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 DA=["display","text","script","scriptscript"],LA=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};ft({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=nb(n[0]),a=i.type==="atom"&&i.family==="open"?LA(i.text):null,o=nb(n[1]),c=o.type==="atom"&&o.family==="close"?LA(o.text):null,u=rn(n[2],"size"),h,_=null;u.isBlank?h=!0:(_=u.value,h=_.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=rn(m.body[0],"textord");p=DA[Number(x.text)]}}else m=rn(m,"textord"),p=DA[Number(m.text)];return pF({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:_,leftDelim:a,rightDelim:c},p)}});ft({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:rn(n[0],"size").value,token:s}}});ft({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=rn(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 mF=(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=rn(e.base,"horizBrace")):s=rn(e,"horizBrace");var i=In(s.base,n.havingBaseStyle(Qt.DISPLAY)),a=vy(s,n),o;if(s.isOver?o=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Dn({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 c=We(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Dn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return We(["minner",s.isOver?"mover":"munder"],[o],n)},$Tn=(e,n)=>{var t=gy(e.label);return new Je(e.isOver?"mover":"munder",[lr(e.base,n),t])};ft({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:mF,mathmlBuilder:$Tn});ft({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=rn(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=ds(e.body,n,!1);return Yjn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=ju(e.body,n);return t instanceof Je||(t=new Je("mrow",[t])),t.setAttribute("href",e.href),t}});ft({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=rn(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=rn(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,c={};switch(r){case"\\htmlClass":c.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),h=0;h{var t=ds(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=We(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)=>ju(e.body,n)});ft({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=ds(e.html,n,!1);return ml(t)},mathmlBuilder:(e,n)=>ju(e.mathml,n)});var Kw=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 Ze("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!MP(r))throw new Ze("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ft({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 c=rn(t[0],"raw").string,u=c.split(","),h=0;h{var t=zr(e.height,n),r=0;e.totalheight.number>0&&(r=zr(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=zr(e.width,n));var i={height:rt(t+r)};s>0&&(i.width=rt(s)),r>0&&(i.verticalAlign=rt(-r));var a=new Bjn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Je("mglyph",[]);t.setAttribute("alt",e.alt);var r=zr(e.height,n),s=0;if(e.totalheight.number>0&&(s=zr(e.totalheight,n)-r,t.setAttribute("valign",rt(-s))),t.setAttribute("height",rt(r+s)),e.width.number>0){var i=zr(e.width,n);t.setAttribute("width",rt(i))}return t.setAttribute("src",e.src),t}});ft({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=rn(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 BP(e.dimension,n)},mathmlBuilder(e,n){var t=zr(e.dimension,n);return new GP(t)}});ft({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=We([],[In(e.body,n)]),t=We(["inner"],[t],n)):t=We(["inner"],[In(e.body,n)]);var r=We(["fix"],[]),s=We([e.alignment],[t,r],n),i=We(["strut"]);return i.style.height=rt(s.height+s.depth),s.depth&&(i.style.verticalAlign=rt(-s.depth)),s.children.unshift(i),s=We(["thinbox"],[s],n),We(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Je("mpadded",[lr(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}});ft({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}}});ft({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ze("Mismatched "+e.funcName)}});var IA=(e,n)=>{switch(n.style.size){case Qt.DISPLAY.size:return e.display;case Qt.TEXT.size:return e.text;case Qt.SCRIPT.size:return e.script;case Qt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ft({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=IA(e,n),r=ds(t,n,!1);return ml(r)},mathmlBuilder:(e,n)=>{var t=IA(e,n);return ju(t,n)}});var gF=(e,n,t,r,s,i,a)=>{e=We([],[e]);var o=t&&hl(t),c,u;if(n){var h=In(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var _=In(t,r.havingStyle(s.sub()),r);c={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=Dn({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:rt(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:rt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var x=e.height-a;p=Dn({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:rt(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=Dn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:rt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=We(["mspace"],[],r);b.style.marginRight=rt(i),v.unshift(b)}return We(["mop","op-limits"],v,r)},vF=new Set(["\\smallint"]),Uh=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=rn(e.base,"op"),s=!0):i=rn(e,"op");var a=n.style,o=!1;a.size===Qt.DISPLAY.size&&i.symbol&&!vF.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=o?"Size2-Regular":"Size1-Regular",_="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(_=i.name.slice(1),i.name=_==="oiint"?"\\iint":"\\iiint"),c=ci(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,_.length>0){var p=FP(_+"Size"+(o?"2":"1"),n);c=Dn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(i.body){var m=ds(i.body,n,!0);m.length===1&&m[0]instanceof ra?(c=m[0],c.classes[0]="mop"):c=We(["mop"],m,n)}else{for(var x=[],k=1;k{var t;if(e.symbol)t=new Je("mo",[$a(e.name,e.mode)]),vF.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Je("mo",la(e.body,n));else{t=new Je("mi",[new rs(e.name.slice(1))]);var r=new Je("mo",[$a("⁡","text")]);e.parentIsSupSub?t=new Je("mrow",[t,r]):t=UP([t,r])}return t},BTn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ft({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=BTn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Uh,mathmlBuilder:Im});ft({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:Uh,mathmlBuilder:Im});var PTn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ft({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:Uh,mathmlBuilder:Im});ft({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:Uh,mathmlBuilder:Im});ft({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=PTn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Uh,mathmlBuilder:Im});var bF=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=rn(e.base,"operatorname"),s=!0):i=rn(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=ds(o,n.withFont("mathrm"),!0),u=0;u{for(var t=la(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new rs(o)]}var c=new Je("mi",t);c.setAttribute("mathvariant","normal");var u=new Je("mo",[$a("⁡","text")]);return e.parentIsSupSub?new Je("mrow",[c,u]):UP([c,u])};ft({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:bF,mathmlBuilder:FTn});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?ml(ds(e.body,n,!1)):We(["mord"],ds(e.body,n,!0),n)},mathmlBuilder(e,n){return ju(e.body,n,!0)}});ft({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=wh("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 We(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new rs("‾")]);t.setAttribute("stretchy","true");var r=new Je("mover",[lr(e.body,n),t]);return r.setAttribute("accent","true"),r}});ft({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=ds(e.body,n.withPhantom(),!1);return ml(t)},mathmlBuilder:(e,n)=>{var t=la(e.body,n);return new Je("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");ft({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=We(["inner"],[In(e.body,n.withPhantom())]),r=We(["fix"],[]);return We(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=la(ns(e.body),n),r=new Je("mphantom",t),s=new Je("mpadded",[r]);return s.setAttribute("width","0px"),s}});ft({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=rn(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=zr(e.dy,n);return Dn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[lr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});ft({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});ft({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=rn(n[0],"size"),a=rn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&rn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=We(["mord","rule"],[],n),r=zr(e.width,n),s=zr(e.height,n),i=e.shift?zr(e.shift,n):0;return t.style.borderRightWidth=rt(r),t.style.borderTopWidth=rt(s),t.style.bottom=rt(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=zr(e.width,n),r=zr(e.height,n),s=e.shift?zr(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Je("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",rt(t)),a.setAttribute("height",rt(r));var o=new Je("mpadded",[a]);return s>=0?o.setAttribute("height",rt(s)):(o.setAttribute("height",rt(s)),o.setAttribute("depth",rt(-s))),o.setAttribute("voffset",rt(s)),o}});function yF(e,n,t){for(var r=ds(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return yF(e.body,t,n)};ft({type:"sizing",names:$A,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:$A.indexOf(r)+1,body:i}},htmlBuilder:HTn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=la(e.body,t),s=new Je("mstyle",r);return s.setAttribute("mathsize",rt(t.sizeMultiplier)),s}});ft({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]&&rn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=We([],[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 We(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Je("mpadded",[lr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});ft({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=kh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=rt(h);var m=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(Qt.SCRIPTSCRIPT),k=In(e.index,x,n),v=.6*(m.height-m.depth),b=Dn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),w=We(["root"],[b]);return We(["mord","sqrt"],[w,m],n)}else return We(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Je("mroot",[lr(t,n),lr(r,n)]):new Je("msqrt",[lr(t,n)])}});var M5={display:Qt.DISPLAY,text:Qt.TEXT,script:Qt.SCRIPT,scriptscript:Qt.SCRIPTSCRIPT};function qTn(e){return e in M5}ft({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(!qTn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=M5[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),yF(e.body,r,n)},mathmlBuilder(e,n){var t=M5[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=la(e.body,r),i=new Je("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 UTn=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===Qt.DISPLAY.size||r.alwaysHandleSupSub);return s?Uh:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===Qt.DISPLAY.size||r.limits);return i?bF:null}else{if(r.type==="accent")return hl(r.base)?W6:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?mF:null}else return null}else return null};kf({type:"supsub",htmlBuilder(e,n){var t=UTn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=In(r,n),o,c,u=n.fontMetrics(),h=0,_=0,p=r&&hl(r);if(s){var m=n.havingStyle(n.style.sup());o=In(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());c=In(i,x,n),p||(_=a.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var k;n.style===Qt.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=rt(.5/u.ptPerEm/v),w=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof ra||y){var C;w=rt(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var z=u.defaultRuleThickness,T=4*z;if(h-o.depth-(c.height-_)0&&(h+=j,_-=j)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-h,marginRight:b}];N=Dn({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var D=[{type:"elem",elem:c,marginLeft:w,marginRight:b}];N=Dn({positionType:"shift",positionData:_,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=Dn({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=z5(a,"right")||"mord";return We([I],[a,We(["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=[lr(e.base,n)];e.sub&&i.push(lr(e.sub,n)),e.sup&&i.push(lr(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===Qt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===Qt.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===Qt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===Qt.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===Qt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===Qt.DISPLAY)?a="mover":a="msup"}return new Je(a,i)}});kf({type:"atom",htmlBuilder(e,n){return U6(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Je("mo",[$a(e.text,e.mode)]);if(e.family==="bin"){var r=K6(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 xF={mi:"italic",mn:"normal",mtext:"normal"};kf({type:"mathord",htmlBuilder(e,n){return my(e,n,"mathord")},mathmlBuilder(e,n){var t=new Je("mi",[$a(e.text,e.mode,n)]),r=K6(e,n)||"italic";return r!==xF[t.type]&&t.setAttribute("mathvariant",r),t}});kf({type:"textord",htmlBuilder(e,n){return my(e,n,"textord")},mathmlBuilder(e,n){var t=$a(e.text,e.mode,n),r=K6(e,n)||"normal",s;return e.mode==="text"?s=new Je("mtext",[t]):/[0-9]/.test(e.text)?s=new Je("mn",[t]):e.text==="\\prime"?s=new Je("mo",[t]):s=new Je("mi",[t]),r!==xF[s.type]&&s.setAttribute("mathvariant",r),s}});var Ww={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Qw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kf({type:"spacing",htmlBuilder(e,n){if(Qw.hasOwnProperty(e.text)){var t=Qw[e.text].className||"";if(e.mode==="text"){var r=my(e,n,"textord");return r.classes.push(t),r}else return We(["mspace",t],[U6(e.text,e.mode,n)],n)}else{if(Ww.hasOwnProperty(e.text))return We(["mspace",Ww[e.text]],[],n);throw new Ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Qw.hasOwnProperty(e.text))t=new Je("mtext",[new rs(" ")]);else{if(Ww.hasOwnProperty(e.text))return new Je("mspace");throw new Ze('Unknown type of space "'+e.text+'"')}return t}});var BA=()=>{var e=new Je("mtd",[]);return e.setAttribute("width","50%"),e};kf({type:"tag",mathmlBuilder(e,n){var t=new Je("mtable",[new Je("mtr",[BA(),new Je("mtd",[ju(e.body,n)]),BA(),new Je("mtd",[ju(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var PA={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},FA={"\\textbf":"textbf","\\textmd":"textmd"},GTn={"\\textit":"textit","\\textup":"textup"},HA=(e,n)=>{var t=e.font;if(t){if(PA[t])return n.withTextFontFamily(PA[t]);if(FA[t])return n.withTextFontWeight(FA[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(GTn[t])};ft({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=HA(e,n),r=ds(e.body,t,!0);return We(["mord","text"],r,t)},mathmlBuilder(e,n){var t=HA(e,n);return ju(e.body,t)}});ft({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=wh("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 We(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new rs("‾")]);t.setAttribute("stretchy","true");var r=new Je("munder",[lr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});ft({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 Je("mpadded",[lr(e.body,n)],["vcenter"]);return new Je("mrow",[t])}});ft({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=qA(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),gu=HP,wF=`[ \r - ]`,VTn="\\\\[a-zA-Z@]+",KTn="\\\\[^\uD800-\uDFFF]",WTn="("+VTn+")"+wF+"*",QTn=`\\\\( +-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 Xjn(e){return"toText"in e}class Hh{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(Xjn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var v5={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},Yjn={ex:!0,em:!0,mu:!0},OP=function(n){return typeof n!="string"&&(n=n.unit),n in v5||n in Yjn||n==="ex"},Or=function(n,t){var r;if(n.unit in v5)r=v5[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 Ze("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},nt=function(n){return+n.toFixed(4)+"em"},Eu=function(n){return n.filter(t=>t).join(" ")},H6=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=Cjn(r)+":"+s+";")}return t},DP=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)}},LP=function(n){var t=document.createElement(n);t.className=Eu(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]/,IP=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Qs(Eu(this.classes))+'"');var r=H6(this.style);r&&(t+=' style="'+Qs(r)+'"');for(var s of Object.keys(this.attributes)){if(Zjn.test(s))throw new Ze("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Qs(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class qh{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,DP.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return LP.call(this,"span")}toMarkup(){return IP.call(this,"span")}}class hy{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,DP.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 LP.call(this,"a")}toMarkup(){return IP.call(this,"a")}}class Jjn{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=nt(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Eu(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:"+nt(this.italic)+";"),r+=H6(this.style),r&&(n=!0,t+=' style="'+Qs(r)+'"');var s=Qs(this.text);return n?(t+=">",t+=s,t+="",t):s}}class _l{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 b5{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 rTn=e=>e instanceof qh||e instanceof hy||e instanceof Hh,Go={"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]}},b1={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]},dA={Å:"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 sTn(e,n){Go[e]=n}function q6(e,n,t){if(!Go[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Go[n][r];if(!s&&e[0]in dA&&(r=dA[e[0]].charCodeAt(0),s=Go[n][r]),!s&&t==="text"&&MP(r)&&(s=Go[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Dw={};function iTn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!Dw[n]){var t=Dw[n]={cssEmPerMu:b1.quad[n]/18};for(var r in b1)b1.hasOwnProperty(r)&&(t[r]=b1[r][n])}return Dw[n]}var Er={math:{},text:{}};function P(e,n,t,r,s,i){Er[e][s]={font:n,group:t,replace:r},i&&r&&(Er[e][r]=Er[e][s])}var W="math",Ge="text",ee="main",fe="ams",zr="accent-token",ht="bin",hi="close",Uh="inner",Ft="mathord",ls="op-token",ca="open",Lm="punct",de="rel",pl="spacing",ye="textord";P(W,ee,de,"≡","\\equiv",!0);P(W,ee,de,"≺","\\prec",!0);P(W,ee,de,"≻","\\succ",!0);P(W,ee,de,"∼","\\sim",!0);P(W,ee,de,"⊥","\\perp");P(W,ee,de,"⪯","\\preceq",!0);P(W,ee,de,"⪰","\\succeq",!0);P(W,ee,de,"≃","\\simeq",!0);P(W,ee,de,"∣","\\mid",!0);P(W,ee,de,"≪","\\ll",!0);P(W,ee,de,"≫","\\gg",!0);P(W,ee,de,"≍","\\asymp",!0);P(W,ee,de,"∥","\\parallel");P(W,ee,de,"⋈","\\bowtie",!0);P(W,ee,de,"⌣","\\smile",!0);P(W,ee,de,"⊑","\\sqsubseteq",!0);P(W,ee,de,"⊒","\\sqsupseteq",!0);P(W,ee,de,"≐","\\doteq",!0);P(W,ee,de,"⌢","\\frown",!0);P(W,ee,de,"∋","\\ni",!0);P(W,ee,de,"∝","\\propto",!0);P(W,ee,de,"⊢","\\vdash",!0);P(W,ee,de,"⊣","\\dashv",!0);P(W,ee,de,"∋","\\owns");P(W,ee,Lm,".","\\ldotp");P(W,ee,Lm,"⋅","\\cdotp");P(W,ee,Lm,"⋅","·");P(Ge,ee,ye,"⋅","·");P(W,ee,ye,"#","\\#");P(Ge,ee,ye,"#","\\#");P(W,ee,ye,"&","\\&");P(Ge,ee,ye,"&","\\&");P(W,ee,ye,"ℵ","\\aleph",!0);P(W,ee,ye,"∀","\\forall",!0);P(W,ee,ye,"ℏ","\\hbar",!0);P(W,ee,ye,"∃","\\exists",!0);P(W,ee,ye,"∇","\\nabla",!0);P(W,ee,ye,"♭","\\flat",!0);P(W,ee,ye,"ℓ","\\ell",!0);P(W,ee,ye,"♮","\\natural",!0);P(W,ee,ye,"♣","\\clubsuit",!0);P(W,ee,ye,"℘","\\wp",!0);P(W,ee,ye,"♯","\\sharp",!0);P(W,ee,ye,"♢","\\diamondsuit",!0);P(W,ee,ye,"ℜ","\\Re",!0);P(W,ee,ye,"♡","\\heartsuit",!0);P(W,ee,ye,"ℑ","\\Im",!0);P(W,ee,ye,"♠","\\spadesuit",!0);P(W,ee,ye,"§","\\S",!0);P(Ge,ee,ye,"§","\\S");P(W,ee,ye,"¶","\\P",!0);P(Ge,ee,ye,"¶","\\P");P(W,ee,ye,"†","\\dag");P(Ge,ee,ye,"†","\\dag");P(Ge,ee,ye,"†","\\textdagger");P(W,ee,ye,"‡","\\ddag");P(Ge,ee,ye,"‡","\\ddag");P(Ge,ee,ye,"‡","\\textdaggerdbl");P(W,ee,hi,"⎱","\\rmoustache",!0);P(W,ee,ca,"⎰","\\lmoustache",!0);P(W,ee,hi,"⟯","\\rgroup",!0);P(W,ee,ca,"⟮","\\lgroup",!0);P(W,ee,ht,"∓","\\mp",!0);P(W,ee,ht,"⊖","\\ominus",!0);P(W,ee,ht,"⊎","\\uplus",!0);P(W,ee,ht,"⊓","\\sqcap",!0);P(W,ee,ht,"∗","\\ast");P(W,ee,ht,"⊔","\\sqcup",!0);P(W,ee,ht,"◯","\\bigcirc",!0);P(W,ee,ht,"∙","\\bullet",!0);P(W,ee,ht,"‡","\\ddagger");P(W,ee,ht,"≀","\\wr",!0);P(W,ee,ht,"⨿","\\amalg");P(W,ee,ht,"&","\\And");P(W,ee,de,"⟵","\\longleftarrow",!0);P(W,ee,de,"⇐","\\Leftarrow",!0);P(W,ee,de,"⟸","\\Longleftarrow",!0);P(W,ee,de,"⟶","\\longrightarrow",!0);P(W,ee,de,"⇒","\\Rightarrow",!0);P(W,ee,de,"⟹","\\Longrightarrow",!0);P(W,ee,de,"↔","\\leftrightarrow",!0);P(W,ee,de,"⟷","\\longleftrightarrow",!0);P(W,ee,de,"⇔","\\Leftrightarrow",!0);P(W,ee,de,"⟺","\\Longleftrightarrow",!0);P(W,ee,de,"↦","\\mapsto",!0);P(W,ee,de,"⟼","\\longmapsto",!0);P(W,ee,de,"↗","\\nearrow",!0);P(W,ee,de,"↩","\\hookleftarrow",!0);P(W,ee,de,"↪","\\hookrightarrow",!0);P(W,ee,de,"↘","\\searrow",!0);P(W,ee,de,"↼","\\leftharpoonup",!0);P(W,ee,de,"⇀","\\rightharpoonup",!0);P(W,ee,de,"↙","\\swarrow",!0);P(W,ee,de,"↽","\\leftharpoondown",!0);P(W,ee,de,"⇁","\\rightharpoondown",!0);P(W,ee,de,"↖","\\nwarrow",!0);P(W,ee,de,"⇌","\\rightleftharpoons",!0);P(W,fe,de,"≮","\\nless",!0);P(W,fe,de,"","\\@nleqslant");P(W,fe,de,"","\\@nleqq");P(W,fe,de,"⪇","\\lneq",!0);P(W,fe,de,"≨","\\lneqq",!0);P(W,fe,de,"","\\@lvertneqq");P(W,fe,de,"⋦","\\lnsim",!0);P(W,fe,de,"⪉","\\lnapprox",!0);P(W,fe,de,"⊀","\\nprec",!0);P(W,fe,de,"⋠","\\npreceq",!0);P(W,fe,de,"⋨","\\precnsim",!0);P(W,fe,de,"⪹","\\precnapprox",!0);P(W,fe,de,"≁","\\nsim",!0);P(W,fe,de,"","\\@nshortmid");P(W,fe,de,"∤","\\nmid",!0);P(W,fe,de,"⊬","\\nvdash",!0);P(W,fe,de,"⊭","\\nvDash",!0);P(W,fe,de,"⋪","\\ntriangleleft");P(W,fe,de,"⋬","\\ntrianglelefteq",!0);P(W,fe,de,"⊊","\\subsetneq",!0);P(W,fe,de,"","\\@varsubsetneq");P(W,fe,de,"⫋","\\subsetneqq",!0);P(W,fe,de,"","\\@varsubsetneqq");P(W,fe,de,"≯","\\ngtr",!0);P(W,fe,de,"","\\@ngeqslant");P(W,fe,de,"","\\@ngeqq");P(W,fe,de,"⪈","\\gneq",!0);P(W,fe,de,"≩","\\gneqq",!0);P(W,fe,de,"","\\@gvertneqq");P(W,fe,de,"⋧","\\gnsim",!0);P(W,fe,de,"⪊","\\gnapprox",!0);P(W,fe,de,"⊁","\\nsucc",!0);P(W,fe,de,"⋡","\\nsucceq",!0);P(W,fe,de,"⋩","\\succnsim",!0);P(W,fe,de,"⪺","\\succnapprox",!0);P(W,fe,de,"≆","\\ncong",!0);P(W,fe,de,"","\\@nshortparallel");P(W,fe,de,"∦","\\nparallel",!0);P(W,fe,de,"⊯","\\nVDash",!0);P(W,fe,de,"⋫","\\ntriangleright");P(W,fe,de,"⋭","\\ntrianglerighteq",!0);P(W,fe,de,"","\\@nsupseteqq");P(W,fe,de,"⊋","\\supsetneq",!0);P(W,fe,de,"","\\@varsupsetneq");P(W,fe,de,"⫌","\\supsetneqq",!0);P(W,fe,de,"","\\@varsupsetneqq");P(W,fe,de,"⊮","\\nVdash",!0);P(W,fe,de,"⪵","\\precneqq",!0);P(W,fe,de,"⪶","\\succneqq",!0);P(W,fe,de,"","\\@nsubseteqq");P(W,fe,ht,"⊴","\\unlhd");P(W,fe,ht,"⊵","\\unrhd");P(W,fe,de,"↚","\\nleftarrow",!0);P(W,fe,de,"↛","\\nrightarrow",!0);P(W,fe,de,"⇍","\\nLeftarrow",!0);P(W,fe,de,"⇏","\\nRightarrow",!0);P(W,fe,de,"↮","\\nleftrightarrow",!0);P(W,fe,de,"⇎","\\nLeftrightarrow",!0);P(W,fe,de,"△","\\vartriangle");P(W,fe,ye,"ℏ","\\hslash");P(W,fe,ye,"▽","\\triangledown");P(W,fe,ye,"◊","\\lozenge");P(W,fe,ye,"Ⓢ","\\circledS");P(W,fe,ye,"®","\\circledR");P(Ge,fe,ye,"®","\\circledR");P(W,fe,ye,"∡","\\measuredangle",!0);P(W,fe,ye,"∄","\\nexists");P(W,fe,ye,"℧","\\mho");P(W,fe,ye,"Ⅎ","\\Finv",!0);P(W,fe,ye,"⅁","\\Game",!0);P(W,fe,ye,"‵","\\backprime");P(W,fe,ye,"▲","\\blacktriangle");P(W,fe,ye,"▼","\\blacktriangledown");P(W,fe,ye,"■","\\blacksquare");P(W,fe,ye,"⧫","\\blacklozenge");P(W,fe,ye,"★","\\bigstar");P(W,fe,ye,"∢","\\sphericalangle",!0);P(W,fe,ye,"∁","\\complement",!0);P(W,fe,ye,"ð","\\eth",!0);P(Ge,ee,ye,"ð","ð");P(W,fe,ye,"╱","\\diagup");P(W,fe,ye,"╲","\\diagdown");P(W,fe,ye,"□","\\square");P(W,fe,ye,"□","\\Box");P(W,fe,ye,"◊","\\Diamond");P(W,fe,ye,"¥","\\yen",!0);P(Ge,fe,ye,"¥","\\yen",!0);P(W,fe,ye,"✓","\\checkmark",!0);P(Ge,fe,ye,"✓","\\checkmark");P(W,fe,ye,"ℶ","\\beth",!0);P(W,fe,ye,"ℸ","\\daleth",!0);P(W,fe,ye,"ℷ","\\gimel",!0);P(W,fe,ye,"ϝ","\\digamma",!0);P(W,fe,ye,"ϰ","\\varkappa");P(W,fe,ca,"┌","\\@ulcorner",!0);P(W,fe,hi,"┐","\\@urcorner",!0);P(W,fe,ca,"└","\\@llcorner",!0);P(W,fe,hi,"┘","\\@lrcorner",!0);P(W,fe,de,"≦","\\leqq",!0);P(W,fe,de,"⩽","\\leqslant",!0);P(W,fe,de,"⪕","\\eqslantless",!0);P(W,fe,de,"≲","\\lesssim",!0);P(W,fe,de,"⪅","\\lessapprox",!0);P(W,fe,de,"≊","\\approxeq",!0);P(W,fe,ht,"⋖","\\lessdot");P(W,fe,de,"⋘","\\lll",!0);P(W,fe,de,"≶","\\lessgtr",!0);P(W,fe,de,"⋚","\\lesseqgtr",!0);P(W,fe,de,"⪋","\\lesseqqgtr",!0);P(W,fe,de,"≑","\\doteqdot");P(W,fe,de,"≓","\\risingdotseq",!0);P(W,fe,de,"≒","\\fallingdotseq",!0);P(W,fe,de,"∽","\\backsim",!0);P(W,fe,de,"⋍","\\backsimeq",!0);P(W,fe,de,"⫅","\\subseteqq",!0);P(W,fe,de,"⋐","\\Subset",!0);P(W,fe,de,"⊏","\\sqsubset",!0);P(W,fe,de,"≼","\\preccurlyeq",!0);P(W,fe,de,"⋞","\\curlyeqprec",!0);P(W,fe,de,"≾","\\precsim",!0);P(W,fe,de,"⪷","\\precapprox",!0);P(W,fe,de,"⊲","\\vartriangleleft");P(W,fe,de,"⊴","\\trianglelefteq");P(W,fe,de,"⊨","\\vDash",!0);P(W,fe,de,"⊪","\\Vvdash",!0);P(W,fe,de,"⌣","\\smallsmile");P(W,fe,de,"⌢","\\smallfrown");P(W,fe,de,"≏","\\bumpeq",!0);P(W,fe,de,"≎","\\Bumpeq",!0);P(W,fe,de,"≧","\\geqq",!0);P(W,fe,de,"⩾","\\geqslant",!0);P(W,fe,de,"⪖","\\eqslantgtr",!0);P(W,fe,de,"≳","\\gtrsim",!0);P(W,fe,de,"⪆","\\gtrapprox",!0);P(W,fe,ht,"⋗","\\gtrdot");P(W,fe,de,"⋙","\\ggg",!0);P(W,fe,de,"≷","\\gtrless",!0);P(W,fe,de,"⋛","\\gtreqless",!0);P(W,fe,de,"⪌","\\gtreqqless",!0);P(W,fe,de,"≖","\\eqcirc",!0);P(W,fe,de,"≗","\\circeq",!0);P(W,fe,de,"≜","\\triangleq",!0);P(W,fe,de,"∼","\\thicksim");P(W,fe,de,"≈","\\thickapprox");P(W,fe,de,"⫆","\\supseteqq",!0);P(W,fe,de,"⋑","\\Supset",!0);P(W,fe,de,"⊐","\\sqsupset",!0);P(W,fe,de,"≽","\\succcurlyeq",!0);P(W,fe,de,"⋟","\\curlyeqsucc",!0);P(W,fe,de,"≿","\\succsim",!0);P(W,fe,de,"⪸","\\succapprox",!0);P(W,fe,de,"⊳","\\vartriangleright");P(W,fe,de,"⊵","\\trianglerighteq");P(W,fe,de,"⊩","\\Vdash",!0);P(W,fe,de,"∣","\\shortmid");P(W,fe,de,"∥","\\shortparallel");P(W,fe,de,"≬","\\between",!0);P(W,fe,de,"⋔","\\pitchfork",!0);P(W,fe,de,"∝","\\varpropto");P(W,fe,de,"◀","\\blacktriangleleft");P(W,fe,de,"∴","\\therefore",!0);P(W,fe,de,"∍","\\backepsilon");P(W,fe,de,"▶","\\blacktriangleright");P(W,fe,de,"∵","\\because",!0);P(W,fe,de,"⋘","\\llless");P(W,fe,de,"⋙","\\gggtr");P(W,fe,ht,"⊲","\\lhd");P(W,fe,ht,"⊳","\\rhd");P(W,fe,de,"≂","\\eqsim",!0);P(W,ee,de,"⋈","\\Join");P(W,fe,de,"≑","\\Doteq",!0);P(W,fe,ht,"∔","\\dotplus",!0);P(W,fe,ht,"∖","\\smallsetminus");P(W,fe,ht,"⋒","\\Cap",!0);P(W,fe,ht,"⋓","\\Cup",!0);P(W,fe,ht,"⩞","\\doublebarwedge",!0);P(W,fe,ht,"⊟","\\boxminus",!0);P(W,fe,ht,"⊞","\\boxplus",!0);P(W,fe,ht,"⋇","\\divideontimes",!0);P(W,fe,ht,"⋉","\\ltimes",!0);P(W,fe,ht,"⋊","\\rtimes",!0);P(W,fe,ht,"⋋","\\leftthreetimes",!0);P(W,fe,ht,"⋌","\\rightthreetimes",!0);P(W,fe,ht,"⋏","\\curlywedge",!0);P(W,fe,ht,"⋎","\\curlyvee",!0);P(W,fe,ht,"⊝","\\circleddash",!0);P(W,fe,ht,"⊛","\\circledast",!0);P(W,fe,ht,"⋅","\\centerdot");P(W,fe,ht,"⊺","\\intercal",!0);P(W,fe,ht,"⋒","\\doublecap");P(W,fe,ht,"⋓","\\doublecup");P(W,fe,ht,"⊠","\\boxtimes",!0);P(W,fe,de,"⇢","\\dashrightarrow",!0);P(W,fe,de,"⇠","\\dashleftarrow",!0);P(W,fe,de,"⇇","\\leftleftarrows",!0);P(W,fe,de,"⇆","\\leftrightarrows",!0);P(W,fe,de,"⇚","\\Lleftarrow",!0);P(W,fe,de,"↞","\\twoheadleftarrow",!0);P(W,fe,de,"↢","\\leftarrowtail",!0);P(W,fe,de,"↫","\\looparrowleft",!0);P(W,fe,de,"⇋","\\leftrightharpoons",!0);P(W,fe,de,"↶","\\curvearrowleft",!0);P(W,fe,de,"↺","\\circlearrowleft",!0);P(W,fe,de,"↰","\\Lsh",!0);P(W,fe,de,"⇈","\\upuparrows",!0);P(W,fe,de,"↿","\\upharpoonleft",!0);P(W,fe,de,"⇃","\\downharpoonleft",!0);P(W,ee,de,"⊶","\\origof",!0);P(W,ee,de,"⊷","\\imageof",!0);P(W,fe,de,"⊸","\\multimap",!0);P(W,fe,de,"↭","\\leftrightsquigarrow",!0);P(W,fe,de,"⇉","\\rightrightarrows",!0);P(W,fe,de,"⇄","\\rightleftarrows",!0);P(W,fe,de,"↠","\\twoheadrightarrow",!0);P(W,fe,de,"↣","\\rightarrowtail",!0);P(W,fe,de,"↬","\\looparrowright",!0);P(W,fe,de,"↷","\\curvearrowright",!0);P(W,fe,de,"↻","\\circlearrowright",!0);P(W,fe,de,"↱","\\Rsh",!0);P(W,fe,de,"⇊","\\downdownarrows",!0);P(W,fe,de,"↾","\\upharpoonright",!0);P(W,fe,de,"⇂","\\downharpoonright",!0);P(W,fe,de,"⇝","\\rightsquigarrow",!0);P(W,fe,de,"⇝","\\leadsto");P(W,fe,de,"⇛","\\Rrightarrow",!0);P(W,fe,de,"↾","\\restriction");P(W,ee,ye,"‘","`");P(W,ee,ye,"$","\\$");P(Ge,ee,ye,"$","\\$");P(Ge,ee,ye,"$","\\textdollar");P(W,ee,ye,"%","\\%");P(Ge,ee,ye,"%","\\%");P(W,ee,ye,"_","\\_");P(Ge,ee,ye,"_","\\_");P(Ge,ee,ye,"_","\\textunderscore");P(W,ee,ye,"∠","\\angle",!0);P(W,ee,ye,"∞","\\infty",!0);P(W,ee,ye,"′","\\prime");P(W,ee,ye,"△","\\triangle");P(W,ee,ye,"Γ","\\Gamma",!0);P(W,ee,ye,"Δ","\\Delta",!0);P(W,ee,ye,"Θ","\\Theta",!0);P(W,ee,ye,"Λ","\\Lambda",!0);P(W,ee,ye,"Ξ","\\Xi",!0);P(W,ee,ye,"Π","\\Pi",!0);P(W,ee,ye,"Σ","\\Sigma",!0);P(W,ee,ye,"Υ","\\Upsilon",!0);P(W,ee,ye,"Φ","\\Phi",!0);P(W,ee,ye,"Ψ","\\Psi",!0);P(W,ee,ye,"Ω","\\Omega",!0);P(W,ee,ye,"A","Α");P(W,ee,ye,"B","Β");P(W,ee,ye,"E","Ε");P(W,ee,ye,"Z","Ζ");P(W,ee,ye,"H","Η");P(W,ee,ye,"I","Ι");P(W,ee,ye,"K","Κ");P(W,ee,ye,"M","Μ");P(W,ee,ye,"N","Ν");P(W,ee,ye,"O","Ο");P(W,ee,ye,"P","Ρ");P(W,ee,ye,"T","Τ");P(W,ee,ye,"X","Χ");P(W,ee,ye,"¬","\\neg",!0);P(W,ee,ye,"¬","\\lnot");P(W,ee,ye,"⊤","\\top");P(W,ee,ye,"⊥","\\bot");P(W,ee,ye,"∅","\\emptyset");P(W,fe,ye,"∅","\\varnothing");P(W,ee,Ft,"α","\\alpha",!0);P(W,ee,Ft,"β","\\beta",!0);P(W,ee,Ft,"γ","\\gamma",!0);P(W,ee,Ft,"δ","\\delta",!0);P(W,ee,Ft,"ϵ","\\epsilon",!0);P(W,ee,Ft,"ζ","\\zeta",!0);P(W,ee,Ft,"η","\\eta",!0);P(W,ee,Ft,"θ","\\theta",!0);P(W,ee,Ft,"ι","\\iota",!0);P(W,ee,Ft,"κ","\\kappa",!0);P(W,ee,Ft,"λ","\\lambda",!0);P(W,ee,Ft,"μ","\\mu",!0);P(W,ee,Ft,"ν","\\nu",!0);P(W,ee,Ft,"ξ","\\xi",!0);P(W,ee,Ft,"ο","\\omicron",!0);P(W,ee,Ft,"π","\\pi",!0);P(W,ee,Ft,"ρ","\\rho",!0);P(W,ee,Ft,"σ","\\sigma",!0);P(W,ee,Ft,"τ","\\tau",!0);P(W,ee,Ft,"υ","\\upsilon",!0);P(W,ee,Ft,"ϕ","\\phi",!0);P(W,ee,Ft,"χ","\\chi",!0);P(W,ee,Ft,"ψ","\\psi",!0);P(W,ee,Ft,"ω","\\omega",!0);P(W,ee,Ft,"ε","\\varepsilon",!0);P(W,ee,Ft,"ϑ","\\vartheta",!0);P(W,ee,Ft,"ϖ","\\varpi",!0);P(W,ee,Ft,"ϱ","\\varrho",!0);P(W,ee,Ft,"ς","\\varsigma",!0);P(W,ee,Ft,"φ","\\varphi",!0);P(W,ee,ht,"∗","*",!0);P(W,ee,ht,"+","+");P(W,ee,ht,"−","-",!0);P(W,ee,ht,"⋅","\\cdot",!0);P(W,ee,ht,"∘","\\circ",!0);P(W,ee,ht,"÷","\\div",!0);P(W,ee,ht,"±","\\pm",!0);P(W,ee,ht,"×","\\times",!0);P(W,ee,ht,"∩","\\cap",!0);P(W,ee,ht,"∪","\\cup",!0);P(W,ee,ht,"∖","\\setminus",!0);P(W,ee,ht,"∧","\\land");P(W,ee,ht,"∨","\\lor");P(W,ee,ht,"∧","\\wedge",!0);P(W,ee,ht,"∨","\\vee",!0);P(W,ee,ye,"√","\\surd");P(W,ee,ca,"⟨","\\langle",!0);P(W,ee,ca,"∣","\\lvert");P(W,ee,ca,"∥","\\lVert");P(W,ee,hi,"?","?");P(W,ee,hi,"!","!");P(W,ee,hi,"⟩","\\rangle",!0);P(W,ee,hi,"∣","\\rvert");P(W,ee,hi,"∥","\\rVert");P(W,ee,de,"=","=");P(W,ee,de,":",":");P(W,ee,de,"≈","\\approx",!0);P(W,ee,de,"≅","\\cong",!0);P(W,ee,de,"≥","\\ge");P(W,ee,de,"≥","\\geq",!0);P(W,ee,de,"←","\\gets");P(W,ee,de,">","\\gt",!0);P(W,ee,de,"∈","\\in",!0);P(W,ee,de,"","\\@not");P(W,ee,de,"⊂","\\subset",!0);P(W,ee,de,"⊃","\\supset",!0);P(W,ee,de,"⊆","\\subseteq",!0);P(W,ee,de,"⊇","\\supseteq",!0);P(W,fe,de,"⊈","\\nsubseteq",!0);P(W,fe,de,"⊉","\\nsupseteq",!0);P(W,ee,de,"⊨","\\models");P(W,ee,de,"←","\\leftarrow",!0);P(W,ee,de,"≤","\\le");P(W,ee,de,"≤","\\leq",!0);P(W,ee,de,"<","\\lt",!0);P(W,ee,de,"→","\\rightarrow",!0);P(W,ee,de,"→","\\to");P(W,fe,de,"≱","\\ngeq",!0);P(W,fe,de,"≰","\\nleq",!0);P(W,ee,pl," ","\\ ");P(W,ee,pl," ","\\space");P(W,ee,pl," ","\\nobreakspace");P(Ge,ee,pl," ","\\ ");P(Ge,ee,pl," "," ");P(Ge,ee,pl," ","\\space");P(Ge,ee,pl," ","\\nobreakspace");P(W,ee,pl,"","\\nobreak");P(W,ee,pl,"","\\allowbreak");P(W,ee,Lm,",",",");P(W,ee,Lm,";",";");P(W,fe,ht,"⊼","\\barwedge",!0);P(W,fe,ht,"⊻","\\veebar",!0);P(W,ee,ht,"⊙","\\odot",!0);P(W,ee,ht,"⊕","\\oplus",!0);P(W,ee,ht,"⊗","\\otimes",!0);P(W,ee,ye,"∂","\\partial",!0);P(W,ee,ht,"⊘","\\oslash",!0);P(W,fe,ht,"⊚","\\circledcirc",!0);P(W,fe,ht,"⊡","\\boxdot",!0);P(W,ee,ht,"△","\\bigtriangleup");P(W,ee,ht,"▽","\\bigtriangledown");P(W,ee,ht,"†","\\dagger");P(W,ee,ht,"⋄","\\diamond");P(W,ee,ht,"⋆","\\star");P(W,ee,ht,"◃","\\triangleleft");P(W,ee,ht,"▹","\\triangleright");P(W,ee,ca,"{","\\{");P(Ge,ee,ye,"{","\\{");P(Ge,ee,ye,"{","\\textbraceleft");P(W,ee,hi,"}","\\}");P(Ge,ee,ye,"}","\\}");P(Ge,ee,ye,"}","\\textbraceright");P(W,ee,ca,"{","\\lbrace");P(W,ee,hi,"}","\\rbrace");P(W,ee,ca,"[","\\lbrack",!0);P(Ge,ee,ye,"[","\\lbrack",!0);P(W,ee,hi,"]","\\rbrack",!0);P(Ge,ee,ye,"]","\\rbrack",!0);P(W,ee,ca,"(","\\lparen",!0);P(W,ee,hi,")","\\rparen",!0);P(Ge,ee,ye,"<","\\textless",!0);P(Ge,ee,ye,">","\\textgreater",!0);P(W,ee,ca,"⌊","\\lfloor",!0);P(W,ee,hi,"⌋","\\rfloor",!0);P(W,ee,ca,"⌈","\\lceil",!0);P(W,ee,hi,"⌉","\\rceil",!0);P(W,ee,ye,"\\","\\backslash");P(W,ee,ye,"∣","|");P(W,ee,ye,"∣","\\vert");P(Ge,ee,ye,"|","\\textbar",!0);P(W,ee,ye,"∥","\\|");P(W,ee,ye,"∥","\\Vert");P(Ge,ee,ye,"∥","\\textbardbl");P(Ge,ee,ye,"~","\\textasciitilde");P(Ge,ee,ye,"\\","\\textbackslash");P(Ge,ee,ye,"^","\\textasciicircum");P(W,ee,de,"↑","\\uparrow",!0);P(W,ee,de,"⇑","\\Uparrow",!0);P(W,ee,de,"↓","\\downarrow",!0);P(W,ee,de,"⇓","\\Downarrow",!0);P(W,ee,de,"↕","\\updownarrow",!0);P(W,ee,de,"⇕","\\Updownarrow",!0);P(W,ee,ls,"∐","\\coprod");P(W,ee,ls,"⋁","\\bigvee");P(W,ee,ls,"⋀","\\bigwedge");P(W,ee,ls,"⨄","\\biguplus");P(W,ee,ls,"⋂","\\bigcap");P(W,ee,ls,"⋃","\\bigcup");P(W,ee,ls,"∫","\\int");P(W,ee,ls,"∫","\\intop");P(W,ee,ls,"∬","\\iint");P(W,ee,ls,"∭","\\iiint");P(W,ee,ls,"∏","\\prod");P(W,ee,ls,"∑","\\sum");P(W,ee,ls,"⨂","\\bigotimes");P(W,ee,ls,"⨁","\\bigoplus");P(W,ee,ls,"⨀","\\bigodot");P(W,ee,ls,"∮","\\oint");P(W,ee,ls,"∯","\\oiint");P(W,ee,ls,"∰","\\oiiint");P(W,ee,ls,"⨆","\\bigsqcup");P(W,ee,ls,"∫","\\smallint");P(Ge,ee,Uh,"…","\\textellipsis");P(W,ee,Uh,"…","\\mathellipsis");P(Ge,ee,Uh,"…","\\ldots",!0);P(W,ee,Uh,"…","\\ldots",!0);P(W,ee,Uh,"⋯","\\@cdots",!0);P(W,ee,Uh,"⋱","\\ddots",!0);P(W,ee,ye,"⋮","\\varvdots");P(Ge,ee,ye,"⋮","\\varvdots");P(W,ee,zr,"ˊ","\\acute");P(W,ee,zr,"ˋ","\\grave");P(W,ee,zr,"¨","\\ddot");P(W,ee,zr,"~","\\tilde");P(W,ee,zr,"ˉ","\\bar");P(W,ee,zr,"˘","\\breve");P(W,ee,zr,"ˇ","\\check");P(W,ee,zr,"^","\\hat");P(W,ee,zr,"⃗","\\vec");P(W,ee,zr,"˙","\\dot");P(W,ee,zr,"˚","\\mathring");P(W,ee,Ft,"","\\@imath");P(W,ee,Ft,"","\\@jmath");P(W,ee,ye,"ı","ı");P(W,ee,ye,"ȷ","ȷ");P(Ge,ee,ye,"ı","\\i",!0);P(Ge,ee,ye,"ȷ","\\j",!0);P(Ge,ee,ye,"ß","\\ss",!0);P(Ge,ee,ye,"æ","\\ae",!0);P(Ge,ee,ye,"œ","\\oe",!0);P(Ge,ee,ye,"ø","\\o",!0);P(Ge,ee,ye,"Æ","\\AE",!0);P(Ge,ee,ye,"Œ","\\OE",!0);P(Ge,ee,ye,"Ø","\\O",!0);P(Ge,ee,zr,"ˊ","\\'");P(Ge,ee,zr,"ˋ","\\`");P(Ge,ee,zr,"ˆ","\\^");P(Ge,ee,zr,"˜","\\~");P(Ge,ee,zr,"ˉ","\\=");P(Ge,ee,zr,"˘","\\u");P(Ge,ee,zr,"˙","\\.");P(Ge,ee,zr,"¸","\\c");P(Ge,ee,zr,"˚","\\r");P(Ge,ee,zr,"ˇ","\\v");P(Ge,ee,zr,"¨",'\\"');P(Ge,ee,zr,"˝","\\H");P(Ge,ee,zr,"◯","\\textcircled");var $P={"--":!0,"---":!0,"``":!0,"''":!0};P(Ge,ee,ye,"–","--",!0);P(Ge,ee,ye,"–","\\textendash");P(Ge,ee,ye,"—","---",!0);P(Ge,ee,ye,"—","\\textemdash");P(Ge,ee,ye,"‘","`",!0);P(Ge,ee,ye,"‘","\\textquoteleft");P(Ge,ee,ye,"’","'",!0);P(Ge,ee,ye,"’","\\textquoteright");P(Ge,ee,ye,"“","``",!0);P(Ge,ee,ye,"“","\\textquotedblleft");P(Ge,ee,ye,"”","''",!0);P(Ge,ee,ye,"”","\\textquotedblright");P(W,ee,ye,"°","\\degree",!0);P(Ge,ee,ye,"°","\\degree");P(Ge,ee,ye,"°","\\textdegree",!0);P(W,ee,ye,"£","\\pounds");P(W,ee,ye,"£","\\mathsterling",!0);P(Ge,ee,ye,"£","\\pounds");P(Ge,ee,ye,"£","\\textsterling",!0);P(W,fe,ye,"✠","\\maltese");P(Ge,fe,ye,"✠","\\maltese");var hA='0123456789/@."';for(var Lw=0;Lw{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 SA[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return oTn[i]}else{if(r===120485||r===120486)return SA[0];if(120486{if(Eu(e.classes)!==Eu(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},BP=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},We=function(n,t,r,s){var i=new qh(n,t,r,s);return G6(i),i},zu=(e,n,t,r)=>new qh(e,n,t,r),Sh=function(n,t,r){var s=We([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=nt(s.height),s.maxFontSize=1,s},_Tn=function(n,t,r,s){var i=new hy(n,t,r,s);return G6(i),i},ml=function(n){var t=new Hh(n);return G6(t),t},Ch=function(n,t){return n instanceof Hh?We([],[n],t):n},fTn=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=We(["mspace"],[],n),r=Or(e,n);return t.style.marginRight=nt(r),t},w1=(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},C5={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"}},FP={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},HP=function(n,t){var[r,s,i]=FP[n],a=new Nu(r),o=new _l([a],{width:nt(s),height:nt(i),style:"width:"+nt(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=zu(["overlay"],[o],t);return c.height=i,c.style.height=nt(i),c.style.width=nt(s),c},Rr={number:3,unit:"mu"},h_={number:4,unit:"mu"},Pc={number:5,unit:"mu"},dTn={mord:{mop:Rr,mbin:h_,mrel:Pc,minner:Rr},mop:{mord:Rr,mop:Rr,mrel:Pc,minner:Rr},mbin:{mord:h_,mop:h_,mopen:h_,minner:h_},mrel:{mord:Pc,mop:Pc,mopen:Pc,minner:Pc},mopen:{},mclose:{mop:Rr,mbin:h_,mrel:Pc,minner:Rr},mpunct:{mord:Rr,mop:Rr,mrel:Pc,mopen:Rr,mclose:Rr,mpunct:Rr,minner:Rr},minner:{mord:Rr,mop:Rr,mbin:h_,mrel:Pc,mopen:Rr,mpunct:Rr,minner:Rr}},hTn={mord:{mop:Rr},mop:{mord:Rr,mop:Rr},mbin:{},mrel:{},mopen:{},mclose:{mop:Rr},mpunct:{},minner:{mop:Rr}},qP={},eb={},tb={};function dt(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},c=0;c{var v=k.classes[0],b=x.classes[0];v==="mbin"&&mTn.has(b)?k.classes[0]="mord":b==="mbin"&&pTn.has(v)&&(x.classes[0]="mord")},{node:_},p,m),E5(i,(x,k)=>{var v,b,w=z5(k),y=z5(x),C=w&&y?x.hasClass("mtight")?(v=hTn[w])==null?void 0:v[y]:(b=dTn[w])==null?void 0:b[y]:null;if(C)return PP(C,u)},{node:_},p,m),i},E5=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(_+1,0,p),a++})(a)}s&&n.pop()},UP=function(n){return n instanceof Hh||n instanceof hy||n instanceof qh&&n.hasClass("enclosing")?n:null},N5=function(n,t){var r=UP(n);if(r){var s=r.children;if(s.length){if(t==="right")return N5(s[s.length-1],"right");if(t==="left")return N5(s[0],"left")}}return n},z5=function(n,t){if(!n)return null;t&&(n=N5(n,t));var r=n.classes[0];return vTn[r]||null},q0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return We(t.concat(r))},Ln=function(n,t,r){if(!n)return We();if(eb[n.type]){var s=eb[n.type](n,t);if(r&&t.size!==r.size){s=We(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Ze("Got group of unknown type: '"+n.type+"'")};function k1(e,n){var t=We(["base"],e,n),r=We(["strut"]);return r.style.height=nt(t.height+t.depth),t.depth&&(r.style.verticalAlign=nt(-t.depth)),t.children.unshift(r),t}function j5(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=vs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(k1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(k1(a,n));var u;t?(u=k1(vs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=We(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=nt(h.height+h.depth),h.depth&&(_.style.verticalAlign=nt(-h.depth))}return h}function GP(e){return new Hh(e)}class Je{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=Eu(this.classes));for(var r=0;r0&&(n+=' class ="'+Qs(Eu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class cs{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 VP{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",nt(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var bTn=new Set(["\\imath","\\jmath"]),yTn=new Set(["mrow","mtable"]),$a=function(n,t,r){return Er[t][n]&&Er[t][n].replace&&n.charCodeAt(0)!==55349&&!($P.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Er[t][n].replace),new cs(n)},V6=function(n){return n.length===1?n[0]:new Je("mrow",n)},xTn={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"},K6=(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=xTn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(bTn.has(i))return null;if(Er[r][i]){var a=Er[r][i].replace;a&&(i=a)}var o=C5[t].fontName;return q6(i,o,r)?C5[t].variant:null};function Pw(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof cs&&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 cs&&t.text===","}else return!1}var la=function(n,t,r){if(n.length===1){var s=fr(n[0],t);return r&&s instanceof Je&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Pw(a))){var u=c.children[0];u instanceof Je&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof cs&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof cs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),i.pop())}}}i.push(c),a=c}return i},ju=function(n,t,r){return V6(la(n,t,r))},fr=function(n,t){if(!n)return new Je("mrow");if(tb[n.type])return tb[n.type](n,t);throw new Ze("Got group of unknown type: '"+n.type+"'")};function CA(e,n,t,r,s){var i=la(e,t),a;i.length===1&&i[0]instanceof Je&&yTn.has(i[0].type)?a=i[0]:a=new Je("mrow",i);var o=new Je("annotation",[new cs(n)]);o.setAttribute("encoding","application/x-tex");var c=new Je("semantics",[a,o]),u=new Je("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return We([h],[u])}var wTn=[[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]],EA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],NA=function(n,t){return t.size<2?n:wTn[n-1][t.size-1]};class Kc{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||Kc.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=EA[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 Kc(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:NA(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:EA[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=NA(Kc.BASESIZE,n);return this.size===t&&this.textSize===Kc.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!==Kc.BASESIZE?["sizing","reset-size"+this.size,"size"+Kc.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=iTn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Kc.BASESIZE=6;var KP=function(n){return new Kc({style:n.displayMode?Yt.DISPLAY:Yt.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},WP=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=We(r,[n])}return n},kTn=function(n,t,r){var s=KP(r),i;if(r.output==="mathml")return CA(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=j5(n,s);i=We(["katex"],[a])}else{var o=CA(n,t,s,r.displayMode,!1),c=j5(n,s);i=We(["katex"],[o,c])}return WP(i,r)},STn=function(n,t,r){var s=KP(r),i=j5(n,s),a=We(["katex"],[i]);return WP(a,r)},CTn={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":"="},gy=function(n){var t=new Je("mo",[new cs(CTn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},ETn={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]},NTn=new Set(["widehat","widecheck","widetilde","utilde"]),vy=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(NTn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,_,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,_=c+"4"):(h=312,o=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][m],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var x=new Nu(_),k=new _l([x],{width:"100%",height:nt(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:zu([],[k],t),minWidth:0,height:p}}else{var v=[],b=ETn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[w,y,C]=b,N=C/1e3,z=w.length,T,j;if(z===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');T=["hide-tail"],j=[b[3]]}else if(z===2)T=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(z===3)T=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+z+" children.");for(var M=0;M0&&(s.style.minWidth=nt(i)),s},zTn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=We(["stretchy",t],[],i),t==="fbox"){var c=i.color&&i.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new b5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new b5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new _l(u,{width:"100%",height:nt(o)});a=zu([],[h],i)}return a.height=o,a.style.height=nt(o),a},jTn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},TTn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function ATn(e){return e in jTn}function rn(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 by(e){var n=yy(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 yy(e){return e&&(e.type==="atom"||TTn.hasOwnProperty(e.type))?e:null}var QP=e=>{if(e instanceof ra)return e;if(rTn(e)&&e.children.length===1)return QP(e.children[0])},W6=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=rn(e.base,"accent"),t=r.base,e.base=t,s=nTn(Ln(e,n)),e.base=r):(r=rn(e,"accent"),t=r.base);var i=Ln(t,n.havingCrampedStyle()),a=r.isShifty&&hl(t),o=0;if(a){var c,u;o=(c=(u=QP(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",_=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=vy(r,n),p=On({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+nt(2*o)+")",marginLeft:nt(2*o)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=HP("vec",n),x=FP.vec[1]):(m=my({mode:r.mode,text:r.label},n,"textord"),m=tTn(m),m.italic=0,x=m.width,h&&(_+=m.depth)),p=We(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),_=i.height);var v=o;k||(v-=x/2),p.style.left=nt(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=On({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=We(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},XP=(e,n)=>{var t=e.isStretchy?gy(e.label):new Je("mo",[$a(e.label,e.mode)]),r=new Je("mover",[fr(e.base,n),t]);return r.setAttribute("accent","true"),r},RTn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));dt({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=nb(n[0]),r=!RTn.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:W6,mathmlBuilder:XP});dt({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:W6,mathmlBuilder:XP});dt({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=Ln(e.base,n),r=vy(e,n),s=e.label==="\\utilde"?.12:0,i=On({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return We(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=gy(e.label),r=new Je("munder",[fr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var S1=e=>{var n=new Je("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};dt({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=Ch(Ln(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=Ch(Ln(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=vy(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var h;if(a){var _=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=On({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else h=On({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return We(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=gy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=S1(fr(e.body,n));if(e.below){var i=S1(fr(e.below,n));r=new Je("munderover",[t,i,s])}else r=new Je("mover",[t,s])}else if(e.below){var a=S1(fr(e.below,n));r=new Je("munder",[t,a])}else r=S1(),r=new Je("mover",[t,r]);return r}});function YP(e,n){var t=vs(e.body,n,!0);return We([e.mclass],t,n)}function ZP(e,n){var t,r=la(e.body,n);return e.mclass==="minner"?t=new Je("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Je("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Je("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}dt({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:os(s),isCharacterBox:hl(s)}},htmlBuilder:YP,mathmlBuilder:ZP});var xy=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"};dt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:xy(n[0]),body:os(n[1]),isCharacterBox:hl(n[1])}}});dt({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=xy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:os(s)},c={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:[c],isCharacterBox:hl(c)}},htmlBuilder:YP,mathmlBuilder:ZP});dt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:xy(n[0]),body:os(n[0])}},htmlBuilder(e,n){var t=vs(e.body,n,!0),r=We([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=la(e.body,n),r=new Je("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var MTn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},zA=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),jA=e=>e.type==="textord"&&e.text==="@",OTn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function DTn(e,n,t){var r=MTn[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]],[]),c={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[c],[])}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 LTn(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 Ze("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var x=DTn(u,h,e),k={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(k),o=zA()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=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:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}dt({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=Ch(Ln(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=nt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Je("mrow",[fr(e.label,n)]);return t=new Je("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Je("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});dt({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=Ch(Ln(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Je("mrow",[fr(e.fragment,n)])}});dt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=rn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Ze("\\@char with invalid code point "+i);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var JP=(e,n)=>{var t=vs(e.body,n.withColor(e.color),!1);return ml(t)},eF=(e,n)=>{var t=la(e.body,n.withColor(e.color)),r=new Je("mstyle",t);return r.setAttribute("mathcolor",e.color),r};dt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=rn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:os(s)}},htmlBuilder:JP,mathmlBuilder:eF});dt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=rn(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:JP,mathmlBuilder:eF});dt({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&&rn(s,"size").value}},htmlBuilder(e,n){var t=We(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=nt(Or(e.size,n)))),t},mathmlBuilder(e,n){var t=new Je("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",nt(Or(e.size,n)))),t}});var T5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},tF=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ze("Expected a control sequence",e);return n},ITn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},nF=(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)};dt({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(T5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=T5[r.text]),rn(n.parseFunction(),"internal");throw new Ze("Invalid token after macro prefix",r)}});dt({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 Ze("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 Ze('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Ze('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Ze("Expected a macro definition");o[i].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:i,delimiters:o},t===T5[t]),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=tF(n.gullet.popToken());n.gullet.consumeSpaces();var s=ITn(n);return nF(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=tF(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return nF(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var s0=function(n,t,r){var s=Er.math[n]&&Er.math[n].replace,i=q6(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},Q6=function(n,t,r,s){var i=r.havingBaseStyle(t),a=We(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},rF=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=nt(i),n.height-=i,n.depth+=i},$Tn=function(n,t,r,s,i,a){var o=li(n,"Main-Regular",i,s),c=Q6(o,t,s,a);return rF(c,s,t),c},BTn=function(n,t,r,s){return li(n,"Size"+t+"-Regular",r,s)},sF=function(n,t,r,s,i,a){var o=BTn(n,t,i,s),c=Q6(We(["delimsizing","size"+t],[o],s),Yt.TEXT,s,a);return r&&rF(c,s,Yt.TEXT),c},Fw=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=We(["delimsizinginner",s],[We([],[li(n,t,r)])]);return{type:"elem",elem:i}},Hw=function(n,t,r){var s=Go["Size4-Regular"][n.charCodeAt(0)]?Go["Size4-Regular"][n.charCodeAt(0)][4]:Go["Size1-Regular"][n.charCodeAt(0)][4],i=new Nu("inner",Wjn(n,Math.round(1e3*t))),a=new _l([i],{width:nt(s),height:nt(t),style:"width:"+nt(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=zu([],[a],r);return o.height=t,o.style.height=nt(t),o.style.width=nt(s),{type:"elem",elem:o}},A5=.008,C1={type:"kern",size:-1*A5},PTn=new Set(["|","\\lvert","\\rvert","\\vert"]),FTn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),iF=function(n,t,r,s,i,a){var o,c,u,h,_="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):PTn.has(n)?(u="∣",_="vert",p=333):FTn.has(n)?(u="∥",_="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",_="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",_="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",_="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",_="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",_="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",_="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",_="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",_="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var x=s0(o,m,i),k=x.height+x.depth,v=s0(u,m,i),b=v.height+v.depth,w=s0(h,m,i),y=w.height+w.depth,C=0,N=1;if(c!==null){var z=s0(c,m,i);C=z.height+z.depth,N=2}var T=k+y+C,j=Math.max(0,Math.ceil((t-T)/(N*b))),M=T+j*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,$=[];if(_.length>0){var q=M-k-y,H=Math.round(M*1e3),Q=Qjn(_,Math.round(q*1e3)),V=new Nu(_,Q),J=nt(p/1e3),Z=nt(H/1e3),B=new _l([V],{width:J,height:Z,viewBox:"0 0 "+p+" "+H}),L=zu([],[B],s);L.height=H/1e3,L.style.width=J,L.style.height=Z,$.push({type:"elem",elem:L})}else{if($.push(Fw(h,m,i)),$.push(C1),c===null){var F=M-k-y+2*A5;$.push(Hw(u,F,s))}else{var U=(M-k-y-C)/2+2*A5;$.push(Hw(u,U,s)),$.push(C1),$.push(Fw(c,m,i)),$.push(C1),$.push(Hw(u,U,s))}$.push(C1),$.push(Fw(o,m,i))}var K=s.havingBaseStyle(Yt.TEXT),ne=On({positionType:"bottom",positionData:I,children:$});return Q6(We(["delimsizing","mult"],[ne],K),Yt.TEXT,s,a)},qw=80,Uw=.08,Gw=function(n,t,r,s,i){var a=Kjn(n,s,r),o=new Nu(n,a),c=new _l([o],{width:"400em",height:nt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return zu(["hide-tail"],[c],i)},HTn=function(n,t){var r=t.havingBaseSizing(),s=uF("\\surd",n*r.sizeMultiplier,lF,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,_;return s.type==="small"?(h=1e3+1e3*a+qw,n<1?i=1:n<1.4&&(i=.7),c=(1+a+Uw)/i,u=(1+a)/i,o=Gw("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",_=.833/i):s.type==="large"?(h=(1e3+qw)*v0[s.size],u=(v0[s.size]+a)/i,c=(v0[s.size]+a+Uw)/i,o=Gw("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",_=1/i):(c=n+a+Uw,u=n+a,h=Math.floor(1e3*n+a)+qw,o=Gw("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",_=1.056),o.height=u,o.style.height=nt(c),{span:o,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},aF=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),qTn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),oF=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),v0=[0,1.2,1.8,2.4,3],cF=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),aF.has(n)||oF.has(n))return sF(n,t,!1,r,s,i);if(qTn.has(n))return iF(n,v0[t],!1,r,s,i);throw new Ze("Illegal delimiter: '"+n+"'")},UTn=[{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}],GTn=[{type:"small",style:Yt.SCRIPTSCRIPT},{type:"small",style:Yt.SCRIPT},{type:"small",style:Yt.TEXT},{type:"stack"}],lF=[{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"}],VTn=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.")},uF=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]},R5=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;oF.has(n)?o=UTn:aF.has(n)?o=lF:o=GTn;var c=uF(n,t,o,s);return c.type==="small"?$Tn(n,c.style,r,s,i,a):c.type==="large"?sF(n,c.size,r,s,i,a):iF(n,t,r,s,i,a)},Vw=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),_=Math.max(h/500*c,2*h-u);return R5(n,_,!0,s,i,a)},TA={"\\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}},KTn=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 AA(e){return"isMiddle"in e}function wy(e,n){var t=yy(e);if(t&&KTn.has(t.text))return t;throw t?new Ze("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ze("Invalid delimiter type '"+e.type+"'",e)}dt({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=wy(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:TA[e.funcName].size,mclass:TA[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?We([e.mclass]):cF(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push($a(e.delim,e.mode));var t=new Je("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=nt(v0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function RA(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}dt({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 Ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:wy(n[0],e).text,color:t}}});dt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=wy(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=rn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{RA(e);for(var t=vs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{RA(e);var t=la(e.body,n);if(e.left!=="."){var r=new Je("mo",[$a(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Je("mo",[$a(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return V6(t)}});dt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=wy(n[0],e);if(!e.parser.leftrightDepth)throw new Ze("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=q0(n,[]):(t=cF(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?$a("|","text"):$a(e.delim,e.mode),r=new Je("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var ky=(e,n)=>{var t=Ch(Ln(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=hl(e.body);if(r==="sout")i=We(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=Or({number:.6,unit:"pt"},n),u=Or({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=nt(_/2+c);var p=Math.floor(1e3*_*s),m=Gjn(p),x=new _l([new Nu("phase",m)],{width:"400em",height:nt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=zu(["hide-tail"],[x],n),i.style.height=nt(_),a=t.depth+c+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=zTn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=nt(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=nt(b),i.style.borderRightWidth=nt(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=On({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];w=On({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:y}]})}return/cancel/.test(r)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(r)&&!o?We(["mord","cancel-lap"],[w],n):We(["mord"],[w],n)},Sy=(e,n)=>{var t,r=new Je(e.label.includes("colorbox")?"mpadded":"menclose",[fr(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: "+nt(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};dt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=rn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:ky,mathmlBuilder:Sy});dt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=rn(n[0],"color-token").color,a=rn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:ky,mathmlBuilder:Sy});dt({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]}}});dt({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:ky,mathmlBuilder:Sy});dt({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:ky,mathmlBuilder:Sy});dt({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 _F={};function ic(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},c=0;c{var n=e.parser.settings;if(!n.displayMode)throw new Ze("{"+e.envName+"} can be used only in display mode.")},WTn=new Set(["gather","gather*"]);function X6(e){if(!e.includes("ed"))return!e.includes("*")}function Iu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,maxNumCols:_,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 Ze("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],k=[x],v=[],b=[],w=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new ea("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(MA(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:N};t&&(z={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[z]}),x.push(z);var T=e.fetch().text;if(T==="&"){if(_&&x.length===_){if(u||o)throw new Ze("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(T==="\\end"){C(),x.length===1&&z.type==="styling"&&z.body.length===1&&z.body[0].type==="ordgroup"&&z.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Be[rt]})}for(C(a[0]),r=0;r0&&(I+=w,TBe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var le,pe;oe=(le=(pe=K)==null?void 0:pe.pregap)!=null?le:p,oe!==0&&(Q=We(["arraycolsep"],[]),Q.style.width=nt(oe),H.push(Q))}var be=[];for(r=0;r0){for(var Ct=Sh("hline",t,h),Ht=Sh("hdashline",t,h),pt=[{type:"elem",elem:it,shift:0}];u.length>0;){var _t=u.pop(),Le=_t.pos-$;_t.isDashed?pt.push({type:"elem",elem:Ht,shift:Le}):pt.push({type:"elem",elem:Ct,shift:Le})}it=On({positionType:"individualShift",children:pt})}if(J.length===0)return We(["mord"],[it],t);var me=On({positionType:"individualShift",children:J}),Ae=We(["tag"],[me],t);return ml([it,Ae])},QTn={c:"center ",l:"left ",r:"right "},oc=function(n,t){for(var r=[],s=new Je("mtd",[],["mtr-glue"]),i=new Je("mtd",[],["mml-eqn-num"]),a=0;a0){var x=n.cols,k="",v=!1,b=0,w=x.length;x[0].type==="separator"&&(p+="top ",b=1),x[x.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var D=1;D0&&m&&(v=1),r[x]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};ic({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=yy(n[0]),r=t?[n[0]]:rn(n[0],"ordgroup").body,s=r.map(function(a){var o=by(a),c=o.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new Ze("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Iu(e.parser,i,Y6(e.envName))},htmlBuilder:ac,mathmlBuilder:oc});ic({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 Ze("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=Iu(e.parser,r,Y6(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:ac,mathmlBuilder:oc});ic({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Iu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=yy(n[0]),r=t?[n[0]]:rn(n[0],"ordgroup").body,s=r.map(function(o){var c=by(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Ze("Unknown column alignment: "+u,o)});if(s.length>1)throw new Ze("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=Iu(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ze("{subarray} can contain only one column");return a},htmlBuilder:ac,mathmlBuilder:oc});ic({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=Iu(e.parser,n,Y6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:dF,htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){WTn.has(e.envName)&&Cy(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:X6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Iu(e.parser,n,"display")},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:dF,htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Cy(e);var n={autoTag:X6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Iu(e.parser,n,"display")},htmlBuilder:ac,mathmlBuilder:oc});ic({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Cy(e),LTn(e.parser)},htmlBuilder:ac,mathmlBuilder:oc});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");dt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ze(e.funcName+" valid only within array environment")}});var OA=_F;dt({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 Ze("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return Ln(e.body,r)},pF=(e,n)=>{var t=e.font,r=n.withFont(t);return fr(e.body,r)},DA={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};dt({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=nb(n[0]),i=r;return i in DA&&(i=DA[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:hF,mathmlBuilder:pF});dt({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:xy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:hl(r)}}});dt({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:hF,mathmlBuilder:pF});var XTn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=Ln(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?x=3*p:x=7*p,k=n.fontMetrics().denom1):(_>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),k=n.fontMetrics().denom2);var v;if(h){var w=n.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new Je("mfrac",[fr(e.numer,n),fr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Or(e.barSize,n);t.setAttribute("linethickness",nt(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Je("mo",[new cs(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Je("mo",[new cs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return V6(s)}return t},mF=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};dt({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,c=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="(",c=")";break;case"\\\\bracefrac":a=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),mF({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:XTn,mathmlBuilder:YTn});dt({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 LA=["display","text","script","scriptscript"],IA=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};dt({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=nb(n[0]),a=i.type==="atom"&&i.family==="open"?IA(i.text):null,o=nb(n[1]),c=o.type==="atom"&&o.family==="close"?IA(o.text):null,u=rn(n[2],"size"),h,_=null;u.isBlank?h=!0:(_=u.value,h=_.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=rn(m.body[0],"textord");p=LA[Number(x.text)]}}else m=rn(m,"textord"),p=LA[Number(m.text)];return mF({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:_,leftDelim:a,rightDelim:c},p)}});dt({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:rn(n[0],"size").value,token:s}}});dt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=rn(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 gF=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?Ln(e.sup,n.havingStyle(t.sup()),n):Ln(e.sub,n.havingStyle(t.sub()),n),s=rn(e.base,"horizBrace")):s=rn(e,"horizBrace");var i=Ln(s.base,n.havingBaseStyle(Yt.DISPLAY)),a=vy(s,n),o;if(s.isOver?o=On({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=On({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 c=We(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=On({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=On({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return We(["minner",s.isOver?"mover":"munder"],[o],n)},ZTn=(e,n)=>{var t=gy(e.label);return new Je(e.isOver?"mover":"munder",[fr(e.base,n),t])};dt({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:gF,mathmlBuilder:ZTn});dt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=rn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:os(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=vs(e.body,n,!1);return _Tn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=ju(e.body,n);return t instanceof Je||(t=new Je("mrow",[t])),t.setAttribute("href",e.href),t}});dt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=rn(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=rn(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,c={};switch(r){case"\\htmlClass":c.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),h=0;h{var t=vs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=We(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)=>ju(e.body,n)});dt({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:os(n[0]),mathml:os(n[1])}},htmlBuilder:(e,n)=>{var t=vs(e.html,n,!1);return ml(t)},mathmlBuilder:(e,n)=>ju(e.mathml,n)});var Kw=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 Ze("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!OP(r))throw new Ze("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};dt({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 c=rn(t[0],"raw").string,u=c.split(","),h=0;h{var t=Or(e.height,n),r=0;e.totalheight.number>0&&(r=Or(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Or(e.width,n));var i={height:nt(t+r)};s>0&&(i.width=nt(s)),r>0&&(i.verticalAlign=nt(-r));var a=new Jjn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Je("mglyph",[]);t.setAttribute("alt",e.alt);var r=Or(e.height,n),s=0;if(e.totalheight.number>0&&(s=Or(e.totalheight,n)-r,t.setAttribute("valign",nt(-s))),t.setAttribute("height",nt(r+s)),e.width.number>0){var i=Or(e.width,n);t.setAttribute("width",nt(i))}return t.setAttribute("src",e.src),t}});dt({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=rn(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 PP(e.dimension,n)},mathmlBuilder(e,n){var t=Or(e.dimension,n);return new VP(t)}});dt({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=We([],[Ln(e.body,n)]),t=We(["inner"],[t],n)):t=We(["inner"],[Ln(e.body,n)]);var r=We(["fix"],[]),s=We([e.alignment],[t,r],n),i=We(["strut"]);return i.style.height=nt(s.height+s.depth),s.depth&&(i.style.verticalAlign=nt(-s.depth)),s.children.unshift(i),s=We(["thinbox"],[s],n),We(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Je("mpadded",[fr(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}});dt({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}}});dt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ze("Mismatched "+e.funcName)}});var $A=(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}};dt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:os(n[0]),text:os(n[1]),script:os(n[2]),scriptscript:os(n[3])}},htmlBuilder:(e,n)=>{var t=$A(e,n),r=vs(t,n,!1);return ml(r)},mathmlBuilder:(e,n)=>{var t=$A(e,n);return ju(t,n)}});var vF=(e,n,t,r,s,i,a)=>{e=We([],[e]);var o=t&&hl(t),c,u;if(n){var h=Ln(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var _=Ln(t,r.havingStyle(s.sub()),r);c={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=On({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:nt(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:nt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var x=e.height-a;p=On({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:nt(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=On({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:nt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=We(["mspace"],[],r);b.style.marginRight=nt(i),v.unshift(b)}return We(["mop","op-limits"],v,r)},bF=new Set(["\\smallint"]),Gh=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=rn(e.base,"op"),s=!0):i=rn(e,"op");var a=n.style,o=!1;a.size===Yt.DISPLAY.size&&i.symbol&&!bF.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=o?"Size2-Regular":"Size1-Regular",_="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(_=i.name.slice(1),i.name=_==="oiint"?"\\iint":"\\iiint"),c=li(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,_.length>0){var p=HP(_+"Size"+(o?"2":"1"),n);c=On({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(i.body){var m=vs(i.body,n,!0);m.length===1&&m[0]instanceof ra?(c=m[0],c.classes[0]="mop"):c=We(["mop"],m,n)}else{for(var x=[],k=1;k{var t;if(e.symbol)t=new Je("mo",[$a(e.name,e.mode)]),bF.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Je("mo",la(e.body,n));else{t=new Je("mi",[new cs(e.name.slice(1))]);var r=new Je("mo",[$a("⁡","text")]);e.parentIsSupSub?t=new Je("mrow",[t,r]):t=GP([t,r])}return t},JTn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dt({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=JTn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Gh,mathmlBuilder:Im});dt({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:os(r)}},htmlBuilder:Gh,mathmlBuilder:Im});var eAn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dt({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:Gh,mathmlBuilder:Im});dt({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:Gh,mathmlBuilder:Im});dt({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=eAn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Gh,mathmlBuilder:Im});var yF=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=rn(e.base,"operatorname"),s=!0):i=rn(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=vs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=la(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new cs(o)]}var c=new Je("mi",t);c.setAttribute("mathvariant","normal");var u=new Je("mo",[$a("⁡","text")]);return e.parentIsSupSub?new Je("mrow",[c,u]):GP([c,u])};dt({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:os(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:yF,mathmlBuilder:tAn});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Cf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?ml(vs(e.body,n,!1)):We(["mord"],vs(e.body,n,!0),n)},mathmlBuilder(e,n){return ju(e.body,n,!0)}});dt({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=Ln(e.body,n.havingCrampedStyle()),r=Sh("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=On({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return We(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new cs("‾")]);t.setAttribute("stretchy","true");var r=new Je("mover",[fr(e.body,n),t]);return r.setAttribute("accent","true"),r}});dt({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:os(r)}},htmlBuilder:(e,n)=>{var t=vs(e.body,n.withPhantom(),!1);return ml(t)},mathmlBuilder:(e,n)=>{var t=la(e.body,n);return new Je("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");dt({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=We(["inner"],[Ln(e.body,n.withPhantom())]),r=We(["fix"],[]);return We(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=la(os(e.body),n),r=new Je("mphantom",t),s=new Je("mpadded",[r]);return s.setAttribute("width","0px"),s}});dt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=rn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=Ln(e.body,n),r=Or(e.dy,n);return On({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[fr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});dt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});dt({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=rn(n[0],"size"),a=rn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&rn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=We(["mord","rule"],[],n),r=Or(e.width,n),s=Or(e.height,n),i=e.shift?Or(e.shift,n):0;return t.style.borderRightWidth=nt(r),t.style.borderTopWidth=nt(s),t.style.bottom=nt(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Or(e.width,n),r=Or(e.height,n),s=e.shift?Or(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Je("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",nt(t)),a.setAttribute("height",nt(r));var o=new Je("mpadded",[a]);return s>=0?o.setAttribute("height",nt(s)):(o.setAttribute("height",nt(s)),o.setAttribute("depth",nt(-s))),o.setAttribute("voffset",nt(s)),o}});function xF(e,n,t){for(var r=vs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return xF(e.body,t,n)};dt({type:"sizing",names:BA,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:BA.indexOf(r)+1,body:i}},htmlBuilder:nAn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=la(e.body,t),s=new Je("mstyle",r);return s.setAttribute("mathsize",nt(t.sizeMultiplier)),s}});dt({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]&&rn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=We([],[Ln(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 We(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Je("mpadded",[fr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});dt({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=Ln(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Ch(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=nt(h);var m=On({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(Yt.SCRIPTSCRIPT),k=Ln(e.index,x,n),v=.6*(m.height-m.depth),b=On({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),w=We(["root"],[b]);return We(["mord","sqrt"],[w,m],n)}else return We(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Je("mroot",[fr(t,n),fr(r,n)]):new Je("msqrt",[fr(t,n)])}});var M5={display:Yt.DISPLAY,text:Yt.TEXT,script:Yt.SCRIPT,scriptscript:Yt.SCRIPTSCRIPT};function rAn(e){return e in M5}dt({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(!rAn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=M5[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),xF(e.body,r,n)},mathmlBuilder(e,n){var t=M5[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=la(e.body,r),i=new Je("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 sAn=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?Gh:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===Yt.DISPLAY.size||r.limits);return i?yF:null}else{if(r.type==="accent")return hl(r.base)?W6:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?gF:null}else return null}else return null};Cf({type:"supsub",htmlBuilder(e,n){var t=sAn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=Ln(r,n),o,c,u=n.fontMetrics(),h=0,_=0,p=r&&hl(r);if(s){var m=n.havingStyle(n.style.sup());o=Ln(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());c=Ln(i,x,n),p||(_=a.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var k;n.style===Yt.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=nt(.5/u.ptPerEm/v),w=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof ra||y){var C;w=nt(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var z=u.defaultRuleThickness,T=4*z;if(h-o.depth-(c.height-_)0&&(h+=j,_-=j)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-h,marginRight:b}];N=On({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var D=[{type:"elem",elem:c,marginLeft:w,marginRight:b}];N=On({positionType:"shift",positionData:_,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=On({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=z5(a,"right")||"mord";return We([I],[a,We(["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=[fr(e.base,n)];e.sub&&i.push(fr(e.sub,n)),e.sup&&i.push(fr(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===Yt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===Yt.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===Yt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===Yt.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===Yt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===Yt.DISPLAY)?a="mover":a="msup"}return new Je(a,i)}});Cf({type:"atom",htmlBuilder(e,n){return U6(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Je("mo",[$a(e.text,e.mode)]);if(e.family==="bin"){var r=K6(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 wF={mi:"italic",mn:"normal",mtext:"normal"};Cf({type:"mathord",htmlBuilder(e,n){return my(e,n,"mathord")},mathmlBuilder(e,n){var t=new Je("mi",[$a(e.text,e.mode,n)]),r=K6(e,n)||"italic";return r!==wF[t.type]&&t.setAttribute("mathvariant",r),t}});Cf({type:"textord",htmlBuilder(e,n){return my(e,n,"textord")},mathmlBuilder(e,n){var t=$a(e.text,e.mode,n),r=K6(e,n)||"normal",s;return e.mode==="text"?s=new Je("mtext",[t]):/[0-9]/.test(e.text)?s=new Je("mn",[t]):e.text==="\\prime"?s=new Je("mo",[t]):s=new Je("mi",[t]),r!==wF[s.type]&&s.setAttribute("mathvariant",r),s}});var Ww={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Qw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Cf({type:"spacing",htmlBuilder(e,n){if(Qw.hasOwnProperty(e.text)){var t=Qw[e.text].className||"";if(e.mode==="text"){var r=my(e,n,"textord");return r.classes.push(t),r}else return We(["mspace",t],[U6(e.text,e.mode,n)],n)}else{if(Ww.hasOwnProperty(e.text))return We(["mspace",Ww[e.text]],[],n);throw new Ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Qw.hasOwnProperty(e.text))t=new Je("mtext",[new cs(" ")]);else{if(Ww.hasOwnProperty(e.text))return new Je("mspace");throw new Ze('Unknown type of space "'+e.text+'"')}return t}});var PA=()=>{var e=new Je("mtd",[]);return e.setAttribute("width","50%"),e};Cf({type:"tag",mathmlBuilder(e,n){var t=new Je("mtable",[new Je("mtr",[PA(),new Je("mtd",[ju(e.body,n)]),PA(),new Je("mtd",[ju(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var FA={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},HA={"\\textbf":"textbf","\\textmd":"textmd"},iAn={"\\textit":"textit","\\textup":"textup"},qA=(e,n)=>{var t=e.font;if(t){if(FA[t])return n.withTextFontFamily(FA[t]);if(HA[t])return n.withTextFontWeight(HA[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(iAn[t])};dt({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:os(s),font:r}},htmlBuilder(e,n){var t=qA(e,n),r=vs(e.body,t,!0);return We(["mord","text"],r,t)},mathmlBuilder(e,n){var t=qA(e,n);return ju(e.body,t)}});dt({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=Ln(e.body,n),r=Sh("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=On({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return We(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new cs("‾")]);t.setAttribute("stretchy","true");var r=new Je("munder",[fr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});dt({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=Ln(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return On({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[fr(e.body,n)],["vcenter"]);return new Je("mrow",[t])}});dt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=UA(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),gu=qP,kF=`[ \r + ]`,aAn="\\\\[a-zA-Z@]+",oAn="\\\\[^\uD800-\uDFFF]",cAn="("+aAn+")"+kF+"*",lAn=`\\\\( |[ \r ]+ -?)[ \r ]*`,O5="[̀-ͯ]",XTn=new RegExp(O5+"+$"),YTn="("+wF+"+)|"+(QTn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(O5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(O5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+WTn)+("|"+KTn+")");class UA{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(YTn,"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 ea("EOF",new zi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ze("Unexpected character: '"+n[t]+"'",new ea(n[t],new zi(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 ea(s,new zi(this,t,this.tokenRegex.lastIndex))}}class ZTn{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 Ze("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 JTn=_F;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 GA={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 Ze("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=GA[n.text],r==null||r>=t)throw new Ze("Invalid base-"+t+" digit "+n.text);for(var s;(s=GA[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ze("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Ze("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Ze("\\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 c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Ze("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ie("\\newcommand",e=>Z6(e,!1,!0,!1));ie("\\renewcommand",e=>Z6(e,!0,!1,!1));ie("\\providecommand",e=>Z6(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),gu[t],xr.math[t],xr.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 VA={",":"\\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"},eAn=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in VA?n=VA[t]:(t.slice(0,4)==="\\not"||t in xr.math&&eAn.has(xr.math[t].group))&&(n="\\dotsb"),n});var J6={")":!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 J6?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in J6&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in J6?"\\@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 Ze("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 kF=rt(Go["Main-Regular"][84][1]-.7*Go["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+kF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+kF+"}{\\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 SF=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 c=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=_;if(!_&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var u=n.consumeArg().tokens,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ie("\\bra@ket",SF(!1));ie("\\bra@set",SF(!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 CF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class tAn{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 ZTn(JTn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new UA(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 ea("EOF",r.loc)),this.pushTokens(s),new ea("",zi.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 Ze("Extra }",i)}else if(i.text==="EOF")throw new Ze("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 Ze("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ze("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 Ze("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 c=i[o];if(c.text==="#"){if(o===0)throw new Ze("Incomplete placeholder at end of macro body",c);if(c=i[--o],c.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(c.text))i.splice(o,2,...a[+c.text-1]);else throw new Ze("Not a valid argument number",c)}}}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 ea(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 UA(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||gu.hasOwnProperty(n)||xr.math.hasOwnProperty(n)||xr.text.hasOwnProperty(n)||CF.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:gu.hasOwnProperty(n)&&!gu[n].primitive}}var KA=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,E1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Xw={"́":{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"}},WA={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ey{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 tAn(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 Ze("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 ea("}")),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(Ey.endOfExpression.has(s.text)||t&&s.text===t||n&&gu[s.text]&&gu[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&&(RP(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:zi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:z}:void 0),z===!1?p.lastIndex=C+1:(x!==C&&w.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(z)?w.push(...z):z&&w.push(z),x=C+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=XA(e,"(");let i=XA(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 jF(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ef(t)||cy(t))&&(!n||t!==47)}TF.peek=OAn;function EAn(){this.buffer()}function NAn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function zAn(){this.buffer()}function jAn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function TAn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ao(this.sliceSerialize(e)).toLowerCase(),t.label=n}function AAn(e){this.exit(e)}function RAn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ao(this.sliceSerialize(e)).toLowerCase(),t.label=n}function MAn(e){this.exit(e)}function OAn(){return"["}function TF(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 DAn(){return{enter:{gfmFootnoteCallString:EAn,gfmFootnoteCall:NAn,gfmFootnoteDefinitionLabelString:zAn,gfmFootnoteDefinition:jAn},exit:{gfmFootnoteCallString:TAn,gfmFootnoteCall:AAn,gfmFootnoteDefinitionLabelString:RAn,gfmFootnoteDefinition:MAn}}}function LAn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:TF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?AF:IAn))),u(),c}}function IAn(e,n,t){return n===0?e:AF(e,n,t)}function AF(e,n,t){return(t?"":" ")+e}const $An=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RF.peek=qAn;function BAn(){return{canContainEols:["delete"],enter:{strikethrough:FAn},exit:{strikethrough:HAn}}}function PAn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$An}],handlers:{delete:RF}}}function FAn(e){this.enter({type:"delete",children:[]},e)}function HAn(e){this.exit(e)}function RF(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 qAn(){return"~"}function UAn(e){return e.length}function GAn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||UAn,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=y)}k.push(w)}a[h]=k,o[h]=v}let _=-1;if(typeof r=="object"&&"length"in r)for(;++_c[_]&&(c[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),o.splice(1,0,m),h=-1;const x=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),WAn);return s(),a}function WAn(e,n,t){return">"+(t?"":" ")+e}function QAn(e,n){return ZA(e,n.inConstruct,!0)&&!ZA(e,n.notInConstruct,!1)}function ZA(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 XAn(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 YAn(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 ZAn(e,n,t,r){const s=YAn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(XAn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(i,JAn);return _(),p}const o=t.createTracker(r),c=s.repeat(Math.max(MF(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const _=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` +?)[ \r ]*`,O5="[̀-ͯ]",uAn=new RegExp(O5+"+$"),_An="("+kF+"+)|"+(lAn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(O5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(O5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+cAn)+("|"+oAn+")");class GA{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(_An,"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 ea("EOF",new zi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ze("Unexpected character: '"+n[t]+"'",new ea(n[t],new zi(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 ea(s,new zi(this,t,this.tokenRegex.lastIndex))}}class fAn{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 Ze("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 dAn=fF;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 VA={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 Ze("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=VA[n.text],r==null||r>=t)throw new Ze("Invalid base-"+t+" digit "+n.text);for(var s;(s=VA[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ze("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Ze("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Ze("\\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 c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Ze("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ie("\\newcommand",e=>Z6(e,!1,!0,!1));ie("\\renewcommand",e=>Z6(e,!0,!1,!1));ie("\\providecommand",e=>Z6(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),gu[t],Er.math[t],Er.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 KA={",":"\\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"},hAn=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in KA?n=KA[t]:(t.slice(0,4)==="\\not"||t in Er.math&&hAn.has(Er.math[t].group))&&(n="\\dotsb"),n});var J6={")":!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 J6?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in J6&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in J6?"\\@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 Ze("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 SF=nt(Go["Main-Regular"][84][1]-.7*Go["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+SF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+SF+"}{\\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 CF=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 c=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=_;if(!_&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var u=n.consumeArg().tokens,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ie("\\bra@ket",CF(!1));ie("\\bra@set",CF(!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 EF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class pAn{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 fAn(dAn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new GA(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 ea("EOF",r.loc)),this.pushTokens(s),new ea("",zi.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 Ze("Extra }",i)}else if(i.text==="EOF")throw new Ze("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 Ze("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ze("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 Ze("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 c=i[o];if(c.text==="#"){if(o===0)throw new Ze("Incomplete placeholder at end of macro body",c);if(c=i[--o],c.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(c.text))i.splice(o,2,...a[+c.text-1]);else throw new Ze("Not a valid argument number",c)}}}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 ea(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 GA(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||gu.hasOwnProperty(n)||Er.math.hasOwnProperty(n)||Er.text.hasOwnProperty(n)||EF.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:gu.hasOwnProperty(n)&&!gu[n].primitive}}var WA=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,E1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Xw={"́":{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"}},QA={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ey{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 pAn(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 Ze("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 ea("}")),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(Ey.endOfExpression.has(s.text)||t&&s.text===t||n&&gu[s.text]&&gu[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&&(MP(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:zi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:z}:void 0),z===!1?p.lastIndex=C+1:(x!==C&&w.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(z)?w.push(...z):z&&w.push(z),x=C+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=YA(e,"(");let i=YA(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 TF(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||tf(t)||cy(t))&&(!n||t!==47)}AF.peek=WAn;function PAn(){this.buffer()}function FAn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function HAn(){this.buffer()}function qAn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UAn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ao(this.sliceSerialize(e)).toLowerCase(),t.label=n}function GAn(e){this.exit(e)}function VAn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ao(this.sliceSerialize(e)).toLowerCase(),t.label=n}function KAn(e){this.exit(e)}function WAn(){return"["}function AF(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 QAn(){return{enter:{gfmFootnoteCallString:PAn,gfmFootnoteCall:FAn,gfmFootnoteDefinitionLabelString:HAn,gfmFootnoteDefinition:qAn},exit:{gfmFootnoteCallString:UAn,gfmFootnoteCall:GAn,gfmFootnoteDefinitionLabelString:VAn,gfmFootnoteDefinition:KAn}}}function XAn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:AF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` +`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?RF:YAn))),u(),c}}function YAn(e,n,t){return n===0?e:RF(e,n,t)}function RF(e,n,t){return(t?"":" ")+e}const ZAn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];MF.peek=rRn;function JAn(){return{canContainEols:["delete"],enter:{strikethrough:tRn},exit:{strikethrough:nRn}}}function eRn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ZAn}],handlers:{delete:MF}}}function tRn(e){this.enter({type:"delete",children:[]},e)}function nRn(e){this.exit(e)}function MF(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 rRn(){return"~"}function sRn(e){return e.length}function iRn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||sRn,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=y)}k.push(w)}a[h]=k,o[h]=v}let _=-1;if(typeof r=="object"&&"length"in r)for(;++_c[_]&&(c[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),o.splice(1,0,m),h=-1;const x=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),cRn);return s(),a}function cRn(e,n,t){return">"+(t?"":" ")+e}function lRn(e,n){return JA(e,n.inConstruct,!0)&&!JA(e,n.notInConstruct,!1)}function JA(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 uRn(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 _Rn(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 fRn(e,n,t,r){const s=_Rn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(uRn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(i,dRn);return _(),p}const o=t.createTracker(r),c=s.repeat(Math.max(OF(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const _=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` `,encode:["`"],...o.current()})),_()}return h+=o.move(` `),i&&(h+=o.move(i+` -`)),h+=o.move(c),u(),h}function JAn(e,n,t){return(t?"":" ")+e}function nC(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 eRn(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":` -`,...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function tRn(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 U0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function rb(e,n,t){const r=yh(e),s=yh(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}}OF.peek=nRn;function OF(e,n,t,r){const s=tRn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),h=rb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=U0(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=rb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+U0(_));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function nRn(e,n,t){return t.options.emphasis||"*"}function rRn(e,n){let t=!1;return A6(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,o5}),!!((!e.depth||e.depth<3)&&L6(e)&&(n.options.setext||t))}function sRn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(rRn(e,t)){const h=t.enter("headingSetext"),_=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` +`)),h+=o.move(c),u(),h}function dRn(e,n,t){return(t?"":" ")+e}function nC(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 hRn(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":` +`,...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function pRn(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 U0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function rb(e,n,t){const r=wh(e),s=wh(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}}DF.peek=mRn;function DF(e,n,t,r){const s=pRn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),h=rb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=U0(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=rb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+U0(_));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function mRn(e,n,t){return t.options.emphasis||"*"}function gRn(e,n){let t=!1;return A6(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,o5}),!!((!e.depth||e.depth<3)&&L6(e)&&(n.options.setext||t))}function vRn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(gRn(e,t)){const h=t.enter("headingSetext"),_=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` `,after:` `});return _(),h(),p+` `+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const a="#".repeat(s),o=t.enter("headingAtx"),c=t.enter("phrasing");i.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` -`,...i.current()});return/^[\t ]/.test(u)&&(u=U0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}DF.peek=iRn;function DF(e){return e.value||""}function iRn(){return"<"}LF.peek=aRn;function LF(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function aRn(){return"!"}IF.peek=oRn;function IF(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const u=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function oRn(){return"!"}$F.peek=cRn;function $F(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))}PF.peek=lRn;function PF(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(BF(e,t)){const h=t.stack;t.stack=[],o=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),o(),t.stack=h,_}o=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=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),c()),u+=a.move(")"),o(),u}function lRn(e,n,t){return BF(e,t)?"<":"["}FF.peek=uRn;function FF(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function uRn(){return"["}function rC(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 _Rn(e){const n=rC(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 fRn(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 HF(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 dRn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?fRn(t):rC(t);const o=e.ordered?a==="."?")":".":_Rn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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&&(c=!0),HF(t)===a&&h){let _=-1;for(;++_-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 c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),h);return c(),u;function h(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?i:i+" ".repeat(a-i.length))+_}}function mRn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const gRn=Mm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vRn(e,n,t,r){return(e.children.some(function(a){return gRn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function bRn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}qF.peek=yRn;function qF(e,n,t,r){const s=bRn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),h=rb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=U0(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=rb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+U0(_));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function yRn(e,n,t){return t.options.strong||"*"}function xRn(e,n,t,r){return t.safe(e.value,r)}function wRn(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 kRn(e,n,t){const r=(HF(t)+(t.options.ruleSpaces?" ":"")).repeat(wRn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const UF={blockquote:KAn,break:JA,code:ZAn,definition:eRn,emphasis:OF,hardBreak:JA,heading:sRn,html:DF,image:LF,imageReference:IF,inlineCode:$F,link:PF,linkReference:FF,list:dRn,listItem:pRn,paragraph:mRn,root:vRn,strong:qF,text:xRn,thematicBreak:kRn};function SRn(){return{enter:{table:CRn,tableData:eR,tableHeader:eR,tableRow:NRn},exit:{codeText:zRn,table:ERn,tableData:e4,tableHeader:e4,tableRow:e4}}}function CRn(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 ERn(e){this.exit(e),this.data.inTable=void 0}function NRn(e){this.enter({type:"tableRow",children:[]},e)}function e4(e){this.exit(e)}function eR(e){this.enter({type:"tableCell",children:[]},e)}function zRn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,jRn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function jRn(e,n){return n==="|"?n:e}function TRn(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...i.current()});return/^[\t ]/.test(u)&&(u=U0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}LF.peek=bRn;function LF(e){return e.value||""}function bRn(){return"<"}IF.peek=yRn;function IF(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function yRn(){return"!"}$F.peek=xRn;function $F(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const u=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function xRn(){return"!"}BF.peek=wRn;function BF(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))}FF.peek=kRn;function FF(e,n,t,r){const s=nC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(PF(e,t)){const h=t.stack;t.stack=[],o=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),o(),t.stack=h,_}o=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=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),c()),u+=a.move(")"),o(),u}function kRn(e,n,t){return PF(e,t)?"<":"["}HF.peek=SRn;function HF(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function SRn(){return"["}function rC(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 CRn(e){const n=rC(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 ERn(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 qF(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 NRn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?ERn(t):rC(t);const o=e.ordered?a==="."?")":".":CRn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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&&(c=!0),qF(t)===a&&h){let _=-1;for(;++_-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 c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),h);return c(),u;function h(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?i:i+" ".repeat(a-i.length))+_}}function TRn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const ARn=Mm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function RRn(e,n,t,r){return(e.children.some(function(a){return ARn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function MRn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}UF.peek=ORn;function UF(e,n,t,r){const s=MRn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),h=rb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=U0(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=rb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+U0(_));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function ORn(e,n,t){return t.options.strong||"*"}function DRn(e,n,t,r){return t.safe(e.value,r)}function LRn(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 IRn(e,n,t){const r=(qF(t)+(t.options.ruleSpaces?" ":"")).repeat(LRn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const GF={blockquote:oRn,break:eR,code:fRn,definition:hRn,emphasis:DF,hardBreak:eR,heading:vRn,html:LF,image:IF,imageReference:$F,inlineCode:BF,link:FF,linkReference:HF,list:NRn,listItem:jRn,paragraph:TRn,root:RRn,strong:UF,text:DRn,thematicBreak:IRn};function $Rn(){return{enter:{table:BRn,tableData:tR,tableHeader:tR,tableRow:FRn},exit:{codeText:HRn,table:PRn,tableData:e4,tableHeader:e4,tableRow:e4}}}function BRn(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 PRn(e){this.exit(e),this.data.inTable=void 0}function FRn(e){this.enter({type:"tableRow",children:[]},e)}function e4(e){this.exit(e)}function tR(e){this.enter({type:"tableCell",children:[]},e)}function HRn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,qRn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function qRn(e,n){return n==="|"?n:e}function URn(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:c,tableRow:o}};function a(m,x,k,v){return u(h(m,k,v),m.align)}function o(m,x,k,v){const b=_(m,k,v),w=u([b]);return w.slice(0,w.indexOf(` -`))}function c(m,x,k,v){const b=k.enter("tableCell"),w=k.enter("phrasing"),y=k.containerPhrasing(m,{...v,before:i,after:i});return w(),b(),y}function u(m,x){return GAn(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function h(m,x,k){const v=m.children;let b=-1;const w=[],y=x.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const WRn={tokenize:nMn,partial:!0};function QRn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JRn,continuation:{tokenize:eMn},exit:tMn}},text:{91:{name:"gfmFootnoteCall",tokenize:ZRn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XRn,resolveTo:YRn}}}}function XRn(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return t(c);const u=ao(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function YRn(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 ZRn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(i>999||_===93&&!a||_===null||_===91||cr(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(ao(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(_)}return cr(_)||(a=!0),i++,e.consume(_),_===92?h:u}function h(_){return _===91||_===92||_===93?(e.consume(_),i++,u):u(_)}}function JRn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(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",h):t(x)}function h(x){if(a>999||x===93&&!o||x===null||x===91||cr(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=ao(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return cr(x)||(o=!0),a++,e.consume(x),x===92?_:h}function _(x){return x===91||x===92||x===93?(e.consume(x),a++,h):h(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(i)||s.push(i),ln(e,m,"gfmFootnoteDefinitionWhitespace")):t(x)}function m(x){return n(x)}}function eMn(e,n,t){return e.check(Dm,n,e.attempt(WRn,n,t))}function tMn(e){e.exit("gfmFootnoteDefinition")}function nMn(e,n,t){const r=this;return ln(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 rMn(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 c=-1;for(;++c1?c(x):(a.consume(x),_++,m);if(_<2&&!t)return c(x);const v=a.exit("strikethroughSequenceTemporary"),b=yh(x);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(x)}}}class sMn{constructor(){this.map=[]}add(n,t,r){iMn(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 iMn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const H=r.events[I][1].type;if(H==="lineEnding"||H==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,q=$==="tableHead"||$==="tableRow"?z:c;return q===z&&r.parser.lazy[r.now().line]?t(D):q(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Et(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):dn(D)?ln(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),_(D)))}function _(D){return D===null||D===124||cr(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?p:_)}function p(D){return D===92||D===124?(e.consume(D),_):_(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(D):(e.enter("tableDelimiterRow"),a=!1,dn(D)?ln(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):x(D))}function x(D){return D===45||D===58?v(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):N(D)}function k(D){return dn(D)?ln(e,v,"whitespace")(D):v(D)}function v(D){return D===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),b):D===45?(i+=1,b(D)):D===null||Et(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),w(D)):N(D)}function w(D){return D===45?(e.consume(D),w):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(D))}function y(D){return dn(D)?ln(e,C,"whitespace")(D):C(D)}function C(D){return D===124?x(D):D===null||Et(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function z(D){return e.enter("tableRow"),T(D)}function T(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),T):D===null||Et(D)?(e.exit("tableRow"),n(D)):dn(D)?ln(e,T,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||cr(D)?(e.exit("data"),T(D)):(e.consume(D),D===92?M:j)}function M(D){return D===92||D===124?(e.consume(D),j):j(D)}}function lMn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,h,_;const p=new sMn;for(;++tt[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",_,n]])}return s!==void 0&&(i.end=Object.assign({},Sd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function nR(e,n,t,r,s){const i=[],a=Sd(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 Sd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const uMn={name:"tasklistCheck",tokenize:fMn};function _Mn(){return{text:{91:uMn}}}function fMn(e,n,t){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return cr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return Et(c)?n(c):dn(c)?e.check({tokenize:dMn},n,t)(c):t(c)}}function dMn(e,n,t){return ln(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function hMn(e){return oP([BRn(),QRn(),rMn(e),oMn(),_Mn()])}const pMn={};function JF(e){const n=this,t=e||pMn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(hMn(t)),i.push(DRn()),a.push(LRn(t))}function mMn(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(c){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]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const _=h.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.data.hChildren.push({type:"text",value:u})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function gMn(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,c){const u=i.value||"",h=o.createTracker(c),_="$".repeat(Math.max(MF(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(_);if(i.meta){const x=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` +`))}function c(m,x,k,v){const b=k.enter("tableCell"),w=k.enter("phrasing"),y=k.containerPhrasing(m,{...v,before:i,after:i});return w(),b(),y}function u(m,x){return iRn(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function h(m,x,k){const v=m.children;let b=-1;const w=[],y=x.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const cMn={tokenize:mMn,partial:!0};function lMn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dMn,continuation:{tokenize:hMn},exit:pMn}},text:{91:{name:"gfmFootnoteCall",tokenize:fMn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uMn,resolveTo:_Mn}}}}function uMn(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return t(c);const u=ao(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function _Mn(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 fMn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(i>999||_===93&&!a||_===null||_===91||_r(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(ao(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(_)}return _r(_)||(a=!0),i++,e.consume(_),_===92?h:u}function h(_){return _===91||_===92||_===93?(e.consume(_),i++,u):u(_)}}function dMn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(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",h):t(x)}function h(x){if(a>999||x===93&&!o||x===null||x===91||_r(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=ao(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return _r(x)||(o=!0),a++,e.consume(x),x===92?_:h}function _(x){return x===91||x===92||x===93?(e.consume(x),a++,h):h(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(i)||s.push(i),un(e,m,"gfmFootnoteDefinitionWhitespace")):t(x)}function m(x){return n(x)}}function hMn(e,n,t){return e.check(Dm,n,e.attempt(cMn,n,t))}function pMn(e){e.exit("gfmFootnoteDefinition")}function mMn(e,n,t){const r=this;return un(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 gMn(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 c=-1;for(;++c1?c(x):(a.consume(x),_++,m);if(_<2&&!t)return c(x);const v=a.exit("strikethroughSequenceTemporary"),b=wh(x);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(x)}}}class vMn{constructor(){this.map=[]}add(n,t,r){bMn(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 bMn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const H=r.events[I][1].type;if(H==="lineEnding"||H==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,q=$==="tableHead"||$==="tableRow"?z:c;return q===z&&r.parser.lazy[r.now().line]?t(D):q(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Tt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):mn(D)?un(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),_(D)))}function _(D){return D===null||D===124||_r(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?p:_)}function p(D){return D===92||D===124?(e.consume(D),_):_(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(D):(e.enter("tableDelimiterRow"),a=!1,mn(D)?un(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):x(D))}function x(D){return D===45||D===58?v(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):N(D)}function k(D){return mn(D)?un(e,v,"whitespace")(D):v(D)}function v(D){return D===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),b):D===45?(i+=1,b(D)):D===null||Tt(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),w(D)):N(D)}function w(D){return D===45?(e.consume(D),w):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(D))}function y(D){return mn(D)?un(e,C,"whitespace")(D):C(D)}function C(D){return D===124?x(D):D===null||Tt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function z(D){return e.enter("tableRow"),T(D)}function T(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),T):D===null||Tt(D)?(e.exit("tableRow"),n(D)):mn(D)?un(e,T,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||_r(D)?(e.exit("data"),T(D)):(e.consume(D),D===92?M:j)}function M(D){return D===92||D===124?(e.consume(D),j):j(D)}}function kMn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,h,_;const p=new vMn;for(;++tt[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",_,n]])}return s!==void 0&&(i.end=Object.assign({},Ed(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function rR(e,n,t,r,s){const i=[],a=Ed(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 Ed(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const SMn={name:"tasklistCheck",tokenize:EMn};function CMn(){return{text:{91:SMn}}}function EMn(e,n,t){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return _r(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return Tt(c)?n(c):mn(c)?e.check({tokenize:NMn},n,t)(c):t(c)}}function NMn(e,n,t){return un(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function zMn(e){return cP([JRn(),lMn(),gMn(e),xMn(),CMn()])}const jMn={};function eH(e){const n=this,t=e||jMn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(zMn(t)),i.push(QRn()),a.push(XRn(t))}function TMn(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(c){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]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const _=h.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.data.hChildren.push({type:"text",value:u})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function AMn(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,c){const u=i.value||"",h=o.createTracker(c),_="$".repeat(Math.max(OF(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(_);if(i.meta){const x=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` `,before:m,encode:["$"],...h.current()})),x()}return m+=h.move(` `),u&&(m+=h.move(u+` -`)),m+=h.move(_),p(),m}function r(i,a,o){let c=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const h="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function L5(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 c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!c)break;r+=c[0].length,t+=c[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 zMn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||G0(e,n)||Sh(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`)),m+=h.move(_),p(),m}function r(i,a,o){let c=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const h="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function L5(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 c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!c)break;r+=c[0].length,t+=c[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 HMn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||G0(e,n)||Eh(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=L5(i);return a.indentation<=3&&r+a.offset===n}function jMn(e,n){const t=e[n],r=Sh(e,n,t),s=e.lastIndexOf(` +`,n),i=e.slice(r,s===-1?e.length:s),a=L5(i);return a.indentation<=3&&r+a.offset===n}function qMn(e,n){const t=e[n],r=Eh(e,n,t),s=e.lastIndexOf(` `,n-1)+1,i=e.indexOf(` `,n),a=L5(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&&_.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function TMn(e,n,t){const r=Sh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function RMn(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 OMn(e,{predictMath:n=!1}={}){const t=RMn(e),r=new Set,s=new Set;for(let u=0;u=a.listIndent&&_.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function UMn(e,n,t){const r=Eh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function VMn(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 WMn(e,{predictMath:n=!1}={}){const t=VMn(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}`)),OMn(t,n)}function nH(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 IMn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function $r(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=IMn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const rH=A.createContext(void 0);function sH({projectId:e,sessionId:n,children:t}){const r=A.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=RB(s);return a?(a.source==="absolute"?PL(a.path):a.source==="artifact"&&!i?Q_(e,a.path):g3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return f.jsx(rH,{value:r,children:t})}function $Mn({src:e,alt:n,name:t,onClose:r}){const s=A.useRef(null),i=A.useRef(null),[a,o]=A.useState(1),[c,u]=A.useState({width:0,height:0}),[h,_]=A.useState({width:0,height:0});A.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const x=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return x&&k.observe(x),()=>{k.disconnect(),m==null||m.close()}},[]);const p=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return oa.createPortal(f.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||ED(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[f.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:f.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:f.jsx("img",{src:e,alt:n,onLoad:m=>_({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),f.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[f.jsx(Cm,{shape:"circle",href:e,download:t||!0,"aria-label":Ev(),title:Ev(),className:"bg-background shadow-popover",children:f.jsx(fS,{size:16})}),f.jsx(Lt,{shape:"circle",onClick:r,"aria-label":p3(),title:p3(),className:"bg-background shadow-popover",children:f.jsx(or,{size:16})})]}),f.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&f.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),f.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[f.jsx(Lt,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":VN(),title:VN(),children:f.jsx(V4n,{size:16})}),f.jsxs(De,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:KN(),"aria-label":KN(),children:[Math.round(a*100),"%"]}),f.jsx(Lt,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":GN(),title:GN(),children:f.jsx(Dh,{size:16})})]})]})]}),document.body)}function BMn({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=A.useState(!1),[o,c]=A.useState(!1),u=i&&n?n:e;return f.jsxs(f.Fragment,{children:[f.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&f.jsx($Mn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const PMn=1e5;function FMn({code:e,lang:n}){const[t,r]=A.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return f.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[f.jsx(Lt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:Vk(),"aria-label":Det(),onClick:s,children:t?f.jsx(Xi,{size:13}):f.jsx(Oh,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:Ikn(e,n,PMn)})})]})}function HMn(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 aR(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(),c=HMn(a[2]??"");if(!c[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:n4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:n4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(siH(e)}function UMn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");t.properties[s]=s==="src"&&t.tagName==="img"&&k6(i)?i:CP(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function cR({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 f.jsxs("button",{className:"file-chip",title:r?FY({path:Ne(e)}):e,...$r(o=>r==null?void 0:r(e,i,t,void 0,o)),disabled:!r,children:[f.jsx(II,{size:12}),f.jsx("span",{className:"file-chip-label",children:a}),f.jsx(UI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function GMn({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?hZ({id:Ne(e)}):pJ({id:Ne(e)}),...$r(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(gS,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||ML()}),f.jsx(UI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const aH={singleDollarTextMath:!0},VMn=_y().use(dy).use(JF).use(eH,aH).use(NMn).use(qMn).use(Xv).use(UMn).use(zF);function KMn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const oH={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 f.jsx("code",{className:s,...r,children:t});const c=i?F3(i[1]):null;return f.jsx(FMn,{code:a,lang:c})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})};function WMn({children:e}){return f.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const Jo=A.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){hf();const o=A.useContext(rH),c=i??o,u=A.useMemo(()=>({"file-mention":h=>f.jsx(cR,{path:h.path,lines:h.lines,exp:h.exp,onOpenFile:t}),"run-mention":h=>f.jsx(GMn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:_,children:p,"data-figure-src":m,...x})=>{const k=typeof m=="string"?RB(m):null;if(k&&t){const v=k.source==="artifact"?`artifacts/${k.path}`:k.path,b=s?s(v):v;if(b)return f.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...$r(w=>t(b,void 0,void 0,void 0,w)),children:p})}if(_&&KMn(_)&&t){let v;try{v=decodeURI(_)}catch{return f.jsx("span",{children:p})}const b=s?s(v):v;return b?f.jsx(cR,{path:b,onOpenFile:t}):f.jsx("span",{children:p})}return f.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",...x,children:p})},figure:({children:h})=>f.jsx(WMn,{children:h}),figcaption:({children:h})=>f.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,..._})=>f.jsx("th",{dir:"auto",..._}),td:({node:h,..._})=>f.jsx("td",{dir:"auto",..._}),img:({node:h,src:_,alt:p,className:m,...x})=>{var v;if(!_||typeof _!="string")return null;const k=c?c(_):_;return k?A.createElement(BMn,{...x,key:k,downloadName:(v=_.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(_,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...oH}),[t,r,s,i,o,c]);return f.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:f.jsx(Rzn,{content:nH(n,{predictMath:a}),processor:VMn,components:u,predict:a})})}),lR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function QMn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=A.useState(!1),u=A.useRef(null),[h,_]=A.useState(!1),[p,m]=A.useState(""),x=A.useRef(null);A.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),A.useEffect(()=>{var v;h&&((v=x.current)==null||v.focus())},[h]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),_(!1)};return f.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:[f.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[f.jsx(gS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),f.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?rxt({agent:Ne(n)}):Xyt({agent:Ne(n)})}),f.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",...$r(t),children:kxt()})]}),h?f.jsxs(f.Fragment,{children:[f.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:Yxt(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),_(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:lR,children:[f.jsx(De,{size:"small",onClick:()=>{m(""),_(!1)},children:nL()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(De,{size:"small",variant:"primary",onClick:k,children:[Ixt(),f.jsx(LI,{size:13})]})]})]}):f.jsxs("div",{className:lR,children:[f.jsx(De,{size:"small",onClick:i,children:Txt()}),f.jsx(De,{size:"small",onClick:()=>_(!0),children:Uxt()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[f.jsx(De,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:jyt()}),f.jsx(De,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":mxt(),onClick:()=>c(v=>!v),children:f.jsx(rc,{size:13})}),o&&f.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:f.jsx(Yn,{onClick:()=>{c(!1),r("bypassPermissions")},children:Lyt()})})]}):f.jsx(De,{size:"small",variant:"primary",onClick:()=>r(),children:qyt()})]})]})}function uR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=A.useState(""),[o,c]=A.useState(!1),[u,h]=A.useState(null);async function _(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(m instanceof Error?m.message:String(m))}finally{c(!1)}}}return f.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:_,children:[f.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),f.jsx(De,{type:"submit",disabled:o||!i.trim(),children:o?ia():nc()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??JVe()}),u&&f.jsx("div",{className:"error",children:u})]})}function cH({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return f.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[f.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:f.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)&&f.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[f.jsx("span",{children:t??`${i}%`}),r]})]})}function XMn({settings:e}){const[n,t]=A.useState(!1);return f.jsxs("label",{className:"inline-flex max-w-full flex-wrap items-center gap-2 text-sm text-subtext",children:[oln(),f.jsx("span",{className:"inline-block w-max max-w-full",children:f.jsx(Yo,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:vL()},...e.defaultHost&&!e.hosts.some(r=>r.host===e.defaultHost)?[{id:e.defaultHost,label:e.defaultHost}]:[],...e.hosts.map(r=>({id:r.host,label:r.host}))],onSelect:r=>{t(!0),zbn(r||null).catch(s=>{mn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function YMn({host:e,connecting:n,reference:t,onChange:r}){const s=A.useId(),i=an({mutationFn:Nbn,scope:{id:`ssh-settings-${e.host}`}});function a(o){r(o),i.reset(),!(o!==null&&!o.trim())&&i.mutate({host:e.host,container:(o==null?void 0:o.trim())??null})}return f.jsxs("details",{className:"pb-3",children:[f.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-subtext focus-visible:outline-2 focus-visible:outline-text",children:KD()}),f.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[f.jsxs("label",{className:"text-sm text-subtext",children:[zln(),f.jsx(Yo,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:hln()},{id:"container",label:xln()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&f.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[eln(),f.jsx(Ir,{id:`${s}-container`,value:t,disabled:n,required:!0,onChange:o=>a(o.target.value)})]}),i.error&&f.jsx("p",{className:"m-0 text-sm text-accent-red",role:"status",children:i.error.message})]})]})}const ec=["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(" "),tf=["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(" "),ZMn=["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(" "),Ny="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",Da=["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(" "),iC=["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(" "),nl=["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(" "),I5=["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(" "),v0=["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(" "),JMn=new Set(["gh auth login","hf auth login","claude auth status"]);function lH(e){return JMn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function zy(){const[e,n]=A.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function aC({note:e,className:n,disabled:t,resolve:r=lH,onRun:s}){return e?f.jsx("p",{className:n,children:ph(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function jy({run:e,onComplete:n,onClose:t}){return e?f.jsx(K3n,{path:e.path,label:e.command,onComplete:n,onError:r=>mn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function r4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:K_()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:QD()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="local"?Wk():ZQt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:tFt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:XD()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:h3()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:fZt()}:{cls:"warn",variant:"warning",label:bL()}:{cls:"warn",variant:"warning",label:EGt()}}function eOn({h:e}){return e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod?f.jsx(f.Fragment,{children:Ljt()}):e.authMethod?e.authMethod==="local"?f.jsx(f.Fragment,{children:zv()}):f.jsx(f.Fragment,{children:e.authMethod==="oauth"?qOt():Kk()}):f.jsx(f.Fragment,{children:"—"})}function tOn(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function nOn({remote:e}){const n=ku(),{data:t=null}=ut(n),[r,s]=A.useState(null),[i,a]=A.useState(!1),o=zy(),[c,u]=A.useState(null),h=ut(eI()),_=(x,k=!1)=>{a(!0),X_(x,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((x,k)=>Number(k.agentReady)-Number(x.agentReady)),m=p.find(x=>x.id===r)??p[0];return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:d3()}),!e&&c&&h.data&&f.jsx(c$,{harness:c,commands:h.data[c.id],onClose:()=>u(null)}),f.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:f.jsx(Yo,{variant:"field",dropDown:!0,title:d3(),choices:p.map(x=>({id:x.id,label:x.name})),value:(m==null?void 0:m.id)??null,onSelect:x=>{const k=p.find(v=>v.id===x);k&&s(k.id)},renderIcon:x=>{const k=p.find(v=>v.id===x.id);return k&&f.jsx(mh,{harness:k.id})},renderLabel:x=>{const k=p.find(b=>b.id===x.id),v=k&&r4(k);return f.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[x.label,v&&f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),f.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?f.jsxs("div",{className:ec,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Ht,{variant:r4(m).variant,children:r4(m).label}),f.jsx("div",{className:"spacer flex-1"}),!e&&!m.catalogPending&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported"&&f.jsxs(De,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[f.jsx(mf,{size:14})," ",PD()]}),f.jsxs(De,{size:"small",onClick:()=>_(!0,!0),disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),f.jsxs("div",{className:fs(tf,"[&_.v]:text-sm"),children:[f.jsx("span",{className:"k",children:wLt()}),f.jsx("span",{className:"v",children:m.binPath??mOt()}),f.jsx("span",{className:"k",children:CL()}),f.jsx("span",{className:"v",children:m.version??"—"}),f.jsx("span",{className:"k",children:qDt()}),f.jsx("span",{className:"v",children:f.jsx(eOn,{h:m})}),m.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:m.id==="opencode"?vJt():Zk()}),f.jsx("span",{className:"v",children:m.account})]}),m.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:$Vt()}),f.jsx("span",{className:"v",children:m.org})]}),m.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:BKt()}),f.jsx("span",{className:"v",children:m.plan})]}),f.jsx("span",{className:"k",children:TDt()}),f.jsx("span",{className:"v",children:m.catalogPending?K_():m.models.length>0?lMt({count:Wt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(x=>Ne(K1(x))))}):Yk()})]}),f.jsx(aC,{note:m.agentNote,className:fs(Da,"text-sm"),disabled:e,resolve:x=>{var k;return tOn(m,(k=h.data)==null?void 0:k[m.id],x)??lH(x)},onRun:(x,k)=>o.start(x,k,m.id)}),o.run&&f.jsx("div",{hidden:o.run.owner!==m.id,children:f.jsx(jy,{run:o.run,onComplete:()=>_(!0,!0),onClose:o.clear})}),m.id==="opencode"&&f.jsx(d$,{installed:m.installed})]}):null:f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",mBt()]})]})}function rOn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Ht,{variant:"success",children:WIt()}):f.jsx(Ht,{variant:"error",children:EUt()}):f.jsx(Ht,{variant:"error",children:zIt()}):f.jsx(Ht,{variant:"error",children:HFt()})}function sOn({onEditState:e}){var T;const n=an({mutationFn:vbn}),t=Hz(),r=ut(t),s=r.data??null,i=j=>{Vr(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((T=r.error)==null?void 0:T.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(null),b=j=>{i(j),c(j.context??""),h(j.namespace)},w=A.useRef(null);A.useEffect(()=>{const j=w.current;w.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const y=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!y;A.useEffect(()=>{e==null||e({dirty:C,saving:_})},[C,_,e]);async function N(){if(!(m||_||!y)){x(!0);try{await nt.fetchQuery({...Hz(),staleTime:0})}catch(j){mn(j instanceof Error?j.message:String(j),"error")}finally{x(!1)}}}async function z(j){if(j.preventDefault(),!(_||m)){p(!0),v(null);try{b(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0",children:m||_?f.jsx(Ht,{children:ta()}):C?f.jsx(Ht,{children:LD()}):f.jsx(rOn,{s})})]}),y&&!m&&!_&&s.preflight.error&&f.jsx("p",{className:`${Ny} break-words`,children:s.preflight.error}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:z,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[t$t(),f.jsx(Yo,{choices:[{id:"",label:s.currentContext?KAt({context:Ne(s.currentContext)}):PAt()},...o&&!s.contexts.includes(o)?[{id:o,label:kOt({context:Ne(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:_||m,onSelect:c})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[Aqt(),f.jsx(Ir,{type:"text",value:u,disabled:_||m,onChange:j=>h(j.target.value),placeholder:q$t(),autoComplete:"off",spellCheck:!1})]}),k&&f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",onClick:()=>void N(),disabled:_||m||!y,children:[f.jsx(Pa,{size:13})," ",m?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:_||m||y,children:_?ia():nc()})]})]})]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",QLt()]})})}function iOn(){var y;const e=an({mutationFn:C=>ybn(...C)}),n=qz(),t=ut(n),r=t.data??null,s=C=>{Vr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=A.useState(null),o=i??((y=t.error)==null?void 0:y.message)??null,[c,u]=A.useState(""),[h,_]=A.useState(""),[p,m]=A.useState(!1),x=t.isPending||p,[k,v]=A.useState(!1);async function b(){if(!(x||k)){m(!0),a(null);try{await nt.fetchQuery({...qz(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function w(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||x||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),_("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return f.jsxs(f.Fragment,{children:[!r&&x?f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",nIt()]}):r&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Ht,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?eS():jb()})})]}),(r==null?void 0:r.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:xRt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:w,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?zRt():QRt(),f.jsx(Ir,{type:"password",value:c,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?DRt():nMt(),f.jsx(Ir,{type:"password",value:h,onChange:C=>_(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:HRt()}),o&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:x||k,onClick:()=>void b(),children:[f.jsx(Pa,{size:13})," ",km()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||x||k||(r==null?void 0:r.processEnv),children:k?ia():nc()})]})]})]})}const uH="rounded-sm border-border-strong bg-surface text-subtext",_H="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",aOn=5e3;function fH(e){const n=Ia(),t=e.map(a=>Uz(a)),r=XV({queries:t.map(a=>({...a,refetchInterval:aOn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{Rn(n)&&Vr(Uz(a).queryKey,{running:!0})}]}function oOn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Ht,{className:_H,children:cL()})});if(e===void 0)return f.jsx(Ht,{className:uH,children:gL()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?f.jsx(Ht,{className:"rounded-sm",variant:"error",children:Jk()}):e.toolsFound?i?f.jsx(Ht,{className:"rounded-sm",variant:"warning",children:lL()}):f.jsx(Ht,{className:"rounded-sm",variant:"success",children:wm()}):f.jsx(Ht,{className:"rounded-sm",variant:"error",children:s.length===1?mMt({tool:Ne(s[0])}):kMt()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!i&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:co(e.testedAt)})]})}function cOn({remote:e=!1}){var I;const n=JL(),t=ut(n),r=((I=t.data)==null?void 0:I.hosts)??(t.isError?[]:null),[s,i]=A.useState(!1),[a,o]=A.useState({}),[c,u]=A.useState({}),h=A.useRef(0),[_,p]=A.useState(!1),[m,x]=A.useState({}),[k,v]=A.useState(null),[b,w]=A.useState(!1),[y,C]=A.useState(0),N=e?[]:(r==null?void 0:r.filter($=>{const q=a[$.host]??$.lastTest;return(q==null?void 0:q.reachable)&&q.toolsFound}).map($=>$.host))??[],[z,T]=fH(N);function j($){h.current+=1,p(!1),w(!1),C(q=>q+1),v($),x(q=>({...q,[$]:!0}))}function M(){h.current+=1,p(!1),w(!1),v(null)}function D($,q){x(H=>({...H,[$]:!q}))}return f.jsxs(f.Fragment,{children:[t.error&&f.jsx("p",{className:"text-sm text-accent-red",children:t.error.message}),f.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[!e&&t.data&&f.jsx(XMn,{settings:t.data}),f.jsxs(De,{variant:"ghost",className:"ms-auto",onClick:()=>i(!0),children:[f.jsx(vS,{size:14})," ",AL()]})]}),r===null?f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",xL()]}):r.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:bUt()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map($=>{var ne,ce,_e;const q=c[$.host]===void 0?$.container??null:c[$.host],H=a[$.host],Q=q!==null&&((ne=H==null?void 0:H.container)==null?void 0:ne.reference)===q.trim()?H:void 0,V=q!==null?Q:H!=null&&H.container?$.lastTest:H??$.lastTest,J=(ce=Q==null?void 0:Q.container)==null?void 0:ce.error,Z=((_e=Q==null?void 0:Q.container)==null?void 0:_e.ready)===!1,B=(V==null?void 0:V.error)||J,L=k===$.host,F=m[$.host]??!1,U=!e&&(L||!!B),K=`${$.user?`${$.user}@`:""}${$.hostname??$.host}${$.port?`:${$.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:$.host,children:$.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:K,children:K})]})}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsxs("div",{className:"flex items-center gap-2 text-start",children:[f.jsx(oOn,{test:V,connecting:L&&!b,masterRunning:z[$.host],containerFailed:Z}),U&&f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":F,"aria-label":F?oX({name:Ne($.host)}):KX({name:Ne($.host)}),onClick:se=>{se.stopPropagation(),D($.host,F)},children:f.jsx(rc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${F?" rotate-180":""}`})})]}),f.jsx(De,{size:"small",type:"button",className:"justify-self-end",onClick:se=>{se.stopPropagation(),L&&!b?M():j($.host)},disabled:!L&&(k!==null&&!b||q!==null&&!q.trim()),children:L?b?Vs():W_():(V==null?void 0:V.reachable)===!1||Z?Vs():V?EL():Qk()})]})]}),!e&&f.jsx(YMn,{host:$,connecting:L&&!b,reference:q,onChange:se=>{L&&M(),u(G=>({...G,[$.host]:se})),o(G=>{const oe={...G};return delete oe[$.host],oe})}}),U&&(F||L)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3${F?"":" hidden"}`,children:[!L&&B&&f.jsx(W3n,{host:$.host,transcript:B}),L&&!_&&f.jsx(wS,{host:$.host,backend:"ssh",active:F,onComplete:se=>{if(se.backend!=="ssh")return;T($.host);const G=h.current;if(q===null){o(oe=>({...oe,[$.host]:{...se.result,container:null}})),w(!1),v(null);return}p(!0),jbn($.host,q.trim()).then(oe=>{h.current===G&&o(le=>({...le,[$.host]:{...oe,container:oe.container??{reference:q.trim(),ready:!1,error:oe.error??null}}}))}).catch(oe=>{h.current===G&&o(le=>({...le,[$.host]:{...se.result,container:{reference:q.trim(),ready:!1,error:oe instanceof Error?oe.message:String(oe)}}}))}).finally(()=>{h.current===G&&(p(!1),w(!1),v(null))})},onError:se=>{w(!0),o(G=>({...G,[$.host]:{container:q===null?null:{reference:q.trim(),ready:!1,error:se},reachable:!1,toolsFound:!1,missingTools:[],error:se,testedAt:Date.now()}}))}},y)]})]},$.host)})}),s&&f.jsx($$,{onClose:()=>i(!1)})]})}function lOn({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Ht,{className:_H,children:cL()}):e===null?f.jsx(Ht,{className:uH,children:gL()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Ht,{className:"rounded-sm",variant:"warning",children:lL()}):f.jsx(Ht,{className:"rounded-sm",variant:"success",children:wm()}):f.jsx(Ht,{className:"rounded-sm",variant:"error",children:rqt()}):f.jsx(Ht,{className:"rounded-sm",variant:"error",children:eGt()}):f.jsx(Ht,{className:"rounded-sm",variant:"error",children:Jk()})}function uOn({remote:e=!1}){var B;const n=an({mutationFn:Pbn}),t=Wyn(),r=ut(t),s=r.data??null,i=L=>{Vr(t.queryKey,F=>(typeof L=="function"?L(F??null):L)??void 0)},a=s?null:((B=r.error)==null?void 0:B.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(""),[m,x]=A.useState(""),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(null),[N,z]=A.useState(!1),[T,j]=A.useState(!1),[M,D]=A.useState(0),I=!e&&o&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[o]:[],[$,q]=fH(I);function H(){j(!1),D(L=>L+1),z(!0)}const Q=L=>{i(L),c(L.host??""),h(L.partition??""),p(L.account??""),x(L.timeLimit??"")},V=A.useRef(null);A.useEffect(()=>{const L=V.current;V.current=s,s&&(!L||o===(L.host??"")&&u.trim()===(L.partition??"")&&_.trim()===(L.account??"")&&m.trim()===(L.timeLimit??""))&&(c(s.host??""),h(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,o,u,_,m]);const J=s!==null&&o===(s.host??"")&&u.trim()===(s.partition??"")&&_.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function Z(L){if(L.preventDefault(),!k){v(!0),w(null);try{Q(await n.mutateAsync({host:o,partition:u.trim(),account:_.trim(),timeLimit:m.trim()}))}catch(F){w(F instanceof Error?F.message:String(F))}finally{v(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[!N&&(y==null?void 0:y.error)&&f.jsx("p",{className:Ny,children:y.error}),f.jsxs("form",{className:iC,onSubmit:Z,children:[f.jsx("div",{className:"max-w-xl",children:f.jsxs("label",{children:[qHt(),f.jsx(Yo,{choices:[{id:"",label:vL()},...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:k||N,onSelect:L=>{c(L),C(null),z(!1),j(!1)}})]})}),f.jsxs("div",{className:"actions",children:[!e&&f.jsx(De,{type:"button",onClick:()=>{N&&!T?(j(!1),z(!1)):H()},disabled:!o,title:o?void 0:_Jt(),children:N?T?Vs():W_():y?EL():Qk()}),f.jsx("span",{role:"status",children:f.jsx(lOn,{test:y,connecting:N&&!T,masterRunning:$[o]})})]}),f.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[CKt(),f.jsx(Ir,{type:"text",list:"slurm-partitions",value:u,onChange:L=>h(L.target.value),placeholder:zz(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map(L=>f.jsx("option",{value:L},L))})]}),f.jsxs("label",{children:[Zk(),f.jsx(Ir,{type:"text",value:_,onChange:L=>p(L.target.value),placeholder:zz(),autoComplete:"off",spellCheck:!1})]})]}),f.jsxs("label",{className:"mt-3 block max-w-xl",children:[KYt(),f.jsx(Ir,{type:"text",value:m,onChange:L=>x(L.target.value),placeholder:xIt(),autoComplete:"off",spellCheck:!1})]})]}),b&&f.jsx("div",{className:"error",children:b}),f.jsx("div",{className:"actions",children:f.jsx(De,{variant:"primary",type:"submit",disabled:k||J||N,children:k?ia():nc()})})]}),!e&&N&&f.jsx(wS,{host:o,backend:"slurm",onComplete:L=>{L.backend==="slurm"&&(C(L.result),q(o),j(!1),z(!1))},onError:L=>{j(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:L})}},M)]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",pHt()]})})}function _On(){var C;const e=an({mutationFn:Hbn}),n=Qyn(),t=ut(n),r=t.data??null,s=N=>{Vr(n.queryKey,z=>(typeof N=="function"?N(z??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=A.useState(""),[c,u]=A.useState(!1),[h,_]=A.useState(null),[p,m]=A.useState(null),x=p!==null&&p!=="testing"?p:null,k=N=>{s(N),o(N.address??"")},v=A.useRef(null);A.useEffect(()=>{const N=v.current;v.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const b=r!==null&&a===(r.address??"");async function w(N){if(N.preventDefault(),!c){u(!0),_(null);try{k(await e.mutateAsync({address:a}))}catch(z){_(z instanceof Error?z.message:String(z))}finally{u(!1)}}}async function y(){m("testing");try{m(await qbn(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[(x==null?void 0:x.error)&&f.jsx("p",{className:Ny,children:x.error}),f.jsxs("form",{className:iC,onSubmit:w,children:[f.jsxs("label",{children:[DFt(),f.jsx(Ir,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[TBt(),": ",Ne(r.resolvedAddress)," · ",wL(),": ",r.source]}),h&&f.jsx("div",{className:"error",children:h}),f.jsxs("div",{className:"actions",children:[f.jsx(De,{variant:"primary",type:"submit",disabled:c||b,children:c?ia():nc()}),f.jsx(De,{type:"button",onClick:()=>void y(),disabled:p==="testing",children:iYt()}),f.jsx(fOn,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[JKt(),": ",x.rayVersion]})]})]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",cHt()]})})}function fOn({test:e}){return e===null?null:e==="testing"?f.jsx(Ht,{children:fYt()}):e.reachable?f.jsx(Ht,{variant:"success",children:aWt()}):f.jsx(Ht,{variant:"error",children:Jk()})}function dOn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:el(e.memBytes),r=e.gpus.length===0?null:gTt({count:e.gpus.length});return[n,e.cpuCount>0?qzt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function hOn({remote:e}){var p;const n=ut(Yyn()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=A.useState(0),[o,c]=A.useState(!0),[u,h]=A.useState(!1),_=()=>n.refetch();return f.jsxs(f.Fragment,{children:[r&&!t?f.jsx("div",{className:"error",children:r}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:ZMn,children:[f.jsx("span",{className:"k",children:Mh()}),f.jsx("span",{className:"v",children:!t&&s||u?f.jsxs(Ht,{className:"gap-1.5",role:"status",children:[f.jsx(Nt,{}),u?rDt():ta()]}):r?f.jsx(Ht,{variant:"warning",children:h3()}):t?t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Ht,{variant:"success",children:wm()}):t.sshKeyStatus==="unknown"?f.jsx(Ht,{variant:"warning",children:h3()}):f.jsx(Ht,{variant:"warning",children:jb()}):f.jsx(Ht,{variant:"warning",children:bL()}):null}),f.jsx("span",{className:"k",children:GVt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:_Xt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Ht,{variant:"success",children:iVt()}):t.sshKeyStatus==="no_local_match"?f.jsx(Ht,{variant:"warning",children:PGt()}):t.sshKeyStatus==="none_registered"?f.jsx(Ht,{variant:"error",children:oGt()}):f.jsx(Ht,{children:kL()}):"—"})]}),e&&t&&!t.loggedIn&&f.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:oRt({command:Ne("orx login")})}),!e&&i>0&&f.jsx(V3n,{login:o,onComplete:()=>{h(!1),a(0),_()},onError:m=>{h(!1),mn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?f.jsxs("p",{dir:"auto",className:Da,children:[mDt()," ",f.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:Da,children:[KUt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),bYt()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?f.jsx("p",{dir:"auto",className:Da,children:AJt({register:Ne(`orx ssh-key add ${t.sshKeyPath}`),load:Ne("ssh-add")})}):f.jsxs("p",{dir:"auto",className:Da,children:[PUt()," ",f.jsx("code",{children:"ssh-add"}),AVt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&f.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)})]}),f.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[f.jsxs(De,{onClick:()=>void _(),disabled:s||u,children:[f.jsx(Pa,{size:13})," ",s?ta():xm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&f.jsxs(De,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?f.jsx(Nt,{}):f.jsx(mf,{size:13})," ",t.loggedIn?btn():NL()]})]})]})}const pOn={local:hTe,ssh:QTe,tinker:nAe,hf:eTe,modal:xTe,k8s:oTe,slurm:HTe,ray:DTe,openresearch:zTe},Ty={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"},_R=["hf","modal","slurm","ray","openresearch"],s4=["hf","modal","openresearch"],dH={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"]},$5=["tinker","hf","modal","ray","k8s"],mOn={tinker:$Re,hf:gRe,modal:SRe,openresearch:ARe},fR="__custom__";function Kp(e,n){return!!(n&&!(dH[e]??[]).includes(n))}function gOn({settings:e,projectId:n,onSaved:t}){const r=an({mutationFn:Gbn}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=A.useState(s),[c,u]=A.useState(i),[h,_]=A.useState(Kp(s,i)),[p,m]=A.useState(!1),[x,k]=A.useState(null),v=e.targets.find($=>$.id===a),b=e.targets.filter($=>$.configured||$.id===s),w=_R.includes(a),y=s4.includes(a),C=dH[a]??[],N=a===s&&(!w||c.trim()===i),z=J_[a](),T=mOn[a],j=p?Ern():y&&!c.trim()?gNt({destination:z}):a==="ssh"?IMt():TMt({destination:z});A.useEffect(()=>{o(s),u(i),_(Kp(s,i))},[s,i]);async function M($,q){const H=_R.includes($);if(!(p||s4.includes($)&&!q.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:$,flavor:H&&q.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),_(Kp(s,i))}finally{m(!1)}}}function D($){const q=e.targets.find(Q=>Q.id===$);if(!q)return;o(q.id);const H=q.id===s?i:"";u(H),_(Kp(q.id,H)),s4.includes(q.id)||M(q.id,H)}function I($){if($===fR){_(!0);return}_(!1),u($),(!y||$)&&M(a,$)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:nBt()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:$=>{$.preventDefault(),N||M(a,c)},children:[f.jsx(Yo,{choices:b.map($=>({id:$.id,label:J_[$.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:$=>{const q=e.targets.find(H=>H.id===$.id);return q?f.jsx(Lh,{kind:Ty[q.id],size:16}):null},onSelect:D}),w&&f.jsx("div",{children:h?f.jsxs("div",{className:"relative",children:[f.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:c,onChange:$=>u($.target.value),onBlur:()=>{if(y&&!c.trim()){a===s&&(u(i),_(Kp(s,i)));return}N||M(a,c)},placeholder:w$t(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),f.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":Nz(),title:Nz(),onMouseDown:$=>$.preventDefault(),onClick:()=>_(!1),children:f.jsx(rc,{size:12})})]}):f.jsx(Yo,{choices:[{id:"",label:y?uNt():YMt()},...c&&!C.includes(c)?[{id:c,label:ujt({value:Ne(c)})}]:[],...C.map($=>({id:$,label:$})),{id:fR,label:j$t()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),x&&f.jsx("div",{className:"error mt-2.5",children:x}),v&&!v.configured&&f.jsx("p",{className:Da,children:MYt()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),T&&f.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:T()})]})}function vOn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?XEt():e.id==="openresearch"?NL():e.id==="ray"?Qk():ftn();return f.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&&f.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":J_[e.id](),"aria-describedby":i,"aria-haspopup":$5.includes(e.id)?"dialog":void 0}),f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(Lh,{kind:Ty[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:J_[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:pOn[e.id]()}),f.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?f.jsxs(f.Fragment,{children:[e.id==="tinker"?MAt():Znn()," ",f.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:jjt()})]}):t??e.summary}),f.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[f.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?hL():e.configured?!r||$5.includes(e.id)?eS():Vrn():a}),r&&f.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:f.jsx(Q1,{size:16})})]})]})}function bOn({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(A0,{size:16})," ",fL()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:f.jsx(Lh,{kind:Ty[e.id],size:36})}),f.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:J_[e.id]()})]}),n&&f.jsx(Ht,{className:"flex-none border-primary bg-primary-subtle text-primary",children:hL()})]}),f.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"&&f.jsx(cOn,{remote:r}),e.id==="slurm"&&f.jsx(uOn,{remote:r}),e.id==="openresearch"&&f.jsx(hOn,{remote:r})]})]})}function yOn({target:e,remote:n,onClose:t}){const r=A.useRef(null),[s,i]=A.useState({dirty:!1,saving:!1});A.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm(EAt())||t()};return f.jsxs("dialog",{ref:r,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(),a())},onCancel:o=>{o.preventDefault(),a()},children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(Lh,{kind:Ty[e.id],size:32}),f.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:J_[e.id]()})]}),f.jsx(Lt,{title:z0(),"aria-label":z0(),onClick:a,disabled:s.saving,children:f.jsx(or,{size:14})})]}),e.id==="tinker"&&f.jsx(wOn,{target:e}),e.id==="hf"&&f.jsx(SOn,{remote:n}),e.id==="modal"&&f.jsx(iOn,{}),e.id==="ray"&&f.jsx(_On,{}),e.id==="k8s"&&f.jsx(sOn,{onEditState:i})]})}function xOn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=ZL(e==null?void 0:e.id),i=ut(s),a=i.data??null,o=I=>{Vr(s.queryKey,$=>(typeof I=="function"?I($??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=A.useState(null),[_,p]=A.useState(null),m=Xyn(),x=ut(m),k=x.data??null,v=((D=x.error)==null?void 0:D.message)??null;A.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},w=a?a.targets:null,y=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=w?[...w].sort((I,$)=>+($.id===y)-+(I.id===y)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],z=(C==null?void 0:C.filter(I=>!I.configured))??[],T=I=>f.jsx(vOn,{target:I,isDefault:y===I.id,summary:I.id==="local"?k?dOn(k):v??lBt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),j=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return j&&!$5.includes(j.id)?f.jsx(bOn,{target:j,isDefault:y===j.id,onBack:()=>h(null),remote:r}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:dL()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:FIt()}),f.jsx(FOn,{projectId:e==null?void 0:e.id,onViewHistory:n}),c?f.jsx("div",{className:"error",children:c}):a?f.jsxs(f.Fragment,{children:[_&&f.jsx("div",{className:"error",children:_}),f.jsx(gOn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:eS()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(T)})]}),z.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:uqt()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:z.map(T)})]}),j&&f.jsx(yOn,{target:j,remote:r,onClose:()=>h(null)})]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",HLt()]})]})}function wOn({target:e}){var w;const n=an({mutationFn:_bn}),[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(null),c=Fz(),u=ut(c),h=u.data??null,_=a??((w=u.error)==null?void 0:w.message)??null,p=y=>{Vr(c.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},[m,x]=A.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){x(!0),o(null);try{await nt.fetchQuery({...Fz(),staleTime:0})}catch(y){o(y instanceof Error?y.message:String(y))}finally{x(!1)}}}async function b(y){if(y.preventDefault(),!(!t.trim()||s||k)){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 f.jsxs(f.Fragment,{children:[!h&&k?f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",ta()]}):h&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Ht,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?wm():h.validationStatus==="invalid"?Gnn():h.validationStatus==="billingRequired"?Ann():jb()})})]}),(h==null?void 0:h.validationStatus)==="billingRequired"&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:f.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:Snn()})}),(h==null?void 0:h.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:$nn()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?Cen():Kk(),f.jsx(Ir,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:y=>r(y.target.value),autoComplete:"new-password"})]}),_&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:_}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:s||k,onClick:()=>void v(),children:[f.jsx(Pa,{size:13})," ",k?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?jL():nc()})]})]})]})}function kOn({settings:e}){return e.validationStatus==="missing"?f.jsx(Ht,{variant:"warning",children:jb()}):e.validationStatus==="invalid"?f.jsx(Ht,{variant:"error",children:zFt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?f.jsx(Ht,{variant:"success",children:wm()}):e.jobsWrite===!1?f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Ht,{variant:"warning",children:MUt()}),f.jsx(lS,{content:$Tt(),className:"text-subtext",children:f.jsx(hS,{size:15})})]}):null}function SOn({remote:e}){var w;const n=an({mutationFn:lbn}),t=Pz(),r=ut(t),s=r.data??null,i=y=>{Vr(t.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},a=s?null:((w=r.error)==null?void 0:w.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(!1),[_,p]=A.useState(!1),[m,x]=A.useState(null),k=zy();async function v(){if(!(u||_||!s&&!a)){p(!0),x(null);try{await nt.fetchQuery({...Pz(),staleTime:0})}catch(y){x(y instanceof Error?y.message:String(y))}finally{p(!1)}}}async function b(y){if(y.preventDefault(),!(!o.trim()||u||_||!s&&!a)){h(!0),x(null);try{const C=await n.mutateAsync(o.trim());i(C),x(null),c("")}catch(C){x(C instanceof Error?C.message:String(C))}finally{h(!1)}}}return f.jsxs(f.Fragment,{children:[a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Zk()}),f.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Mh()}),f.jsx("dd",{className:"m-0 text-text",children:f.jsx(kOn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&f.jsx("p",{className:Ny,children:s.validationError}),s.source==="env"&&f.jsx("p",{className:Da,children:DPt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&f.jsx(aC,{note:ATt({login:"`hf auth login`",url:Ne("huggingface.co/settings/tokens")}),className:Da,disabled:e,onRun:k.start}),f.jsx(jy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",wHt()]}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?Ren():UMt(),f.jsx(Ir,{type:"password",value:o,onChange:y=>c(y.target.value),placeholder:(s==null?void 0:s.maskedToken)??zPt(),autoComplete:"off"})]}),m&&f.jsx("div",{className:"error",children:m}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:u||_||!s&&!a,onClick:()=>void v(),children:[f.jsx(Pa,{size:13})," ",_?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!o.trim()||u||_||!s&&!a,children:u?jL():nc()})]})]})]})}const hH=/^hf_[A-Za-z0-9]{10,}$/;function pH(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:Da,children:[PYt()," ",f.jsx("code",{children:"HF_TOKEN"}),CQt()]})})})}const dR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function B5(e,n){const t=n instanceof Error?n.message:String(n);mn(t.includes(e)?t:`${e}: ${t}`,"error")}function COn({name:e,entry:n,onVars:t}){const r=an({mutationFn:_=>qL(..._)}),s=an({mutationFn:wbn}),[i,a]=A.useState(""),[o,c]=A.useState(!1);async function u(){if(!(!i.trim()||o)){c(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(_){B5(e,_)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(_){B5(e,_)}finally{c(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{className:"font-mono text-sm",children:e}),f.jsx("td",{className:"text-base text-subtext",children:n?f.jsxs(f.Fragment,{children:[n.maskedValue,n.inProcessEnv&&f.jsx(Ht,{children:vKt()})]}):f.jsx(Ir,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&a("")},placeholder:SL(),"aria-label":qJ({name:Ne(e)}),autoComplete:"new-password",disabled:o})}),f.jsx("td",{children:n?f.jsx(Lt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:r3({name:Ne(e)}),"aria-label":r3({name:Ne(e)}),onClick:()=>void h(),disabled:o,children:f.jsx(gf,{size:13})}):i.trim()&&f.jsx(De,{size:"small",onClick:()=>void u(),disabled:o,children:o?ia():nc()})})]}),!n&&e!=="HF_TOKEN"&&hH.test(i.trim())&&f.jsx(pH,{})]})}function EOn({onVars:e,onDone:n}){const t=an({mutationFn:_=>qL(..._)}),[r,s]=A.useState(""),[i,a]=A.useState(""),[o,c]=A.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){c(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(_){B5(r.trim(),_)}finally{c(!1)}}}const h=_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(Ir,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:_=>s(_.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":Zqt(),autoComplete:"off",spellCheck:!1,disabled:o})}),f.jsx("td",{children:f.jsx(Ir,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:h,placeholder:SL(),"aria-label":iUt(),autoComplete:"new-password",disabled:o})}),f.jsxs("td",{children:[f.jsx(De,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?ia():nc()}),f.jsx(Lt,{title:W_(),"aria-label":DLt(),onClick:n,disabled:o,children:f.jsx(or,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&hH.test(i.trim())&&f.jsx(pH,{})]})}function NOn(){var u;const e=Zyn(),n=ut(e),t=n.data??null,r=h=>{Vr(e.queryKey,_=>(typeof h=="function"?h(_??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=A.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!dR.includes(h)),c=[...dR,...o];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[f.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:$Zt()}),f.jsxs(De,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[f.jsx(Dh,{size:12})," ",kDt()]})]}),f.jsx("div",{className:ec,children:s?f.jsx("div",{className:"error",children:s}):t===null?f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]}):f.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:f.jsxs("tbody",{children:[c.map(h=>f.jsx(COn,{name:h,entry:t.find(_=>_.key===h),onVars:r},h)),i&&f.jsx(EOn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const Wp=[{value:"system",label:gnn,icon:W4n},{value:"light",label:unn,icon:y3n},{value:"dark",label:Ytn,icon:X4n}],zOn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function jOn(){const e=hf(),[n,t]=_I(),r=s=>{var h;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(_=>_===document.activeElement),u=((o===-1?Wp.findIndex(_=>_.value===n):o)+i+Wp.length)%Wp.length;t(Wp[u].value),(h=a[u])==null||h.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:mEt()}),f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:`${nl} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Lz()}),f.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":Lz(),onKeyDown:r,children:Wp.map(({value:s,label:i,icon:a})=>f.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:[f.jsx(a,{size:14}),i()]},s))})]}),f.jsxs("div",{className:nl,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:eRt()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(Yo,{choices:zOn,value:e,variant:"field",dropDown:!0,onSelect:s=>{fD(s)&&cI(s)}})})]})]})]})}const TOn={installer:kmn,"app-bundle":nmn,portable:Imn,cargo:lmn,homebrew:mmn,nix:Tmn,unknown:Umn},i4={cargo:Ymn,homebrew:sgn,nix:_gn};function AOn(){var _;const e=an({mutationFn:p=>pbn(...p)}),{status:n,error:t,apply:r}=o6(),[s,i]=A.useState(null),[a,o]=A.useState(null),c=P$(n),u=s!==null||c.restarting;if(!n)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Mz()}),t?f.jsx("div",{className:ec,children:f.jsx("div",{className:"error",children:t})}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]})]});const h=async(p,m)=>{i(p),o(null);try{await m()}catch(x){o(x instanceof Error?x.message:String(x))}finally{i(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Mz()}),f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:`${tf} pb-3.5`,children:[f.jsx("div",{className:"k",children:CL()}),f.jsx("div",{className:"v",children:n.current}),f.jsx("div",{className:"k",children:QFt()}),f.jsx("div",{className:"v",children:n.latest??"—"}),f.jsx("div",{className:"k",children:mL()}),f.jsx("div",{className:"v",children:TOn[n.channel]()})]}),n.restartRequired&&f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:sQt()}),f.jsx("p",{children:c.error?DL({error:c.error}):Ven({installed:Ne(n.installedVersion??"—"),current:Ne(n.current??n.installedVersion??"—")})})]}),n.canRestart&&f.jsx(De,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?LL():OL()})]}),n.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Tz()}),f.jsxs("p",{children:[Gqt(),n.envDisabled&&brn()]})]}),f.jsx(cS,{type:"button",checked:n.autoUpdate,"aria-label":Tz(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?frn({version:Ne(n.latest??"—")}):LEt()}),f.jsx("p",{children:n.updateAvailable?bAt():rNt()})]}),f.jsx(De,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>dbn().then(r)),children:s==="apply"?Hk():n.updateAvailable?irn():qEt()})]})]}):f.jsx("div",{className:nl,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:ZVt()}),f.jsx("p",{children:((_=i4[n.channel])==null?void 0:_.call(i4))??$Jt()})]})}),n.channel==="app-bundle"&&f.jsx(MOn,{busy:s,disabled:u,run:h}),a&&f.jsx("div",{className:"error",children:a})]})]})}function ROn(){var _;const e=an({mutationFn:uyn}),n=axn(),t=ut(n),r=t.data??null,s=p=>{Vr(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=A.useState(!1),[o,c]=A.useState(null),u=o??((_=t.error)==null?void 0:_.message)??null,h=()=>{!r||i||(a(!0),c(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>c(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:CZt()}),r?f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[Ez(),r.locked&&r.reason&&f.jsx(lS,{content:`${p$t()} ${r.reason}.`,className:"text-subtext",children:f.jsx(hS,{size:15})})]}),f.jsx("p",{children:fUt()})]}),f.jsx(cS,{type:"button",checked:r.enabled,"aria-label":Ez(),disabled:i||r.locked,onClick:h})]}),u&&f.jsx("div",{className:"error",children:u})]}):u?f.jsx("div",{className:"error",children:u}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]})]})}function MOn({busy:e,disabled:n,run:t}){const r=an({mutationFn:mbn}),[s,i]=A.useState(null),[a,o]=A.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:iAt({command:Ne("orx")})}),s?f.jsxs("p",{children:[s.alreadyCurrent?ANt({link:Ne(s.link)}):$Nt({link:Ne(s.link)}),!s.onPath&&lEt({directory:Ne(s.dir)})]}):f.jsx("p",{children:ZTt({command:Ne("orx")})})]}),f.jsx(De,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?Hk():a?ven():s?GJt():GTt()})]})}function OOn({remote:e}){var x;const n=an({mutationFn:k=>WL(...k)}),t=rS(),r=ut(t),s=r.data??null,i=k=>{Vr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=A.useState(!1),[c,u]=A.useState(null),h=c??((x=r.error)==null?void 0:x.message)??null,_=async()=>{await r.refetch({cancelRefetch:!1})},p=zy(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:tPt()}),s?f.jsxs("div",{className:`${ec} 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:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx("h3",{children:cPt()}),f.jsx(Ht,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?oL():uL()})]}),f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:jz()}),f.jsx("p",{children:YZt()})]}),f.jsx(cS,{type:"button",checked:s.githubForNewProjects,"aria-label":jz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(mH,{ghInstalled:s.ghInstalled,remote:e,onCheck:_,onRun:p.start})}),f.jsx(jy,{run:p.run,onComplete:()=>void _(),onClose:p.clear}),h&&f.jsx("div",{className:"error",children:h})]}):h?f.jsx("div",{className:"error",children:h}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]})]})}function mH({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=A.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return f.jsxs(f.Fragment,{children:[f.jsx(aC,{note:e?Jen():fAt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(dh,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[cFt()," ",f.jsx(Y_,{size:12})]}),f.jsx(De,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ta():xm()})]})]})}function DOn(){var m,x,k;const e=an({mutationFn:Qvn}),n=an({mutationFn:Xvn}),t=Ykn(),r=ut(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,a=v=>Vr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=A.useState(!1),[h,_]=A.useState(null),p=h??((k=r.error)==null?void 0:k.message);return f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:yL()}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:pPt()}),f.jsx("span",{className:"v",children:f.jsx(Ht,{variant:s?"success":"default",children:s===null?p?ro():ta():s?Dz():f3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:sJt()}),s?f.jsx("div",{className:v0,children:f.jsx(De,{disabled:c,onClick:()=>{u(!0),_(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?Oz():ien()})}):f.jsx(uR,{save:FL,onSaved:v=>o(v.hasToken),placeholder:_Kt(),createHref:"https://www.overleaf.com/user/settings"}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:RQt()}),f.jsx("span",{className:"v",children:f.jsx(Ht,{variant:i?"success":"default",children:i===null?p?ro():ta():i?Dz():f3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:BQt()}),i?f.jsx("div",{className:v0,children:f.jsx(De,{disabled:c,onClick:()=>{u(!0),_(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?Oz():ZJt()})}):f.jsx(uR,{save:v=>HL(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:c3(),createHref:"https://www.overleaf.com/project",createLabel:n1t()}),p&&f.jsx("div",{className:"error",children:p})]})}function LOn({project:e,onProjectUpdate:n,remote:t}){var M;const r=an({mutationFn:D=>WL(...D)}),s={...ixn((e==null?void 0:e.id)??""),enabled:!!e},i=ut(s),a=zy(),o=i.data??null,c=D=>{Vr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=A.useState(!1),[_,p]=A.useState(null),m=_??((M=i.error)==null?void 0:M.message)??null,[x,k]=A.useState(!1),[v,b]=A.useState(!1),[w,y]=A.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},z=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?Xjt():I.includes("(fetch first)")||I.includes("non-fast-forward")?rTt():I.includes("403")||I.toLowerCase().includes("permission denied")?uTt():I},T=()=>{e&&(h(!0),p(null),oyn(e.id).then(D=>{c(D.git),n(D.project),nt.fetchQuery(rS()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(z(D))).finally(()=>h(!1)))},j=D=>{b(!0),y(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>y(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:YWt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:Ben({project:(e==null?void 0:e.name)??rjt()})}),e?m&&!o?f.jsx("div",{className:"error",children:m}):o?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:LHt()}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:RKt()}),f.jsx("span",{className:"v",children:o.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:o.gitVersion??WD()}),f.jsx("span",{className:"k",children:CXt()}),f.jsx("span",{className:"v",children:o.initialized?qjt({branch:Ne(o.currentBranch??Xk()),state:o.clean?SNt():STt()}):TOt()}),f.jsx("span",{className:"k",children:pLt()}),f.jsx("span",{className:"v",children:o.baselineBranch}),f.jsx("span",{className:"k",children:UWt()}),f.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):Yk()})]}),!o.initialized&&f.jsx("div",{className:v0,children:f.jsx(De,{variant:"primary",onClick:()=>void ayn(e.id).then(c).catch(D=>p(String(D))),children:HPt()})})]}),f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:_L()}),f.jsx("span",{className:"v",children:f.jsx(Ht,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?oL():uL()})}),f.jsx("span",{className:"k",children:VKt()}),f.jsx("span",{className:"v",children:C?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&f.jsx(Ht,{children:ZXt()})]}):f.jsx(Ht,{children:jHt()})}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:GXt()}),f.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(mH,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),f.jsx(jy,{run:a.run,onComplete:()=>void N(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?Mrn():Xzt()}),f.jsxs("div",{className:v0,children:[C&&o.github.url&&f.jsxs(dh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[Rz()," ",f.jsx(Y_,{size:12})]}),f.jsx(De,{variant:"primary",disabled:u,onClick:T,children:u?Q7t():H7t()})]})]}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:kBt()}),f.jsxs("div",{className:v0,children:[o.github.url&&f.jsxs(dh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[Rz()," ",f.jsx(Y_,{size:12})]}),f.jsx(De,{disabled:u,onClick:()=>{h(!0),cyn(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?n8t():D7t()})]})]})]}),f.jsx(DOn,{}),m&&f.jsx("div",{className:"error",children:z(m)})]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]}):f.jsx("div",{className:ec,children:f.jsx("p",{className:Da,children:fVt()})}),x&&f.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:()=>j(!1),children:f.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:D=>D.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:XHt()}),f.jsx("p",{children:EYt()}),w&&f.jsx("div",{className:"error",children:w}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(De,{disabled:v,onClick:()=>j(!1),children:MGt()}),f.jsx(De,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?ia():hRt()})]})]})})]})}const IOn={env:G_n,config:Z_n,xdg:ifn,default:$_n},a4={preparing:S_n,copying:Lun,verifying:ffn,finalizing:qun},$On=e=>{var n;return((n=a4[e])==null?void 0:n.call(a4))??e};function BOn(){var y;const e=Jyn(),n=ut(e),t=n.data??null,r=t?null:((y=n.error)==null?void 0:y.message)??null,[s,i]=A.useState(""),[a,o]=A.useState(!1),[c,u]=A.useState(null),[h,_]=A.useState({kind:"idle"}),[p,m]=A.useState(null);A.useEffect(()=>{t&&i(C=>C||t.current)},[t]),A.useEffect(()=>aI(C=>{C.type==="progress"?_(N=>{const z=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||z}}):C.type==="done"?(_({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&_({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await Sbn(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function w(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(r_n({path:Ne(k)})))){_({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await Cbn(k)}catch(N){_({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:$Xt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:$tn()}),r?f.jsx("div",{className:ec,children:f.jsx("div",{className:"error",children:r})}):t?f.jsxs("div",{className:ec,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:L$t()})}),f.jsxs("div",{className:tf,children:[f.jsx("span",{className:"k",children:c$t()}),f.jsx("span",{className:"v",children:t.current}),f.jsx("span",{className:"k",children:wL()}),f.jsx("span",{className:"v",children:IOn[t.source]()})]}),!x&&f.jsxs("form",{className:iC,onSubmit:w,children:[f.jsxs("label",{children:[$qt(),f.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&f.jsxs("p",{className:Da,children:[CWt()," ",el(c.treeBytes??0),c.freeBytes!=null&&` — ${Xun({size:Ne(el(c.freeBytes))})}`,c.sameFilesystem?A_n():"","."]}),c&&c.ok===!1&&c.error&&f.jsx("div",{className:"error",children:c.error}),p&&f.jsx("div",{className:"error",children:p}),h.kind==="moving"&&f.jsx(cH,{value:h.copied,max:h.total,label:$On(h.phase),caption:h.total>0?f.jsxs("span",{className:"text-sm",children:[el(h.copied)," / ",el(h.total)]}):void 0}),h.kind==="done"&&f.jsxs("p",{className:Da,children:[Sqt(),h.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",XOt({path:Ne(h.oldPathLeft)})]})]}),h.kind==="error"&&f.jsxs("div",{className:"error",children:[gqt()," ",h.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(De,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ta():kEt()}),f.jsx(De,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?g_n():u_n()})]})]})]}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]})]})}const P5=e=>e==="running"||e==="starting";function POn(e){return P5(e.status)?T0(Date.now()-e.createdAt):e.endedAt?T0(e.endedAt-e.createdAt):"—"}function gH({instances:e,emptyLabel:n}){return e.length===0?f.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}):f.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:f.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:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:cLt()}),f.jsx("th",{children:Mh()}),f.jsx("th",{children:vXt()}),f.jsx("th",{children:vQt()})]})}),f.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 f.jsxs("tr",{children:[f.jsx("td",{children:f.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[f.jsx(jS,{backend:t.backend}),r&&f.jsx(Cm,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:Az(),"aria-label":Az(),onClick:i=>i.stopPropagation(),children:f.jsx(Y_,{size:12})})]})}),f.jsx("td",{children:f.jsx(al,{status:Qi(t)})}),f.jsx("td",{children:co(t.createdAt)}),f.jsx("td",{children:POn(t)})]},t.id)})})]})})}function FOn({projectId:e,onViewHistory:n}){var _;const t=ut({...mu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(_=t.error)==null?void 0:_.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},c=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>P5(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!P5(p.status)).sort(c);return f.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:[f.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:[f.jsx("div",{children:f.jsxs("h2",{children:[_Qt(),u&&u.length>0&&f.jsx("span",{className:"count-badge",children:u.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(De,{size:"small",onClick:o,disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]}),f.jsx(De,{size:"small",onClick:n,children:h!=null&&h.length?eZe({count:Wt(h.length)}):KYe()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!u||!h?f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]}):f.jsx(gH,{instances:u,emptyLabel:e?EYe():PYe()})]})}function HOn({projectId:e,onBack:n}){var c;const t=ut({...mu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(c=t.error)==null?void 0:c.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const u=setInterval(()=>a(h=>h+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(A0,{size:14})," ",fL()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:xFt()}),f.jsxs(De,{size:"small",onClick:o,disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),s&&f.jsx("div",{className:"error",children:s}),r?f.jsx(gH,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?bYe():MYe()}):f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",Ru()]})]})}const vH=["projects","harnesses","storage"],qOn=[{id:"compute",label:dL,icon:f.jsx(_S,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:pL,icon:f.jsx(mf,{size:15}),activeTabs:["environment"]},{id:"settings",label:tS,icon:f.jsx(vS,{size:15}),activeTabs:["settings",...vH]}];function UOn(e){return vH.includes(e)}function GOn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||UOn(e),a=A.useRef(null);return A.useLayoutEffect(()=>{const o=a.current,c=o==null?void 0:o.parentElement;if(!o||!c)return;const u=()=>o.scrollIntoView({block:"start"}),h=new ResizeObserver(u);h.observe(c),u();const _=()=>h.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,_,{passive:!0});return()=>{_();for(const m of p)window.removeEventListener(m,_)}},[e,n==null?void 0:n.id]),f.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&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:tS()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:hd,children:f.jsx(jOn,{})}),f.jsx("section",{ref:e==="projects"?a:void 0,className:hd,children:f.jsx(OOn,{remote:s})}),f.jsx("section",{ref:e==="harnesses"?a:void 0,className:hd,children:f.jsx(nOn,{remote:s})}),!s&&f.jsx("section",{ref:e==="storage"?a:void 0,className:hd,children:f.jsx(BOn,{})}),f.jsx("section",{className:hd,children:f.jsx(ROn,{})}),!s&&f.jsx("section",{className:hd,children:f.jsx(AOn,{})})]})]}),e==="compute"&&f.jsx(xOn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&f.jsx(HOn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:pL()}),f.jsx(NOn,{})]}),e==="git"&&f.jsx(LOn,{project:n,onProjectUpdate:t,remote:s})]})}function sb(e){return e.charAt(0).toUpperCase()+e.slice(1).replaceAll("-"," ")}function F5(e){return`${e.plugin?`${sb(e.plugin)}: `:""}${sb(e.name)}`}const bH=["plan","goal","new","resume","model","compact","copy","export"],VOn={plan:()=>wyt(),goal:()=>aKe(),new:()=>_rt(),resume:()=>l8t(),model:()=>ttt(),compact:()=>Kje(),copy:()=>bMe(),export:()=>d$e()};function KOn(e){return{name:e,get description(){return VOn[e]()},source:"command"}}function Ay(e){return bH.some(n=>n===e)}const ib={clear:"new",summarize:"compact"};function H5(e){const n=e.toLowerCase();return Ay(n)?n:Object.hasOwn(ib,n)?ib[n]:null}function yH(e){return Object.keys(ib).filter(n=>ib[n]===e)}function WOn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Ay(e.name)&&yH(e.name).some(t=>t.startsWith(n))}function o4(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(;r=r?h:s}${a.slice(h.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 hR(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 xH(e){return bH.filter(n=>n!=="plan"||e)}function YOn(e,n){const t=e.filter(r=>!H5(r.name));for(const r of xH(n))t.push(KOn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||F5(r).localeCompare(F5(s),void 0,{sensitivity:"base"}))}function c4(e){return e==="plan"||e==="goal"}function ZOn(e,n){for(const t of xH(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...yH(t)].join("|");if(t==="plan"){const s=new RegExp(`(^|\\s)\\/(?:${r})(?=\\s|$)`,"gi");if(s.test(e))return{name:t,prompt:e.replace(s,"").trim()}}else if(t==="goal"){const s=new RegExp(`^\\/(?:${r})(?=\\s|$)`,"i");if(s.test(e.trim()))return{name:t,prompt:e.trim().replace(s,"").trim()}}else if(new RegExp(`^\\/(?:${r})$`,"i").test(e.trim()))return{name:t,prompt:""}}return null}function l4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const JOn=["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"];let eDn=null;function q5(e,n){const t=eDn??(eDn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(sb(e)).width-t.measureText(`/${e}`).width;return Math.max(2,Math.ceil((s+6)/t.measureText(" ").width))}const tDn={plan:$4n,goal:BI,new:g3n,resume:PI,model:_S,compact:h4n,copy:Oh,export:fS};function wH({name:e,className:n}){const t=Ay(e)?tDn[e]:T3n;return f.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function kH({name:e}){return f.jsxs(f.Fragment,{children:[f.jsx(wH,{name:e,className:"me-1 inline-block align-middle"}),sb(e)]})}function SH(e,n,t,r,s,i=!1){let a=0;return QOn(e,n).map((o,c,u)=>{var m,x;const h=a+o.text.length;a=h;const _=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,_,h,c);let p=o.text;return i||((m=u[c-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(x=u[c+1])!=null&&x.command&&(p=p.replace(/[ \t]+$/," "))),o.command?f.jsx("span",{className:t,onMouseDown:void 0,children:f.jsx(kH,{name:_})},c):i?f.jsx("span",{"aria-hidden":"true",children:o.text},c):f.jsx(A.Fragment,{children:p},c)})}function nDn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=A.useRef(null),o=A.useRef(null),c=A.useRef(null),u=A.useId(),[h,_]=A.useState(!1),p=ut({...cxn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,x=p.isFetching,[k,v]=A.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},w=()=>{const N=a.current;if(!N)return;const z=N.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(z.left-4,window.innerWidth-T-16));v(z.top>300?{bottom:window.innerHeight-z.top+12,left:j,width:T}:{left:j,top:z.bottom+12,width:T})},y=()=>{b(),w(),_(!0)},C=()=>{b(),c.current=window.setTimeout(()=>_(!1),120)};return A.useEffect(()=>()=>b(),[]),A.useEffect(()=>{if(!h)return;const N=()=>w();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),f.jsxs(A.Fragment,{children:[f.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":zZ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onKeyDown:N=>{var z,T;if(N.key==="Escape"){_(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),y();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(T=o.current)==null||T.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var z,T;N.preventDefault(),(z=i.current)==null||z.focus(),(T=i.current)==null||T.setSelectionRange(t,t),b()},children:[f.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"}),f.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),f.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:f.jsx("span",{className:"bg-background text-skill-blue",children:f.jsx(kH,{name:n})})})]}),h&&oa.createPortal(f.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":LJ({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[f.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:[f.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),f.jsx(Ht,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:Jrn()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?f.jsx("span",{className:"text-muted",children:asn()}):f.jsx(Jo,{text:m??r.description})})]}),document.body)]})}function rDn({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:SH(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function sDn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=A.useRef(null);return A.useLayoutEffect(()=>{const o=i.current,c=a.current;if(!o||!c)return;const u=()=>{const _=getComputedStyle(o);for(const p of JOn)c.style.setProperty(p,_.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.disconnect()},[e,i]),A.useLayoutEffect(()=>{const o=i.current;if(!o)return;const c=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return c(),o.addEventListener("scroll",c),()=>o.removeEventListener("scroll",c)},[i,e]),f.jsxs("div",{ref:a,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:[SH(e,t,"",void 0,(o,c,u,h)=>{var x;const _=e.slice(u),p=((x=/^[ \t]+/.exec(_))==null?void 0:x[0].length)??0;if(u===n||_&&!_.startsWith(` -`)&&pk.name===c);return m&&m.source!=="command"?f.jsx(nDn,{label:o,name:c,end:u,skill:m,projectId:s,textareaRef:i},`${h}:${u}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function iDn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=A.useRef(null);return A.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>f.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[f.jsx(wH,{name:i.name,className:"shrink-0"}),f.jsx("span",{className:"skill-name shrink-0",children:F5(i)}),f.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:dsn()})]},i.name))})}function aDn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const U5=6.5,pR=2*Math.PI*U5;function oDn({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(cDn,{usage:e})}function cDn({usage:e}){const{open:n,setOpen:t,ref:r}=_o(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":aDn(a),c=a===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(a/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.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:ZRe(),onClick:()=>t(u=>!u),children:a===null?e1(s):f.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:U5,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:U5,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${pR*Math.max(a,2)/100} ${pR}`,transform:"rotate(-90 8 8)"})]})}),n&&f.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:[f.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[f.jsx("span",{children:GRe()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?iMe({value:Ne(e1(s))}):fMe({used:Ne(e1(s)),total:Ne(e1(i)),percent:Ne(c)})})]}),a!==null&&f.jsx(cH,{value:s,max:i,fillColor:o})]})]})}function lDn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),f.jsxs("div",{role:"group","aria-label":wz(),children:[f.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:wz()}),r.slice(n)]},"from-terminal")]}function uDn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=A.useRef(null),i=A.useRef(null),{data:a,isPending:o,error:c}=ut(fxn()),{data:u=[]}=ut(_h()),{data:h=[]}=ut(tI()),[_,p]=A.useState(""),[m,x]=A.useState(0);Em(s,n);const k=A.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=A.useMemo(()=>{const N=_.trim().toLowerCase(),z=M=>!N||M.toLowerCase().includes(N),T=(a??[]).filter(M=>M.id!==e).filter(M=>z(`${M.title??""} ${k.get(M.projectId)??""} ${su[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),j=h.filter(M=>z(`${M.title??""} ${M.cwd??""} ${su[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...T,...j]},[a,h,_,e,k]),b=A.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),w=Math.min(m,Math.max(0,v.length-1));A.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[w,v]);const y=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-start justify-center bg-modal-backdrop p-5 pt-[var(--modal-top)]",onClick:N=>{N.target===N.currentTarget&&n()},children:f.jsxs("div",{ref:s,className:"flex max-h-[calc(100vh_-_var(--modal-top)_-_1.25rem)] w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-label":Sz(),tabIndex:-1,children:[f.jsx("div",{className:"border-b border-border p-3",children:f.jsx(Ir,{"data-initial-focus":!0,value:_,placeholder:kz(),"aria-label":kz(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[w]?`resume-option-${v[w].key}`:void 0,onChange:N=>{p(N.target.value),x(0)},onKeyDown:N=>{if(!N.nativeEvent.isComposing)if(N.key==="ArrowDown"||N.key==="ArrowUp"){if(N.preventDefault(),v.length===0)return;const z=N.key==="ArrowDown"?1:-1;x((w+z+v.length)%v.length)}else N.key==="Enter"&&v[w]&&(N.preventDefault(),C(v[w]))}})}),f.jsx("div",{id:"resume-options",className:"min-h-0 flex-1 overflow-y-auto p-1.5",role:v.length>0?"listbox":void 0,"aria-label":v.length>0?Sz():void 0,children:o?f.jsxs(Kr,{className:"px-2.5 py-2",role:"status",children:[f.jsx(Nt,{})," ",Uk()]}):c&&!a?f.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:qk({error:Ne(c instanceof Error?c.message:String(c))})}):v.length===0?f.jsx("div",{className:"px-2.5 py-2 text-sm text-muted",role:"status",children:m8t()}):lDn(v,b,(N,z)=>{var D;const T=N.kind==="native"?N.chat:null,j=N.kind==="session"?N.session:null;return f.jsxs(Yn,{id:`resume-option-${N.key}`,ref:z===w?i:void 0,type:"button",role:"option","aria-selected":z===w,active:z===w,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>x(z),onClick:()=>C(N),children:[f.jsx(mh,{harness:(T==null?void 0:T.harness)??(j==null?void 0:j.harness)??"claude-code"}),f.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(T==null?void 0:T.title)??(j==null?void 0:j.title))==null?void 0:D.trim())||vd()}),f.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(T==null?void 0:T.cwd)??void 0,children:T?y(T.cwd):k.get((j==null?void 0:j.projectId)??"")??""}),f.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:co((T==null?void 0:T.updatedAt)??(j==null?void 0:j.updatedAt)??0)})]},N.key)})})]})}),document.body)}const ab="!";function mR(e){return e.startsWith(ab)?e.slice(ab.length).trim():null}function _Dn(e){return e.startsWith(ab)?e.slice(ab.length):e}function fDn(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 dDn(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 hDn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`,u+3),p=_===-1?e.length:_;/^[ \t]*$/.test(e.slice(h,u))&&/^[ \t\r]*$/.test(e.slice(u+3,p))&&a.push(u)}for(let u=0;u+1`$$${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}`)),WMn(t,n)}function rH(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 YMn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function Ur(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=YMn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const sH=A.createContext(void 0);function iH({projectId:e,sessionId:n,children:t}){const r=A.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=MB(s);return a?(a.source==="absolute"?FL(a.path):a.source==="artifact"&&!i?X_(e,a.path):g3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return f.jsx(sH,{value:r,children:t})}function ZMn({src:e,alt:n,name:t,onClose:r}){const s=A.useRef(null),i=A.useRef(null),[a,o]=A.useState(1),[c,u]=A.useState({width:0,height:0}),[h,_]=A.useState({width:0,height:0});A.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const x=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return x&&k.observe(x),()=>{k.disconnect(),m==null||m.close()}},[]);const p=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return oa.createPortal(f.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||ND(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[f.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:f.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:f.jsx("img",{src:e,alt:n,onLoad:m=>_({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),f.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[f.jsx(Cm,{shape:"circle",href:e,download:t||!0,"aria-label":Ev(),title:Ev(),className:"bg-background shadow-popover",children:f.jsx(fS,{size:16})}),f.jsx(It,{shape:"circle",onClick:r,"aria-label":p3(),title:p3(),className:"bg-background shadow-popover",children:f.jsx(ur,{size:16})})]}),f.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&f.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),f.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[f.jsx(It,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":KN(),title:KN(),children:f.jsx(a3n,{size:16})}),f.jsxs(De,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:WN(),"aria-label":WN(),children:[Math.round(a*100),"%"]}),f.jsx(It,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":VN(),title:VN(),children:f.jsx(Lh,{size:16})})]})]})]}),document.body)}function JMn({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=A.useState(!1),[o,c]=A.useState(!1),u=i&&n?n:e;return f.jsxs(f.Fragment,{children:[f.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&f.jsx(ZMn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const eOn=1e5;function tOn({code:e,lang:n}){const[t,r]=A.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return f.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[f.jsx(It,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:Vk(),"aria-label":Qet(),onClick:s,children:t?f.jsx(Ai,{size:13}):f.jsx(gf,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:Ykn(e,n,eOn)})})]})}function nOn(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 oR(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(),c=nOn(a[2]??"");if(!c[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:n4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:n4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(saH(e)}function sOn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");t.properties[s]=s==="src"&&t.tagName==="img"&&k6(i)?i:EP(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function lR({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 f.jsxs("button",{className:"file-chip",title:r?HY({path:ze(e)}):e,...Ur(o=>r==null?void 0:r(e,i,t,void 0,o)),disabled:!r,children:[f.jsx($I,{size:12}),f.jsx("span",{className:"file-chip-label",children:a}),f.jsx(GI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function iOn({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?pZ({id:ze(e)}):mJ({id:ze(e)}),...Ur(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(gS,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||OL()}),f.jsx(GI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const oH={singleDollarTextMath:!0},aOn=_y().use(dy).use(eH).use(tH,oH).use(FMn).use(rOn).use(Xv).use(sOn).use(jF);function oOn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const cH={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 f.jsx("code",{className:s,...r,children:t});const c=i?F3(i[1]):null;return f.jsx(tOn,{code:a,lang:c})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})};function cOn({children:e}){return f.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const Jo=A.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){pf();const o=A.useContext(sH),c=i??o,u=A.useMemo(()=>({"file-mention":h=>f.jsx(lR,{path:h.path,lines:h.lines,exp:h.exp,onOpenFile:t}),"run-mention":h=>f.jsx(iOn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:_,children:p,"data-figure-src":m,...x})=>{const k=typeof m=="string"?MB(m):null;if(k&&t){const v=k.source==="artifact"?`artifacts/${k.path}`:k.path,b=s?s(v):v;if(b)return f.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...Ur(w=>t(b,void 0,void 0,void 0,w)),children:p})}if(_&&oOn(_)&&t){let v;try{v=decodeURI(_)}catch{return f.jsx("span",{children:p})}const b=s?s(v):v;return b?f.jsx(lR,{path:b,onOpenFile:t}):f.jsx("span",{children:p})}return f.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",...x,children:p})},figure:({children:h})=>f.jsx(cOn,{children:h}),figcaption:({children:h})=>f.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,..._})=>f.jsx("th",{dir:"auto",..._}),td:({node:h,..._})=>f.jsx("td",{dir:"auto",..._}),img:({node:h,src:_,alt:p,className:m,...x})=>{var v;if(!_||typeof _!="string")return null;const k=c?c(_):_;return k?A.createElement(JMn,{...x,key:k,downloadName:(v=_.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(_,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...cH}),[t,r,s,i,o,c]);return f.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:f.jsx(Vzn,{content:rH(n,{predictMath:a}),processor:aOn,components:u,predict:a})})}),uR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function lOn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=A.useState(!1),u=A.useRef(null),[h,_]=A.useState(!1),[p,m]=A.useState(""),x=A.useRef(null);A.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),A.useEffect(()=>{var v;h&&((v=x.current)==null||v.focus())},[h]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),_(!1)};return f.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:[f.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[f.jsx(gS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),f.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?gxt({agent:ze(n)}):uxt({agent:ze(n)})}),f.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",...Ur(t),children:Ixt()})]}),h?f.jsxs(f.Fragment,{children:[f.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:_2t(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),_(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:uR,children:[f.jsx(De,{size:"small",onClick:()=>{m(""),_(!1)},children:rL()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(De,{size:"small",variant:"primary",onClick:k,children:[Yxt(),f.jsx(II,{size:13})]})]})]}):f.jsxs("div",{className:uR,children:[f.jsx(De,{size:"small",onClick:i,children:Uxt()}),f.jsx(De,{size:"small",onClick:()=>_(!0),children:s2t()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[f.jsx(De,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:qyt()}),f.jsx(De,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":Txt(),onClick:()=>c(v=>!v),children:f.jsx(rc,{size:13})}),o&&f.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:f.jsx(Xn,{onClick:()=>{c(!1),r("bypassPermissions")},children:Xyt()})})]}):f.jsx(De,{size:"small",variant:"primary",onClick:()=>r(),children:rxt()})]})]})}function _R({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=A.useState(""),[o,c]=A.useState(!1),[u,h]=A.useState(null);async function _(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(m instanceof Error?m.message:String(m))}finally{c(!1)}}}return f.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:_,children:[f.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),f.jsx(De,{type:"submit",disabled:o||!i.trim(),children:o?ia():nc()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??dKe()}),u&&f.jsx("div",{className:"error",children:u})]})}function lH({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return f.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[f.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:f.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)&&f.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[f.jsx("span",{children:t??`${i}%`}),r]})]})}function uOn({settings:e}){const[n,t]=A.useState(!1);return f.jsxs("label",{className:"inline-flex max-w-full flex-wrap items-center gap-2 text-sm text-subtext",children:[xln(),f.jsx("span",{className:"inline-block w-max max-w-full",children:f.jsx(Yo,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:bL()},...e.defaultHost&&!e.hosts.some(r=>r.host===e.defaultHost)?[{id:e.defaultHost,label:e.defaultHost}]:[],...e.hosts.map(r=>({id:r.host,label:r.host}))],onSelect:r=>{t(!0),Hbn(r||null).catch(s=>{pn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function _On({host:e,connecting:n,reference:t,onChange:r}){const s=A.useId(),i=an({mutationFn:Fbn,scope:{id:`ssh-settings-${e.host}`}});function a(o){r(o),i.reset(),!(o!==null&&!o.trim())&&i.mutate({host:e.host,container:(o==null?void 0:o.trim())??null})}return f.jsxs("details",{className:"pb-3",children:[f.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-subtext focus-visible:outline-2 focus-visible:outline-text",children:WD()}),f.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[f.jsxs("label",{className:"text-sm text-subtext",children:[Hln(),f.jsx(Yo,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:zln()},{id:"container",label:Dln()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&f.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[hln(),f.jsx(qr,{id:`${s}-container`,value:t,disabled:n,required:!0,onChange:o=>a(o.target.value)})]}),i.error&&f.jsx("p",{className:"m-0 text-sm text-accent-red",role:"status",children:i.error.message})]})]})}const ec=["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(" "),nf=["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(" "),fOn=["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(" "),Ny="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",Da=["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(" "),iC=["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(" "),nl=["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(" "),I5=["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(" "),b0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),md=["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(" "),dOn=new Set(["gh auth login","hf auth login","claude auth status"]);function uH(e){return dOn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function zy(){const[e,n]=A.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function aC({note:e,className:n,disabled:t,resolve:r=uH,onRun:s}){return e?f.jsx("p",{className:n,children:gh(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function jy({run:e,onComplete:n,onClose:t}){return e?f.jsx(o5n,{path:e.path,label:e.command,onComplete:n,onError:r=>pn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function r4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:W_()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:XD()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="local"?Wk():fXt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:pFt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:YD()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:h3()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:EZt()}:{cls:"warn",variant:"warning",label:yL()}:{cls:"warn",variant:"warning",label:PGt()}}function hOn({h:e}){return e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod?f.jsx(f.Fragment,{children:Xjt()}):e.authMethod?e.authMethod==="local"?f.jsx(f.Fragment,{children:zv()}):f.jsx(f.Fragment,{children:e.authMethod==="oauth"?rDt():Kk()}):f.jsx(f.Fragment,{children:"—"})}function pOn(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function mOn({remote:e}){const n=ku(),{data:t=null}=ut(n),[r,s]=A.useState(null),[i,a]=A.useState(!1),o=zy(),[c,u]=A.useState(null),h=ut(tI()),_=(x,k=!1)=>{a(!0),Y_(x,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((x,k)=>Number(k.agentReady)-Number(x.agentReady)),m=p.find(x=>x.id===r)??p[0];return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:d3()}),!e&&c&&h.data&&f.jsx(l$,{harness:c,commands:h.data[c.id],onClose:()=>u(null)}),f.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:f.jsx(Yo,{variant:"field",dropDown:!0,title:d3(),choices:p.map(x=>({id:x.id,label:x.name})),value:(m==null?void 0:m.id)??null,onSelect:x=>{const k=p.find(v=>v.id===x);k&&s(k.id)},renderIcon:x=>{const k=p.find(v=>v.id===x.id);return k&&f.jsx(vh,{harness:k.id})},renderLabel:x=>{const k=p.find(b=>b.id===x.id),v=k&&r4(k);return f.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[x.label,v&&f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),f.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?f.jsxs("div",{className:ec,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Ut,{variant:r4(m).variant,children:r4(m).label}),f.jsx("div",{className:"spacer flex-1"}),!e&&!m.catalogPending&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported"&&f.jsxs(De,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[f.jsx(vf,{size:14})," ",FD()]}),f.jsxs(De,{size:"small",onClick:()=>_(!0,!0),disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),f.jsxs("div",{className:gs(nf,"[&_.v]:text-sm"),children:[f.jsx("span",{className:"k",children:LLt()}),f.jsx("span",{className:"v",children:m.binPath??TOt()}),f.jsx("span",{className:"k",children:EL()}),f.jsx("span",{className:"v",children:m.version??"—"}),f.jsx("span",{className:"k",children:rLt()}),f.jsx("span",{className:"v",children:f.jsx(hOn,{h:m})}),m.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:m.id==="opencode"?RJt():Zk()}),f.jsx("span",{className:"v",children:m.account})]}),m.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:ZVt()}),f.jsx("span",{className:"v",children:m.org})]}),m.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:JKt()}),f.jsx("span",{className:"v",children:m.plan})]}),f.jsx("span",{className:"k",children:UDt()}),f.jsx("span",{className:"v",children:m.catalogPending?W_():m.models.length>0?kMt({count:Xt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(x=>ze(K1(x))))}):Yk()})]}),f.jsx(aC,{note:m.agentNote,className:gs(Da,"text-sm"),disabled:e,resolve:x=>{var k;return pOn(m,(k=h.data)==null?void 0:k[m.id],x)??uH(x)},onRun:(x,k)=>o.start(x,k,m.id)}),o.run&&f.jsx("div",{hidden:o.run.owner!==m.id,children:f.jsx(jy,{run:o.run,onComplete:()=>_(!0,!0),onClose:o.clear})}),m.id==="opencode"&&f.jsx(h$,{installed:m.installed})]}):null:f.jsxs(Gr,{children:[f.jsx(zt,{})," ",TBt()]})]})}function gOn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Ut,{variant:"success",children:c$t()}):f.jsx(Ut,{variant:"error",children:PUt()}):f.jsx(Ut,{variant:"error",children:HIt()}):f.jsx(Ut,{variant:"error",children:nHt()})}function vOn({onEditState:e}){var T;const n=an({mutationFn:Rbn}),t=qz(),r=ut(t),s=r.data??null,i=j=>{Jr(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((T=r.error)==null?void 0:T.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(null),b=j=>{i(j),c(j.context??""),h(j.namespace)},w=A.useRef(null);A.useEffect(()=>{const j=w.current;w.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const y=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!y;A.useEffect(()=>{e==null||e({dirty:C,saving:_})},[C,_,e]);async function N(){if(!(m||_||!y)){x(!0);try{await tt.fetchQuery({...qz(),staleTime:0})}catch(j){pn(j instanceof Error?j.message:String(j),"error")}finally{x(!1)}}}async function z(j){if(j.preventDefault(),!(_||m)){p(!0),v(null);try{b(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"text-subtext",children:Dh()}),f.jsx("dd",{className:"m-0",children:m||_?f.jsx(Ut,{children:ta()}):C?f.jsx(Ut,{children:ID()}):f.jsx(gOn,{s})})]}),y&&!m&&!_&&s.preflight.error&&f.jsx("p",{className:`${Ny} break-words`,children:s.preflight.error}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:z,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[p$t(),f.jsx(Yo,{choices:[{id:"",label:s.currentContext?oRt({context:ze(s.currentContext)}):eRt()},...o&&!s.contexts.includes(o)?[{id:o,label:IOt({context:ze(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:_||m,onSelect:c})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[Gqt(),f.jsx(qr,{type:"text",value:u,disabled:_||m,onChange:j=>h(j.target.value),placeholder:rBt(),autoComplete:"off",spellCheck:!1})]}),k&&f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",onClick:()=>void N(),disabled:_||m||!y,children:[f.jsx(Pa,{size:13})," ",m?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:_||m||y,children:_?ia():nc()})]})]})]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",lIt()]})})}function bOn(){var y;const e=an({mutationFn:C=>Obn(...C)}),n=Uz(),t=ut(n),r=t.data??null,s=C=>{Jr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=A.useState(null),o=i??((y=t.error)==null?void 0:y.message)??null,[c,u]=A.useState(""),[h,_]=A.useState(""),[p,m]=A.useState(!1),x=t.isPending||p,[k,v]=A.useState(!1);async function b(){if(!(x||k)){m(!0),a(null);try{await tt.fetchQuery({...Uz(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function w(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||x||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),_("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return f.jsxs(f.Fragment,{children:[!r&&x?f.jsxs(Gr,{children:[f.jsx(zt,{})," ",mIt()]}):r&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Dh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Ut,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?eS():jb()})})]}),(r==null?void 0:r.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:DRt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:w,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?HRt():lMt(),f.jsx(qr,{type:"password",value:c,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?QRt():mMt(),f.jsx(qr,{type:"password",value:h,onChange:C=>_(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:nMt()}),o&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:x||k,onClick:()=>void b(),children:[f.jsx(Pa,{size:13})," ",km()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||x||k||(r==null?void 0:r.processEnv),children:k?ia():nc()})]})]})]})}const _H="rounded-sm border-border-strong bg-surface text-subtext",fH="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",yOn=5e3;function dH(e){const n=Ia(),t=e.map(a=>Gz(a)),r=YV({queries:t.map(a=>({...a,refetchInterval:yOn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{An(n)&&Jr(Gz(a).queryKey,{running:!0})}]}function xOn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Ut,{className:fH,children:lL()})});if(e===void 0)return f.jsx(Ut,{className:_H,children:vL()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?f.jsx(Ut,{className:"rounded-sm",variant:"error",children:Jk()}):e.toolsFound?i?f.jsx(Ut,{className:"rounded-sm",variant:"warning",children:uL()}):f.jsx(Ut,{className:"rounded-sm",variant:"success",children:wm()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:s.length===1?TMt({tool:ze(s[0])}):IMt()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!i&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:co(e.testedAt)})]})}function wOn({remote:e=!1}){var I;const n=eI(),t=ut(n),r=((I=t.data)==null?void 0:I.hosts)??(t.isError?[]:null),[s,i]=A.useState(!1),[a,o]=A.useState({}),[c,u]=A.useState({}),h=A.useRef(0),[_,p]=A.useState(!1),[m,x]=A.useState({}),[k,v]=A.useState(null),[b,w]=A.useState(!1),[y,C]=A.useState(0),N=e?[]:(r==null?void 0:r.filter($=>{const q=a[$.host]??$.lastTest;return(q==null?void 0:q.reachable)&&q.toolsFound}).map($=>$.host))??[],[z,T]=dH(N);function j($){h.current+=1,p(!1),w(!1),C(q=>q+1),v($),x(q=>({...q,[$]:!0}))}function M(){h.current+=1,p(!1),w(!1),v(null)}function D($,q){x(H=>({...H,[$]:!q}))}return f.jsxs(f.Fragment,{children:[t.error&&f.jsx("p",{className:"text-sm text-accent-red",children:t.error.message}),f.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[!e&&t.data&&f.jsx(uOn,{settings:t.data}),f.jsxs(De,{variant:"ghost",className:"ms-auto",onClick:()=>i(!0),children:[f.jsx(vS,{size:14})," ",RL()]})]}),r===null?f.jsxs(Gr,{children:[f.jsx(zt,{})," ",wL()]}):r.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:MUt()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map($=>{var ne,ce,_e;const q=c[$.host]===void 0?$.container??null:c[$.host],H=a[$.host],Q=q!==null&&((ne=H==null?void 0:H.container)==null?void 0:ne.reference)===q.trim()?H:void 0,V=q!==null?Q:H!=null&&H.container?$.lastTest:H??$.lastTest,J=(ce=Q==null?void 0:Q.container)==null?void 0:ce.error,Z=((_e=Q==null?void 0:Q.container)==null?void 0:_e.ready)===!1,B=(V==null?void 0:V.error)||J,L=k===$.host,F=m[$.host]??!1,U=!e&&(L||!!B),K=`${$.user?`${$.user}@`:""}${$.hostname??$.host}${$.port?`:${$.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:$.host,children:$.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:K,children:K})]})}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsxs("div",{className:"flex items-center gap-2 text-start",children:[f.jsx(xOn,{test:V,connecting:L&&!b,masterRunning:z[$.host],containerFailed:Z}),U&&f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":F,"aria-label":F?cX({name:ze($.host)}):WX({name:ze($.host)}),onClick:se=>{se.stopPropagation(),D($.host,F)},children:f.jsx(rc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${F?" rotate-180":""}`})})]}),f.jsx(De,{size:"small",type:"button",className:"justify-self-end",onClick:se=>{se.stopPropagation(),L&&!b?M():j($.host)},disabled:!L&&(k!==null&&!b||q!==null&&!q.trim()),children:L?b?Ws():Q_():(V==null?void 0:V.reachable)===!1||Z?Ws():V?NL():Qk()})]})]}),!e&&f.jsx(_On,{host:$,connecting:L&&!b,reference:q,onChange:se=>{L&&M(),u(G=>({...G,[$.host]:se})),o(G=>{const oe={...G};return delete oe[$.host],oe})}}),U&&(F||L)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3${F?"":" hidden"}`,children:[!L&&B&&f.jsx(c5n,{host:$.host,transcript:B}),L&&!_&&f.jsx(wS,{host:$.host,backend:"ssh",active:F,onComplete:se=>{if(se.backend!=="ssh")return;T($.host);const G=h.current;if(q===null){o(oe=>({...oe,[$.host]:{...se.result,container:null}})),w(!1),v(null);return}p(!0),qbn($.host,q.trim()).then(oe=>{h.current===G&&o(le=>({...le,[$.host]:{...oe,container:oe.container??{reference:q.trim(),ready:!1,error:oe.error??null}}}))}).catch(oe=>{h.current===G&&o(le=>({...le,[$.host]:{...se.result,container:{reference:q.trim(),ready:!1,error:oe instanceof Error?oe.message:String(oe)}}}))}).finally(()=>{h.current===G&&(p(!1),w(!1),v(null))})},onError:se=>{w(!0),o(G=>({...G,[$.host]:{container:q===null?null:{reference:q.trim(),ready:!1,error:se},reachable:!1,toolsFound:!1,missingTools:[],error:se,testedAt:Date.now()}}))}},y)]})]},$.host)})}),s&&f.jsx(B$,{onClose:()=>i(!1)})]})}function kOn({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Ut,{className:fH,children:lL()}):e===null?f.jsx(Ut,{className:_H,children:vL()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Ut,{className:"rounded-sm",variant:"warning",children:uL()}):f.jsx(Ut,{className:"rounded-sm",variant:"success",children:wm()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:gqt()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:hGt()}):f.jsx(Ut,{className:"rounded-sm",variant:"error",children:Jk()})}function SOn({remote:e=!1}){var B;const n=an({mutationFn:eyn}),t=cxn(),r=ut(t),s=r.data??null,i=L=>{Jr(t.queryKey,F=>(typeof L=="function"?L(F??null):L)??void 0)},a=s?null:((B=r.error)==null?void 0:B.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(""),[m,x]=A.useState(""),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(null),[N,z]=A.useState(!1),[T,j]=A.useState(!1),[M,D]=A.useState(0),I=!e&&o&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[o]:[],[$,q]=dH(I);function H(){j(!1),D(L=>L+1),z(!0)}const Q=L=>{i(L),c(L.host??""),h(L.partition??""),p(L.account??""),x(L.timeLimit??"")},V=A.useRef(null);A.useEffect(()=>{const L=V.current;V.current=s,s&&(!L||o===(L.host??"")&&u.trim()===(L.partition??"")&&_.trim()===(L.account??"")&&m.trim()===(L.timeLimit??""))&&(c(s.host??""),h(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,o,u,_,m]);const J=s!==null&&o===(s.host??"")&&u.trim()===(s.partition??"")&&_.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function Z(L){if(L.preventDefault(),!k){v(!0),w(null);try{Q(await n.mutateAsync({host:o,partition:u.trim(),account:_.trim(),timeLimit:m.trim()}))}catch(F){w(F instanceof Error?F.message:String(F))}finally{v(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[!N&&(y==null?void 0:y.error)&&f.jsx("p",{className:Ny,children:y.error}),f.jsxs("form",{className:iC,onSubmit:Z,children:[f.jsx("div",{className:"max-w-xl",children:f.jsxs("label",{children:[rqt(),f.jsx(Yo,{choices:[{id:"",label:bL()},...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:k||N,onSelect:L=>{c(L),C(null),z(!1),j(!1)}})]})}),f.jsxs("div",{className:"actions",children:[!e&&f.jsx(De,{type:"button",onClick:()=>{N&&!T?(j(!1),z(!1)):H()},disabled:!o,title:o?void 0:CJt(),children:N?T?Ws():Q_():y?NL():Qk()}),f.jsx("span",{role:"status",children:f.jsx(kOn,{test:y,connecting:N&&!T,masterRunning:$[o]})})]}),f.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[BKt(),f.jsx(qr,{type:"text",list:"slurm-partitions",value:u,onChange:L=>h(L.target.value),placeholder:jz(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map(L=>f.jsx("option",{value:L},L))})]}),f.jsxs("label",{children:[Zk(),f.jsx(qr,{type:"text",value:_,onChange:L=>p(L.target.value),placeholder:jz(),autoComplete:"off",spellCheck:!1})]})]}),f.jsxs("label",{className:"mt-3 block max-w-xl",children:[oZt(),f.jsx(qr,{type:"text",value:m,onChange:L=>x(L.target.value),placeholder:DIt(),autoComplete:"off",spellCheck:!1})]})]}),b&&f.jsx("div",{className:"error",children:b}),f.jsx("div",{className:"actions",children:f.jsx(De,{variant:"primary",type:"submit",disabled:k||J||N,children:k?ia():nc()})})]}),!e&&N&&f.jsx(wS,{host:o,backend:"slurm",onComplete:L=>{L.backend==="slurm"&&(C(L.result),q(o),j(!1),z(!1))},onError:L=>{j(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:L})}},M)]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",jHt()]})})}function COn(){var C;const e=an({mutationFn:nyn}),n=lxn(),t=ut(n),r=t.data??null,s=N=>{Jr(n.queryKey,z=>(typeof N=="function"?N(z??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=A.useState(""),[c,u]=A.useState(!1),[h,_]=A.useState(null),[p,m]=A.useState(null),x=p!==null&&p!=="testing"?p:null,k=N=>{s(N),o(N.address??"")},v=A.useRef(null);A.useEffect(()=>{const N=v.current;v.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const b=r!==null&&a===(r.address??"");async function w(N){if(N.preventDefault(),!c){u(!0),_(null);try{k(await e.mutateAsync({address:a}))}catch(z){_(z instanceof Error?z.message:String(z))}finally{u(!1)}}}async function y(){m("testing");try{m(await ryn(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[(x==null?void 0:x.error)&&f.jsx("p",{className:Ny,children:x.error}),f.jsxs("form",{className:iC,onSubmit:w,children:[f.jsxs("label",{children:[QFt(),f.jsx(qr,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[UBt(),": ",ze(r.resolvedAddress)," · ",kL(),": ",r.source]}),h&&f.jsx("div",{className:"error",children:h}),f.jsxs("div",{className:"actions",children:[f.jsx(De,{variant:"primary",type:"submit",disabled:c||b,children:c?ia():nc()}),f.jsx(De,{type:"button",onClick:()=>void y(),disabled:p==="testing",children:bYt()}),f.jsx(EOn,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[dWt(),": ",x.rayVersion]})]})]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",wHt()]})})}function EOn({test:e}){return e===null?null:e==="testing"?f.jsx(Ut,{children:EYt()}):e.reachable?f.jsx(Ut,{variant:"success",children:yWt()}):f.jsx(Ut,{variant:"error",children:Jk()})}function NOn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:el(e.memBytes),r=e.gpus.length===0?null:ATt({count:e.gpus.length});return[n,e.cpuCount>0?rjt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function zOn({remote:e}){var p;const n=ut(_xn()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=A.useState(0),[o,c]=A.useState(!0),[u,h]=A.useState(!1),_=()=>n.refetch();return f.jsxs(f.Fragment,{children:[r&&!t?f.jsx("div",{className:"error",children:r}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:fOn,children:[f.jsx("span",{className:"k",children:Dh()}),f.jsx("span",{className:"v",children:!t&&s||u?f.jsxs(Ut,{className:"gap-1.5",role:"status",children:[f.jsx(zt,{}),u?gDt():ta()]}):r?f.jsx(Ut,{variant:"warning",children:h3()}):t?t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Ut,{variant:"success",children:wm()}):t.sshKeyStatus==="unknown"?f.jsx(Ut,{variant:"warning",children:h3()}):f.jsx(Ut,{variant:"warning",children:jb()}):f.jsx(Ut,{variant:"warning",children:yL()}):null}),f.jsx("span",{className:"k",children:iKt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:CXt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Ut,{variant:"success",children:bVt()}):t.sshKeyStatus==="no_local_match"?f.jsx(Ut,{variant:"warning",children:eVt()}):t.sshKeyStatus==="none_registered"?f.jsx(Ut,{variant:"error",children:xGt()}):f.jsx(Ut,{children:SL()}):"—"})]}),e&&t&&!t.loggedIn&&f.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:xRt({command:ze("orx login")})}),!e&&i>0&&f.jsx(a5n,{login:o,onComplete:()=>{h(!1),a(0),_()},onError:m=>{h(!1),pn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?f.jsxs("p",{dir:"auto",className:Da,children:[TDt()," ",f.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:Da,children:[oGt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),MYt()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?f.jsx("p",{dir:"auto",className:Da,children:GJt({register:ze(`orx ssh-key add ${t.sshKeyPath}`),load:ze("ssh-add")})}):f.jsxs("p",{dir:"auto",className:Da,children:[eGt()," ",f.jsx("code",{children:"ssh-add"}),GVt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&f.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)})]}),f.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[f.jsxs(De,{onClick:()=>void _(),disabled:s||u,children:[f.jsx(Pa,{size:13})," ",s?ta():xm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&f.jsxs(De,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?f.jsx(zt,{}):f.jsx(vf,{size:13})," ",t.loggedIn?Mtn():zL()]})]})]})}const jOn={local:pTe,ssh:XTe,tinker:rAe,hf:tTe,modal:wTe,k8s:cTe,slurm:qTe,ray:LTe,openresearch:jTe},Ty={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"},fR=["hf","modal","slurm","ray","openresearch"],s4=["hf","modal","openresearch"],hH={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"]},$5=["tinker","hf","modal","ray","k8s"],TOn={tinker:BRe,hf:vRe,modal:CRe,openresearch:RRe},dR="__custom__";function Wp(e,n){return!!(n&&!(hH[e]??[]).includes(n))}function AOn({settings:e,projectId:n,onSaved:t}){const r=an({mutationFn:iyn}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=A.useState(s),[c,u]=A.useState(i),[h,_]=A.useState(Wp(s,i)),[p,m]=A.useState(!1),[x,k]=A.useState(null),v=e.targets.find($=>$.id===a),b=e.targets.filter($=>$.configured||$.id===s),w=fR.includes(a),y=s4.includes(a),C=hH[a]??[],N=a===s&&(!w||c.trim()===i),z=ef[a](),T=TOn[a],j=p?Prn():y&&!c.trim()?ANt({destination:z}):a==="ssh"?YMt():UMt({destination:z});A.useEffect(()=>{o(s),u(i),_(Wp(s,i))},[s,i]);async function M($,q){const H=fR.includes($);if(!(p||s4.includes($)&&!q.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:$,flavor:H&&q.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),_(Wp(s,i))}finally{m(!1)}}}function D($){const q=e.targets.find(Q=>Q.id===$);if(!q)return;o(q.id);const H=q.id===s?i:"";u(H),_(Wp(q.id,H)),s4.includes(q.id)||M(q.id,H)}function I($){if($===dR){_(!0);return}_(!1),u($),(!y||$)&&M(a,$)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:mBt()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:$=>{$.preventDefault(),N||M(a,c)},children:[f.jsx(Yo,{choices:b.map($=>({id:$.id,label:ef[$.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:$=>{const q=e.targets.find(H=>H.id===$.id);return q?f.jsx(Ih,{kind:Ty[q.id],size:16}):null},onSelect:D}),w&&f.jsx("div",{children:h?f.jsxs("div",{className:"relative",children:[f.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:c,onChange:$=>u($.target.value),onBlur:()=>{if(y&&!c.trim()){a===s&&(u(i),_(Wp(s,i)));return}N||M(a,c)},placeholder:L$t(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),f.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":zz(),title:zz(),onMouseDown:$=>$.preventDefault(),onClick:()=>_(!1),children:f.jsx(rc,{size:12})})]}):f.jsx(Yo,{choices:[{id:"",label:y?SNt():_Ot()},...c&&!C.includes(c)?[{id:c,label:Sjt({value:ze(c)})}]:[],...C.map($=>({id:$,label:$})),{id:dR,label:q$t()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),x&&f.jsx("div",{className:"error mt-2.5",children:x}),v&&!v.configured&&f.jsx("p",{className:Da,children:KYt()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),T&&f.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:T()})]})}function ROn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?uNt():e.id==="openresearch"?zL():e.id==="ray"?Qk():Etn();return f.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&&f.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":ef[e.id](),"aria-describedby":i,"aria-haspopup":$5.includes(e.id)?"dialog":void 0}),f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(Ih,{kind:Ty[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:ef[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:jOn[e.id]()}),f.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?f.jsxs(f.Fragment,{children:[e.id==="tinker"?KAt():frn()," ",f.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:qjt()})]}):t??e.summary}),f.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[f.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?pL():e.configured?!r||$5.includes(e.id)?eS():asn():a}),r&&f.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:f.jsx(Q1,{size:16})})]})]})}function MOn({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(A0,{size:16})," ",dL()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:f.jsx(Ih,{kind:Ty[e.id],size:36})}),f.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:ef[e.id]()})]}),n&&f.jsx(Ut,{className:"flex-none border-primary bg-primary-subtle text-primary",children:pL()})]}),f.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"&&f.jsx(wOn,{remote:r}),e.id==="slurm"&&f.jsx(SOn,{remote:r}),e.id==="openresearch"&&f.jsx(zOn,{remote:r})]})]})}function OOn({target:e,remote:n,onClose:t}){const r=A.useRef(null),[s,i]=A.useState({dirty:!1,saving:!1});A.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm(PAt())||t()};return f.jsxs("dialog",{ref:r,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(),a())},onCancel:o=>{o.preventDefault(),a()},children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(Ih,{kind:Ty[e.id],size:32}),f.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:ef[e.id]()})]}),f.jsx(It,{title:j0(),"aria-label":j0(),onClick:a,disabled:s.saving,children:f.jsx(ur,{size:14})})]}),e.id==="tinker"&&f.jsx(LOn,{target:e}),e.id==="hf"&&f.jsx($On,{remote:n}),e.id==="modal"&&f.jsx(bOn,{}),e.id==="ray"&&f.jsx(COn,{}),e.id==="k8s"&&f.jsx(vOn,{onEditState:i})]})}function DOn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=JL(e==null?void 0:e.id),i=ut(s),a=i.data??null,o=I=>{Jr(s.queryKey,$=>(typeof I=="function"?I($??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=A.useState(null),[_,p]=A.useState(null),m=uxn(),x=ut(m),k=x.data??null,v=((D=x.error)==null?void 0:D.message)??null;A.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},w=a?a.targets:null,y=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=w?[...w].sort((I,$)=>+($.id===y)-+(I.id===y)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],z=(C==null?void 0:C.filter(I=>!I.configured))??[],T=I=>f.jsx(ROn,{target:I,isDefault:y===I.id,summary:I.id==="local"?k?NOn(k):v??kBt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),j=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return j&&!$5.includes(j.id)?f.jsx(MOn,{target:j,isDefault:y===j.id,onBack:()=>h(null),remote:r}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:hL()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:t$t()}),f.jsx(tDn,{projectId:e==null?void 0:e.id,onViewHistory:n}),c?f.jsx("div",{className:"error",children:c}):a?f.jsxs(f.Fragment,{children:[_&&f.jsx("div",{className:"error",children:_}),f.jsx(AOn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:eS()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(T)})]}),z.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Sqt()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:z.map(T)})]}),j&&f.jsx(OOn,{target:j,remote:r,onClose:()=>h(null)})]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",nIt()]})]})}function LOn({target:e}){var w;const n=an({mutationFn:Cbn}),[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(null),c=Hz(),u=ut(c),h=u.data??null,_=a??((w=u.error)==null?void 0:w.message)??null,p=y=>{Jr(c.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},[m,x]=A.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){x(!0),o(null);try{await tt.fetchQuery({...Hz(),staleTime:0})}catch(y){o(y instanceof Error?y.message:String(y))}finally{x(!1)}}}async function b(y){if(y.preventDefault(),!(!t.trim()||s||k)){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 f.jsxs(f.Fragment,{children:[!h&&k?f.jsxs(Gr,{children:[f.jsx(zt,{})," ",ta()]}):h&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Dh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Ut,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?wm():h.validationStatus==="invalid"?irn():h.validationStatus==="billingRequired"?Gnn():jb()})})]}),(h==null?void 0:h.validationStatus)==="billingRequired"&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:f.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:$nn()})}),(h==null?void 0:h.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Znn()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?Ben():Kk(),f.jsx(qr,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:y=>r(y.target.value),autoComplete:"new-password"})]}),_&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:_}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:s||k,onClick:()=>void v(),children:[f.jsx(Pa,{size:13})," ",k?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?TL():nc()})]})]})]})}function IOn({settings:e}){return e.validationStatus==="missing"?f.jsx(Ut,{variant:"warning",children:jb()}):e.validationStatus==="invalid"?f.jsx(Ut,{variant:"error",children:HFt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?f.jsx(Ut,{variant:"success",children:wm()}):e.jobsWrite===!1?f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Ut,{variant:"warning",children:KUt()}),f.jsx(lS,{content:ZTt(),className:"text-subtext",children:f.jsx(hS,{size:15})})]}):null}function $On({remote:e}){var w;const n=an({mutationFn:kbn}),t=Fz(),r=ut(t),s=r.data??null,i=y=>{Jr(t.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},a=s?null:((w=r.error)==null?void 0:w.message)??null,[o,c]=A.useState(""),[u,h]=A.useState(!1),[_,p]=A.useState(!1),[m,x]=A.useState(null),k=zy();async function v(){if(!(u||_||!s&&!a)){p(!0),x(null);try{await tt.fetchQuery({...Fz(),staleTime:0})}catch(y){x(y instanceof Error?y.message:String(y))}finally{p(!1)}}}async function b(y){if(y.preventDefault(),!(!o.trim()||u||_||!s&&!a)){h(!0),x(null);try{const C=await n.mutateAsync(o.trim());i(C),x(null),c("")}catch(C){x(C instanceof Error?C.message:String(C))}finally{h(!1)}}}return f.jsxs(f.Fragment,{children:[a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Zk()}),f.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Dh()}),f.jsx("dd",{className:"m-0 text-text",children:f.jsx(IOn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&f.jsx("p",{className:Ny,children:s.validationError}),s.source==="env"&&f.jsx("p",{className:Da,children:QPt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&f.jsx(aC,{note:GTt({login:"`hf auth login`",url:ze("huggingface.co/settings/tokens")}),className:Da,disabled:e,onRun:k.start}),f.jsx(jy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",LHt()]}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?Ven():sOt(),f.jsx(qr,{type:"password",value:o,onChange:y=>c(y.target.value),placeholder:(s==null?void 0:s.maskedToken)??HPt(),autoComplete:"off"})]}),m&&f.jsx("div",{className:"error",children:m}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(De,{type:"button",disabled:u||_||!s&&!a,onClick:()=>void v(),children:[f.jsx(Pa,{size:13})," ",_?ta():xm()]}),f.jsx(De,{variant:"primary",type:"submit",disabled:!o.trim()||u||_||!s&&!a,children:u?TL():nc()})]})]})]})}const pH=/^hf_[A-Za-z0-9]{10,}$/;function mH(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:Da,children:[eZt()," ",f.jsx("code",{children:"HF_TOKEN"}),BQt()]})})})}const hR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function B5(e,n){const t=n instanceof Error?n.message:String(n);pn(t.includes(e)?t:`${e}: ${t}`,"error")}function BOn({name:e,entry:n,onVars:t}){const r=an({mutationFn:_=>UL(..._)}),s=an({mutationFn:Lbn}),[i,a]=A.useState(""),[o,c]=A.useState(!1);async function u(){if(!(!i.trim()||o)){c(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(_){B5(e,_)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(_){B5(e,_)}finally{c(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{className:"font-mono text-sm",children:e}),f.jsx("td",{className:"text-base text-subtext",children:n?f.jsxs(f.Fragment,{children:[n.maskedValue,n.inProcessEnv&&f.jsx(Ut,{children:RKt()})]}):f.jsx(qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&a("")},placeholder:CL(),"aria-label":UJ({name:ze(e)}),autoComplete:"new-password",disabled:o})}),f.jsx("td",{children:n?f.jsx(It,{className:"[&:hover:not(:disabled)]:text-accent-red",title:r3({name:ze(e)}),"aria-label":r3({name:ze(e)}),onClick:()=>void h(),disabled:o,children:f.jsx(bf,{size:13})}):i.trim()&&f.jsx(De,{size:"small",onClick:()=>void u(),disabled:o,children:o?ia():nc()})})]}),!n&&e!=="HF_TOKEN"&&pH.test(i.trim())&&f.jsx(mH,{})]})}function POn({onVars:e,onDone:n}){const t=an({mutationFn:_=>UL(..._)}),[r,s]=A.useState(""),[i,a]=A.useState(""),[o,c]=A.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){c(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(_){B5(r.trim(),_)}finally{c(!1)}}}const h=_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(qr,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:_=>s(_.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":fUt(),autoComplete:"off",spellCheck:!1,disabled:o})}),f.jsx("td",{children:f.jsx(qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:h,placeholder:CL(),"aria-label":bUt(),autoComplete:"new-password",disabled:o})}),f.jsxs("td",{children:[f.jsx(De,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?ia():nc()}),f.jsx(It,{title:Q_(),"aria-label":QLt(),onClick:n,disabled:o,children:f.jsx(ur,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&pH.test(i.trim())&&f.jsx(mH,{})]})}function FOn(){var u;const e=fxn(),n=ut(e),t=n.data??null,r=h=>{Jr(e.queryKey,_=>(typeof h=="function"?h(_??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=A.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!hR.includes(h)),c=[...hR,...o];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[f.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:ZZt()}),f.jsxs(De,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[f.jsx(Lh,{size:12})," ",IDt()]})]}),f.jsx("div",{className:ec,children:s?f.jsx("div",{className:"error",children:s}):t===null?f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]}):f.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:f.jsxs("tbody",{children:[c.map(h=>f.jsx(BOn,{name:h,entry:t.find(_=>_.key===h),onVars:r},h)),i&&f.jsx(POn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const Qp=[{value:"system",label:Ann,icon:c3n},{value:"light",label:Snn,icon:O3n},{value:"dark",label:_nn,icon:u3n}],HOn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function qOn(){const e=pf(),[n,t]=fI(),r=s=>{var h;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(_=>_===document.activeElement),u=((o===-1?Qp.findIndex(_=>_.value===n):o)+i+Qp.length)%Qp.length;t(Qp[u].value),(h=a[u])==null||h.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:TEt()}),f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:`${nl} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Iz()}),f.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":Iz(),onKeyDown:r,children:Qp.map(({value:s,label:i,icon:a})=>f.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:[f.jsx(a,{size:14}),i()]},s))})]}),f.jsxs("div",{className:nl,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:hRt()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(Yo,{choices:HOn,value:e,variant:"field",dropDown:!0,onSelect:s=>{dD(s)&&lI(s)}})})]})]})]})}const UOn={installer:Imn,"app-bundle":mmn,portable:Ymn,cargo:kmn,homebrew:Tmn,nix:Umn,unknown:sgn},i4={cargo:_gn,homebrew:vgn,nix:Cgn};function GOn(){var _;const e=an({mutationFn:p=>jbn(...p)}),{status:n,error:t,apply:r}=o6(),[s,i]=A.useState(null),[a,o]=A.useState(null),c=F$(n),u=s!==null||c.restarting;if(!n)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Oz()}),t?f.jsx("div",{className:ec,children:f.jsx("div",{className:"error",children:t})}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]})]});const h=async(p,m)=>{i(p),o(null);try{await m()}catch(x){o(x instanceof Error?x.message:String(x))}finally{i(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Oz()}),f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:`${nf} pb-3.5`,children:[f.jsx("div",{className:"k",children:EL()}),f.jsx("div",{className:"v",children:n.current}),f.jsx("div",{className:"k",children:lHt()}),f.jsx("div",{className:"v",children:n.latest??"—"}),f.jsx("div",{className:"k",children:gL()}),f.jsx("div",{className:"v",children:UOn[n.channel]()})]}),n.restartRequired&&f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:vQt()}),f.jsx("p",{children:c.error?LL({error:c.error}):atn({installed:ze(n.installedVersion??"—"),current:ze(n.current??n.installedVersion??"—")})})]}),n.canRestart&&f.jsx(De,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?IL():DL()})]}),n.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Az()}),f.jsxs("p",{children:[iUt(),n.envDisabled&&Mrn()]})]}),f.jsx(cS,{type:"button",checked:n.autoUpdate,"aria-label":Az(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?Ern({version:ze(n.latest??"—")}):XEt()}),f.jsx("p",{children:n.updateAvailable?MAt():gNt()})]}),f.jsx(De,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>Nbn().then(r)),children:s==="apply"?Hk():n.updateAvailable?brn():rNt()})]})]}):f.jsx("div",{className:nl,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:fKt()}),f.jsx("p",{children:((_=i4[n.channel])==null?void 0:_.call(i4))??ZJt()})]})}),n.channel==="app-bundle"&&f.jsx(KOn,{busy:s,disabled:u,run:h}),a&&f.jsx("div",{className:"error",children:a})]})]})}function VOn(){var _;const e=an({mutationFn:Syn}),n=yxn(),t=ut(n),r=t.data??null,s=p=>{Jr(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=A.useState(!1),[o,c]=A.useState(null),u=o??((_=t.error)==null?void 0:_.message)??null,h=()=>{!r||i||(a(!0),c(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>c(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:BZt()}),r?f.jsxs("div",{className:`${ec} mt-3`,children:[f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[Nz(),r.locked&&r.reason&&f.jsx(lS,{content:`${j$t()} ${r.reason}.`,className:"text-subtext",children:f.jsx(hS,{size:15})})]}),f.jsx("p",{children:EUt()})]}),f.jsx(cS,{type:"button",checked:r.enabled,"aria-label":Nz(),disabled:i||r.locked,onClick:h})]}),u&&f.jsx("div",{className:"error",children:u})]}):u?f.jsx("div",{className:"error",children:u}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]})]})}function KOn({busy:e,disabled:n,run:t}){const r=an({mutationFn:Tbn}),[s,i]=A.useState(null),[a,o]=A.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:bAt({command:ze("orx")})}),s?f.jsxs("p",{children:[s.alreadyCurrent?GNt({link:ze(s.link)}):ZNt({link:ze(s.link)}),!s.onPath&&kEt({directory:ze(s.dir)})]}):f.jsx("p",{children:fAt({command:ze("orx")})})]}),f.jsx(De,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?Hk():a?Ren():s?ien():iAt()})]})}function WOn({remote:e}){var x;const n=an({mutationFn:k=>QL(...k)}),t=rS(),r=ut(t),s=r.data??null,i=k=>{Jr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=A.useState(!1),[c,u]=A.useState(null),h=c??((x=r.error)==null?void 0:x.message)??null,_=async()=>{await r.refetch({cancelRefetch:!1})},p=zy(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:pPt()}),s?f.jsxs("div",{className:`${ec} 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:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx("h3",{children:wPt()}),f.jsx(Ut,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?cL():_L()})]}),f.jsxs("div",{className:nl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Tz()}),f.jsx("p",{children:_Jt()})]}),f.jsx(cS,{type:"button",checked:s.githubForNewProjects,"aria-label":Tz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(gH,{ghInstalled:s.ghInstalled,remote:e,onCheck:_,onRun:p.start})}),f.jsx(jy,{run:p.run,onComplete:()=>void _(),onClose:p.clear}),h&&f.jsx("div",{className:"error",children:h})]}):h?f.jsx("div",{className:"error",children:h}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]})]})}function gH({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=A.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return f.jsxs(f.Fragment,{children:[f.jsx(aC,{note:e?dtn():EAt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(ph,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[wFt()," ",f.jsx(Z_,{size:12})]}),f.jsx(De,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ta():xm()})]})]})}function QOn(){var m,x,k;const e=an({mutationFn:lbn}),n=an({mutationFn:ubn}),t=_Sn(),r=ut(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,a=v=>Jr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=A.useState(!1),[h,_]=A.useState(null),p=h??((k=r.error)==null?void 0:k.message);return f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:xL()}),f.jsxs("div",{className:nf,children:[f.jsx("span",{className:"k",children:jPt()}),f.jsx("span",{className:"v",children:f.jsx(Ut,{variant:s?"success":"default",children:s===null?p?ro():ta():s?Lz():f3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:vJt()}),s?f.jsx("div",{className:b0,children:f.jsx(De,{disabled:c,onClick:()=>{u(!0),_(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?Dz():ben()})}):f.jsx(_R,{save:HL,onSaved:v=>o(v.hasToken),placeholder:CKt(),createHref:"https://www.overleaf.com/user/settings"}),f.jsxs("div",{className:nf,children:[f.jsx("span",{className:"k",children:VQt()}),f.jsx("span",{className:"v",children:f.jsx(Ut,{variant:i?"success":"default",children:i===null?p?ro():ta():i?Lz():f3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:JQt()}),i?f.jsx("div",{className:b0,children:f.jsx(De,{disabled:c,onClick:()=>{u(!0),_(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?Dz():fen()})}):f.jsx(_R,{save:v=>qL(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:c3(),createHref:"https://www.overleaf.com/project",createLabel:m1t()}),p&&f.jsx("div",{className:"error",children:p})]})}function XOn({project:e,onProjectUpdate:n,remote:t}){var M;const r=an({mutationFn:D=>QL(...D)}),s={...bxn((e==null?void 0:e.id)??""),enabled:!!e},i=ut(s),a=zy(),o=i.data??null,c=D=>{Jr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=A.useState(!1),[_,p]=A.useState(null),m=_??((M=i.error)==null?void 0:M.message)??null,[x,k]=A.useState(!1),[v,b]=A.useState(!1),[w,y]=A.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},z=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?uTt():I.includes("(fetch first)")||I.includes("non-fast-forward")?gTt():I.includes("403")||I.toLowerCase().includes("permission denied")?STt():I},T=()=>{e&&(h(!0),p(null),xyn(e.id).then(D=>{c(D.git),n(D.project),tt.fetchQuery(rS()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(z(D))).finally(()=>h(!1)))},j=D=>{b(!0),y(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>y(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:_Qt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:Jen({project:(e==null?void 0:e.name)??gjt()})}),e?m&&!o?f.jsx("div",{className:"error",children:m}):o?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:XHt()}),f.jsxs("div",{className:nf,children:[f.jsx("span",{className:"k",children:VKt()}),f.jsx("span",{className:"v",children:o.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:o.gitVersion??QD()}),f.jsx("span",{className:"k",children:BXt()}),f.jsx("span",{className:"v",children:o.initialized?rTt({branch:ze(o.currentBranch??Xk()),state:o.clean?$Nt():$Tt()}):UOt()}),f.jsx("span",{className:"k",children:jLt()}),f.jsx("span",{className:"v",children:o.baselineBranch}),f.jsx("span",{className:"k",children:sQt()}),f.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):Yk()})]}),!o.initialized&&f.jsx("div",{className:b0,children:f.jsx(De,{variant:"primary",onClick:()=>void yyn(e.id).then(c).catch(D=>p(String(D))),children:nFt()})})]}),f.jsxs("div",{className:I5,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:nf,children:[f.jsx("span",{className:"k",children:fL()}),f.jsx("span",{className:"v",children:f.jsx(Ut,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?cL():_L()})}),f.jsx("span",{className:"k",children:aWt()}),f.jsx("span",{className:"v",children:C?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&f.jsx(Ut,{children:fYt()})]}):f.jsx(Ut,{children:qHt()})}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:iYt()}),f.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(gH,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),f.jsx(jy,{run:a.run,onComplete:()=>void N(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?Krn():ujt()}),f.jsxs("div",{className:b0,children:[C&&o.github.url&&f.jsxs(ph,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[Mz()," ",f.jsx(Z_,{size:12})]}),f.jsx(De,{variant:"primary",disabled:u,onClick:T,children:u?l8t():n8t()})]})]}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:IBt()}),f.jsxs("div",{className:b0,children:[o.github.url&&f.jsxs(ph,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[Mz()," ",f.jsx(Z_,{size:12})]}),f.jsx(De,{disabled:u,onClick:()=>{h(!0),wyn(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?m8t():Q7t()})]})]})]}),f.jsx(QOn,{}),m&&f.jsx("div",{className:"error",children:z(m)})]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]}):f.jsx("div",{className:ec,children:f.jsx("p",{className:Da,children:EVt()})}),x&&f.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:()=>j(!1),children:f.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:D=>D.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:uqt()}),f.jsx("p",{children:PYt()}),w&&f.jsx("div",{className:"error",children:w}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(De,{disabled:v,onClick:()=>j(!1),children:KGt()}),f.jsx(De,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?ia():zRt()})]})]})})]})}const YOn={env:ifn,config:ffn,xdg:bfn,default:Z_n},a4={preparing:$_n,copying:Xun,verifying:Efn,finalizing:r_n},ZOn=e=>{var n;return((n=a4[e])==null?void 0:n.call(a4))??e};function JOn(){var y;const e=dxn(),n=ut(e),t=n.data??null,r=t?null:((y=n.error)==null?void 0:y.message)??null,[s,i]=A.useState(""),[a,o]=A.useState(!1),[c,u]=A.useState(null),[h,_]=A.useState({kind:"idle"}),[p,m]=A.useState(null);A.useEffect(()=>{t&&i(C=>C||t.current)},[t]),A.useEffect(()=>oI(C=>{C.type==="progress"?_(N=>{const z=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||z}}):C.type==="done"?(_({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&_({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await $bn(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function w(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(g_n({path:ze(k)})))){_({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await Bbn(k)}catch(N){_({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:ZXt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:Ztn()}),r?f.jsx("div",{className:ec,children:f.jsx("div",{className:"error",children:r})}):t?f.jsxs("div",{className:ec,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:X$t()})}),f.jsxs("div",{className:nf,children:[f.jsx("span",{className:"k",children:w$t()}),f.jsx("span",{className:"v",children:t.current}),f.jsx("span",{className:"k",children:kL()}),f.jsx("span",{className:"v",children:YOn[t.source]()})]}),!x&&f.jsxs("form",{className:iC,onSubmit:w,children:[f.jsxs("label",{children:[Zqt(),f.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&f.jsxs("p",{className:Da,children:[BWt()," ",el(c.treeBytes??0),c.freeBytes!=null&&` — ${u_n({size:ze(el(c.freeBytes))})}`,c.sameFilesystem?G_n():"","."]}),c&&c.ok===!1&&c.error&&f.jsx("div",{className:"error",children:c.error}),p&&f.jsx("div",{className:"error",children:p}),h.kind==="moving"&&f.jsx(lH,{value:h.copied,max:h.total,label:ZOn(h.phase),caption:h.total>0?f.jsxs("span",{className:"text-sm",children:[el(h.copied)," / ",el(h.total)]}):void 0}),h.kind==="done"&&f.jsxs("p",{className:Da,children:[$qt(),h.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",uDt({path:ze(h.oldPathLeft)})]})]}),h.kind==="error"&&f.jsxs("div",{className:"error",children:[Aqt()," ",h.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(De,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ta():IEt()}),f.jsx(De,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?A_n():S_n()})]})]})]}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]})]})}const P5=e=>e==="running"||e==="starting";function eDn(e){return P5(e.status)?T0(Date.now()-e.createdAt):e.endedAt?T0(e.endedAt-e.createdAt):"—"}function vH({instances:e,emptyLabel:n}){return e.length===0?f.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}):f.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:f.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:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:wLt()}),f.jsx("th",{children:Dh()}),f.jsx("th",{children:RXt()}),f.jsx("th",{children:RQt()})]})}),f.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 f.jsxs("tr",{children:[f.jsx("td",{children:f.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[f.jsx(jS,{backend:t.backend}),r&&f.jsx(Cm,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:Rz(),"aria-label":Rz(),onClick:i=>i.stopPropagation(),children:f.jsx(Z_,{size:12})})]})}),f.jsx("td",{children:f.jsx(al,{status:Xi(t)})}),f.jsx("td",{children:co(t.createdAt)}),f.jsx("td",{children:eDn(t)})]},t.id)})})]})})}function tDn({projectId:e,onViewHistory:n}){var _;const t=ut({...mu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(_=t.error)==null?void 0:_.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},c=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>P5(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!P5(p.status)).sort(c);return f.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:[f.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:[f.jsx("div",{children:f.jsxs("h2",{children:[CQt(),u&&u.length>0&&f.jsx("span",{className:"count-badge",children:u.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(De,{size:"small",onClick:o,disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]}),f.jsx(De,{size:"small",onClick:n,children:h!=null&&h.length?hZe({count:Xt(h.length)}):oZe()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!u||!h?f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]}):f.jsx(vH,{instances:u,emptyLabel:e?PYe():eZe()})]})}function nDn({projectId:e,onBack:n}){var c;const t=ut({...mu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(c=t.error)==null?void 0:c.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const u=setInterval(()=>a(h=>h+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return f.jsxs(f.Fragment,{children:[f.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:[f.jsx(A0,{size:14})," ",dL()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:DFt()}),f.jsxs(De,{size:"small",onClick:o,disabled:i,children:[f.jsx(Pa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),s&&f.jsx("div",{className:"error",children:s}),r?f.jsx(vH,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?MYe():KYe()}):f.jsxs(Gr,{children:[f.jsx(zt,{})," ",Ru()]})]})}const bH=["projects","harnesses","storage"],rDn=[{id:"compute",label:hL,icon:f.jsx(_S,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:mL,icon:f.jsx(vf,{size:15}),activeTabs:["environment"]},{id:"settings",label:tS,icon:f.jsx(vS,{size:15}),activeTabs:["settings",...bH]}];function sDn(e){return bH.includes(e)}function iDn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||sDn(e),a=A.useRef(null);return A.useLayoutEffect(()=>{const o=a.current,c=o==null?void 0:o.parentElement;if(!o||!c)return;const u=()=>o.scrollIntoView({block:"start"}),h=new ResizeObserver(u);h.observe(c),u();const _=()=>h.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,_,{passive:!0});return()=>{_();for(const m of p)window.removeEventListener(m,_)}},[e,n==null?void 0:n.id]),f.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&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:tS()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:md,children:f.jsx(qOn,{})}),f.jsx("section",{ref:e==="projects"?a:void 0,className:md,children:f.jsx(WOn,{remote:s})}),f.jsx("section",{ref:e==="harnesses"?a:void 0,className:md,children:f.jsx(mOn,{remote:s})}),!s&&f.jsx("section",{ref:e==="storage"?a:void 0,className:md,children:f.jsx(JOn,{})}),f.jsx("section",{className:md,children:f.jsx(VOn,{})}),!s&&f.jsx("section",{className:md,children:f.jsx(GOn,{})})]})]}),e==="compute"&&f.jsx(DOn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&f.jsx(nDn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:mL()}),f.jsx(FOn,{})]}),e==="git"&&f.jsx(XOn,{project:n,onProjectUpdate:t,remote:s})]})}function sb(e){return e.charAt(0).toUpperCase()+e.slice(1).replaceAll("-"," ")}function F5(e){return`${e.plugin?`${sb(e.plugin)}: `:""}${sb(e.name)}`}const yH=["plan","goal","new","resume","model","compact","copy","export"],aDn={plan:()=>Lyt(),goal:()=>yKe(),new:()=>Crt(),resume:()=>k8t(),model:()=>ptt(),compact:()=>Wje(),copy:()=>yMe(),export:()=>h$e()};function oDn(e){return{name:e,get description(){return aDn[e]()},source:"command"}}function Ay(e){return yH.some(n=>n===e)}const ib={clear:"new",summarize:"compact"};function H5(e){const n=e.toLowerCase();return Ay(n)?n:Object.hasOwn(ib,n)?ib[n]:null}function xH(e){return Object.keys(ib).filter(n=>ib[n]===e)}function cDn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Ay(e.name)&&xH(e.name).some(t=>t.startsWith(n))}function o4(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(;r=r?h:s}${a.slice(h.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 pR(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 wH(e){return yH.filter(n=>n!=="plan"||e)}function _Dn(e,n){const t=e.filter(r=>!H5(r.name));for(const r of wH(n))t.push(oDn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||F5(r).localeCompare(F5(s),void 0,{sensitivity:"base"}))}function c4(e){return e==="plan"||e==="goal"}function fDn(e,n){for(const t of wH(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...xH(t)].join("|");if(t==="plan"){const s=new RegExp(`(^|\\s)\\/(?:${r})(?=\\s|$)`,"gi");if(s.test(e))return{name:t,prompt:e.replace(s,"").trim()}}else if(t==="goal"){const s=new RegExp(`^\\/(?:${r})(?=\\s|$)`,"i");if(s.test(e.trim()))return{name:t,prompt:e.trim().replace(s,"").trim()}}else if(new RegExp(`^\\/(?:${r})$`,"i").test(e.trim()))return{name:t,prompt:""}}return null}function l4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const dDn=["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"];let hDn=null;function q5(e,n){const t=hDn??(hDn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(sb(e)).width-t.measureText(`/${e}`).width;return Math.max(2,Math.ceil((s+6)/t.measureText(" ").width))}const pDn={plan:Z4n,goal:PI,new:A3n,resume:FI,model:_S,compact:z4n,copy:gf,export:fS};function kH({name:e,className:n}){const t=Ay(e)?pDn[e]:U3n;return f.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function SH({name:e}){return f.jsxs(f.Fragment,{children:[f.jsx(kH,{name:e,className:"me-1 inline-block align-middle"}),sb(e)]})}function CH(e,n,t,r,s,i=!1){let a=0;return lDn(e,n).map((o,c,u)=>{var m,x;const h=a+o.text.length;a=h;const _=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,_,h,c);let p=o.text;return i||((m=u[c-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(x=u[c+1])!=null&&x.command&&(p=p.replace(/[ \t]+$/," "))),o.command?f.jsx("span",{className:t,onMouseDown:void 0,children:f.jsx(SH,{name:_})},c):i?f.jsx("span",{"aria-hidden":"true",children:o.text},c):f.jsx(A.Fragment,{children:p},c)})}function mDn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=A.useRef(null),o=A.useRef(null),c=A.useRef(null),u=A.useId(),[h,_]=A.useState(!1),p=ut({...wxn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,x=p.isFetching,[k,v]=A.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},w=()=>{const N=a.current;if(!N)return;const z=N.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(z.left-4,window.innerWidth-T-16));v(z.top>300?{bottom:window.innerHeight-z.top+12,left:j,width:T}:{left:j,top:z.bottom+12,width:T})},y=()=>{b(),w(),_(!0)},C=()=>{b(),c.current=window.setTimeout(()=>_(!1),120)};return A.useEffect(()=>()=>b(),[]),A.useEffect(()=>{if(!h)return;const N=()=>w();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),f.jsxs(A.Fragment,{children:[f.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":jZ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onKeyDown:N=>{var z,T;if(N.key==="Escape"){_(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),y();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(T=o.current)==null||T.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var z,T;N.preventDefault(),(z=i.current)==null||z.focus(),(T=i.current)==null||T.setSelectionRange(t,t),b()},children:[f.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"}),f.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),f.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:f.jsx("span",{className:"bg-background text-skill-blue",children:f.jsx(SH,{name:n})})})]}),h&&oa.createPortal(f.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":IJ({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[f.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:[f.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),f.jsx(Ut,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:dsn()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?f.jsx("span",{className:"text-muted",children:ysn()}):f.jsx(Jo,{text:m??r.description})})]}),document.body)]})}function gDn({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:CH(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function vDn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=A.useRef(null);return A.useLayoutEffect(()=>{const o=i.current,c=a.current;if(!o||!c)return;const u=()=>{const _=getComputedStyle(o);for(const p of dDn)c.style.setProperty(p,_.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.disconnect()},[e,i]),A.useLayoutEffect(()=>{const o=i.current;if(!o)return;const c=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return c(),o.addEventListener("scroll",c),()=>o.removeEventListener("scroll",c)},[i,e]),f.jsxs("div",{ref:a,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:[CH(e,t,"",void 0,(o,c,u,h)=>{var x;const _=e.slice(u),p=((x=/^[ \t]+/.exec(_))==null?void 0:x[0].length)??0;if(u===n||_&&!_.startsWith(` +`)&&pk.name===c);return m&&m.source!=="command"?f.jsx(mDn,{label:o,name:c,end:u,skill:m,projectId:s,textareaRef:i},`${h}:${u}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function bDn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=A.useRef(null);return A.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>f.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[f.jsx(kH,{name:i.name,className:"shrink-0"}),f.jsx("span",{className:"skill-name shrink-0",children:F5(i)}),f.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:Nsn()})]},i.name))})}function yDn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const U5=6.5,mR=2*Math.PI*U5;function xDn({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(wDn,{usage:e})}function wDn({usage:e}){const{open:n,setOpen:t,ref:r}=_o(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":yDn(a),c=a===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(a/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.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:JRe(),onClick:()=>t(u=>!u),children:a===null?e1(s):f.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:U5,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:U5,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${mR*Math.max(a,2)/100} ${mR}`,transform:"rotate(-90 8 8)"})]})}),n&&f.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:[f.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[f.jsx("span",{children:VRe()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?aMe({value:ze(e1(s))}):dMe({used:ze(e1(s)),total:ze(e1(i)),percent:ze(c)})})]}),a!==null&&f.jsx(lH,{value:s,max:i,fillColor:o})]})]})}function kDn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),f.jsxs("div",{role:"group","aria-label":kz(),children:[f.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:kz()}),r.slice(n)]},"from-terminal")]}function SDn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=A.useRef(null),i=A.useRef(null),{data:a,isPending:o,error:c}=ut(Exn()),{data:u=[]}=ut(dh()),{data:h=[]}=ut(nI()),[_,p]=A.useState(""),[m,x]=A.useState(0);Em(s,n);const k=A.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=A.useMemo(()=>{const N=_.trim().toLowerCase(),z=M=>!N||M.toLowerCase().includes(N),T=(a??[]).filter(M=>M.id!==e).filter(M=>z(`${M.title??""} ${k.get(M.projectId)??""} ${su[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),j=h.filter(M=>z(`${M.title??""} ${M.cwd??""} ${su[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...T,...j]},[a,h,_,e,k]),b=A.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),w=Math.min(m,Math.max(0,v.length-1));A.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[w,v]);const y=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-start justify-center bg-modal-backdrop p-5 pt-[var(--modal-top)]",onClick:N=>{N.target===N.currentTarget&&n()},children:f.jsxs("div",{ref:s,className:"flex max-h-[calc(100vh_-_var(--modal-top)_-_1.25rem)] w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-label":Cz(),tabIndex:-1,children:[f.jsx("div",{className:"border-b border-border p-3",children:f.jsx(qr,{"data-initial-focus":!0,value:_,placeholder:Sz(),"aria-label":Sz(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[w]?`resume-option-${v[w].key}`:void 0,onChange:N=>{p(N.target.value),x(0)},onKeyDown:N=>{if(!N.nativeEvent.isComposing)if(N.key==="ArrowDown"||N.key==="ArrowUp"){if(N.preventDefault(),v.length===0)return;const z=N.key==="ArrowDown"?1:-1;x((w+z+v.length)%v.length)}else N.key==="Enter"&&v[w]&&(N.preventDefault(),C(v[w]))}})}),f.jsx("div",{id:"resume-options",className:"min-h-0 flex-1 overflow-y-auto p-1.5",role:v.length>0?"listbox":void 0,"aria-label":v.length>0?Cz():void 0,children:o?f.jsxs(Gr,{className:"px-2.5 py-2",role:"status",children:[f.jsx(zt,{})," ",Uk()]}):c&&!a?f.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:qk({error:ze(c instanceof Error?c.message:String(c))})}):v.length===0?f.jsx("div",{className:"px-2.5 py-2 text-sm text-muted",role:"status",children:T8t()}):kDn(v,b,(N,z)=>{var D;const T=N.kind==="native"?N.chat:null,j=N.kind==="session"?N.session:null;return f.jsxs(Xn,{id:`resume-option-${N.key}`,ref:z===w?i:void 0,type:"button",role:"option","aria-selected":z===w,active:z===w,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>x(z),onClick:()=>C(N),children:[f.jsx(vh,{harness:(T==null?void 0:T.harness)??(j==null?void 0:j.harness)??"claude-code"}),f.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(T==null?void 0:T.title)??(j==null?void 0:j.title))==null?void 0:D.trim())||yd()}),f.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(T==null?void 0:T.cwd)??void 0,children:T?y(T.cwd):k.get((j==null?void 0:j.projectId)??"")??""}),f.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:co((T==null?void 0:T.updatedAt)??(j==null?void 0:j.updatedAt)??0)})]},N.key)})})]})}),document.body)}const ab="!";function gR(e){return e.startsWith(ab)?e.slice(ab.length).trim():null}function CDn(e){return e.startsWith(ab)?e.slice(ab.length):e}function EDn(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 NDn(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 zDn(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,"")} @@ -1059,22 +1059,22 @@ ${t} ${e} \\] -`:`\\(${e}\\)`}function pDn(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function jDn(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 mDn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,c)=>a[c]??"").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 gDn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function vDn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function bDn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const CH="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",oC="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",Tu=256,EH=1024,NH=2e4,u4=8,z1="chat-annotations";function k_(e){return e instanceof Element?e:e.parentElement}function gR(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function _4(e,n){return gR(e).compareBoundaryPoints(Range.START_TO_START,gR(n))<0}function vR(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const yDn=new Set(["A","B","CODE","EM","I","STRONG"]);function xDn(e,n){var s,i;const t=k_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=k_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(yDn.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=k_(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 wDn(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 kDn(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,c=document.createRange();c.selectNode(o);const u={container:c.startContainer,offset:c.startOffset},h={container:c.endContainer,offset:c.endOffset};if(_4(s,u)&&t.append(vR(s,u)),t.append(o.cloneNode(!0)),s=h,!_4(s,r))break}return i.length===0?t.append(e.cloneContents()):_4(s,r)&&t.append(vR(s,r)),xDn(e,t),wDn(t),t}function SDn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>V0(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function TDn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,c)=>a[c]??"").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 ADn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function RDn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function MDn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const EH="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",oC="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",Tu=256,NH=1024,zH=2e4,u4=8,z1="chat-annotations";function k_(e){return e instanceof Element?e:e.parentElement}function vR(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function _4(e,n){return vR(e).compareBoundaryPoints(Range.START_TO_START,vR(n))<0}function bR(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const ODn=new Set(["A","B","CODE","EM","I","STRONG"]);function DDn(e,n){var s,i;const t=k_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=k_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(ODn.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=k_(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 LDn(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 IDn(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,c=document.createRange();c.selectNode(o);const u={container:c.startContainer,offset:c.startOffset},h={container:c.endContainer,offset:c.endOffset};if(_4(s,u)&&t.append(bR(s,u)),t.append(o.cloneNode(!0)),s=h,!_4(s,r))break}return i.length===0?t.append(e.cloneContents()):_4(s,r)&&t.append(bR(s,r)),DDn(e,t),LDn(t),t}function $Dn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>V0(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${mDn(n,!!e.querySelector("tr:first-child th"))} +${TDn(n,!!e.querySelector("tr:first-child th"))} -`:""}function zH(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"),c=o===null?s:Number(o),u=Number.isFinite(c)?c:s;s=u+1;const h=Array.from(a.childNodes).map(_=>_ instanceof HTMLElement&&_.matches("UL, OL")?` -${zH(_).trim()} -`:V0(_)).join("").trim();i.push(pDn(n?`${u}.`:"-",h))}return` +`:""}function jH(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"),c=o===null?s:Number(o),u=Number.isFinite(c)?c:s;s=u+1;const h=Array.from(a.childNodes).map(_=>_ instanceof HTMLElement&&_.matches("UL, OL")?` +${jH(_).trim()} +`:V0(_)).join("").trim();i.push(jDn(n?`${u}.`:"-",h))}return` ${i.join(` `)} -`}function V0(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return fDn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(V0).join("");if(e.matches(".katex-display")){const c=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return c?G5(c,!0):""}if(e.matches(".katex")){const c=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return c?G5(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return SDn(e);if(e.matches("UL, OL"))return zH(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return dDn(e.textContent??"");if(e.tagName==="PRE")return hDn(e.textContent??"");const n=Array.from(e.childNodes).map(V0).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const c=e.getAttribute("href");return c?`[${n}](${c})`:n}if(e.tagName==="LI")return`${n.trim()} +`}function V0(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return EDn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(V0).join("");if(e.matches(".katex-display")){const c=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return c?G5(c,!0):""}if(e.matches(".katex")){const c=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return c?G5(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return $Dn(e);if(e.matches("UL, OL"))return jH(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return NDn(e.textContent??"");if(e.tagName==="PRE")return zDn(e.textContent??"");const n=Array.from(e.childNodes).map(V0).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const c=e.getAttribute("href");return c?`[${n}](${c})`: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` @@ -1082,7 +1082,7 @@ ${n.trim().split(` `).map(c=>`> ${c}`).join(` `)} -`;const t=gDn(e.tagName,n);return t?` +`;const t=ADn(e.tagName,n);return t?` ${t} @@ -1090,35 +1090,35 @@ ${t} ${n.trim()} -`:n}function CDn(e,n){return V0(e).replace(/\r\n?/g,` +`:n}function BDn(e,n){return V0(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function bR(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function EDn(e,n){var s,i,a,o;if(!vDn(e))return;const t=bR(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const h=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=c.querySelector(".katex-html"))==null?void 0:i.textContent,c.textContent].filter(x=>!!x).map(bR).find(x=>bDn(x,t));if(!h)continue;const _=(o=(a=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!_)continue;const p=!!c.closest(".katex-display"),m={markdown:G5(_,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.delta .md .katex")){const h=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=c.querySelector(".katex-html"))==null?void 0:i.textContent,c.textContent].filter(x=>!!x).map(yR).find(x=>MDn(x,t));if(!h)continue;const _=(o=(a=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!_)continue;const p=!!c.closest(".katex-display"),m={markdown:G5(_,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.deltaj.width>0&&j.height>0),x=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topx.top),v=k.length>0?k:[x],b=Math.min(...v.map(j=>j.left)),w=Math.max(...v.map(j=>j.right)),y=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),N=34,z=74,T=y>=N+u4?y-N-u4:C+u4;return{text:CDn(p,_),range:t.cloneRange(),x:Math.min(window.innerWidth-z,Math.max(z,b+(w-b)/2)),top:T}}function zDn(e,n){const[t,r]=A.useState(null),s=A.useRef(!1),i=A.useCallback(()=>{const c=e.current;r(c?NDn(c):null)},[e]);A.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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))},_=p=>{!p.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",h,!0),window.addEventListener("pointerup",_,!0),window.addEventListener("pointercancel",_,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!0),window.removeEventListener("pointerup",_,!0),window.removeEventListener("pointercancel",_,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[i]),A.useEffect(()=>{if(!t)return;const c=u=>{const h=u.target;h instanceof Element&&h.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",i)}},[t,i]);const a=A.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=A.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function jDn(e){A.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(z1);return}const t=new Highlight(...n);return CSS.highlights.set(z1,t),()=>{CSS.highlights.get(z1)===t&&CSS.highlights.delete(z1)}},[e])}function TDn({annotation:e}){const n=A.useRef(null),[t,r]=A.useState();return A.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?EDn(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Jo,{text:t??e.text})})}function ADn({annotations:e,onRemove:n}){return e.map((t,r)=>f.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:[f.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm text-muted mb-1",children:Mke()}),f.jsx(TDn,{annotation:t})]}),n&&f.jsx(Lt,{type:"button",size:"small","data-annotation-remove":!0,title:L5e(),"aria-label":DZ({number:Wt(r+1)}),onClick:()=>n(t.id),children:f.jsx(or,{size:13})})]},t.id))}function cC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=A.useRef(null),i=A.useRef(null),a=A.useId(),o=_o(s),c=n==="sent",u=A.useRef(null),h=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},_=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const x=c||!o.open;o.setOpen(x),x&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var v,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.focus()})};return A.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),f.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:c?h:void 0,onMouseLeave:c?_:void 0,children:[f.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[f.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 ${c?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[f.jsx(HI,{size:c?13:14,className:"text-muted"}),e.length===1?hve():ppe({count:Wt(e.length)})]}),t&&f.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:oN(),"aria-label":oN(),onClick:t,children:f.jsx(or,{size:13})})]}),o.open&&f.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 ${c?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":Eke(),children:f.jsx(ADn,{annotations:e,onRemove:r?m:void 0})})]})}function RDn(e){return f.jsx(cC,{...e,variant:"composer"})}const MDn=["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(" "),yR=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),ODn=["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(" "),DDn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),V5="prompt-actions flex flex-wrap gap-2",xR=[],LDn=[],Qp={};function v_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function f4(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 IDn(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 qs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function d4(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 h4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Tu));s++);return r}function $Dn(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 $d(...e){const n=new Set,t=new RegExp(`^${q_}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Tu||r++>=EH)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Ry(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!_)return null;const p=IDn(t,e),m=Array.from(t.getClientRects()).filter(j=>j.width>0&&j.height>0),x=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topx.top),v=k.length>0?k:[x],b=Math.min(...v.map(j=>j.left)),w=Math.max(...v.map(j=>j.right)),y=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),N=34,z=74,T=y>=N+u4?y-N-u4:C+u4;return{text:BDn(p,_),range:t.cloneRange(),x:Math.min(window.innerWidth-z,Math.max(z,b+(w-b)/2)),top:T}}function HDn(e,n){const[t,r]=A.useState(null),s=A.useRef(!1),i=A.useCallback(()=>{const c=e.current;r(c?FDn(c):null)},[e]);A.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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))},_=p=>{!p.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",h,!0),window.addEventListener("pointerup",_,!0),window.addEventListener("pointercancel",_,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!0),window.removeEventListener("pointerup",_,!0),window.removeEventListener("pointercancel",_,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[i]),A.useEffect(()=>{if(!t)return;const c=u=>{const h=u.target;h instanceof Element&&h.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",i)}},[t,i]);const a=A.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=A.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function qDn(e){A.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(z1);return}const t=new Highlight(...n);return CSS.highlights.set(z1,t),()=>{CSS.highlights.get(z1)===t&&CSS.highlights.delete(z1)}},[e])}function UDn({annotation:e}){const n=A.useRef(null),[t,r]=A.useState();return A.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?PDn(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Jo,{text:t??e.text})})}function GDn({annotations:e,onRemove:n}){return e.map((t,r)=>f.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:[f.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm text-muted mb-1",children:Oke()}),f.jsx(UDn,{annotation:t})]}),n&&f.jsx(It,{type:"button",size:"small","data-annotation-remove":!0,title:I5e(),"aria-label":LZ({number:Xt(r+1)}),onClick:()=>n(t.id),children:f.jsx(ur,{size:13})})]},t.id))}function cC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=A.useRef(null),i=A.useRef(null),a=A.useId(),o=_o(s),c=n==="sent",u=A.useRef(null),h=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},_=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const x=c||!o.open;o.setOpen(x),x&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var v,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.focus()})};return A.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),f.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:c?h:void 0,onMouseLeave:c?_:void 0,children:[f.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[f.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 ${c?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[f.jsx(qI,{size:c?13:14,className:"text-muted"}),e.length===1?pve():mpe({count:Xt(e.length)})]}),t&&f.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:oN(),"aria-label":oN(),onClick:t,children:f.jsx(ur,{size:13})})]}),o.open&&f.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 ${c?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":Nke(),children:f.jsx(GDn,{annotations:e,onRemove:r?m:void 0})})]})}function VDn(e){return f.jsx(cC,{...e,variant:"composer"})}const KDn=["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(" "),xR=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),WDn=["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(" "),QDn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),V5="prompt-actions flex flex-wrap gap-2",wR=[],XDn=[],Xp={};function v_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function f4(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 YDn(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 Gs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function d4(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 h4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Tu));s++);return r}function ZDn(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 Pd(...e){const n=new Set,t=new RegExp(`^${q_}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Tu||r++>=NH)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Ry(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function BDn(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 PDn(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=J7n(r),jH(r)}function jH(e){return HDn(e).replace(/[\t\r ]+/g," ").trim()}function FDn(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&&AH(s)?{ref:r,path:s}:null}function GDn(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 wR(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 VDn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const c=wR(s,o);if(!c)return null;s=c}return s?wR(s,e):e}const $o="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",KDn=new RegExp(`\\bchat_(${$o})\\b`,"gi"),q_=`(?:${$o}|[0-9a-f]{8})`;function Bd(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 h=1,_=null,p=!1;for(let m=u;m{let h=!1;for(let _=u;_n8n(t.raw,n))}function ja(e,n){return My(e,n).length>0}function WDn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,NH).matchAll(KDn))if(n.add(t[0].toLowerCase()),n.size>=Tu)break;return[...n]}function K5(e,n){if(!e)return[];const t=new Set,r=e.slice(0,NH),s=n==="runs"?[new RegExp(`/runs/(${$o})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${$o})`,"gi"),new RegExp(`^\\s*RUN\\s+(${$o})\\b`,"gim"),new RegExp(`={3,}\\s*(${$o})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${$o})`,"gi"),new RegExp(`^\\s*id:\\s*(${$o})`,"gim"),new RegExp(`={3,}\\s*(${$o})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Tu)return[...t];const i=new RegExp(`^\\s*(${$o})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Tu)break;return[...t]}function MH(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 OH(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 DH(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 c=o+a[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function QDn(e,n,t=[],r=[]){const s=My(e,"logs"),i=new Set;if(s.length===0){if(!ja(e,"logs"))return[];const o=t.length>0?[]:K5(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=Tu)break;return $d([...i])}let a=!1;for(const{invocation:o,offset:c}of MH(e,s)){const u=bh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let _=null;for(let v=0;v0?[]:K5(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Tu)break}return $d([...i])}function pd(e,n,t=[],r=[]){const s=My(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of MH(e,s)){const u=bh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let _=!1;h&&new RegExp(`^${q_}$`,"i").test(h)&&(i.add(h),_=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],x=OH(e,m,c,q_);if(x.length>0){for(const v of x)i.add(v);_=!0}const k=DH(e,m,c,q_);for(const v of k)i.add(v);k.length>0&&(_=!0)}_||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:K5(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Tu)break}return $d([...i])}const kR=new WeakMap;function nf(e){const n=E(),t=kR.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=XDn(e);return kR.set(e,{locale:n,activity:r}),r}function XDn(e){var b,w,y,C,N,z;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=qs(i,"command","cmd"),o=$Dn(i,"commandArgv"),c=((w=e.state)==null?void 0:w.output)||((y=e.state)==null?void 0:y.error),u=$d(h4(i,"targetIds")),h=$d(h4(i,"runTargetIds")),_=$d(h4(i,"experimentTargetIds")),p=qs(i,"filePath","file_path","notebookPath","notebook_path","path"),m=qs(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),k=x.at(-1)??n.toLowerCase();if(k==="run"&&x.includes("web")){const T=d4(i,"search_query","q"),j=d4(i,"image_query","q"),M=d4(i,"find","pattern");return T?{kind:"web",label:qE({query:T})}:j?{kind:"web",label:Hie({query:j})}:M?{kind:"web",label:zae({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:K4e()}:Array.isArray(i.weather)?{kind:"web",label:hxe()}:Array.isArray(i.finance)?{kind:"web",label:exe()}:Array.isArray(i.sports)?{kind:"web",label:oxe()}:Array.isArray(i.time)?{kind:"web",label:Kye()}:{kind:"web",label:iN()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["compacted","contextcompaction"],["imported","importedchat"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:F3e()};const T=PDn(a??(o==null?void 0:o.join(" "))??""),j=Bd(T);let M=j.map(G=>G.raw);if(o!=null&&o.length){const G=t8n(o);M=G===null?[o]:Bd(jH(G)).map(oe=>oe.raw)}let D=null;for(const G of M)if(D=r8n(G),D)break;const I=M.some(G=>{const oe=bh(G);return oe!==null&&oe[0]!=="discover"&&oe[0]!=="paper"});if(D&&!I){const G=D.kind==="discover"?{keyword:lie(),embedding:mie(),openalex:cae(),biorxiv:kie(),pubmed:pae()}[D.strategy]:null,oe=D.kind==="discover"?D.query?Vte({activity:G??HE(),query:D.query}):G??HE():D.id?Ip({target:Ne(D.id)}):wre();return{kind:D.kind==="paper"?"read":"search",label:oe,litCall:D}}if(ja(T,"agent\\s+spawn"))return{kind:"agent",label:Jxe(),spawnedSessionIds:WDn(c),litCall:D??void 0};const $=j.map(G=>RH(G.raw)),q=ja(T,"exp\\s+status"),H=ja(T,"exp\\s+desc"),Q=My(T,"exp\\s+desc").some(G=>(bh(G.raw)??[]).some(le=>le==="--set"||le.startsWith("--set=")||le==="--stdin")),V=Q?koe():pre(),J=Q?gee():jse();if(ja(T,"logs")){const G=QDn(T,c,h,u);return{kind:"project",label:G.length===1?pse():wse(),runIds:G,litCall:D??void 0}}if(ja(T,"exp\\s+run"))return{kind:"project",label:_Se(),litCall:D??void 0};if(ja(T,"exp\\s+wait"))return{kind:"project",label:dCe(),litCall:D??void 0};if(ja(T,"exp\\s+cancel"))return{kind:"project",label:dye(),litCall:D??void 0};const Z=ja(T,"project\\s+view");if(Z&&q&&H)return{kind:"project",label:J,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(Z&&H)return{kind:"project",label:V,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(Z&&q)return{kind:"project",label:aN(),experimentIds:pd(T,c,_,u),litCall:D??void 0};if(Z)return{kind:"project",label:p5e(),litCall:D??void 0};if(q&&H)return{kind:"project",label:J,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(q)return{kind:"project",label:aN(),experimentIds:pd(T,c,_,u),litCall:D??void 0};if(H)return{kind:"project",label:V,experimentIds:pd(T,c,_,u),litCall:D??void 0};if(ja(T,"runs?"))return{kind:"project",label:a4e(),litCall:D??void 0};if(ja(T,"projects"))return{kind:"project",label:d4e(),litCall:D??void 0};if(ja(T,"compute"))return{kind:"project",label:Nye(),litCall:D??void 0};const B=$.map(UDn).find(G=>G!=null);if(B){const G=f4(B.path);return{kind:G?"skill":"read",label:G?V2({name:Ne(G)}):Ip({target:Ne(v_(B.path))}),filePath:B.path,fileRef:B.ref,labelTarget:G?`${G} skill`:v_(B.path)}}const L=$.findIndex(G=>G!=null&&["sed","cat","head","tail"].includes(G.name)),F=L>=0?$[L]:null,U=F?qDn(F):null,K=U?VDn(U,j,L,qs(i,"cwd","workdir")):null;if(U&&K){const G=f4(K);return{kind:G?"skill":"read",label:G?V2({name:Ne(G)}):Ip({target:Ne(v_(U))}),filePath:K,labelTarget:G?`${G} skill`:v_(U)}}if($.some(G=>(G==null?void 0:G.name)==="find"||(G==null?void 0:G.name)==="ls"||(G==null?void 0:G.name)==="rg"&&G.args.includes("--files")))return{kind:"search",label:mN()};const ne=$.findIndex(G=>(G==null?void 0:G.name)==="rg"||(G==null?void 0:G.name)==="grep");if(ne>=0){const G=GDn(j[ne].raw);return{kind:"search",label:G?W2({pattern:Ne(G)}):K2(),searchPattern:G??void 0}}const ce=$.find(G=>(G==null?void 0:G.name)==="git"),_e=ce==null?void 0:ce.args[0];if(_e==="grep"){const G=ce==null?void 0:ce.args.slice(1).find(oe=>!oe.startsWith("-"));return{kind:"search",label:G?W2({pattern:Ne(G)}):K2(),searchPattern:G}}if(_e==="status")return{kind:"command",label:Pye()};if(_e==="diff")return{kind:"command",label:dke()};if(_e==="log")return{kind:"command",label:c5e()};const se=G=>$.some(oe=>!oe||!["cargo","pnpm","npm","yarn"].includes(oe.name)?!1:oe.args[0]===G||oe.args[0]==="run"&&oe.args[1]===G);return se("test")?{kind:"command",label:W3e()}:$.some(G=>(G==null?void 0:G.name)==="tsc")||se("typecheck")?{kind:"command",label:xxe()}:se("lint")?{kind:"command",label:yye()}:se("build")?{kind:"command",label:Jbe()}:{kind:"command",label:Wne({command:Ne(T)})}}case"skill":{const T=qs(i,"skill","name"),j=T?IDn(n,T):null;return{kind:"skill",label:T?Nne({name:Ne(T)}):yne(),filePath:j??void 0,labelTarget:j&&T?`${T} skill`:void 0}}case"read":{const T=p?v_(p):null,j=p?f4(p):null;return j?{kind:"skill",label:V2({name:Ne(j)}),filePath:p??void 0,labelTarget:`${j} skill`}:T?{kind:"read",label:Ip({target:Ne(T)}),filePath:p??void 0,labelTarget:T}:{kind:"read",label:t5e()}}case"edit":case"write":case"notebookedit":{const T=BDn(i),j=p??(T==null?void 0:T.path)??null,M=j?v_(j):null,D=M?(T==null?void 0:T.type)==="add"?Yee({target:Ne(M)}):(T==null?void 0:T.type)==="delete"?vte({target:Ne(M)}):Rte({target:Ne(M)}):null;return M?{kind:"edit",label:D??fN(),filePath:j??void 0,labelTarget:M}:{kind:"edit",label:fN()}}case"grep":{const T=qs(i,"pattern");return{kind:"search",label:T?W2({pattern:Ne(T)}):K2(),searchPattern:T??void 0}}case"glob":{const T=qs(i,"pattern");return{kind:"search",label:T?ane({pattern:Ne(T)}):mN()}}case"websearch":{const T=qs(i,"query"),j=qs(i,"url"),M=qs(i,"pattern");return T?{kind:"web",label:qE({query:T})}:M&&j?{kind:"web",label:tae({pattern:M})}:j?{kind:"web",label:Fne({target:Ne(j)})}:{kind:"web",label:m??iN()}}case"webfetch":{const T=qs(i,"url");return{kind:"web",label:T?Ip({target:Ne(T)}):m??Fre()}}case"task":return{kind:"agent",label:m??tre()};case"subagent":return{kind:"agent",label:YDn(i)};case"error":return{kind:"command",label:K6e()};case"importedchat":return{kind:"project",label:Jte()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Uee():((N=e.state)==null?void 0:N.status)==="running"?FE():Aee(),progressLabel:FE()};default:{const T=m??p??a??((z=e.state)==null?void 0:z.title)??"";return{kind:"command",label:T?`${n}: ${T}`:n}}}}function YDn(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 Qae();case"sendInput":return Hae();case"resumeAgent":return tse();case"wait":return Toe();case"closeAgent":return See()}switch(typeof e.kind=="string"?e.kind:""){case"started":return moe();case"interacted":return XJ();case"interrupted":return loe()}return noe()}function ob({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(mf,{...t});if(e.litCall)r=f.jsx(qB,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(AI,{...t});break;case"read":case"project":r=f.jsx(RI,{...t});break;case"search":r=f.jsx(GI,{...t});break;case"edit":r=f.jsx(mS,{...t});break;case"web":r=f.jsx(j4n,{...t});break;case"agent":r=f.jsx(yS,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function p4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=A.useState(!1),a=A.useRef(null),o=A.useRef(!1);return A.useEffect(()=>{var c,u;!s||!o.current||(o.current=!1,(u=(c=a.current)==null?void 0:c.querySelector("button"))==null||u.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((c,u)=>f.jsxs("span",{children:[u>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?$r(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.stopPropagation(),t==null||t(c.id)}},children:c.label}):f.jsx("span",{children:c.label})]},c.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?eY({target:r}):jJ({count:Wt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?TD():Uze({count:Wt(e.length)})})]})}function W5({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:u8n(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(Mwn,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...$r(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((x,k)=>({id:x,label:YE({number:Wt(p.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:P4e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(x)},children:YE({number:Wt(k+1)})})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onSelect:r,targetType:npe()})]})]})}if((u=e.runIds)!=null&&u.length){const _=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||Vc()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:tZ({run:Ne(x)}),...$r(v=>t(x,v),{stopPropagation:!0}),children:(s==null?void 0:s(x))||Vc()}):f.jsx("span",{children:(s==null?void 0:s(x))||Vc()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onOpen:t,targetType:y8e()})]})]})}if((h=e.experimentIds)!=null&&h.length){const _=a?e.experimentIds.filter(x=>!!a(x)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(a==null?void 0:a(x))||Vc()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",i?f.jsx("button",{className:"tool-target",title:OY({name:(a==null?void 0:a(x))||Ne(x)}),...$r(v=>i(x,v),{stopPropagation:!0}),children:(a==null?void 0:a(x))||Vc()}):f.jsx("span",{children:(a==null?void 0:a(x))||Vc()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onOpen:i,targetType:$me()})]})]})}return e.label}function lC(e){const n=e.progressLabel??{skill:One(),read:Wre(),search:Dae(),edit:Bte(),project:Lse(),web:uee(),agent:_te(),command:gD()}[e.kind];return{...e,label:n}}function LH(e,n){const t=nf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:dne(),read:cre(),search:nie(),edit:Cte(),project:cse(),web:ree(),agent:ste(),command:qse()}[t.kind]}function ZDn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const JDn=250;function eLn(e,n){const[t,r]=A.useState(e),s=A.useRef(Date.now()),i=A.useRef(e);return A.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=JDn-(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 tLn=160;function IH(e){const[n,t]=A.useState(!1);return A.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),tLn);return()=>window.clearTimeout(r)},[e]),e&&n}function nLn(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:CD()}}function rLn(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 sLn(e){const n=[];let t=null;for(const r of e){const s=nf(r),i=rLn(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 $H({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var x,k;const i=(x=e.state)==null?void 0:x.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,c]=A.useState(Date.now());if(A.useEffect(()=>{if(typeof a!="number"||(c(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=K7n(i??{},o);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Nt,{}),f.jsx("span",{children:v})]})}const u=FB(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,_=PB(e)?a1e():s?B8e():jN(),p=s?k4n:bS,m=Ry(((k=e.state)==null?void 0:k.error)||jN());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(Ba,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&h&&(u==="retry"||u==="continue")&&f.jsx(De,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?d9e():u==="retry"?Vs():Y0e()})]})}function SR({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",_=Ry((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!_,[m,x]=A.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx($H,{part:e,busy:!1,recovering:!1,usageLimited:i5(e)});const v=f.jsxs(f.Fragment,{children:[h&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),h?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(DI,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(ob,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${CH} ${h?"text-accent-red":"text-subtext"}`,children:[f.jsx(W5,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:hY({count:Wt(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,f.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":k,"aria-label":m?oY({activity:n.label}):wJ({activity:n.label}),onClick:()=>x(b=>!b),children:f.jsx(Ba,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:oC,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function iLn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,D,I;const[c,u]=A.useState(!1),[h,_]=A.useState(!1),p=()=>{_(!0),u($=>!$)},m=sLn(e),x=m.map(({activity:$})=>$),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,w=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(b&&lC(b))??null:null,y=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(w!=null&&w.progressLabel)&&(ZDn((D=v.state)==null?void 0:D.input)||(w==null?void 0:w.kind)==="command"&&!qs(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=eLn(w,y),N=IH(C!=null),z=C??nLn(x),T=C?C.label:CD();return e.length===1?C?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(ob,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:T,children:f.jsx(W5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(SR,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.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:[f.jsx(ob,{activity:z,className:N?"tool-running-shimmer-icon":"text-muted"}),C?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:T,children:f.jsx(W5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":c,children:T}),f.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":c,"aria-label":c?T0e():Ame(),children:f.jsx(Ba,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:h&&m.map(({part:$,count:q,activity:H})=>f.jsx(SR,{part:$,repeatCount:q,activity:H,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},$.id))})})})]})}function aLn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;const s=e.prompt,[i,a]=A.useState([]),o=!n,c=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:o3e(),icon:Xi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:z3e(),icon:mS,iconClass:"text-accent-amber"}:s.approved===!1?{label:h3e(),icon:or,iconClass:"text-accent-red"}:{label:x3e(),icon:Ob,iconClass:"text-muted"},x=m.icon;return f.jsxs("details",{className:ODn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?ND():EN()}),f.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(Ba,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${yR} ms-6`,children:[f.jsx(Jo,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(cC,{annotations:p,variant:"sent"}),f.jsxs("details",{className:MDn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||f7e()}),f.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 ${_?"chosen":""}`,children:_||a8e()})]}),f.jsxs("div",{className:yR,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.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 f.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.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:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?JCe():EN()}),f.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 ${_?"clamped":""}`,children:f.jsx(Jo,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...$r(p=>r(s.plan??"",e.id,p)),children:aCe()}),!o&&!_&&f.jsxs("div",{className:V5,children:[f.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:Ove()}),f.jsx(De,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:Fve()}),f.jsx(De,{size:"small",onClick:()=>c({approve:!1}),children:w5e()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=qs(_,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",x=qs(_,"description")||"",k=m||x||LH(s.tool,_),v=`permission-heading-${e.id}`;return f.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":v,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(bS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:pbe()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&f.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&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(De,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:A2e()}),f.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:cbe()})]})]})]})}const u=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.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&&f.jsx("div",{className:DDn,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=i.includes(_.label);return f.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(_.label):c({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:V5,children:f.jsx(De,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:P6e()})})]})}function oLn(e,n){return e.role==="user"?!0:e.parts.some(t=>vh(t,n))}function cLn(e){const n=e.text??"",t=n.startsWith("data:")?n:Oyn(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}}async function uC(e){try{if(!navigator.clipboard)throw new Error(MD());await navigator.clipboard.writeText(e),mn(j0(),"success")}catch(n){mn(n instanceof Error?n.message:String(n),"error")}}function lLn(e,n){const t=URL.createObjectURL(new Blob([n],{type:"text/markdown;charset=utf-8"})),r=document.createElement("a");r.href=t,r.download=e,document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(t),1e3)}function uLn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,_=new Date(n),p=()=>uC(e);return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&f.jsxs(f.Fragment,{children:[f.jsx(Lt,{size:"small",title:vN(),"aria-label":vN(),disabled:o||!s,onClick:()=>s&&a(s),children:f.jsx(MI,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(Lt,{size:"small",title:gN(),"aria-label":gN(),disabled:o||!i,onClick:()=>i&&a(i),children:f.jsx(Ba,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(E(),{hour:"numeric",minute:"2-digit"})}),f.jsx(Lt,{size:"small","aria-label":Vk(),disabled:!e,onClick:p,children:f.jsx(Oh,{size:13})})]}),f.jsx(Lt,{size:"small",title:_N(),"aria-label":_N(),disabled:u,onClick:c,children:f.jsx(mS,{size:13})})]})}const _Ln=A.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:w,forkIndex:y=0,forkPrevId:C,forkNextId:N,forkDisabled:z,branchDisabled:T,onFork:j,onSelectFork:M}){var J,Z;hf();const[D,I]=A.useState(null),$=dLn(n);if($)return f.jsx(hLn,{part:$});if(n.role==="user"){const B=n.parts.filter(ce=>ce.type==="text").map(ce=>ce.text??"").join(` -`),L=ce=>!!(v!=null&&v.some(_e=>_e.name===ce)),F=n.parts.filter(ce=>ce.type==="image"&&ce.text).map(cLn),U=F.filter(ce=>!ce.isPdf),K=F.filter(ce=>ce.isPdf),ne=n.parts.filter(ce=>ce.type==="annotation"&&ce.text).map(ce=>({id:ce.id,text:ce.text??""}));if(D!==null){const ce=()=>{const _e=D.trim();!_e||z||(I(null),j(n.id,_e))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.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":X2e(),value:D,autoFocus:!0,onChange:_e=>I(_e.target.value),onKeyDown:_e=>{_e.key==="Escape"?(_e.preventDefault(),I(null)):_e.key==="Enter"&&!_e.shiftKey&&!_e.nativeEvent.isComposing&&(_e.preventDefault(),ce())}}),f.jsxs("div",{className:`${V5} justify-end`,children:[f.jsx(De,{size:"small",onClick:()=>I(null),children:aye()}),f.jsx(De,{size:"small",variant:"primary",onClick:ce,disabled:z||!D.trim(),children:i3()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[ne.length>0&&f.jsx(cC,{annotations:ne,variant:"sent"}),f.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]:align-baseline",children:[f.jsx(rDn,{text:B,isCommand:L}),U.length>0&&f.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:U.map((ce,_e)=>f.jsx("a",{href:ce.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:ce.src,alt:qpe()})},_e))}),K.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:K.map((ce,_e)=>f.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:ce.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Ob,{size:15}),f.jsx("span",{children:ce.name})]},_e))})]}),w!==void 0&&f.jsx(uLn,{text:B,createdAt:n.createdAt,count:w,index:y,prevId:C,nextId:N,onSelect:M,pagerDisabled:T,onEdit:()=>I(B),editDisabled:z})]})}const q=n.parts.find(B=>B.type==="tool"&&i5(B)),H=n.parts.find(Rm)??q,Q=n.parts.filter(B=>B!==H&&!(q&&i5(B))),V=b&&!n.completedAt?"":BB(n);return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(fLn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:b}}),H&&f.jsx($H,{part:H,usageLimited:!!q,busy:m,recovering:x===((Z=(J=H.state)==null?void 0:J.input)==null?void 0:Z.turnId),onRecover:k}),V&&f.jsx("div",{className:"flex opacity-0 transition-opacity duration-80 ease-standard group-hover/turn:opacity-100 group-focus-within/turn:opacity-100",children:f.jsx(Lt,{size:"small",title:JE(),"aria-label":JE(),onClick:()=>void uC(V),children:f.jsx(Oh,{size:13})})})]})});function fLn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=IB(n,r),[a,o]=A.useState(!1),[,c]=A.useState(0);if(A.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>c(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:iv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,_=h===null?null:h<6e4||h>=36e5?T0(h):KEe({minutes:Wt(Math.floor(h/6e4)),seconds:Wt(Math.floor(h/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[f.jsx("span",{children:_===null?PEe():eNe({duration:_})}),f.jsx(Ba,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:iv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:iv(i,t)})]})}function dLn(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===nI?n:null}function hLn({part:e}){var c;const n=e.state,t=qs((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((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),o=r?gD():s&&i!==null?g0e({code:Wt(i)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[wD()," "]}),f.jsx(mf,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${oC} mt-2`,children:a.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function iv(e,n){var w,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&vh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(f.jsx(iLn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(vh(C,t)){if(C.type==="tool"&&(mLn(C.tool)||(((w=C.children)==null?void 0:w.length)??0)>0)){b(),k.push(f.jsx(vLn,{part:C,pendingTail:m&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(f.jsx(Jo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":OCe(),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&&k.push(f.jsx(aLn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:_},C.id))}return b(),k}function pLn(e){return nf(e).label}function mLn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function BH(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 cb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&cb(t.children,n);if(r)return r}return null}function gLn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var x,k,v,b;const o=e.children??[],c=((x=e.state)==null?void 0:x.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Ry(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",_=iv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?DB(o):null}),m=o.some(w=>w.type==="text"&&!!w.text)?"":BH(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),h&&f.jsx("div",{className:oC,children:h.slice(0,2e4)}),_.length===0&&!m&&!h?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?Hk():E1e()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(Jo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function vLn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,_,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Ry(((h=e.state)==null?void 0:h.error)||((_=e.state)==null?void 0:_.output)||""),i=n&&!r?lC(nf(e)):nf(e),a=IH(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!BH(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(DI,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(ob,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${CH} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?f.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:c}):f.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:xve(),...$r(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Ba,{size:12})})]})}function bLn(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 c of s){const u=`${i}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(u,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function _C(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=qs(o,"reason","description")||LH(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 yLn(e){const[n,t]=A.useState({text:"",sequence:0}),r=A.useRef(null);return A.useEffect(()=>{var x,k,v,b,w;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:a}=bLn(e),o=_C(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(y=>({text:o?UE({label:Gi(o.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([y,C])=>{var N;return((N=c.get(y))==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(y=>({text:UE({label:Gi(o.label)}),sequence:y.sequence+1}));return}const _=(k=h.find(([,y])=>Rm(y.part)))==null?void 0:k[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const y=FB((b=(v=_.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${$ce()}${y?` ${y==="retry"?rce():Xoe()}`:""}`,sequence:C.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(y=>({text:qoe(),sequence:y.sequence+1}));return}const p=h.filter(([,y])=>y.status==="error");if(p.length>0){const y=p.slice(0,2).map(([,C])=>nf(C.part).label).join(", ");t(C=>({text:p.length===1?Sce({labels:y}):Ace({count:Wt(p.length),labels:y}),sequence:C.sequence+1}));return}const m=h.filter(([,y])=>y.status==="running");if(m.length>0){const y=(w=m.at(-1))==null?void 0:w[1].part;t(C=>({text:y?lC(nf(y)).label:uce(),sequence:C.sequence+1}));return}h.some(([,y])=>y.status==="completed")&&t(y=>({text:gce(),sequence:y.sequence+1}))},[e]),n}const xLn=A.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,recoveringTurnId:C,onRecover:N,skills:z}){var B,L,F;hf();const T=((B=_C(n))==null?void 0:B.id)??null,j=A.useMemo(()=>n.filter(U=>oLn(U,T)),[n,T]),M=A.useMemo(()=>{const U=j.filter(K=>K.role==="user"&&!K.id.startsWith(P_));return P7n(a,n,U,K=>K.startsWith(P_))},[n,j,a]),D=A.useRef(new Set),[I,$]=A.useState(!1),q=A.useCallback(U=>j[U].id,[j]),H=A.useCallback(U=>{if(I)return j.map((ne,ce)=>ce);const K=new Set(MB(U));return j.forEach((ne,ce)=>{D.current.has(ne.id)&&K.add(ce)}),[...K].sort((ne,ce)=>ne-ce)},[j,I]),Q=I7n({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:q,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,j.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:H});A.useLayoutEffect(()=>{const U=()=>Q.scrollToEnd();return r.current=U,i(),()=>{r.current=null}},[Q,r,i]),A.useEffect(()=>{const U=()=>{var ce;const K=window.getSelection();if(!K||K.isCollapsed||!K.rangeCount)return;const ne=K.getRangeAt(0);for(const _e of((ce=t.current)==null?void 0:ce.querySelectorAll("[data-message-id]"))??[])ne.intersectsNode(_e)&&_e.dataset.messageId&&D.current.add(_e.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const V=j.at(-1),J=yLn(n),Z=h?LB(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:J.text},J.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":I,onClick:()=>$(U=>!U),children:J8e()}),f.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(U=>{var se,G,oe,le,fe,me;const K=j[U.index],ne=K.parts.find(Rm),ce=(G=(se=ne==null?void 0:ne.state)==null?void 0:se.input)==null?void 0:G.turnId,_e=ne?h||C!==null:!1;return f.jsx("div",{"data-index":U.index,"data-message-id":K.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:Re=>{!(Re.target instanceof Element)||!Re.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(K.id),onFocusCapture:()=>D.current.add(K.id),children:f.jsx(_Ln,{message:K,forkCount:(oe=M.get(K.id))==null?void 0:oe.count,forkIndex:(le=M.get(K.id))==null?void 0:le.index,forkPrevId:(fe=M.get(K.id))==null?void 0:fe.prevId,forkNextId:(me=M.get(K.id))==null?void 0:me.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:T,pendingTailToolId:(Z==null?void 0:Z.messageId)===K.id?Z.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,busy:_e,recoveringTurnId:ce===C?C:null,onRecover:N,skills:z,predictTextTail:h&&K===V&&K.role==="assistant"})},K.id)})})]})}),wLn=(e,n)=>e==="all"?!0:e==="archived"?n:!n,PH=[{id:"active",label:Wve,railLabel:zD},{id:"archived",label:rN,railLabel:rN},{id:"all",label:tbe,railLabel:xD}];function kLn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=_o();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(Lt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:pN(),"aria-label":pN(),onClick:()=>r(i=>!i),children:f.jsx(VI,{size:13})}),t&&f.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:PH.map(i=>f.jsxs(Yn,{onClick:()=>{n(i.id),r(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(Xi,{size:13})]},i.id))})]})}const SLn=14,CLn=500,ELn=1200;function FH({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.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*SLn,CLn)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function NLn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:_,ref:p}=_o(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[x,k]=A.useState(!1),[v,b]=A.useState(""),w=A.useRef(null);function y(){var z;b(((z=e.title)==null?void 0:z.trim())||""),k(!0)}function C(){var T;const z=v.trim();k(!1),z&&z!==(((T=e.title)==null?void 0:T.trim())||"")&&o(z)}return A.useEffect(()=>{var z,T;x&&((z=w.current)==null||z.focus(),(T=w.current)==null||T.select())},[x]),f.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":""} ${h?"menu-open":""} ${x?"editing":""}`,title:`${su[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?a9e():""}`,onClick:()=>{x||(h?_(!1):a())},onKeyDown:z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),h?_(!1):a())},children:[e.parentSessionId&&!x&&f.jsx(yS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?f.jsx("input",{ref:w,className:"session-title-input","aria-label":Zke(),value:v,onChange:z=>b(z.target.value),onClick:z=>z.stopPropagation(),onBlur:C,onKeyDown:z=>{z.stopPropagation(),z.key==="Enter"?(z.preventDefault(),C()):z.key==="Escape"&&(z.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(FH,{title:m,animate:i!==void 0},i??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsx("button",{className:"session-menu-btn",title:kN(),"aria-label":kN(),onClick:z=>{z.stopPropagation(),_(T=>!T)},children:f.jsx(dS,{size:14})}),h&&f.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:[f.jsx(Yn,{onClick:z=>{z.stopPropagation(),_(!1),y()},children:f.jsx("span",{children:SD()})}),f.jsx(Yn,{onClick:z=>{z.stopPropagation(),_(!1),c(!e.archived)},children:f.jsx("span",{children:e.archived?yEe():wpe()})}),f.jsx(Yn,{danger:!0,onClick:z=>{z.stopPropagation(),_(!1),u()},children:f.jsx("span",{children:kD()})})]})]})}const CR=[RI,GI,mf,hh],zLn=()=>[{title:CSe(),prompt:vSe()},{title:BSe(),prompt:RSe()},{title:JSe(),prompt:VSe()},{title:d6e(),prompt:a6e()}],m4=[{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"}],ER="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function jLn({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:_,onOpenPlan:p,onOpenSubagent:m,runtime:x,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:w,onActiveSessionChange:y,preferredAgent:C,onPreferredAgentChange:N,children:z}){var Ku,zo,Wu,ga,yc,Lf,vs;const T=an({mutationFn:te=>Tyn(...te)}),j=an({mutationFn:te=>zyn(...te)}),M=an({mutationFn:te=>jyn(...te)}),D=an({mutationFn:te=>wyn(...te)}),I=an({mutationFn:te=>Syn(...te)}),$=an({mutationFn:te=>Eyn(...te)}),q=an({mutationFn:te=>Nyn(...te)}),H=an({mutationFn:Cyn}),Q=A.useMemo(()=>La(e),[e]),{data:V=LDn}=ut(Q),J=A.useCallback(te=>{Vr(Q.queryKey,be=>{if(!be)return;const ze=typeof te=="function"?te(be):te,X=new Map(be.map(ae=>[ae.id,ae]));for(const ae of ze)X.get(ae.id)!==ae&&Za(nt,Q.queryKey,ae.id),X.delete(ae.id);for(const ae of X.keys())Za(nt,Q.queryKey,ae);return ze})},[Q]),Z=w,B=A.useRef(y);B.current=y;const L=A.useRef({projectId:e});L.current.projectId!==e&&(L.current={projectId:e});const[F,U]=A.useState(new Set),[K,ne]=A.useState("active"),[ce,_e]=A.useState(""),[se,G]=A.useState(!1),[oe,le]=A.useState(!1),[fe,me]=A.useState([]),Re=A.useRef(0),Oe=A.useRef({projectId:e,activeId:Z,mainView:i});(Oe.current.projectId!==e||Oe.current.activeId!==Z||Oe.current.mainView!==i)&&(Oe.current={projectId:e,activeId:Z,mainView:i});const[Qe,qe]=A.useState([]),[Se,at]=A.useState(null),et=Z??"new",ct=A.useRef(new Map),wt=A.useRef(bw);wt.current={draft:ce,attachments:Qe,annotations:fe};const $t=e===$p&&V.length>0&&V.every(te=>hvn[te.id]===te.activeLeafId)?$z:null,ht=A.useRef(null);$t!==null&&ht.current===null&&Z!==null&&(ht.current=et);const dt=et===ht.current?$t:null;A.useLayoutEffect(()=>{const te=ct.current.get(et)??bw;return wt.current=te,_e(te.draft),qe(te.attachments),me(te.annotations),()=>{const be=X7n(wt.current,dt);be?ct.current.set(et,be):ct.current.delete(et)}},[et,dt]);const[Le,ge]=A.useState(null),Te=A.useRef(Promise.resolve()),Fe=A.useRef(0),st=A.useRef(0),[_t,mt]=A.useState(null),Ue=A.useRef(null),Gt=A.useRef(!1),sn=A.useRef(null),[jt,gt,$n]=gxn(e,i==="chat"?Z:null),{data:Zt=ALn}=ut(ku()),[gn,mr]=A.useState(C);A.useEffect(()=>mr(C),[C]);const[Bn,Nn]=A.useState({}),[zn,Pn]=A.useState(Qp),[jr,Ct]=A.useState(null),tn=A.useRef(!1),vn=A.useRef(null),[on,gr]=A.useState(null),bn=A.useRef(!1),yn=A.useRef(null),[Hn,Ie]=A.useState(new Map),Ke=A.useRef(new Map),Cn=A.useRef(null),Zn=A.useRef(null),Xt=A.useRef(null),Jt=A.useRef(!0),[jn,Wr]=A.useState(!0),qn=A.useRef(null),[ps,hi]=A.useState(!1),Rs=_o(),Qs=A.useCallback(te=>{var be;Re.current+=1,me(ze=>[...ze,{id:`annotation-${Re.current}`,...te}]),(be=qn.current)==null||be.focus()},[]),ms=zDn(Zn,Qs);jDn(fe),A.useEffect(()=>{hi(!1),ms.dismiss()},[Z,e,ms.dismiss]);const[ua,Ms]=A.useState(0),[_a,Br]=A.useState(!1),[nr,ho]=A.useState(0),[po,Un]=A.useState(0),Pr=A.useRef(!1);function mo(te){if(!Vn)return;if(!gi&&te.source==="command"&&Ay(te.name)&&te.name!=="goal"){Fu(te.name,ce,Vn);return}const be=te.source==="command"?1:q5(te.name,qn.current),ze=XOn(ce,Vn,te.name,be);_e(ze.text),window.requestAnimationFrame(()=>{var X,ae;(X=qn.current)==null||X.focus(),(ae=qn.current)==null||ae.setSelectionRange(ze.cursor,ze.cursor),Un(ze.cursor)})}function go(te){if(Ds)return!1;const be=te.selectionStart;if(Pr.current||be!==te.selectionEnd)return!1;const ze=ce.slice(0,be).replace(/[ \t]+$/,"").length,X=o4(ce,ze);if(!X||X.end!==ze||!yl(X.query)||be>ze&&be-ze!==q5(X.query,te))return!1;const ae=hR(ce,{...X,end:be});return _e(ae.text),Un(ae.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(ae.cursor,ae.cursor)),!0}function Xs(te){at(null);let X=Qe.reduce((ae,xe)=>ae+xe.size,0);for(const ae of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(ae.type))continue;if(ae.size>31457280){at(Xpe({name:Ne(ae.name)}));continue}if(X+ae.size>41943040){at(r0e());continue}X+=ae.size;const xe=Z,Ae=new FileReader;Ae.onload=()=>{const ke={dataUrl:Ae.result,mediaType:ae.type,name:ae.name,size:ae.size};if(Oe.current.activeId===xe){qe(Xe=>[...Xe,ke]);return}const He=ct.current.get(xe??"new")??bw;ct.current.set(xe??"new",{...He,attachments:[...He.attachments,ke]})},Ae.readAsDataURL(ae)}}function vo(te){const be=Array.from(te.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);be.length>0&&(te.preventDefault(),Xs(be))}const qt=V.find(te=>te.id===Z),Fa=gn??Y5n(Zt),Gn=qt?{harness:qt.harness,model:Bn.model??qt.model,serviceTier:Bn.serviceTier!==void 0?Bn.serviceTier:qt.serviceTier,permissionMode:Bn.permissionMode??qt.permissionMode,reasoningLevel:Bn.reasoningLevel??qt.reasoningLevel}:Fa?{...Fa,...Bn}:null,{data:Fr=TLn}=ut(oxn(Gn==null?void 0:Gn.harness)),it=Gn?Zt.find(te=>te.id===Gn.harness):void 0,Vt=it==null?void 0:it.options,xs=A.useMemo(()=>YOn(Fr,Vt==null?void 0:Vt.planActivation),[Fr,Vt==null?void 0:Vt.planActivation]),Ys=mR(ce),pi=Ys!==null,Vn=o4(ce,po),_r=(Vn==null?void 0:Vn.query)??null,Os=_r===null?[]:xs.filter(te=>WOn(te,_r)),Ds=!pi&&_r!==null&&(Vn==null?void 0:Vn.end)===po&&Os.length>0,Tr=Ds&&!_a?Os:[],mi=Tr.length>0,fr=Math.min(ua,Math.max(0,Tr.length-1));A.useEffect(()=>Ms(0),[_r]);const ws=Gn&&it&&!it.catalogPending&&it.models.length>0&&!it.models.some(te=>te.id===Gn.model)?it.models[0].id:(Gn==null?void 0:Gn.model)??null,Dt=Gn&&{...Gn,model:ws,serviceTier:Rv(it,ws,Gn.serviceTier),reasoningLevel:XL(it,ws,Gn.reasoningLevel)},ks=Mb(it,Dt==null?void 0:Dt.model),Ha=te=>{if(!Dt)return;const be={...Dt,...te},ze={};te.model!==void 0&&te.model!==Dt.model&&(ze.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Dt.serviceTier&&(ze.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Dt.permissionMode&&(ze.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Dt.reasoningLevel&&(ze.reasoningLevel=te.reasoningLevel),Pn(X=>({...X,...ze})),mr(be),N(be).catch(()=>{}),qt?Nn(X=>({...X,...te})):te.harness&&te.harness!==Dt.harness&&Nn({})},Ss=A.useCallback(te=>{const be=Te.current.catch(()=>{}).then(()=>{if(!Rn(Q.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return Te.current=be.then(()=>{},()=>{}),be},[Q]),qa=te=>{if(te==="plan"&&(it==null?void 0:it.id)==="claude-code"?(Pn(X=>({...X,permissionMode:te})),Nn(X=>({...X,permissionMode:te}))):(Nn(X=>{const ae={...X};return delete ae.permissionMode,ae}),Ha({permissionMode:te})),!qt)return;const be=qt.id,ze=++Fe.current;ge(null),Ss(()=>T.mutateAsync([be,te])).then(X=>{J(ae=>ae.map(xe=>xe.id===X.id?X:xe)),Fe.current===ze&&Nn(ae=>{const xe={...ae};return delete xe.permissionMode,xe})}).catch(()=>{Fe.current===ze&&(Nn(X=>{const ae={...X};return delete ae.permissionMode,ae}),ge(MEe()))})},$u=te=>Ha({reasoningLevel:te}),Bu=((Ku=qt==null?void 0:qt.goal)==null?void 0:Ku.trim())||"",bo=(Dt==null?void 0:Dt.harness)==="claude-code"?Dt.permissionMode==="plan":(Vt==null?void 0:Vt.planActivation)==="command"?_t??(qt==null?void 0:qt.planMode)??!1:!1;A.useEffect(()=>{_t===null||(qt==null?void 0:qt.planMode)!==_t||(Ue.current=null,mt(null))},[qt==null?void 0:qt.planMode,_t]);async function Ar(te){if(Pn(X=>({...X,planMode:te})),Ue.current=te,mt(te),!qt)return;const be=qt.id,ze=++st.current;ge(null);try{const X=await Ss(()=>j.mutateAsync([be,te]));J(ae=>ae.map(xe=>xe.id===X.id?X:xe)),st.current===ze&&(Ue.current=null,mt(null),ge(null))}catch(X){throw st.current===ze&&(Ue.current=null,mt(null)),X}}async function Pu(){if((Dt==null?void 0:Dt.harness)==="claude-code"){qa("auto");return}if(qt)try{await Ar(!1)}catch{ge(Sme())}}async function yo(){const te=!bo;try{if((Dt==null?void 0:Dt.harness)==="claude-code")qa(te?"plan":"auto");else if((Vt==null?void 0:Vt.planActivation)==="command")await Ar(te);else throw new Error(Yg())}catch{ge(zN())}}function fa(te,be=""){var ze;switch(te){case"plan":return yo(),!1;case"new":return Qr(),!1;case"resume":return hi(!0),!0;case"model":return ho(X=>X+1),!0;case"compact":return bl(),!1;case"goal":return Ga(be),!1;case"copy":{const X=ur.at(-1),ae=rr&&(X==null?void 0:X.role)==="assistant"&&!X.completedAt,xe=U7n(ae?ur.slice(0,-1):ur);return xe?uC(xe):mn(eve(),"info"),!1}case"export":{const X=((ze=qt==null?void 0:qt.title)==null?void 0:ze.trim())||vd(),ae=qt?G7n(X,ur,{user:Gme(),assistant:su[qt.harness]}):null;return ae?lLn(V7n(X),ae):mn(ove(),"info"),!1}}}async function Ua(te){ge(null);const be=L.current;try{const ze=await D.mutateAsync([e,te]);if(nt.invalidateQueries({queryKey:tI().queryKey}),L.current!==be)return;J(X=>[ze,...X.filter(ae=>ae.id!==ze.id)]),ne("all"),y(ze.id,{projectId:ze.projectId})}catch(ze){if(L.current!==be)return;ge(Bge({error:Ne(ze instanceof Error?ze.message:String(ze))}))}}async function Ga(te){var Ae;const be=te.trim();if(!be){const ke=(Ae=qt==null?void 0:qt.goal)==null?void 0:Ae.trim();mn(ke?ige({goal:Gi(ke)}):vge(),"info");return}const ze=Oe.current,X=()=>Oe.current.activeId===ze.activeId;ge(null);let ae=Z;if(!ae){if(!(it!=null&&it.agentReady)||!Dt){ge(Yg());return}try{ae=(await ma(Dt,l4(Vt==null?void 0:Vt.planActivation,void 0,Ue.current))).id}catch(ke){ge(eN({error:Ne(ke instanceof Error?ke.message:String(ke))}));return}}const xe=/^(clear|none|off)$/i.test(be);try{const ke=await Ss(()=>M.mutateAsync([ae,xe?null:be]));J(He=>He.map(Xe=>Xe.id===ke.id?ke:Xe)),mn(xe?Zme():Cge(),"success")}catch(ke){if(!X())return;ge(eN({error:Ne(ke instanceof Error?ke.message:String(ke))}))}}async function bl(){const te=Z;if(!te){mn(K1e(),"info");return}if(rr){ge(I0e());return}ge(null),K==="archived"&&ne("active");const be=Oe.current;try{const{message:ze}=await Dyn(te);gt({type:"upsertMessage",sessionId:te,message:ze})}catch(ze){if(Oe.current.activeId!==be.activeId)return;ge(U0e({error:Ne(ze instanceof Error?ze.message:String(ze))}))}}function Fu(te,be,ze){const X=hR(be,ze);_e(X.text),Br(!0),!fa(te)&&window.requestAnimationFrame(()=>{var ae,xe;(ae=qn.current)==null||ae.focus(),(xe=qn.current)==null||xe.setSelectionRange(X.cursor,X.cursor),Un(X.cursor)})}const Ls=A.useCallback(async(te=!1)=>{const be=L.current;if(be.projectId!==e||!Rn(Q.queryKey))return null;const ze=(nt.getQueryData(Q.queryKey)??[]).map(X=>X.id);try{const X=await nt.fetchQuery({...Q,...te?{staleTime:0}:{}});if(L.current!==be||!Rn(Q.queryKey))return null;const ae=X.filter(Ae=>!ll.has(Ae.id)),xe=new Set(ae.map(Ae=>Ae.id));for(const Ae of ze)xe.has(Ae)||qu(Ae);return Ke.current=new Map(ae.map(Ae=>[Ae.id,Ae.title])),ae}catch{return null}},[e]),as=A.useCallback(async te=>{L.current.projectId!==e||!Rn(Q.queryKey)||await Promise.all([nt.fetchQuery({...il(te),staleTime:0}),Ls(!0)]).catch(()=>{})},[e,Ls]);A.useEffect(()=>{const te=i$();U(e===$p?new Set([Tb,Ab].filter(ze=>!te.has(ze))):new Set),G(!1),le(!1),Ie(new Map),Ke.current=new Map,Ls();const be=L.current;return()=>{L.current===be&&(L.current={projectId:e})}},[e,Ls]),A.useEffect(()=>{Pn(Qp),yn.current=null},[Z]),A.useEffect(()=>Ov(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||ll.has(te.session.id))return;const be=Ke.current.has(te.session.id),ze=Ke.current.get(te.session.id)!==te.session.title;Ke.current.set(te.session.id,te.session.title),be&&ze&&te.session.titleSource==="generated"&&(Ie(X=>{const ae=new Map(X);return ae.set(te.session.id,(X.get(te.session.id)??0)+1),ae}),window.setTimeout(()=>{Ie(X=>{if(!X.has(te.session.id))return X;const ae=new Map(X);return ae.delete(te.session.id),ae})},ELn));break}case"sessionDeleted":qu(te.sessionId);break}}),[e]),A.useEffect(()=>Ov(te=>{te.type==="reconnected"&&Ls(!0)}),[Ls]);const uc=Z?jt.messagesBySession[Z]??xR:xR,da=Z?jt.activeLeafBySession[Z]??null:null;vn.current=da;const ur=A.useMemo(()=>$7n(uc,da),[uc,da]),_c=A.useRef({projectId:e,ids:jt.busySessions});A.useEffect(()=>{const te=_c.current;_c.current={projectId:e,ids:jt.busySessions},te.projectId===e&&U(be=>q7n(be,te.ids,jt.busySessions,V,i==="chat"?Z:null))},[e,jt.busySessions,V,Z,i]);const rr=Z?jt.busySessions.has(Z):!1,Sf=!rr&&!!(it!=null&&it.agentReady),xo=rr&&LB(ur)!=null,wo=rr&&H7n(ur),Ri=Z?jt.queuedBySession[Z]??[]:[],Bt=Ri.some(te=>te.dispatchState==="retrying"),Is=Ri.findIndex(te=>te.dispatchState==="blocked"),Zs=Ri.reduce((te,be)=>be.dispatchState!=="retrying"||typeof be.nextRetryAt!="number"?te:te===null?be.nextRetryAt:Math.min(te,be.nextRetryAt),null),[ha,Cf]=A.useState(()=>Date.now());A.useEffect(()=>{if(!Bt||Zs===null||(Cf(Date.now()),Zs<=Date.now()))return;const te=window.setInterval(()=>{const be=Date.now();Cf(be),be>=Zs&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[Bt,Zs]),A.useEffect(()=>{const te=Ri.reduce((be,ze)=>ze.planMode??be,void 0);te!==void 0?(Gt.current=!0,Ue.current=te,mt(te)):Gt.current&&(Gt.current=!1,Ue.current=null,mt(null))},[Ri]);const fc=!!Z&&!(Z in jt.messagesBySession)&&$n.isPending,dc=A.useMemo(()=>{const te=new Set;for(const be of jt.busySessions)(jt.messagesBySession[be]??[]).some(ze=>ze.parts.some(X=>X.type==="prompt"&&X.prompt&&!X.prompt.resolved&&X.prompt.nativeId))&&te.add(be);return te},[jt.busySessions,jt.messagesBySession]),Mi=Z?dc.has(Z):!1,sr=qt,hc=sr?Hn.get(sr.id):void 0,Cs=A.useMemo(()=>{var te;for(let be=ur.length-1;be>=0;be--)for(const ze of ur[be].parts)if(ze.type==="prompt"&&((te=ze.prompt)==null?void 0:te.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[ur]),gi=A.useMemo(()=>Z?F7n(ur,sr==null?void 0:sr.harness,jt.busySessions.has(Z)):null,[ur,sr==null?void 0:sr.harness,Z,jt.busySessions]),$s=pi&&!gi,yl=te=>{if(gi||pi)return!1;const be=H5(te),ze=xs.find(X=>X.name===(be??te));return!ze||ze.source!=="command"?!!ze:be&&c4(be)?be==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},Oi=A.useMemo(()=>xs.filter(te=>te.source!=="command"),[xs]),[Di,Ef]=A.useState(null),ko=Di&&Di.sessionId===Z?Di:null;A.useEffect(()=>{if(!Di)return;const te=jt.busySessions.has(Di.sessionId),be=Di.sessionId===Z&&Cs&&Cs.promptId!==Di.promptId;(!te||be)&&Ef(null)},[Di,Cs,jt.busySessions,Z]);const Vh=A.useMemo(()=>_C(ur),[ur]),pc=rr&&!!(it!=null&&it.supportsSteering)&&!!(it!=null&&it.agentReady)&&!Cs&&!gi&&!Vh&&Qe.length===0&&fe.length===0,mc=A.useMemo(()=>p&&Z?(te,be,ze)=>p(te,Z,be,ze):void 0,[p,Z]),Nf=A.useMemo(()=>m&&Z?(te,be,ze)=>m(Z,te,be,ze):void 0,[m,Z]),zf=A.useMemo(()=>o&&((te,be,ze,X,ae)=>o(te,Z??void 0,be,ze,X,ae)),[o,Z]);A.useEffect(()=>{Fe.current+=1,st.current+=1;const te=(Z?jt.queuedBySession[Z]??[]:[]).reduce((be,ze)=>ze.planMode??be,void 0);Gt.current=te!==void 0,Ue.current=te??null,mt(te??null),Nn({}),ge(null)},[Z]);const xl=i==="chat"&&(ur.length>0||rr),Js=(Dt==null?void 0:Dt.harness)??null,wl=(Dt==null?void 0:Dt.model)??null,So=$n.data?null:$n.error,jf=i==="chat"&&!xl&&!fc&&!So,gc=ut({...Dxn(e,Js??"claude-code",wl,E()),enabled:jf&&Js!==null,subscribed:jf&&Js!==null}),ei=(zo=gc.data)!=null&&zo.blank?zLn():((Wu=gc.data)==null?void 0:Wu.prompts)??null,Kh=Js!==null&&gc.isPending,Tf=e===$p?"demo":"project",Wh=te=>{_e(te),Br(!1),window.requestAnimationFrame(()=>{const be=qn.current;be&&(be.focus(),be.setSelectionRange(te.length,te.length),Un(te.length))})};A.useEffect(()=>{dt&&(_e(te=>te||dt),Br(!1),Un(dt.length))},[dt]),A.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const be=qn.current;be&&(be.focus(),be.setSelectionRange(be.value.length,be.value.length),be.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const Af=A.useId(),kl=e===$p&&ce===$z&&!se,Qh=A.useCallback(te=>{const be=te.scrollHeight-te.scrollTop-te.clientHeight<60;Jt.current=be,Wr(be)},[]),pa=A.useCallback(()=>{var te;Jt.current=!0,Wr(!0),(te=Xt.current)==null||te.call(Xt)},[]);A.useEffect(()=>{const te=Cn.current,be=Zn.current;if(!te||!be)return;const ze=new ResizeObserver(()=>{var X;Jt.current?(X=Xt.current)==null||X.call(Xt):Wr(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return ze.observe(te),ze.observe(be),()=>ze.disconnect()},[xl]);const Rf=A.useCallback(te=>{te.currentTarget.blur(),pa()},[pa]);async function Co({queue:te=!1}={}){var Yh,Zh,If,bi,Xu,ni;const be=ce.trim(),ze=gi?null:ZOn(be,Vt==null?void 0:Vt.planActivation);if(ze&&ze.name!=="plan"){_e(c4(ze.name)?"":ze.prompt),Br(!1),fa(ze.name,ze.prompt);return}if(ru({name:"first_action",surface:Tf,action:"typed_prompt"}),bn.current)return;const X=!!ze,ae=!bo,xe=l4(Vt==null?void 0:Vt.planActivation,X?ae:void 0,Ue.current),Ae=X&&(it==null?void 0:it.id)==="claude-code"?ae?"plan":"auto":void 0,ke=ze?ze.prompt:be,He=Qe,Xe=fe,Mt=Xe.map(xn=>({text:xn.text})),Kn=e,Hr=i;let qr=Z;const vr=()=>{const xn=Oe.current;return Rn(Q.queryKey)&&xn.projectId===Kn&&xn.activeId===qr&&xn.mainView===Hr},ti=()=>{vr()&&(_e(xn=>xn||be),qe(xn=>xn.length?xn:He),me(xn=>xn.length?xn:Xe))};if(X&&!ke&&He.length===0&&Xe.length===0){_e(""),Br(!1);try{if((it==null?void 0:it.id)==="claude-code")qa(ae?"plan":"auto");else if((Vt==null?void 0:Vt.planActivation)==="command")await Ar(ae);else throw new Error(Yg())}catch{ge(zN()),ti()}return}const Wn=Dt?{...Dt,...Ae?{permissionMode:Ae}:{}}:null;Ae&&qa(Ae);let va=null;const xc=Ue.current;X&&(Vt==null?void 0:Vt.planActivation)==="command"&&(va=++st.current,Ue.current=ae,mt(ae));const ba=()=>{!vr()||va===null||st.current!==va||(Ue.current=xc,mt(xc))};if(!ke&&He.length===0&&Xe.length===0)return;if((ke||Xe.length>0)&&gi&&He.length===0){_e(""),me([]),gs({promptId:gi,answers:[],note:ke||void 0,annotations:Mt}).then(xn=>{xn||ti()});return}const Um=JSON.stringify({text:ke,images:He.map(xn=>({mediaType:xn.mediaType,name:xn.name,dataUrl:xn.dataUrl})),annotations:Mt,settings:Wn?{model:Wn.model,serviceTier:Wn.serviceTier,permissionMode:Wn.permissionMode,planMode:xe,reasoningLevel:Wn.reasoningLevel}:null}),Qu=((Yh=yn.current)==null?void 0:Yh.signature)===Um?yn.current.id:`ct_${crypto.randomUUID()}`;if(yn.current={signature:Um,id:Qu},rr){if(!Z||!(it!=null&&it.agentReady)){ba();return}const xn=Z;_e(""),qe([]),me([]),at(null);const Va=Wn?{model:Wn.model,serviceTier:Wn.serviceTier,permissionMode:Wn.permissionMode,planMode:(Vt==null?void 0:Vt.planActivation)==="command"?xe??(qt==null?void 0:qt.planMode):xe,reasoningLevel:Wn.reasoningLevel}:{};vr()&&Nn({});const xa=He.map(Rr=>({mediaType:Rr.mediaType,dataBase64:Rr.dataUrl.slice(Rr.dataUrl.indexOf(",")+1),name:Rr.name}));try{(Zh=(await Ss(()=>Bz(xn,ke,Va,xa.length?xa:void 0,Mt,Qu,pc&&!te&&!X?"steer":void 0))).turn)!=null&&Zh.existing&&await as(xn),vr()&&Pn(Qp),((If=yn.current)==null?void 0:If.id)===Qu&&(yn.current=null)}catch{ba(),ti()}return}if(!(it!=null&&it.agentReady)){ba();return}if(!Wn){ba();return}let ya=Z;try{_e(Fn=>Fn===ce?"":Fn),qe(Fn=>Fn===He?[]:Fn),me(Fn=>Fn===Xe?[]:Fn),at(null),bn.current=!0;try{if(!ya){const Jh=await ma(Wn,xe);ya=Jh.id,qr=Jh.id}if(!Rn(Q.queryKey))return;const Fn=il(ya);await nt.fetchQuery({...Fn,...((bi=nt.getQueryState(Fn.queryKey))==null?void 0:bi.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{bn.current=!1}if(!Rn(Q.queryKey))return;gt({type:"optimisticUser",sessionId:ya,text:ke||Lpe(),attachments:He.map(Fn=>({url:Fn.dataUrl,mediaType:Fn.mediaType,name:Fn.name})),annotations:Xe}),gt({type:"busy",sessionId:ya,busy:!0}),vr()&&pa(),vr()&&K==="archived"&&ne("active");const xn=Wn?{model:Wn.model,serviceTier:Wn.serviceTier,permissionMode:Wn.permissionMode,planMode:xe,reasoningLevel:Wn.reasoningLevel}:{};vr()&&Nn({});const Va=He.map(Fn=>({mediaType:Fn.mediaType,dataBase64:Fn.dataUrl.slice(Fn.dataUrl.indexOf(",")+1),name:Fn.name})),xa=ya;if(!xa)throw new Error(V8e());(Xu=(await Ss(()=>Bz(xa,ke,xn,Va.length?Va:void 0,Mt,Qu))).turn)!=null&&Xu.existing&&await as(xa),vr()&&Pn(Qp),((ni=yn.current)==null?void 0:ni.id)===Qu&&(yn.current=null)}catch(xn){if(!Rn(Q.queryKey)||(ti(),ba(),!ya))return;const Va=xn instanceof Error?xn.message:String(xn);if(!/session is busy/i.test(Va)&&await nt.fetchQuery({...La(e),staleTime:0}).then(Rr=>{var El;return!!((El=Rr.find(Fn=>Fn.id===ya))!=null&&El.busy)}).catch(()=>!1)){vr()&&(_e(Rr=>Rr===ke?"":Rr),qe(Rr=>Rr===He?[]:Rr),me(Rr=>Rr===Xe?[]:Rr));return}gt({type:"busy",sessionId:ya,busy:!1}),gt({type:"localError",sessionId:ya,text:Jge({error:Ne(Va)})})}}async function ma(te,be){const ze=Oe.current,X=L.current,ae=await I.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:be,reasoningLevel:te.reasoningLevel}]);return L.current===X&&(J(xe=>[ae,...xe.filter(Ae=>Ae.id!==ae.id)]),nt.getQueryData(Q.queryKey)||Ls(!0)),L.current===X&&Oe.current===ze&&(B.current(ae.id,{replace:!0}),Oe.current={...ze,activeId:ae.id}),ae}function Xh(){const te=_Dn(ce);_e(te),window.requestAnimationFrame(()=>{var be,ze;(be=qn.current)==null||be.focus(),(ze=qn.current)==null||ze.setSelectionRange(te.length,te.length),Un(te.length)})}async function Sl(){const te=Ys;if(!te)return;if(ge(null),rr){ge(u0e());return}const be=ce,ze=Oe.current;let X=Z;const ae=()=>{const He=Oe.current;return He.projectId===ze.projectId&&He.activeId===X&&He.mainView===ze.mainView},xe=()=>{ae()&&_e(He=>He||be)};_e(""),Br(!1);let Ae=Z;if(!Ae){if(!(it!=null&&it.agentReady)||!Dt){xe(),ge(Yg());return}try{const He=l4(Vt==null?void 0:Vt.planActivation,void 0,Ue.current);Ae=(await ma(Dt,He)).id,X=Ae,ae()&&Nn({})}catch(He){xe();const Xe=He instanceof Error?He.message:String(He);ae()&&ge(ZE({error:Ne(Xe)}));return}}ae()&&K==="archived"&&ne("active");const ke=`${P_}shell-${Date.now()}`;gt({type:"localShell",sessionId:Ae,id:ke,command:te}),ae()&&pa();try{const{message:He}=await Lyn(Ae,te);gt({type:"upsertMessage",sessionId:Ae,message:He})}catch(He){const Xe=He instanceof Error?He.message:String(He);gt({type:"localShell",sessionId:Ae,id:ke,command:te,error:ZE({error:Ne(Xe)})})}}function Eo(){Z&&Pyn(Z).catch(()=>{ge(N9e())})}const Mf=A.useCallback(async(te,be)=>{if(!(!Z||tn.current)){tn.current=!0,ge(null),Ct(te);try{const ze=Q7n({model:zn.model,serviceTier:zn.serviceTier,permissionMode:zn.permissionMode,planMode:zn.planMode,reasoningLevel:zn.reasoningLevel}),X=Z;(await Iyn(X,te,be,ze)).turn.existing&&await as(X),Pn(Qp)}catch{ge(B7e())}finally{tn.current=!1,Ct(null)}}},[Z,zn,as]),Of=A.useCallback((te,be)=>{if(!Z||rr||!(it!=null&&it.agentReady))return;const ze=Z;gt({type:"busy",sessionId:ze,busy:!0}),pa(),Ss(()=>$yn(ze,te,be)).catch(X=>{gt({type:"busy",sessionId:ze,busy:!1});const ae=X instanceof Error?X.message:String(X);gt({type:"localError",sessionId:ze,text:J7e({error:Ne(ae)})})})},[Z,rr,it==null?void 0:it.agentReady,pa,Ss]),Es=A.useCallback(te=>{if(!Z||rr)return;const be=Z,ze=vn.current;gt({type:"activeLeaf",sessionId:be,leafId:te}),Ss(()=>Byn(be,te)).catch(X=>{gt({type:"activeLeaf",sessionId:be,leafId:ze});const ae=X instanceof Error?X.message:String(X);gt({type:"localError",sessionId:be,text:O9e({error:Ne(ae)})})})},[Z,rr,Ss]);function un(te){if(!Z)return;const be=Z;Ryn(be,te).then(({removed:ze})=>{if(ze)return as(be)}).catch(()=>ge(V7e()))}async function Hu(te){if(!Z||on)return;const be=Z;ge(null),gr(te);try{await Myn(be,te),await as(be)}catch{ge(d8e())}finally{gr(null)}}A.useEffect(()=>{if(!rr||i!=="chat")return;function te(be){var ze;be.key!=="Escape"||be.defaultPrevented||(be.preventDefault(),Eo(),(ze=qn.current)==null||ze.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[rr,Z,i]);function qu(te){zb(te),ct.current.delete(te),ht.current===te&&(ht.current=null),Oe.current.projectId===e&&Oe.current.activeId===te&&Oe.current.mainView==="chat"&&(_e(""),qe([]),me([]),B.current(null,{replace:!0})),U(be=>{if(!be.has(te))return be;const ze=new Set(be);return ze.delete(te),ze}),Ke.current.delete(te)}function Cl(te,be){const ze=te.archived;J(X=>X.map(ae=>ae.id===te.id?{...ae,archived:be}:ae)),$.mutateAsync([te.id,be]).catch(()=>{J(X=>X.map(ae=>ae.id===te.id?{...ae,archived:ze}:ae))})}function Df(te,be){const ze=te.title;J(X=>X.map(ae=>ae.id===te.id?{...ae,title:be}:ae)),q.mutateAsync([te.id,be]).catch(()=>{J(X=>X.map(ae=>ae.id===te.id?{...ae,title:ze}:ae))})}async function os(te){var ze;const be=((ze=te.title)==null?void 0:ze.trim())||vd();if(window.confirm(ume({title:Gi(be)}))){try{await H.mutateAsync(te.id)}catch(X){mn(gme({title:Gi(be),error:Ne(X instanceof Error?X.message:String(X))}),"error");return}qu(te.id)}}const gs=A.useCallback(te=>{if(!Z)return Promise.resolve(!1);const be=Z;return gt({type:"busy",sessionId:be,busy:!0}),Ss(()=>Fyn(be,te)).then(()=>!0).catch(()=>!1).finally(()=>{Rn(Q.queryKey)&&(nt.fetchQuery({...il(be),staleTime:0}).catch(()=>{}),nt.fetchQuery({...La(e),staleTime:0}).catch(()=>{}))})},[Z,e,Ss,Q]),vi=V.filter(te=>wLn(K,te.archived)),Uu=/Mac|iPhone|iPad/.test(navigator.platform),No=Uu?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",vc=Uu?"⌘ Enter":"Ctrl + Enter",Qr=A.useCallback(()=>{ne("active"),y(null)},[y]),bc=A.useCallback(te=>{ne("all"),y(te)},[y]);A.useEffect(()=>{const te=be=>{be.repeat||be.key!=="Enter"||!be.metaKey&&!be.ctrlKey||be.altKey||!be.shiftKey||(be.preventDefault(),Qr())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Qr]);const Xr=f.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,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.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":No,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Qr,children:[f.jsx(Dh,{size:15}),N4e()]}),f.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:[f.jsx(AI,{size:15}),Pxe()]}),qOn.map(te=>f.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"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.id))]}),f.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:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((ga=PH.find(te=>te.id===K))==null?void 0:ga.railLabel())??zD()}),f.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:f.jsx(kLn,{value:K,onChange:ne})})]}),f.jsxs("div",{className:"rail-body",children:[vi.map(te=>f.jsx(NLn,{session:te,active:te.id===Z&&i==="chat",unread:F.has(te.id),busy:jt.busySessions.has(te.id),waiting:dc.has(te.id),revealTitle:Hn.get(te.id),onOpen:()=>{if(y(te.id),e===$p){u5n(te.id);const be=dvn[te.id];be&&(ru({name:"demo_experiment_started",kind:"curated",experiment:be}),ru({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:be=>Df(te,be),onSetArchived:be=>Cl(te,be),onDelete:()=>void os(te)},te.id)),vi.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:K==="archived"?M1e():V.length>0?b1e():P1e()})]}),f.jsx(B$,{runtime:x})]}),Gu="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",Vu=!r&&f.jsx(Lt,{title:SN(),"aria-label":SN(),onClick:s,children:f.jsx(qI,{size:20})});return i!=="chat"?f.jsxs(f.Fragment,{children:[r&&Xr,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:Vu}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:z})]})]}):f.jsxs(f.Fragment,{children:[r&&Xr,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 mt-5",children:[f.jsxs("div",{className:r?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] items-center",children:[Vu,f.jsxs("div",{className:Gu,children:[f.jsx(O0,{variant:"header",title:sr?((yc=sr.title)==null?void 0:yc.trim())||vd():tN(),children:sr?f.jsx(FH,{title:((Lf=sr.title)==null?void 0:Lf.trim())||vd(),animate:hc!==void 0},hc??"static"):tN()}),k&&f.jsx(Lt,{"data-tip":nN(),"aria-label":nN(),onClick:k,children:f.jsx(Vwn,{size:15})})]})]}),So?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:So.message}),f.jsx(De,{onClick:()=>void $n.refetch(),children:Vs()})]}):fc?f.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:[f.jsx(Nt,{}),f.jsx("span",{children:y4e()})]}):xl?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Cn,tabIndex:0,role:"region","aria-label":((vs=sr==null?void 0:sr.title)==null?void 0:vs.trim())||vd(),onScroll:te=>{Qh(te.currentTarget),ms.dismiss()},children:f.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:Zn,children:[f.jsx(sH,{projectId:e,sessionId:Z,children:f.jsx(xLn,{scrollRef:Cn,scrollToEndRef:Xt,stickToBottom:Jt,onPinToBottom:pa,messages:ur,allMessages:uc,canFork:Sf,onFork:Of,onSelectFork:Es,busy:rr,onOpenFile:zf,onOpenRun:c,onOpenSpawnedSession:bc,runExperimentName:u,onOpenExperiment:h,experimentName:_,onRespond:gs,onOpenPlan:mc,onOpenSubagent:Nf,recoveringTurnId:jr,onRecover:Mf,skills:Oi},Z)}),rr&&Mi&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:yCe()}),rr&&!Mi&&!xo&&!wo&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:W9e()})})]})}):f.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:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(zS,{})}),f.jsx("h2",{children:NCe()}),f.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:[f.jsx(Su,{size:19}),f.jsx("span",{children:n})]}),Kh&&f.jsx("div",{className:ER,role:"status","aria-live":"polite","aria-label":y6e(),"aria-busy":"true",children:CR.map((te,be)=>f.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 ${m4[be].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${m4[be].icon}`,children:[f.jsx(te,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},be))}),ei&&ei.length>0&&f.jsx("div",{className:ER,role:"group","aria-label":N6e(),children:ei.map((te,be)=>{const ze=CR[be],X=m4[be];return f.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 ${X.box}`,onClick:()=>{ru({name:"project_starter_clicked",slot:be+1}),ru({name:"first_action",surface:Tf,action:"starter_click"}),Wh(te.prompt)},children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(ze,{size:17,className:X.icon}),te.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},be)})})]}),ms.action&&f.jsxs(De,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:ms.action.x,top:ms.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:ms.add,children:[f.jsx(HI,{size:14}),zbe()]}),f.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:[xl&&f.jsx(Lt,{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 ${jn?"opacity-0":"opacity-100"}`,title:NN(),"aria-label":NN(),inert:jn,onClick:Rf,children:rr&&!Mi?f.jsx(dS,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(jwn,{size:16})}),Cs&&!(ko&&Cs.promptId===ko.promptId)&&f.jsx(QMn,{synthesized:Cs.synthesized,agentLabel:sr?su[sr.harness]:F9e(),showResumeModes:(sr==null?void 0:sr.harness)==="claude-code",onView:te=>mc==null?void 0:mc(Cs.plan,Cs.promptId,te),onApprove:te=>gs({promptId:Cs.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>gs({promptId:Cs.promptId,approve:!1}),onRevise:te=>{Z&&Ef({sessionId:Z,promptId:Cs.promptId}),gs({promptId:Cs.promptId,approve:!1,note:te})}}),Ri.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Ri.map((te,be)=>f.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:te.error?`${te.text} +`).trim()}function JDn(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 eLn(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=d8n(r),TH(r)}function TH(e){return nLn(e).replace(/[\t\r ]+/g," ").trim()}function tLn(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&&RH(s)?{ref:r,path:s}:null}function iLn(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 kR(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 aLn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const c=kR(s,o);if(!c)return null;s=c}return s?kR(s,e):e}const $o="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",oLn=new RegExp(`\\bchat_(${$o})\\b`,"gi"),q_=`(?:${$o}|[0-9a-f]{8})`;function Fd(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 h=1,_=null,p=!1;for(let m=u;m{let h=!1;for(let _=u;_m8n(t.raw,n))}function ja(e,n){return My(e,n).length>0}function cLn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,zH).matchAll(oLn))if(n.add(t[0].toLowerCase()),n.size>=Tu)break;return[...n]}function K5(e,n){if(!e)return[];const t=new Set,r=e.slice(0,zH),s=n==="runs"?[new RegExp(`/runs/(${$o})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${$o})`,"gi"),new RegExp(`^\\s*RUN\\s+(${$o})\\b`,"gim"),new RegExp(`={3,}\\s*(${$o})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${$o})`,"gi"),new RegExp(`^\\s*id:\\s*(${$o})`,"gim"),new RegExp(`={3,}\\s*(${$o})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Tu)return[...t];const i=new RegExp(`^\\s*(${$o})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Tu)break;return[...t]}function OH(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 DH(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 LH(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 c=o+a[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function lLn(e,n,t=[],r=[]){const s=My(e,"logs"),i=new Set;if(s.length===0){if(!ja(e,"logs"))return[];const o=t.length>0?[]:K5(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=Tu)break;return Pd([...i])}let a=!1;for(const{invocation:o,offset:c}of OH(e,s)){const u=xh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let _=null;for(let v=0;v0?[]:K5(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Tu)break}return Pd([...i])}function gd(e,n,t=[],r=[]){const s=My(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of OH(e,s)){const u=xh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let _=!1;h&&new RegExp(`^${q_}$`,"i").test(h)&&(i.add(h),_=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],x=DH(e,m,c,q_);if(x.length>0){for(const v of x)i.add(v);_=!0}const k=LH(e,m,c,q_);for(const v of k)i.add(v);k.length>0&&(_=!0)}_||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:K5(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Tu)break}return Pd([...i])}const SR=new WeakMap;function rf(e){const n=E(),t=SR.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=uLn(e);return SR.set(e,{locale:n,activity:r}),r}function uLn(e){var b,w,y,C,N,z;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=Gs(i,"command","cmd"),o=ZDn(i,"commandArgv"),c=((w=e.state)==null?void 0:w.output)||((y=e.state)==null?void 0:y.error),u=Pd(h4(i,"targetIds")),h=Pd(h4(i,"runTargetIds")),_=Pd(h4(i,"experimentTargetIds")),p=Gs(i,"filePath","file_path","notebookPath","notebook_path","path"),m=Gs(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),k=x.at(-1)??n.toLowerCase();if(k==="run"&&x.includes("web")){const T=d4(i,"search_query","q"),j=d4(i,"image_query","q"),M=d4(i,"find","pattern");return T?{kind:"web",label:qE({query:T})}:j?{kind:"web",label:qie({query:j})}:M?{kind:"web",label:jae({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:W4e()}:Array.isArray(i.weather)?{kind:"web",label:pxe()}:Array.isArray(i.finance)?{kind:"web",label:txe()}:Array.isArray(i.sports)?{kind:"web",label:cxe()}:Array.isArray(i.time)?{kind:"web",label:Wye()}:{kind:"web",label:iN()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["compacted","contextcompaction"],["imported","importedchat"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:H3e()};const T=eLn(a??(o==null?void 0:o.join(" "))??""),j=Fd(T);let M=j.map(G=>G.raw);if(o!=null&&o.length){const G=p8n(o);M=G===null?[o]:Fd(TH(G)).map(oe=>oe.raw)}let D=null;for(const G of M)if(D=g8n(G),D)break;const I=M.some(G=>{const oe=xh(G);return oe!==null&&oe[0]!=="discover"&&oe[0]!=="paper"});if(D&&!I){const G=D.kind==="discover"?{keyword:uie(),embedding:gie(),openalex:lae(),biorxiv:Sie(),pubmed:mae()}[D.strategy]:null,oe=D.kind==="discover"?D.query?Kte({activity:G??HE(),query:D.query}):G??HE():D.id?$p({target:ze(D.id)}):kre();return{kind:D.kind==="paper"?"read":"search",label:oe,litCall:D}}if(ja(T,"agent\\s+spawn"))return{kind:"agent",label:e2e(),spawnedSessionIds:cLn(c),litCall:D??void 0};const $=j.map(G=>MH(G.raw)),q=ja(T,"exp\\s+status"),H=ja(T,"exp\\s+desc"),Q=My(T,"exp\\s+desc").some(G=>(xh(G.raw)??[]).some(le=>le==="--set"||le.startsWith("--set=")||le==="--stdin")),V=Q?Soe():mre(),J=Q?vee():Tse();if(ja(T,"logs")){const G=lLn(T,c,h,u);return{kind:"project",label:G.length===1?mse():kse(),runIds:G,litCall:D??void 0}}if(ja(T,"exp\\s+run"))return{kind:"project",label:fSe(),litCall:D??void 0};if(ja(T,"exp\\s+wait"))return{kind:"project",label:hCe(),litCall:D??void 0};if(ja(T,"exp\\s+cancel"))return{kind:"project",label:hye(),litCall:D??void 0};const Z=ja(T,"project\\s+view");if(Z&&q&&H)return{kind:"project",label:J,experimentIds:gd(T,c,_,u),litCall:D??void 0};if(Z&&H)return{kind:"project",label:V,experimentIds:gd(T,c,_,u),litCall:D??void 0};if(Z&&q)return{kind:"project",label:aN(),experimentIds:gd(T,c,_,u),litCall:D??void 0};if(Z)return{kind:"project",label:m5e(),litCall:D??void 0};if(q&&H)return{kind:"project",label:J,experimentIds:gd(T,c,_,u),litCall:D??void 0};if(q)return{kind:"project",label:aN(),experimentIds:gd(T,c,_,u),litCall:D??void 0};if(H)return{kind:"project",label:V,experimentIds:gd(T,c,_,u),litCall:D??void 0};if(ja(T,"runs?"))return{kind:"project",label:o4e(),litCall:D??void 0};if(ja(T,"projects"))return{kind:"project",label:h4e(),litCall:D??void 0};if(ja(T,"compute"))return{kind:"project",label:zye(),litCall:D??void 0};const B=$.map(sLn).find(G=>G!=null);if(B){const G=f4(B.path);return{kind:G?"skill":"read",label:G?V2({name:ze(G)}):$p({target:ze(v_(B.path))}),filePath:B.path,fileRef:B.ref,labelTarget:G?`${G} skill`:v_(B.path)}}const L=$.findIndex(G=>G!=null&&["sed","cat","head","tail"].includes(G.name)),F=L>=0?$[L]:null,U=F?rLn(F):null,K=U?aLn(U,j,L,Gs(i,"cwd","workdir")):null;if(U&&K){const G=f4(K);return{kind:G?"skill":"read",label:G?V2({name:ze(G)}):$p({target:ze(v_(U))}),filePath:K,labelTarget:G?`${G} skill`:v_(U)}}if($.some(G=>(G==null?void 0:G.name)==="find"||(G==null?void 0:G.name)==="ls"||(G==null?void 0:G.name)==="rg"&&G.args.includes("--files")))return{kind:"search",label:mN()};const ne=$.findIndex(G=>(G==null?void 0:G.name)==="rg"||(G==null?void 0:G.name)==="grep");if(ne>=0){const G=iLn(j[ne].raw);return{kind:"search",label:G?W2({pattern:ze(G)}):K2(),searchPattern:G??void 0}}const ce=$.find(G=>(G==null?void 0:G.name)==="git"),_e=ce==null?void 0:ce.args[0];if(_e==="grep"){const G=ce==null?void 0:ce.args.slice(1).find(oe=>!oe.startsWith("-"));return{kind:"search",label:G?W2({pattern:ze(G)}):K2(),searchPattern:G}}if(_e==="status")return{kind:"command",label:Fye()};if(_e==="diff")return{kind:"command",label:hke()};if(_e==="log")return{kind:"command",label:l5e()};const se=G=>$.some(oe=>!oe||!["cargo","pnpm","npm","yarn"].includes(oe.name)?!1:oe.args[0]===G||oe.args[0]==="run"&&oe.args[1]===G);return se("test")?{kind:"command",label:Q3e()}:$.some(G=>(G==null?void 0:G.name)==="tsc")||se("typecheck")?{kind:"command",label:wxe()}:se("lint")?{kind:"command",label:xye()}:se("build")?{kind:"command",label:eye()}:{kind:"command",label:Qne({command:ze(T)})}}case"skill":{const T=Gs(i,"skill","name"),j=T?YDn(n,T):null;return{kind:"skill",label:T?zne({name:ze(T)}):xne(),filePath:j??void 0,labelTarget:j&&T?`${T} skill`:void 0}}case"read":{const T=p?v_(p):null,j=p?f4(p):null;return j?{kind:"skill",label:V2({name:ze(j)}),filePath:p??void 0,labelTarget:`${j} skill`}:T?{kind:"read",label:$p({target:ze(T)}),filePath:p??void 0,labelTarget:T}:{kind:"read",label:n5e()}}case"edit":case"write":case"notebookedit":{const T=JDn(i),j=p??(T==null?void 0:T.path)??null,M=j?v_(j):null,D=M?(T==null?void 0:T.type)==="add"?Zee({target:ze(M)}):(T==null?void 0:T.type)==="delete"?bte({target:ze(M)}):Mte({target:ze(M)}):null;return M?{kind:"edit",label:D??fN(),filePath:j??void 0,labelTarget:M}:{kind:"edit",label:fN()}}case"grep":{const T=Gs(i,"pattern");return{kind:"search",label:T?W2({pattern:ze(T)}):K2(),searchPattern:T??void 0}}case"glob":{const T=Gs(i,"pattern");return{kind:"search",label:T?one({pattern:ze(T)}):mN()}}case"websearch":{const T=Gs(i,"query"),j=Gs(i,"url"),M=Gs(i,"pattern");return T?{kind:"web",label:qE({query:T})}:M&&j?{kind:"web",label:nae({pattern:M})}:j?{kind:"web",label:Hne({target:ze(j)})}:{kind:"web",label:m??iN()}}case"webfetch":{const T=Gs(i,"url");return{kind:"web",label:T?$p({target:ze(T)}):m??Hre()}}case"task":return{kind:"agent",label:m??nre()};case"subagent":return{kind:"agent",label:_Ln(i)};case"error":return{kind:"command",label:W6e()};case"importedchat":return{kind:"project",label:ene()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Gee():((N=e.state)==null?void 0:N.status)==="running"?FE():Ree(),progressLabel:FE()};default:{const T=m??p??a??((z=e.state)==null?void 0:z.title)??"";return{kind:"command",label:T?`${n}: ${T}`:n}}}}function _Ln(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 Xae();case"sendInput":return qae();case"resumeAgent":return nse();case"wait":return Aoe();case"closeAgent":return Cee()}switch(typeof e.kind=="string"?e.kind:""){case"started":return goe();case"interacted":return YJ();case"interrupted":return uoe()}return roe()}function ob({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(vf,{...t});if(e.litCall)r=f.jsx(UB,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(RI,{...t});break;case"read":case"project":r=f.jsx(MI,{...t});break;case"search":r=f.jsx(VI,{...t});break;case"edit":r=f.jsx(mS,{...t});break;case"web":r=f.jsx(q4n,{...t});break;case"agent":r=f.jsx(yS,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function p4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=A.useState(!1),a=A.useRef(null),o=A.useRef(!1);return A.useEffect(()=>{var c,u;!s||!o.current||(o.current=!1,(u=(c=a.current)==null?void 0:c.querySelector("button"))==null||u.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((c,u)=>f.jsxs("span",{children:[u>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?Ur(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.stopPropagation(),t==null||t(c.id)}},children:c.label}):f.jsx("span",{children:c.label})]},c.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?tY({target:r}):TJ({count:Xt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?AD():Gze({count:Xt(e.length)})})]})}function W5({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:S8n(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(Kwn,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...Ur(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((x,k)=>({id:x,label:YE({number:Xt(p.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:F4e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(x)},children:YE({number:Xt(k+1)})})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onSelect:r,targetType:rpe()})]})]})}if((u=e.runIds)!=null&&u.length){const _=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||Vc()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:nZ({run:ze(x)}),...Ur(v=>t(x,v),{stopPropagation:!0}),children:(s==null?void 0:s(x))||Vc()}):f.jsx("span",{children:(s==null?void 0:s(x))||Vc()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onOpen:t,targetType:x8e()})]})]})}if((h=e.experimentIds)!=null&&h.length){const _=a?e.experimentIds.filter(x=>!!a(x)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(a==null?void 0:a(x))||Vc()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",i?f.jsx("button",{className:"tool-target",title:DY({name:(a==null?void 0:a(x))||ze(x)}),...Ur(v=>i(x,v),{stopPropagation:!0}),children:(a==null?void 0:a(x))||Vc()}):f.jsx("span",{children:(a==null?void 0:a(x))||Vc()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(p4,{items:m,onOpen:i,targetType:Bme()})]})]})}return e.label}function lC(e){const n=e.progressLabel??{skill:Dne(),read:Qre(),search:Lae(),edit:Pte(),project:Ise(),web:_ee(),agent:fte(),command:vD()}[e.kind];return{...e,label:n}}function IH(e,n){const t=rf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:hne(),read:lre(),search:rie(),edit:Ete(),project:lse(),web:see(),agent:ite(),command:Use()}[t.kind]}function fLn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const dLn=250;function hLn(e,n){const[t,r]=A.useState(e),s=A.useRef(Date.now()),i=A.useRef(e);return A.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=dLn-(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 pLn=160;function $H(e){const[n,t]=A.useState(!1);return A.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),pLn);return()=>window.clearTimeout(r)},[e]),e&&n}function mLn(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:ED()}}function gLn(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 vLn(e){const n=[];let t=null;for(const r of e){const s=rf(r),i=gLn(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 BH({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var x,k;const i=(x=e.state)==null?void 0:x.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,c]=A.useState(Date.now());if(A.useEffect(()=>{if(typeof a!="number"||(c(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=o8n(i??{},o);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(zt,{}),f.jsx("span",{children:v})]})}const u=HB(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,_=FB(e)?o1e():s?P8e():jN(),p=s?I4n:bS,m=Ry(((k=e.state)==null?void 0:k.error)||jN());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(Ba,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&h&&(u==="retry"||u==="continue")&&f.jsx(De,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?h9e():u==="retry"?Ws():Z0e()})]})}function CR({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",_=Ry((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!_,[m,x]=A.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx(BH,{part:e,busy:!1,recovering:!1,usageLimited:i5(e)});const v=f.jsxs(f.Fragment,{children:[h&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),h?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(LI,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(ob,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${EH} ${h?"text-accent-red":"text-subtext"}`,children:[f.jsx(W5,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:pY({count:Xt(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,f.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":k,"aria-label":m?cY({activity:n.label}):kJ({activity:n.label}),onClick:()=>x(b=>!b),children:f.jsx(Ba,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:oC,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function bLn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,D,I;const[c,u]=A.useState(!1),[h,_]=A.useState(!1),p=()=>{_(!0),u($=>!$)},m=vLn(e),x=m.map(({activity:$})=>$),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,w=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(b&&lC(b))??null:null,y=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(w!=null&&w.progressLabel)&&(fLn((D=v.state)==null?void 0:D.input)||(w==null?void 0:w.kind)==="command"&&!Gs(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=hLn(w,y),N=$H(C!=null),z=C??mLn(x),T=C?C.label:ED();return e.length===1?C?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(ob,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:T,children:f.jsx(W5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(CR,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.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:[f.jsx(ob,{activity:z,className:N?"tool-running-shimmer-icon":"text-muted"}),C?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:T,children:f.jsx(W5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":c,children:T}),f.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":c,"aria-label":c?A0e():Rme(),children:f.jsx(Ba,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:h&&m.map(({part:$,count:q,activity:H})=>f.jsx(CR,{part:$,repeatCount:q,activity:H,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},$.id))})})})]})}function yLn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;const s=e.prompt,[i,a]=A.useState([]),o=!n,c=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:c3e(),icon:Ai,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:j3e(),icon:mS,iconClass:"text-accent-amber"}:s.approved===!1?{label:p3e(),icon:ur,iconClass:"text-accent-red"}:{label:w3e(),icon:Ob,iconClass:"text-muted"},x=m.icon;return f.jsxs("details",{className:WDn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?zD():EN()}),f.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(Ba,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${xR} ms-6`,children:[f.jsx(Jo,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(cC,{annotations:p,variant:"sent"}),f.jsxs("details",{className:KDn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||d7e()}),f.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 ${_?"chosen":""}`,children:_||o8e()})]}),f.jsxs("div",{className:xR,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.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 f.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.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:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?e7e():EN()}),f.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 ${_?"clamped":""}`,children:f.jsx(Jo,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...Ur(p=>r(s.plan??"",e.id,p)),children:oCe()}),!o&&!_&&f.jsxs("div",{className:V5,children:[f.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:Dve()}),f.jsx(De,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:Hve()}),f.jsx(De,{size:"small",onClick:()=>c({approve:!1}),children:k5e()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=Gs(_,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",x=Gs(_,"description")||"",k=m||x||IH(s.tool,_),v=`permission-heading-${e.id}`;return f.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":v,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(bS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:mbe()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&f.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&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(De,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:R2e()}),f.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:lbe()})]})]})]})}const u=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.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&&f.jsx("div",{className:QDn,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=i.includes(_.label);return f.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(_.label):c({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:V5,children:f.jsx(De,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:F6e()})})]})}function xLn(e,n){return e.role==="user"?!0:e.parts.some(t=>yh(t,n))}function wLn(e){const n=e.text??"",t=n.startsWith("data:")?n:Wyn(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}}async function uC(e){try{if(!navigator.clipboard)throw new Error(OD());await navigator.clipboard.writeText(e),pn(K_(),"success")}catch(n){pn(n instanceof Error?n.message:String(n),"error")}}function kLn(e,n){const t=URL.createObjectURL(new Blob([n],{type:"text/markdown;charset=utf-8"})),r=document.createElement("a");r.href=t,r.download=e,document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(t),1e3)}function SLn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,_=new Date(n),p=()=>uC(e);return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&f.jsxs(f.Fragment,{children:[f.jsx(It,{size:"small",title:vN(),"aria-label":vN(),disabled:o||!s,onClick:()=>s&&a(s),children:f.jsx(OI,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(It,{size:"small",title:gN(),"aria-label":gN(),disabled:o||!i,onClick:()=>i&&a(i),children:f.jsx(Ba,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(E(),{hour:"numeric",minute:"2-digit"})}),f.jsx(It,{size:"small","aria-label":Vk(),disabled:!e,onClick:p,children:f.jsx(gf,{size:13})})]}),f.jsx(It,{size:"small",title:_N(),"aria-label":_N(),disabled:u,onClick:c,children:f.jsx(mS,{size:13})})]})}const CLn=A.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:w,forkIndex:y=0,forkPrevId:C,forkNextId:N,forkDisabled:z,branchDisabled:T,onFork:j,onSelectFork:M}){var J,Z;pf();const[D,I]=A.useState(null),$=NLn(n);if($)return f.jsx(zLn,{part:$});if(n.role==="user"){const B=n.parts.filter(ce=>ce.type==="text").map(ce=>ce.text??"").join(` +`),L=ce=>!!(v!=null&&v.some(_e=>_e.name===ce)),F=n.parts.filter(ce=>ce.type==="image"&&ce.text).map(wLn),U=F.filter(ce=>!ce.isPdf),K=F.filter(ce=>ce.isPdf),ne=n.parts.filter(ce=>ce.type==="annotation"&&ce.text).map(ce=>({id:ce.id,text:ce.text??""}));if(D!==null){const ce=()=>{const _e=D.trim();!_e||z||(I(null),j(n.id,_e))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.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":Y2e(),value:D,autoFocus:!0,onChange:_e=>I(_e.target.value),onKeyDown:_e=>{_e.key==="Escape"?(_e.preventDefault(),I(null)):_e.key==="Enter"&&!_e.shiftKey&&!_e.nativeEvent.isComposing&&(_e.preventDefault(),ce())}}),f.jsxs("div",{className:`${V5} justify-end`,children:[f.jsx(De,{size:"small",onClick:()=>I(null),children:oye()}),f.jsx(De,{size:"small",variant:"primary",onClick:ce,disabled:z||!D.trim(),children:i3()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[ne.length>0&&f.jsx(cC,{annotations:ne,variant:"sent"}),f.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]:align-baseline",children:[f.jsx(gDn,{text:B,isCommand:L}),U.length>0&&f.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:U.map((ce,_e)=>f.jsx("a",{href:ce.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:ce.src,alt:Upe()})},_e))}),K.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:K.map((ce,_e)=>f.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:ce.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Ob,{size:15}),f.jsx("span",{children:ce.name})]},_e))})]}),w!==void 0&&f.jsx(SLn,{text:B,createdAt:n.createdAt,count:w,index:y,prevId:C,nextId:N,onSelect:M,pagerDisabled:T,onEdit:()=>I(B),editDisabled:z})]})}const q=n.parts.find(B=>B.type==="tool"&&i5(B)),H=n.parts.find(Rm)??q,Q=n.parts.filter(B=>B!==H&&!(q&&i5(B))),V=b&&!n.completedAt?"":PB(n);return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(ELn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:b}}),H&&f.jsx(BH,{part:H,usageLimited:!!q,busy:m,recovering:x===((Z=(J=H.state)==null?void 0:J.input)==null?void 0:Z.turnId),onRecover:k}),V&&f.jsx("div",{className:"flex opacity-0 transition-opacity duration-80 ease-standard group-hover/turn:opacity-100 group-focus-within/turn:opacity-100",children:f.jsx(It,{size:"small",title:JE(),"aria-label":JE(),onClick:()=>void uC(V),children:f.jsx(gf,{size:13})})})]})});function ELn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=$B(n,r),[a,o]=A.useState(!1),[,c]=A.useState(0);if(A.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>c(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:iv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,_=h===null?null:h<6e4||h>=36e5?T0(h):WEe({minutes:Xt(Math.floor(h/6e4)),seconds:Xt(Math.floor(h/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[f.jsx("span",{children:_===null?FEe():tNe({duration:_})}),f.jsx(Ba,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:iv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:iv(i,t)})]})}function NLn(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===rI?n:null}function zLn({part:e}){var c;const n=e.state,t=Gs((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((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` +`),o=r?vD():s&&i!==null?v0e({code:Xt(i)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[kD()," "]}),f.jsx(vf,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${oC} mt-2`,children:a.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function iv(e,n){var w,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&yh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(f.jsx(bLn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(yh(C,t)){if(C.type==="tool"&&(TLn(C.tool)||(((w=C.children)==null?void 0:w.length)??0)>0)){b(),k.push(f.jsx(RLn,{part:C,pendingTail:m&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(f.jsx(Jo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":DCe(),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&&k.push(f.jsx(yLn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:_},C.id))}return b(),k}function jLn(e){return rf(e).label}function TLn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function PH(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 cb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&cb(t.children,n);if(r)return r}return null}function ALn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var x,k,v,b;const o=e.children??[],c=((x=e.state)==null?void 0:x.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Ry(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",_=iv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?LB(o):null}),m=o.some(w=>w.type==="text"&&!!w.text)?"":PH(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),h&&f.jsx("div",{className:oC,children:h.slice(0,2e4)}),_.length===0&&!m&&!h?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?Hk():N1e()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(Jo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function RLn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,_,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Ry(((h=e.state)==null?void 0:h.error)||((_=e.state)==null?void 0:_.output)||""),i=n&&!r?lC(rf(e)):rf(e),a=$H(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!PH(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[Fk()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(LI,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(ob,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${EH} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?f.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:c}):f.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:wve(),...Ur(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Ba,{size:12})})]})}function MLn(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 c of s){const u=`${i}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(u,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function _C(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=Gs(o,"reason","description")||IH(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 OLn(e){const[n,t]=A.useState({text:"",sequence:0}),r=A.useRef(null);return A.useEffect(()=>{var x,k,v,b,w;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:a}=MLn(e),o=_C(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(y=>({text:o?UE({label:Vi(o.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([y,C])=>{var N;return((N=c.get(y))==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(y=>({text:UE({label:Vi(o.label)}),sequence:y.sequence+1}));return}const _=(k=h.find(([,y])=>Rm(y.part)))==null?void 0:k[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const y=HB((b=(v=_.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Bce()}${y?` ${y==="retry"?sce():Yoe()}`:""}`,sequence:C.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(y=>({text:Uoe(),sequence:y.sequence+1}));return}const p=h.filter(([,y])=>y.status==="error");if(p.length>0){const y=p.slice(0,2).map(([,C])=>rf(C.part).label).join(", ");t(C=>({text:p.length===1?Cce({labels:y}):Rce({count:Xt(p.length),labels:y}),sequence:C.sequence+1}));return}const m=h.filter(([,y])=>y.status==="running");if(m.length>0){const y=(w=m.at(-1))==null?void 0:w[1].part;t(C=>({text:y?lC(rf(y)).label:_ce(),sequence:C.sequence+1}));return}h.some(([,y])=>y.status==="completed")&&t(y=>({text:vce(),sequence:y.sequence+1}))},[e]),n}const DLn=A.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,recoveringTurnId:C,onRecover:N,skills:z}){var B,L,F;pf();const T=((B=_C(n))==null?void 0:B.id)??null,j=A.useMemo(()=>n.filter(U=>xLn(U,T)),[n,T]),M=A.useMemo(()=>{const U=j.filter(K=>K.role==="user"&&!K.id.startsWith(P_));return e8n(a,n,U,K=>K.startsWith(P_))},[n,j,a]),D=A.useRef(new Set),[I,$]=A.useState(!1),q=A.useCallback(U=>j[U].id,[j]),H=A.useCallback(U=>{if(I)return j.map((ne,ce)=>ce);const K=new Set(OB(U));return j.forEach((ne,ce)=>{D.current.has(ne.id)&&K.add(ce)}),[...K].sort((ne,ce)=>ne-ce)},[j,I]),Q=Y7n({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:q,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,j.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:H});A.useLayoutEffect(()=>{const U=()=>Q.scrollToEnd();return r.current=U,i(),()=>{r.current=null}},[Q,r,i]),A.useEffect(()=>{const U=()=>{var ce;const K=window.getSelection();if(!K||K.isCollapsed||!K.rangeCount)return;const ne=K.getRangeAt(0);for(const _e of((ce=t.current)==null?void 0:ce.querySelectorAll("[data-message-id]"))??[])ne.intersectsNode(_e)&&_e.dataset.messageId&&D.current.add(_e.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const V=j.at(-1),J=OLn(n),Z=h?IB(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:J.text},J.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":I,onClick:()=>$(U=>!U),children:e9e()}),f.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(U=>{var se,G,oe,le,pe,be;const K=j[U.index],ne=K.parts.find(Rm),ce=(G=(se=ne==null?void 0:ne.state)==null?void 0:se.input)==null?void 0:G.turnId,_e=ne?h||C!==null:!1;return f.jsx("div",{"data-index":U.index,"data-message-id":K.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:Me=>{!(Me.target instanceof Element)||!Me.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(K.id),onFocusCapture:()=>D.current.add(K.id),children:f.jsx(CLn,{message:K,forkCount:(oe=M.get(K.id))==null?void 0:oe.count,forkIndex:(le=M.get(K.id))==null?void 0:le.index,forkPrevId:(pe=M.get(K.id))==null?void 0:pe.prevId,forkNextId:(be=M.get(K.id))==null?void 0:be.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:T,pendingTailToolId:(Z==null?void 0:Z.messageId)===K.id?Z.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,busy:_e,recoveringTurnId:ce===C?C:null,onRecover:N,skills:z,predictTextTail:h&&K===V&&K.role==="assistant"})},K.id)})})]})}),LLn=(e,n)=>e==="all"?!0:e==="archived"?n:!n,FH=[{id:"active",label:Qve,railLabel:jD},{id:"archived",label:rN,railLabel:rN},{id:"all",label:nbe,railLabel:wD}];function ILn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=_o();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(It,{size:"small",className:"rail-filter-btn",active:e!=="active",title:pN(),"aria-label":pN(),onClick:()=>r(i=>!i),children:f.jsx(KI,{size:13})}),t&&f.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:FH.map(i=>f.jsxs(Xn,{onClick:()=>{n(i.id),r(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(Ai,{size:13})]},i.id))})]})}const $Ln=14,BLn=500,PLn=1200;function HH({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.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*$Ln,BLn)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function FLn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:_,ref:p}=_o(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[x,k]=A.useState(!1),[v,b]=A.useState(""),w=A.useRef(null);function y(){var z;b(((z=e.title)==null?void 0:z.trim())||""),k(!0)}function C(){var T;const z=v.trim();k(!1),z&&z!==(((T=e.title)==null?void 0:T.trim())||"")&&o(z)}return A.useEffect(()=>{var z,T;x&&((z=w.current)==null||z.focus(),(T=w.current)==null||T.select())},[x]),f.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":""} ${h?"menu-open":""} ${x?"editing":""}`,title:`${su[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?o9e():""}`,onClick:()=>{x||(h?_(!1):a())},onKeyDown:z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),h?_(!1):a())},children:[e.parentSessionId&&!x&&f.jsx(yS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?f.jsx("input",{ref:w,className:"session-title-input","aria-label":Jke(),value:v,onChange:z=>b(z.target.value),onClick:z=>z.stopPropagation(),onBlur:C,onKeyDown:z=>{z.stopPropagation(),z.key==="Enter"?(z.preventDefault(),C()):z.key==="Escape"&&(z.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(HH,{title:m,animate:i!==void 0},i??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsx("button",{className:"session-menu-btn",title:kN(),"aria-label":kN(),onClick:z=>{z.stopPropagation(),_(T=>!T)},children:f.jsx(dS,{size:14})}),h&&f.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:[f.jsx(Xn,{onClick:z=>{z.stopPropagation(),_(!1),y()},children:f.jsx("span",{children:CD()})}),f.jsx(Xn,{onClick:z=>{z.stopPropagation(),_(!1),c(!e.archived)},children:f.jsx("span",{children:e.archived?xEe():kpe()})}),f.jsx(Xn,{danger:!0,onClick:z=>{z.stopPropagation(),_(!1),u()},children:f.jsx("span",{children:SD()})})]})]})}const ER=[MI,VI,vf,mh],HLn=()=>[{title:ESe(),prompt:bSe()},{title:PSe(),prompt:MSe()},{title:e6e(),prompt:KSe()},{title:h6e(),prompt:o6e()}],m4=[{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"}],NR="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function qLn({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:_,onOpenPlan:p,onOpenSubagent:m,runtime:x,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:w,onActiveSessionChange:y,preferredAgent:C,onPreferredAgentChange:N,children:z}){var Ku,zo,Wu,ga,yc,$f,xs;const T=an({mutationFn:te=>Uyn(...te)}),j=an({mutationFn:te=>Hyn(...te)}),M=an({mutationFn:te=>qyn(...te)}),D=an({mutationFn:te=>Lyn(...te)}),I=an({mutationFn:te=>$yn(...te)}),$=an({mutationFn:te=>Pyn(...te)}),q=an({mutationFn:te=>Fyn(...te)}),H=an({mutationFn:Byn}),Q=A.useMemo(()=>La(e),[e]),{data:V=XDn}=ut(Q),J=A.useCallback(te=>{Jr(Q.queryKey,ve=>{if(!ve)return;const je=typeof te=="function"?te(ve):te,X=new Map(ve.map(ae=>[ae.id,ae]));for(const ae of je)X.get(ae.id)!==ae&&Za(tt,Q.queryKey,ae.id),X.delete(ae.id);for(const ae of X.keys())Za(tt,Q.queryKey,ae);return je})},[Q]),Z=w,B=A.useRef(y);B.current=y;const L=A.useRef({projectId:e});L.current.projectId!==e&&(L.current={projectId:e});const[F,U]=A.useState(new Set),[K,ne]=A.useState("active"),[ce,_e]=A.useState(""),[se,G]=A.useState(!1),[oe,le]=A.useState(!1),[pe,be]=A.useState([]),Me=A.useRef(0),we=A.useRef({projectId:e,activeId:Z,mainView:i});(we.current.projectId!==e||we.current.activeId!==Z||we.current.mainView!==i)&&(we.current={projectId:e,activeId:Z,mainView:i});const[qe,He]=A.useState([]),[Ce,ot]=A.useState(null),Qe=Z??"new",it=A.useRef(new Map),Ct=A.useRef(bw);Ct.current={draft:ce,attachments:qe,annotations:pe};const Ht=e===Bp&&V.length>0&&V.every(te=>zvn[te.id]===te.activeLeafId)?Bz:null,pt=A.useRef(null);Ht!==null&&pt.current===null&&Z!==null&&(pt.current=Qe);const _t=Qe===pt.current?Ht:null;A.useLayoutEffect(()=>{const te=it.current.get(Qe)??bw;return Ct.current=te,_e(te.draft),He(te.attachments),be(te.annotations),()=>{const ve=u8n(Ct.current,_t);ve?it.current.set(Qe,ve):it.current.delete(Qe)}},[Qe,_t]);const[Le,me]=A.useState(null),Ae=A.useRef(Promise.resolve()),Be=A.useRef(0),rt=A.useRef(0),[ft,St]=A.useState(null),gt=A.useRef(null),Kt=A.useRef(!1),en=A.useRef(null),[Ke,vt,In]=Axn(e,i==="chat"?Z:null),{data:tn=GLn}=ut(ku()),[yn,yr]=A.useState(C);A.useEffect(()=>yr(C),[C]);const[Pn,$n]=A.useState({}),[Fn,Yn]=A.useState(Xp),[Dr,bt]=A.useState(null),ln=A.useRef(!1),En=A.useRef(null),[on,dr]=A.useState(null),sn=A.useRef(!1),gn=A.useRef(null),[Zn,yt]=A.useState(new Map),jt=A.useRef(new Map),zn=A.useRef(null),xr=A.useRef(null),rr=A.useRef(null),_n=A.useRef(!0),[wr,Ve]=A.useState(!0),ct=A.useRef(null),[sr,Jn]=A.useState(!1),xn=_o(),Tr=A.useCallback(te=>{var ve;Me.current+=1,be(je=>[...je,{id:`annotation-${Me.current}`,...te}]),(ve=ct.current)==null||ve.focus()},[]),Hn=HDn(xr,Tr);qDn(pe),A.useEffect(()=>{Jn(!1),Hn.dismiss()},[Z,e,Hn.dismiss]);const[ua,Ds]=A.useState(0),[_a,Vr]=A.useState(!1),[ir,ho]=A.useState(0),[po,qn]=A.useState(0),Kr=A.useRef(!1);function mo(te){if(!Gn)return;if(!gi&&te.source==="command"&&Ay(te.name)&&te.name!=="goal"){Fu(te.name,ce,Gn);return}const ve=te.source==="command"?1:q5(te.name,ct.current),je=uDn(ce,Gn,te.name,ve);_e(je.text),window.requestAnimationFrame(()=>{var X,ae;(X=ct.current)==null||X.focus(),(ae=ct.current)==null||ae.setSelectionRange(je.cursor,je.cursor),qn(je.cursor)})}function go(te){if(Is)return!1;const ve=te.selectionStart;if(Kr.current||ve!==te.selectionEnd)return!1;const je=ce.slice(0,ve).replace(/[ \t]+$/,"").length,X=o4(ce,je);if(!X||X.end!==je||!yl(X.query)||ve>je&&ve-je!==q5(X.query,te))return!1;const ae=pR(ce,{...X,end:ve});return _e(ae.text),qn(ae.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(ae.cursor,ae.cursor)),!0}function Ys(te){ot(null);let X=qe.reduce((ae,xe)=>ae+xe.size,0);for(const ae of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(ae.type))continue;if(ae.size>31457280){ot(Ype({name:ze(ae.name)}));continue}if(X+ae.size>41943040){ot(s0e());continue}X+=ae.size;const xe=Z,Re=new FileReader;Re.onload=()=>{const Se={dataUrl:Re.result,mediaType:ae.type,name:ae.name,size:ae.size};if(we.current.activeId===xe){He(Xe=>[...Xe,Se]);return}const Fe=it.current.get(xe??"new")??bw;it.current.set(xe??"new",{...Fe,attachments:[...Fe.attachments,Se]})},Re.readAsDataURL(ae)}}function vo(te){const ve=Array.from(te.clipboardData.items).filter(je=>je.kind==="file"&&(je.type.startsWith("image/")||je.type==="application/pdf")).map(je=>je.getAsFile()).filter(je=>je!==null);ve.length>0&&(te.preventDefault(),Ys(ve))}const Gt=V.find(te=>te.id===Z),Fa=yn??_kn(tn),Un=Gt?{harness:Gt.harness,model:Pn.model??Gt.model,serviceTier:Pn.serviceTier!==void 0?Pn.serviceTier:Gt.serviceTier,permissionMode:Pn.permissionMode??Gt.permissionMode,reasoningLevel:Pn.reasoningLevel??Gt.reasoningLevel}:Fa?{...Fa,...Pn}:null,{data:Wr=ULn}=ut(xxn(Un==null?void 0:Un.harness)),st=Un?tn.find(te=>te.id===Un.harness):void 0,Wt=st==null?void 0:st.options,Ss=A.useMemo(()=>_Dn(Wr,Wt==null?void 0:Wt.planActivation),[Wr,Wt==null?void 0:Wt.planActivation]),Zs=gR(ce),pi=Zs!==null,Gn=o4(ce,po),pr=(Gn==null?void 0:Gn.query)??null,Ls=pr===null?[]:Ss.filter(te=>cDn(te,pr)),Is=!pi&&pr!==null&&(Gn==null?void 0:Gn.end)===po&&Ls.length>0,Lr=Is&&!_a?Ls:[],mi=Lr.length>0,mr=Math.min(ua,Math.max(0,Lr.length-1));A.useEffect(()=>Ds(0),[pr]);const Cs=Un&&st&&!st.catalogPending&&st.models.length>0&&!st.models.some(te=>te.id===Un.model)?st.models[0].id:(Un==null?void 0:Un.model)??null,$t=Un&&{...Un,model:Cs,serviceTier:Rv(st,Cs,Un.serviceTier),reasoningLevel:YL(st,Cs,Un.reasoningLevel)},Es=Mb(st,$t==null?void 0:$t.model),Ha=te=>{if(!$t)return;const ve={...$t,...te},je={};te.model!==void 0&&te.model!==$t.model&&(je.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==$t.serviceTier&&(je.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==$t.permissionMode&&(je.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==$t.reasoningLevel&&(je.reasoningLevel=te.reasoningLevel),Yn(X=>({...X,...je})),yr(ve),N(ve).catch(()=>{}),Gt?$n(X=>({...X,...te})):te.harness&&te.harness!==$t.harness&&$n({})},Ns=A.useCallback(te=>{const ve=Ae.current.catch(()=>{}).then(()=>{if(!An(Q.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return Ae.current=ve.then(()=>{},()=>{}),ve},[Q]),qa=te=>{if(te==="plan"&&(st==null?void 0:st.id)==="claude-code"?(Yn(X=>({...X,permissionMode:te})),$n(X=>({...X,permissionMode:te}))):($n(X=>{const ae={...X};return delete ae.permissionMode,ae}),Ha({permissionMode:te})),!Gt)return;const ve=Gt.id,je=++Be.current;me(null),Ns(()=>T.mutateAsync([ve,te])).then(X=>{J(ae=>ae.map(xe=>xe.id===X.id?X:xe)),Be.current===je&&$n(ae=>{const xe={...ae};return delete xe.permissionMode,xe})}).catch(()=>{Be.current===je&&($n(X=>{const ae={...X};return delete ae.permissionMode,ae}),me(OEe()))})},$u=te=>Ha({reasoningLevel:te}),Bu=((Ku=Gt==null?void 0:Gt.goal)==null?void 0:Ku.trim())||"",bo=($t==null?void 0:$t.harness)==="claude-code"?$t.permissionMode==="plan":(Wt==null?void 0:Wt.planActivation)==="command"?ft??(Gt==null?void 0:Gt.planMode)??!1:!1;A.useEffect(()=>{ft===null||(Gt==null?void 0:Gt.planMode)!==ft||(gt.current=null,St(null))},[Gt==null?void 0:Gt.planMode,ft]);async function Ir(te){if(Yn(X=>({...X,planMode:te})),gt.current=te,St(te),!Gt)return;const ve=Gt.id,je=++rt.current;me(null);try{const X=await Ns(()=>j.mutateAsync([ve,te]));J(ae=>ae.map(xe=>xe.id===X.id?X:xe)),rt.current===je&&(gt.current=null,St(null),me(null))}catch(X){throw rt.current===je&&(gt.current=null,St(null)),X}}async function Pu(){if(($t==null?void 0:$t.harness)==="claude-code"){qa("auto");return}if(Gt)try{await Ir(!1)}catch{me(Cme())}}async function yo(){const te=!bo;try{if(($t==null?void 0:$t.harness)==="claude-code")qa(te?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ir(te);else throw new Error(Yg())}catch{me(zN())}}function fa(te,ve=""){var je;switch(te){case"plan":return yo(),!1;case"new":return es(),!1;case"resume":return Jn(!0),!0;case"model":return ho(X=>X+1),!0;case"compact":return bl(),!1;case"goal":return Ga(ve),!1;case"copy":{const X=hr.at(-1),ae=ar&&(X==null?void 0:X.role)==="assistant"&&!X.completedAt,xe=s8n(ae?hr.slice(0,-1):hr);return xe?uC(xe):pn(tve(),"info"),!1}case"export":{const X=((je=Gt==null?void 0:Gt.title)==null?void 0:je.trim())||yd(),ae=Gt?i8n(X,hr,{user:Vme(),assistant:su[Gt.harness]}):null;return ae?kLn(a8n(X),ae):pn(cve(),"info"),!1}}}async function Ua(te){me(null);const ve=L.current;try{const je=await D.mutateAsync([e,te]);if(tt.invalidateQueries({queryKey:nI().queryKey}),L.current!==ve)return;J(X=>[je,...X.filter(ae=>ae.id!==je.id)]),ne("all"),y(je.id,{projectId:je.projectId})}catch(je){if(L.current!==ve)return;me(Pge({error:ze(je instanceof Error?je.message:String(je))}))}}async function Ga(te){var Re;const ve=te.trim();if(!ve){const Se=(Re=Gt==null?void 0:Gt.goal)==null?void 0:Re.trim();pn(Se?age({goal:Vi(Se)}):bge(),"info");return}const je=we.current,X=()=>we.current.activeId===je.activeId;me(null);let ae=Z;if(!ae){if(!(st!=null&&st.agentReady)||!$t){me(Yg());return}try{ae=(await ma($t,l4(Wt==null?void 0:Wt.planActivation,void 0,gt.current))).id}catch(Se){me(eN({error:ze(Se instanceof Error?Se.message:String(Se))}));return}}const xe=/^(clear|none|off)$/i.test(ve);try{const Se=await Ns(()=>M.mutateAsync([ae,xe?null:ve]));J(Fe=>Fe.map(Xe=>Xe.id===Se.id?Se:Xe)),pn(xe?Jme():Ege(),"success")}catch(Se){if(!X())return;me(eN({error:ze(Se instanceof Error?Se.message:String(Se))}))}}async function bl(){const te=Z;if(!te){pn(W1e(),"info");return}if(ar){me($0e());return}me(null),K==="archived"&&ne("active");const ve=we.current;try{const{message:je}=await Qyn(te);vt({type:"upsertMessage",sessionId:te,message:je})}catch(je){if(we.current.activeId!==ve.activeId)return;me(G0e({error:ze(je instanceof Error?je.message:String(je))}))}}function Fu(te,ve,je){const X=pR(ve,je);_e(X.text),Vr(!0),!fa(te)&&window.requestAnimationFrame(()=>{var ae,xe;(ae=ct.current)==null||ae.focus(),(xe=ct.current)==null||xe.setSelectionRange(X.cursor,X.cursor),qn(X.cursor)})}const $s=A.useCallback(async(te=!1)=>{const ve=L.current;if(ve.projectId!==e||!An(Q.queryKey))return null;const je=(tt.getQueryData(Q.queryKey)??[]).map(X=>X.id);try{const X=await tt.fetchQuery({...Q,...te?{staleTime:0}:{}});if(L.current!==ve||!An(Q.queryKey))return null;const ae=X.filter(Re=>!ll.has(Re.id)),xe=new Set(ae.map(Re=>Re.id));for(const Re of je)xe.has(Re)||qu(Re);return jt.current=new Map(ae.map(Re=>[Re.id,Re.title])),ae}catch{return null}},[e]),_s=A.useCallback(async te=>{L.current.projectId!==e||!An(Q.queryKey)||await Promise.all([tt.fetchQuery({...il(te),staleTime:0}),$s(!0)]).catch(()=>{})},[e,$s]);A.useEffect(()=>{const te=a$();U(e===Bp?new Set([Tb,Ab].filter(je=>!te.has(je))):new Set),G(!1),le(!1),yt(new Map),jt.current=new Map,$s();const ve=L.current;return()=>{L.current===ve&&(L.current={projectId:e})}},[e,$s]),A.useEffect(()=>{Yn(Xp),gn.current=null},[Z]),A.useEffect(()=>Ov(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||ll.has(te.session.id))return;const ve=jt.current.has(te.session.id),je=jt.current.get(te.session.id)!==te.session.title;jt.current.set(te.session.id,te.session.title),ve&&je&&te.session.titleSource==="generated"&&(yt(X=>{const ae=new Map(X);return ae.set(te.session.id,(X.get(te.session.id)??0)+1),ae}),window.setTimeout(()=>{yt(X=>{if(!X.has(te.session.id))return X;const ae=new Map(X);return ae.delete(te.session.id),ae})},PLn));break}case"sessionDeleted":qu(te.sessionId);break}}),[e]),A.useEffect(()=>Ov(te=>{te.type==="reconnected"&&$s(!0)}),[$s]);const uc=Z?Ke.messagesBySession[Z]??wR:wR,da=Z?Ke.activeLeafBySession[Z]??null:null;En.current=da;const hr=A.useMemo(()=>Z7n(uc,da),[uc,da]),_c=A.useRef({projectId:e,ids:Ke.busySessions});A.useEffect(()=>{const te=_c.current;_c.current={projectId:e,ids:Ke.busySessions},te.projectId===e&&U(ve=>r8n(ve,te.ids,Ke.busySessions,V,i==="chat"?Z:null))},[e,Ke.busySessions,V,Z,i]);const ar=Z?Ke.busySessions.has(Z):!1,Ef=!ar&&!!(st!=null&&st.agentReady),xo=ar&&IB(hr)!=null,wo=ar&&n8n(hr),Mi=Z?Ke.queuedBySession[Z]??[]:[],Pt=Mi.some(te=>te.dispatchState==="retrying"),Bs=Mi.findIndex(te=>te.dispatchState==="blocked"),Js=Mi.reduce((te,ve)=>ve.dispatchState!=="retrying"||typeof ve.nextRetryAt!="number"?te:te===null?ve.nextRetryAt:Math.min(te,ve.nextRetryAt),null),[ha,Nf]=A.useState(()=>Date.now());A.useEffect(()=>{if(!Pt||Js===null||(Nf(Date.now()),Js<=Date.now()))return;const te=window.setInterval(()=>{const ve=Date.now();Nf(ve),ve>=Js&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[Pt,Js]),A.useEffect(()=>{const te=Mi.reduce((ve,je)=>je.planMode??ve,void 0);te!==void 0?(Kt.current=!0,gt.current=te,St(te)):Kt.current&&(Kt.current=!1,gt.current=null,St(null))},[Mi]);const fc=!!Z&&!(Z in Ke.messagesBySession)&&In.isPending,dc=A.useMemo(()=>{const te=new Set;for(const ve of Ke.busySessions)(Ke.messagesBySession[ve]??[]).some(je=>je.parts.some(X=>X.type==="prompt"&&X.prompt&&!X.prompt.resolved&&X.prompt.nativeId))&&te.add(ve);return te},[Ke.busySessions,Ke.messagesBySession]),Oi=Z?dc.has(Z):!1,or=Gt,hc=or?Zn.get(or.id):void 0,zs=A.useMemo(()=>{var te;for(let ve=hr.length-1;ve>=0;ve--)for(const je of hr[ve].parts)if(je.type==="prompt"&&((te=je.prompt)==null?void 0:te.kind)==="plan"&&!je.prompt.resolved)return{promptId:je.id,plan:je.prompt.plan??"",synthesized:!!je.prompt.synthesized};return null},[hr]),gi=A.useMemo(()=>Z?t8n(hr,or==null?void 0:or.harness,Ke.busySessions.has(Z)):null,[hr,or==null?void 0:or.harness,Z,Ke.busySessions]),Ps=pi&&!gi,yl=te=>{if(gi||pi)return!1;const ve=H5(te),je=Ss.find(X=>X.name===(ve??te));return!je||je.source!=="command"?!!je:ve&&c4(ve)?ve==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},Di=A.useMemo(()=>Ss.filter(te=>te.source!=="command"),[Ss]),[Li,zf]=A.useState(null),ko=Li&&Li.sessionId===Z?Li:null;A.useEffect(()=>{if(!Li)return;const te=Ke.busySessions.has(Li.sessionId),ve=Li.sessionId===Z&&zs&&zs.promptId!==Li.promptId;(!te||ve)&&zf(null)},[Li,zs,Ke.busySessions,Z]);const Kh=A.useMemo(()=>_C(hr),[hr]),pc=ar&&!!(st!=null&&st.supportsSteering)&&!!(st!=null&&st.agentReady)&&!zs&&!gi&&!Kh&&qe.length===0&&pe.length===0,mc=A.useMemo(()=>p&&Z?(te,ve,je)=>p(te,Z,ve,je):void 0,[p,Z]),jf=A.useMemo(()=>m&&Z?(te,ve,je)=>m(Z,te,ve,je):void 0,[m,Z]),Tf=A.useMemo(()=>o&&((te,ve,je,X,ae)=>o(te,Z??void 0,ve,je,X,ae)),[o,Z]);A.useEffect(()=>{Be.current+=1,rt.current+=1;const te=(Z?Ke.queuedBySession[Z]??[]:[]).reduce((ve,je)=>je.planMode??ve,void 0);Kt.current=te!==void 0,gt.current=te??null,St(te??null),$n({}),me(null)},[Z]);const xl=i==="chat"&&(hr.length>0||ar),ei=($t==null?void 0:$t.harness)??null,wl=($t==null?void 0:$t.model)??null,So=In.data?null:In.error,Af=i==="chat"&&!xl&&!fc&&!So,gc=ut({...Qxn(e,ei??"claude-code",wl,E()),enabled:Af&&ei!==null,subscribed:Af&&ei!==null}),ti=(zo=gc.data)!=null&&zo.blank?HLn():((Wu=gc.data)==null?void 0:Wu.prompts)??null,Wh=ei!==null&&gc.isPending,Rf=e===Bp?"demo":"project",Qh=te=>{_e(te),Vr(!1),window.requestAnimationFrame(()=>{const ve=ct.current;ve&&(ve.focus(),ve.setSelectionRange(te.length,te.length),qn(te.length))})};A.useEffect(()=>{_t&&(_e(te=>te||_t),Vr(!1),qn(_t.length))},[_t]),A.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const ve=ct.current;ve&&(ve.focus(),ve.setSelectionRange(ve.value.length,ve.value.length),ve.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const Mf=A.useId(),kl=e===Bp&&ce===Bz&&!se,Xh=A.useCallback(te=>{const ve=te.scrollHeight-te.scrollTop-te.clientHeight<60;_n.current=ve,Ve(ve)},[]),pa=A.useCallback(()=>{var te;_n.current=!0,Ve(!0),(te=rr.current)==null||te.call(rr)},[]);A.useEffect(()=>{const te=zn.current,ve=xr.current;if(!te||!ve)return;const je=new ResizeObserver(()=>{var X;_n.current?(X=rr.current)==null||X.call(rr):Ve(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return je.observe(te),je.observe(ve),()=>je.disconnect()},[xl]);const Of=A.useCallback(te=>{te.currentTarget.blur(),pa()},[pa]);async function Co({queue:te=!1}={}){var Zh,Jh,Bf,bi,Xu,ri;const ve=ce.trim(),je=gi?null:fDn(ve,Wt==null?void 0:Wt.planActivation);if(je&&je.name!=="plan"){_e(c4(je.name)?"":je.prompt),Vr(!1),fa(je.name,je.prompt);return}if(ru({name:"first_action",surface:Rf,action:"typed_prompt"}),sn.current)return;const X=!!je,ae=!bo,xe=l4(Wt==null?void 0:Wt.planActivation,X?ae:void 0,gt.current),Re=X&&(st==null?void 0:st.id)==="claude-code"?ae?"plan":"auto":void 0,Se=je?je.prompt:ve,Fe=qe,Xe=pe,Dt=Xe.map(wn=>({text:wn.text})),Vn=e,Qr=i;let Xr=Z;const kr=()=>{const wn=we.current;return An(Q.queryKey)&&wn.projectId===Vn&&wn.activeId===Xr&&wn.mainView===Qr},ni=()=>{kr()&&(_e(wn=>wn||ve),He(wn=>wn.length?wn:Fe),be(wn=>wn.length?wn:Xe))};if(X&&!Se&&Fe.length===0&&Xe.length===0){_e(""),Vr(!1);try{if((st==null?void 0:st.id)==="claude-code")qa(ae?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ir(ae);else throw new Error(Yg())}catch{me(zN()),ni()}return}const Kn=$t?{...$t,...Re?{permissionMode:Re}:{}}:null;Re&&qa(Re);let va=null;const xc=gt.current;X&&(Wt==null?void 0:Wt.planActivation)==="command"&&(va=++rt.current,gt.current=ae,St(ae));const ba=()=>{!kr()||va===null||rt.current!==va||(gt.current=xc,St(xc))};if(!Se&&Fe.length===0&&Xe.length===0)return;if((Se||Xe.length>0)&&gi&&Fe.length===0){_e(""),be([]),ys({promptId:gi,answers:[],note:Se||void 0,annotations:Dt}).then(wn=>{wn||ni()});return}const Um=JSON.stringify({text:Se,images:Fe.map(wn=>({mediaType:wn.mediaType,name:wn.name,dataUrl:wn.dataUrl})),annotations:Dt,settings:Kn?{model:Kn.model,serviceTier:Kn.serviceTier,permissionMode:Kn.permissionMode,planMode:xe,reasoningLevel:Kn.reasoningLevel}:null}),Qu=((Zh=gn.current)==null?void 0:Zh.signature)===Um?gn.current.id:`ct_${crypto.randomUUID()}`;if(gn.current={signature:Um,id:Qu},ar){if(!Z||!(st!=null&&st.agentReady)){ba();return}const wn=Z;_e(""),He([]),be([]),ot(null);const Va=Kn?{model:Kn.model,serviceTier:Kn.serviceTier,permissionMode:Kn.permissionMode,planMode:(Wt==null?void 0:Wt.planActivation)==="command"?xe??(Gt==null?void 0:Gt.planMode):xe,reasoningLevel:Kn.reasoningLevel}:{};kr()&&$n({});const xa=Fe.map($r=>({mediaType:$r.mediaType,dataBase64:$r.dataUrl.slice($r.dataUrl.indexOf(",")+1),name:$r.name}));try{(Jh=(await Ns(()=>Pz(wn,Se,Va,xa.length?xa:void 0,Dt,Qu,pc&&!te&&!X?"steer":void 0))).turn)!=null&&Jh.existing&&await _s(wn),kr()&&Yn(Xp),((Bf=gn.current)==null?void 0:Bf.id)===Qu&&(gn.current=null)}catch{ba(),ni()}return}if(!(st!=null&&st.agentReady)){ba();return}if(!Kn){ba();return}let ya=Z;try{_e(Bn=>Bn===ce?"":Bn),He(Bn=>Bn===Fe?[]:Bn),be(Bn=>Bn===Xe?[]:Bn),ot(null),sn.current=!0;try{if(!ya){const ep=await ma(Kn,xe);ya=ep.id,Xr=ep.id}if(!An(Q.queryKey))return;const Bn=il(ya);await tt.fetchQuery({...Bn,...((bi=tt.getQueryState(Bn.queryKey))==null?void 0:bi.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{sn.current=!1}if(!An(Q.queryKey))return;vt({type:"optimisticUser",sessionId:ya,text:Se||Ipe(),attachments:Fe.map(Bn=>({url:Bn.dataUrl,mediaType:Bn.mediaType,name:Bn.name})),annotations:Xe}),vt({type:"busy",sessionId:ya,busy:!0}),kr()&&pa(),kr()&&K==="archived"&&ne("active");const wn=Kn?{model:Kn.model,serviceTier:Kn.serviceTier,permissionMode:Kn.permissionMode,planMode:xe,reasoningLevel:Kn.reasoningLevel}:{};kr()&&$n({});const Va=Fe.map(Bn=>({mediaType:Bn.mediaType,dataBase64:Bn.dataUrl.slice(Bn.dataUrl.indexOf(",")+1),name:Bn.name})),xa=ya;if(!xa)throw new Error(K8e());(Xu=(await Ns(()=>Pz(xa,Se,wn,Va.length?Va:void 0,Dt,Qu))).turn)!=null&&Xu.existing&&await _s(xa),kr()&&Yn(Xp),((ri=gn.current)==null?void 0:ri.id)===Qu&&(gn.current=null)}catch(wn){if(!An(Q.queryKey)||(ni(),ba(),!ya))return;const Va=wn instanceof Error?wn.message:String(wn);if(!/session is busy/i.test(Va)&&await tt.fetchQuery({...La(e),staleTime:0}).then($r=>{var El;return!!((El=$r.find(Bn=>Bn.id===ya))!=null&&El.busy)}).catch(()=>!1)){kr()&&(_e($r=>$r===Se?"":$r),He($r=>$r===Fe?[]:$r),be($r=>$r===Xe?[]:$r));return}vt({type:"busy",sessionId:ya,busy:!1}),vt({type:"localError",sessionId:ya,text:e1e({error:ze(Va)})})}}async function ma(te,ve){const je=we.current,X=L.current,ae=await I.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:ve,reasoningLevel:te.reasoningLevel}]);return L.current===X&&(J(xe=>[ae,...xe.filter(Re=>Re.id!==ae.id)]),tt.getQueryData(Q.queryKey)||$s(!0)),L.current===X&&we.current===je&&(B.current(ae.id,{replace:!0}),we.current={...je,activeId:ae.id}),ae}function Yh(){const te=CDn(ce);_e(te),window.requestAnimationFrame(()=>{var ve,je;(ve=ct.current)==null||ve.focus(),(je=ct.current)==null||je.setSelectionRange(te.length,te.length),qn(te.length)})}async function Sl(){const te=Zs;if(!te)return;if(me(null),ar){me(_0e());return}const ve=ce,je=we.current;let X=Z;const ae=()=>{const Fe=we.current;return Fe.projectId===je.projectId&&Fe.activeId===X&&Fe.mainView===je.mainView},xe=()=>{ae()&&_e(Fe=>Fe||ve)};_e(""),Vr(!1);let Re=Z;if(!Re){if(!(st!=null&&st.agentReady)||!$t){xe(),me(Yg());return}try{const Fe=l4(Wt==null?void 0:Wt.planActivation,void 0,gt.current);Re=(await ma($t,Fe)).id,X=Re,ae()&&$n({})}catch(Fe){xe();const Xe=Fe instanceof Error?Fe.message:String(Fe);ae()&&me(ZE({error:ze(Xe)}));return}}ae()&&K==="archived"&&ne("active");const Se=`${P_}shell-${Date.now()}`;vt({type:"localShell",sessionId:Re,id:Se,command:te}),ae()&&pa();try{const{message:Fe}=await Xyn(Re,te);vt({type:"upsertMessage",sessionId:Re,message:Fe})}catch(Fe){const Xe=Fe instanceof Error?Fe.message:String(Fe);vt({type:"localShell",sessionId:Re,id:Se,command:te,error:ZE({error:ze(Xe)})})}}function Eo(){Z&&exn(Z).catch(()=>{me(z9e())})}const Df=A.useCallback(async(te,ve)=>{if(!(!Z||ln.current)){ln.current=!0,me(null),bt(te);try{const je=l8n({model:Fn.model,serviceTier:Fn.serviceTier,permissionMode:Fn.permissionMode,planMode:Fn.planMode,reasoningLevel:Fn.reasoningLevel}),X=Z;(await Yyn(X,te,ve,je)).turn.existing&&await _s(X),Yn(Xp)}catch{me(P7e())}finally{ln.current=!1,bt(null)}}},[Z,Fn,_s]),Lf=A.useCallback((te,ve)=>{if(!Z||ar||!(st!=null&&st.agentReady))return;const je=Z;vt({type:"busy",sessionId:je,busy:!0}),pa(),Ns(()=>Zyn(je,te,ve)).catch(X=>{vt({type:"busy",sessionId:je,busy:!1});const ae=X instanceof Error?X.message:String(X);vt({type:"localError",sessionId:je,text:e8e({error:ze(ae)})})})},[Z,ar,st==null?void 0:st.agentReady,pa,Ns]),js=A.useCallback(te=>{if(!Z||ar)return;const ve=Z,je=En.current;vt({type:"activeLeaf",sessionId:ve,leafId:te}),Ns(()=>Jyn(ve,te)).catch(X=>{vt({type:"activeLeaf",sessionId:ve,leafId:je});const ae=X instanceof Error?X.message:String(X);vt({type:"localError",sessionId:ve,text:D9e({error:ze(ae)})})})},[Z,ar,Ns]);function fn(te){if(!Z)return;const ve=Z;Vyn(ve,te).then(({removed:je})=>{if(je)return _s(ve)}).catch(()=>me(K7e()))}async function Hu(te){if(!Z||on)return;const ve=Z;me(null),dr(te);try{await Kyn(ve,te),await _s(ve)}catch{me(h8e())}finally{dr(null)}}A.useEffect(()=>{if(!ar||i!=="chat")return;function te(ve){var je;ve.key!=="Escape"||ve.defaultPrevented||(ve.preventDefault(),Eo(),(je=ct.current)==null||je.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[ar,Z,i]);function qu(te){zb(te),it.current.delete(te),pt.current===te&&(pt.current=null),we.current.projectId===e&&we.current.activeId===te&&we.current.mainView==="chat"&&(_e(""),He([]),be([]),B.current(null,{replace:!0})),U(ve=>{if(!ve.has(te))return ve;const je=new Set(ve);return je.delete(te),je}),jt.current.delete(te)}function Cl(te,ve){const je=te.archived;J(X=>X.map(ae=>ae.id===te.id?{...ae,archived:ve}:ae)),$.mutateAsync([te.id,ve]).catch(()=>{J(X=>X.map(ae=>ae.id===te.id?{...ae,archived:je}:ae))})}function If(te,ve){const je=te.title;J(X=>X.map(ae=>ae.id===te.id?{...ae,title:ve}:ae)),q.mutateAsync([te.id,ve]).catch(()=>{J(X=>X.map(ae=>ae.id===te.id?{...ae,title:je}:ae))})}async function fs(te){var je;const ve=((je=te.title)==null?void 0:je.trim())||yd();if(window.confirm(_me({title:Vi(ve)}))){try{await H.mutateAsync(te.id)}catch(X){pn(vme({title:Vi(ve),error:ze(X instanceof Error?X.message:String(X))}),"error");return}qu(te.id)}}const ys=A.useCallback(te=>{if(!Z)return Promise.resolve(!1);const ve=Z;return vt({type:"busy",sessionId:ve,busy:!0}),Ns(()=>txn(ve,te)).then(()=>!0).catch(()=>!1).finally(()=>{An(Q.queryKey)&&(tt.fetchQuery({...il(ve),staleTime:0}).catch(()=>{}),tt.fetchQuery({...La(e),staleTime:0}).catch(()=>{}))})},[Z,e,Ns,Q]),vi=V.filter(te=>LLn(K,te.archived)),Uu=/Mac|iPhone|iPad/.test(navigator.platform),No=Uu?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",vc=Uu?"⌘ Enter":"Ctrl + Enter",es=A.useCallback(()=>{ne("active"),y(null)},[y]),bc=A.useCallback(te=>{ne("all"),y(te)},[y]);A.useEffect(()=>{const te=ve=>{ve.repeat||ve.key!=="Enter"||!ve.metaKey&&!ve.ctrlKey||ve.altKey||!ve.shiftKey||(ve.preventDefault(),es())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[es]);const ts=f.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,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.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":No,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:es,children:[f.jsx(Lh,{size:15}),z4e()]}),f.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:[f.jsx(RI,{size:15}),Fxe()]}),rDn.map(te=>f.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"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.id))]}),f.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:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((ga=FH.find(te=>te.id===K))==null?void 0:ga.railLabel())??jD()}),f.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:f.jsx(ILn,{value:K,onChange:ne})})]}),f.jsxs("div",{className:"rail-body",children:[vi.map(te=>f.jsx(FLn,{session:te,active:te.id===Z&&i==="chat",unread:F.has(te.id),busy:Ke.busySessions.has(te.id),waiting:dc.has(te.id),revealTitle:Zn.get(te.id),onOpen:()=>{if(y(te.id),e===Bp){S5n(te.id);const ve=Nvn[te.id];ve&&(ru({name:"demo_experiment_started",kind:"curated",experiment:ve}),ru({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:ve=>If(te,ve),onSetArchived:ve=>Cl(te,ve),onDelete:()=>void fs(te)},te.id)),vi.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:K==="archived"?O1e():V.length>0?y1e():F1e()})]}),f.jsx(P$,{runtime:x})]}),Gu="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",Vu=!r&&f.jsx(It,{title:SN(),"aria-label":SN(),onClick:s,children:f.jsx(UI,{size:20})});return i!=="chat"?f.jsxs(f.Fragment,{children:[r&&ts,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:Vu}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:z})]})]}):f.jsxs(f.Fragment,{children:[r&&ts,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 mt-5",children:[f.jsxs("div",{className:r?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] items-center",children:[Vu,f.jsxs("div",{className:Gu,children:[f.jsx(O0,{variant:"header",title:or?((yc=or.title)==null?void 0:yc.trim())||yd():tN(),children:or?f.jsx(HH,{title:(($f=or.title)==null?void 0:$f.trim())||yd(),animate:hc!==void 0},hc??"static"):tN()}),k&&f.jsx(It,{"data-tip":nN(),"aria-label":nN(),onClick:k,children:f.jsx(a4n,{size:15})})]})]}),So?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:So.message}),f.jsx(De,{onClick:()=>void In.refetch(),children:Ws()})]}):fc?f.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:[f.jsx(zt,{}),f.jsx("span",{children:x4e()})]}):xl?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:zn,tabIndex:0,role:"region","aria-label":((xs=or==null?void 0:or.title)==null?void 0:xs.trim())||yd(),onScroll:te=>{Xh(te.currentTarget),Hn.dismiss()},children:f.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:xr,children:[f.jsx(iH,{projectId:e,sessionId:Z,children:f.jsx(DLn,{scrollRef:zn,scrollToEndRef:rr,stickToBottom:_n,onPinToBottom:pa,messages:hr,allMessages:uc,canFork:Ef,onFork:Lf,onSelectFork:js,busy:ar,onOpenFile:Tf,onOpenRun:c,onOpenSpawnedSession:bc,runExperimentName:u,onOpenExperiment:h,experimentName:_,onRespond:ys,onOpenPlan:mc,onOpenSubagent:jf,recoveringTurnId:Dr,onRecover:Df,skills:Di},Z)}),ar&&Oi&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:xCe()}),ar&&!Oi&&!xo&&!wo&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:Q9e()})})]})}):f.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:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(zS,{})}),f.jsx("h2",{children:zCe()}),f.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:[f.jsx(Su,{size:19}),f.jsx("span",{children:n})]}),Wh&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:NR,"aria-hidden":"true",children:ER.map((te,ve)=>f.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 ${m4[ve].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${m4[ve].icon}`,children:[f.jsx(te,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},ve))}),f.jsxs(Gr,{className:"mt-3",role:"status",children:[f.jsx(zt,{}),f.jsx("span",{children:x6e()})]})]}),ti&&ti.length>0&&f.jsx("div",{className:NR,role:"group","aria-label":z6e(),children:ti.map((te,ve)=>{const je=ER[ve],X=m4[ve];return f.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 ${X.box}`,onClick:()=>{ru({name:"project_starter_clicked",slot:ve+1}),ru({name:"first_action",surface:Rf,action:"starter_click"}),Qh(te.prompt)},children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(je,{size:17,className:X.icon}),te.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},ve)})})]}),Hn.action&&f.jsxs(De,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:Hn.action.x,top:Hn.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:Hn.add,children:[f.jsx(qI,{size:14}),jbe()]}),f.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:[xl&&f.jsx(It,{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 ${wr?"opacity-0":"opacity-100"}`,title:NN(),"aria-label":NN(),inert:wr,onClick:Of,children:ar&&!Oi?f.jsx(dS,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(qwn,{size:16})}),zs&&!(ko&&zs.promptId===ko.promptId)&&f.jsx(lOn,{synthesized:zs.synthesized,agentLabel:or?su[or.harness]:H9e(),showResumeModes:(or==null?void 0:or.harness)==="claude-code",onView:te=>mc==null?void 0:mc(zs.plan,zs.promptId,te),onApprove:te=>ys({promptId:zs.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>ys({promptId:zs.promptId,approve:!1}),onRevise:te=>{Z&&zf({sessionId:Z,promptId:zs.promptId}),ys({promptId:zs.promptId,approve:!1,note:te})}}),Mi.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Mi.map((te,ve)=>f.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:te.error?`${te.text} -${te.error}`:te.text,children:[te.dispatchState==="blocked"?f.jsx(bS,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(Zwn,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?W7n(te.nextRetryAt,ha):b7e()}),te.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Hu(te.id),"aria-label":nJ({text:te.text}),disabled:on!==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:on===te.id?aL():Vs()}),f.jsx("button",{onClick:()=>un(te.id),"aria-label":QZ({text:te.text}),disabled:on!==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:j5e()}),be===Is&&beun(te.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:f.jsx(or,{size:11})})]},te.id))}),kl&&f.jsxs("div",{id:Af,role:"note",className:`composer-demo-hint ${NR}`,children:[f.jsx(hh,{size:16,className:"shrink-0 text-primary"}),f.jsx("span",{className:"flex-1",dir:"auto",children:f2e()}),f.jsx(Lt,{size:"small","aria-label":Xg(),title:Xg(),onClick:()=>{var te;G(!0),(te=qn.current)==null||te.focus()},children:f.jsx(or,{size:14})})]}),b&&!oe&&c&&f.jsxs("div",{role:"note",className:`composer-demo-run-hint ${NR}`,children:[f.jsx(hh,{size:16,className:"shrink-0 text-primary"}),f.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[f.jsx("span",{children:uN()}),f.jsxs(De,{size:"small",onClick:()=>c(b,"keepOpen"),children:[f.jsx(lo,{size:14}),a3()]}),f.jsx("span",{children:lN()})]}),f.jsx(Lt,{size:"small","aria-label":Xg(),title:Xg(),onClick:()=>{var te;le(!0),(te=qn.current)==null||te.focus()},children:f.jsx(or,{size:14})})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${uN()} ${a3()} ${lN()}`:""}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${$s?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[it&&!it.agentReady&&f.jsx("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:it.catalogPending?f.jsxs("span",{children:[it.name," — ",K_()]}):f.jsxs(f.Fragment,{children:[f.jsxs("strong",{children:[it.name," ",Pwe()]})," ",it.agentNote?ph(it.agentNote):R7e()]})}),mi&&f.jsx(iDn,{skills:Tr,activeIndex:fr,onPick:mo,onHover:Ms}),ps&&f.jsx(uDn,{activeSessionId:Z,onClose:()=>hi(!1),onResume:te=>{hi(!1),ne("all"),y(te.id,{projectId:te.projectId})},onImport:te=>{hi(!1),Ua(te)}}),fe.length>0&&f.jsx(RDn,{annotations:fe,onClear:()=>{me([]),window.requestAnimationFrame(()=>{var te;return(te=qn.current)==null?void 0:te.focus()})},onRemove:te=>{const be=fe.filter(ze=>ze.id!==te);me(be),be.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=qn.current)==null?void 0:ze.focus()})}}),Qe.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Qe.map((te,be)=>{const ze=()=>qe(X=>X.filter((ae,xe)=>xe!==be));return te.mediaType==="application/pdf"?f.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:te.name,children:[f.jsx(Ob,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),f.jsx("button",{title:bN(),"aria-label":bN(),onClick:ze,children:f.jsx(or,{size:11})})]},be):f.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:[f.jsx("img",{src:te.dataUrl,alt:ED()}),f.jsx("button",{title:yN(),"aria-label":yN(),onClick:ze,children:f.jsx(or,{size:11})})]},be)})}),Se&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Se}),Le&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Le}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${$s?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:qn,"aria-describedby":kl?Af:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:gi?dEe():pc&&it?y9e({harness:Ne(su[it.id]),shortcut:Ne(vc)}):Dt?it!=null&&it.agentReady?Vge({harness:Ne(su[Dt.harness])}):Rge({harness:Ne(su[Dt.harness])}):jpe(),rows:2,onPaste:vo,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),Xs(Array.from(te.dataTransfer.files)))},onChange:te=>{const be=te.target.value,ze=te.target.selectionStart;Un(ze);const X=ze>0&&/\s/.test(be[ze-1])&&!gi&&!Pr.current&&mR(be)===null?o4(be,ze-1):null,ae=X&&H5(X.query),xe=X?(be.slice(0,X.start)+be.slice(X.end)).trim():"";if(X&&ae&&(ae==="plan"||!c4(ae)&&!xe)&&xs.some(Ae=>Ae.name===ae)){Fu(ae,be,X);return}_e(be),Br(!1)},onSelect:te=>Un(te.currentTarget.selectionStart),onCompositionStart:()=>{Pr.current=!0},onCompositionEnd:()=>{Pr.current=!1},onKeyDown:te=>{if(mi){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const be=te.key==="ArrowDown"?1:-1;Ms((fr+be+Tr.length)%Tr.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),mo(Tr[fr]);return}if(te.key==="Escape"){te.preventDefault(),Br(!0);return}}if(te.key==="Backspace"&&go(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),$s){Sl();return}Co({queue:te.metaKey||te.ctrlKey})}}}),f.jsx(sDn,{text:ce,editingTokenEnd:Vn==null?void 0:Vn.end,isCommand:yl,skills:xs,projectId:e,textareaRef:qn})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Rs.ref,children:[f.jsx(Lt,{type:"button",className:"composer-bare",title:Q2(),"aria-label":Q2(),"aria-haspopup":"dialog","aria-expanded":Rs.open,onClick:()=>Rs.setOpen(te=>!te),children:f.jsx(k3n,{size:16})}),Rs.open&&f.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:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:Q2()}),f.jsx(f8n,{})]})]}),f.jsx("input",{ref:sn,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{Xs(Array.from(te.target.files??[])),te.target.value=""}}),f.jsx(Lt,{type:"button",className:"composer-attach",title:sN(),"aria-label":sN(),onClick:()=>{var te;return(te=sn.current)==null?void 0:te.click()},children:f.jsx(r3n,{size:16})}),Bu&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:cN({goal:Gi(Bu)}),"aria-label":cN({goal:Gi(Bu)}),onClick:()=>void Ga("clear"),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(BI,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(or,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{className:"truncate",children:Mwe()})]}),bo&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:hN(),"aria-label":hN(),onClick:()=>void Pu(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(D4n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(or,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:e3e()})]}),$s&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:dN(),"aria-label":dN(),onClick:Xh,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(mf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(or,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:wD()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(Z5n,{value:Dt,onSelect:Ha,onOpenSettings:()=>a("harnesses"),permissionChoices:it!=null&&it.agentReady?(Vt==null?void 0:Vt.permissionModes)??[]:[],defaultPermissionId:(Vt==null?void 0:Vt.defaultPermissionMode)??null,onSelectPermission:qa,reasoningChoices:it!=null&&it.agentReady?ks.choices:[],defaultReasoningId:ks.defaultId,onSelectReasoning:$u,lockHarness:!!qt,openRequest:nr}),f.jsx(oDn,{usage:qt==null?void 0:qt.contextUsage})]}),rr&&!gi?f.jsx(Lt,{className:"send-btn",variant:"stop",title:CN(),"aria-label":CN(),onClick:Eo,children:f.jsx(or,{size:16})}):f.jsx(Lt,{className:`send-btn ${kl&&(it!=null&&it.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:$s?wN():i3(),"aria-label":$s?wN():i3(),onClick:()=>void($s?Sl():Co()),disabled:$s?!Ys||!Z&&!(it!=null&&it.agentReady):!(it!=null&&it.agentReady)||!ce.trim()&&Qe.length===0&&fe.length===0,children:f.jsx(LI,{size:16})})]})]})]})]})]})}const NR="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",TLn=[],ALn=[];function Aa({className:e,...n}){return f.jsx("div",{className:fs("relative flex min-h-0 flex-1 flex-col",e),...n})}function Pd({className:e,...n}){return f.jsx("div",{className:fs("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Vo({className:e,...n}){return f.jsx("div",{className:fs("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const zR=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function RLn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=ut(il(n)),h=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),_=A.useRef(null),p=A.useRef(null),m=A.useRef(!0);if(A.useLayoutEffect(()=>{m.current=!0;const v=_.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),A.useLayoutEffect(()=>{const v=_.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[h]),A.useEffect(()=>{const v=_.current,b=p.current;if(!v||!b)return;const w=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return w.observe(b),w.observe(v),()=>w.disconnect()},[h===null]),h===null)return f.jsx(Aa,{children:f.jsx("div",{className:zR,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:bfn()})})});let x=null;for(const v of h)if(x=cb(v.parts,t),x)break;return f.jsx(Aa,{children:f.jsx("div",{className:zR,ref:_,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:f.jsx("div",{ref:p,children:x?f.jsx(sH,{projectId:e,sessionId:n,children:f.jsx(gLn,{spawn:x,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Efn()})})})})}function MLn({experiment:e}){var s;const n=ut(q$(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(Pd,{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?f.jsxs(Vo,{children:[jhe()," ",Ne(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(jB,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(AB,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?qhe():whe()}):f.jsx(Vo,{children:Lhe()})})}function HH({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:c}){return f.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&&f.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":ENe(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:MNe()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:jD()})]}),r&&f.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:[f.jsx(Nm,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&f.jsx(Cm,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(Fb,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Lt,{title:TN(),"aria-label":TN(),onClick:c,children:o?f.jsx(Nt,{}):f.jsx(u3n,{size:13})})]})}const OLn=/\.(md|mdx|markdown)$/i,DLn=/\.tex$/i,LLn=/\.html?$/i,ILn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,$Ln=/\.(csv|tsv|xlsx?|ods)$/i,BLn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,PLn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,FLn=/\.pdf$/i,HLn=/\.(docx?|log|rtf|txt)$/i;function qLn(e){return ILn.test(e)}function fC(e){return OLn.test(e)}function qH(e){return DLn.test(e)}function ULn(e){return LLn.test(e)}function Ch({name:e}){const n=fC(e)?"markdown":qLn(e)?"image":$Ln.test(e)?"spreadsheet":BLn.test(e)?"code":PLn.test(e)?"archive":FLn.test(e)?"pdf":HLn.test(e)||qH(e)?"document":"file";let t;return n==="markdown"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),f.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=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),f.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),f.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=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=f.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=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),f.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),f.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 UH(e,n){const t=navigator.clipboard;if(!t){mn(MD(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>mn(j0(),"success")).catch(r=>mn(r instanceof Error?r.message:String(r),"error"))}function GH({name:e,onCommit:n,onCancel:t}){const[r,s]=A.useState(e),i=A.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(Ir,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":eBe({path:Ne(e)}),onFocus:o=>{const c=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,c>0?c: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 VH(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 KH({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=A.useRef(null),c=A.useRef(a);c.current=a;const[u,h]=A.useState({x:e.x,y:e.y});A.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return h({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))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),A.useEffect(()=>{const m=()=>c.current(),x=v=>{var b;(b=o.current)!=null&&b.contains(v.target instanceof Node?v.target:null)||c.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),c.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),c.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const _=m=>{c.current(),m()},p=(m,x,k=!1)=>f.jsx(Yn,{size:"compact",role:"menuitem",danger:k,onClick:()=>_(x),children:f.jsx("span",{children:m})});return oa.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":P$e({path:Ne(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 b,w;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((b=o.current)==null?void 0:b.querySelectorAll("button"))??[]],k=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),v=m.key==="ArrowDown"?1:-1;(w=x[(k+v+x.length)%x.length])==null||w.focus()},children:[p(K$e(),n),t&&p(SD(),t),r&&p(M$e(),r),p(xfe(),s),i&&p(kD(),i,!0)]}),document.body)}const Q5=["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(" "),jR=["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 TR(){return{dirs:new Map,files:[]}}function WH(e){const n=TR();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?f.jsx(rc,{size:13,className:jR}):f.jsx(Ba,{size:13,className:jR}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(dC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function dC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(GLn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&u)return f.jsxs("div",{className:Q5,style:{paddingInlineStart:8+t*14},children:[f.jsx(Ch,{name:p}),f.jsx(GH,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const x=$r(k=>i(m,k));return f.jsxs("button",{type:"button",className:Q5,style:{paddingInlineStart:8+t*14},...x,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}x.onKeyDown(k)},title:xY({name:Ne(m)}),children:[f.jsx(Ch,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function VLn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,z;const c=t.branchName,u=ut({...G$(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=ut({...qv(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,x=q$(t.id),k=ZV({queryKey:x.queryKey})>0,v=(z=h.data)!=null&&z.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},w=A.useMemo(()=>_?WH(_.entries):null,[_]),y=r==="files"?m:k,C=A.useCallback(T=>{const j=new Set(s);j.has(T)?j.delete(T):j.add(T),a(j)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(HH,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Rb(n.githubOwner,n.githubRepo,c):void 0,githubTitle:mD({branch:Ne(c)}),refreshing:y,onRefresh:()=>r==="files"?b():void nt.invalidateQueries(x)}),r==="changes"?f.jsx(MLn,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Vo,{children:VNe()}),p&&w&&f.jsxs(Vo,{children:[aze()," ",Ne(p)]}),f.jsx(Pd,{children:w?w.dirs.size===0&&w.files.length===0?f.jsx(Vo,{children:JNe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(dC,{node:w,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(T,j)=>v?o(T,v,void 0,j):o(T,void 0,c,j)})}):f.jsx(Vo,{children:p?qk({error:Ne(p)}):Uk()})})]})]})}function hC({icon:e,title:n,description:t}){return f.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:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function KLn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var B,L,F;const c=n.id,h=((B=ut(La(c)).data)==null?void 0:B.some(U=>U.id===e&&U.busy))??!1,_=ut({...qv(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=ut({...G$(c,m),enabled:!e||_.isSuccess,refetchInterval:h?5e3:!1}),k=x.data,v=(L=_.error??x.error)==null?void 0:L.message,b=_.isFetching||x.isFetching,[w,y]=A.useState(null),[C,N]=A.useState(null),z=A.useCallback(()=>{e&&nt.invalidateQueries(qv(e)),nt.invalidateQueries({queryKey:St("getCodeTree",c),predicate:U=>!cD(U)})},[e,c]),T=A.useRef(h);A.useEffect(()=>{T.current&&!h&&z(),T.current=h},[h,z]);const j=A.useMemo(()=>k?WH(k.entries):null,[k]),M=A.useCallback(U=>{const K=new Set(r);K.has(U)?K.delete(U):K.add(U),i(K)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?A1n({branch:Ne(D.baselineBranch)}):Xk()),$=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,q=D?g1n({branch:Ne(`${I}${$>0?"*":""}`)}):S1n({branch:Ne(n.baselineBranch)}),H=D?D.branch:n.baselineBranch,Q=(U,K)=>D?a(U,e,void 0,K):a(U,void 0,n.baselineBranch,K),V=(k==null?void 0:k.root)==="worktree",J=async(U,K)=>{try{await qvn(c,U,K,{sessionId:e}),z()}catch(ne){mn(ne instanceof Error?ne.message:String(ne),"error")}},Z=U=>{const K=(k==null?void 0:k.path)??n.repoPath;UH(K,U)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(HH,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:q,branchTitle:q,githubHref:n.githubEnabled&&H?Rb(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?mD({branch:Ne(H)}):void 0,refreshing:b,onRefresh:z}),v&&(p||k)&&f.jsxs(Vo,{children:[fvn()," ",Ne(v)]}),!k||e&&!p?f.jsx(Pd,{children:f.jsx(Vo,{children:v?qk({error:Ne(v)}):Uk()})}):D&&t==="changes"?f.jsx(Pd,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:$===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:Z1n()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(jB,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(AB,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(Pd,{children:[k.truncated&&f.jsx(Vo,{children:$1n()}),j?j.dirs.size===0&&j.files.length===0?f.jsx(hC,{icon:Su,title:ivn(),description:_Ge()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(dC,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(U,K)=>{y(VH(U,K))},onRename:(U,K)=>{N(null),J(U,{action:"rename",newName:K})},onCancelRename:()=>N(null)})}):f.jsx(Vo,{children:G1n()})]}),w&&f.jsx(KH,{target:w,onOpen:()=>Q(w.path,"keepOpen"),onRename:V&&o(w.path)?()=>N(w.path):void 0,onDuplicate:V?()=>void J(w.path,{action:"duplicate"}):void 0,onCopyPath:()=>Z(w.path),onDelete:V?()=>{window.confirm(E$e({path:Ne(w.path)}))&&J(w.path,{action:"delete"})}:void 0,onClose:()=>y(null)})]})}function QH({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=A.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` -`),_=D$(h,TS(n));return h.endsWith(` -`)?_.slice(0,-1):_},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=A.useRef(null);A.useEffect(()=>{var h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=g$(i.length),u=A.useMemo(()=>i.map((h,_)=>f.jsxs("div",{ref:_+1===a?o:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${m$} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${Fv} ${p$}`,children:L$(h)?f.jsx("br",{}):h})]},_)),[i,c,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Fv}`,children:[i.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}function XH(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function AR({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Wet()," ",f.jsxs("a",{href:e,download:n,children:[Ev()," ",Ne(n)]})]})}function X5({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=A.useState(!1);if(A.useEffect(()=>i(!1),[e,n]),s)return f.jsx(AR,{url:n,name:t});let a;return e==="image"?a=f.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:f.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.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=f.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:f.jsx(AR,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a,r&&f.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:f.jsxs("a",{href:n,download:t,children:[Ev()," ",t]})})]})}const WLn=e=>({queryKey:St("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 YH(e,n=!0){return ut({...WLn(e),enabled:n,subscribed:n}).data??null}function QLn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function XLn(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),c=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 h=u.join("/");if(!h)return null;const _=new URLSearchParams(c);_.delete("path");const p=_.toString();return{path:h,url:`${Q_(e,h)}${p?`&${p}`:""}${i}`}}function YLn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const ZH="orx:files-tree-width",JH="orx:artifacts-collapsed:",eq=180,tq=320,ZLn=8,JLn=280;function eIn(){try{const e=Number(localStorage.getItem(ZH));if(Number.isFinite(e)&&e>=eq&&e<=tq)return e}catch{}return JLn}function tIn(e){try{const n=localStorage.getItem(`${JH}${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 K0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=K0(t.children??[],n);if(r)return r}}return null}function nq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(QLn(i))return i;const a=XLn(e,n,i);if(!a)return null;const o=K0(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};return f.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:f.jsx(Bzn,{remarkPlugins:[JF,[eH,aH]],rehypePlugins:[zF],components:{a:({href:i,children:a,...o})=>{const c=!i||i.startsWith("#"),u=c?i:s(i);return u?f.jsx("a",{...o,href:u,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...oH},children:nH(YLn(t))})})}function nIn(e){return e.presentation==="text"&&fC(e.name)?"markdown":XH(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function rIn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=KL,i=u6(e,n.path),a=ut({...i,enabled:s,subscribed:s}),o=A.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});A.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&nt.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((u=a.error)==null?void 0:u.message)??(c===null?zfe():null),wantsText:s}}function sIn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=nIn(n),i=YH(Q_(e,n.path)),{text:a,binary:o,truncated:c,error:u,wantsText:h}=rIn(e,n,s,i),[_,p]=A.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),k=`${Q_(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let v;return s==="image"||s==="audio"||s==="video"||s==="pdf"?v=f.jsx(X5,{kind:s,url:k,name:n.name}):s==="download"||!h||o?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?hfe():phe()," ",f.jsx("a",{href:k,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?OD():Dfe()})]}):u?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[cde()," ",Ne(u)]}):a===null?v=f.jsxs(Kr,{children:[f.jsx(Nt,{})," ",yD()]}):m&&!_?v=f.jsx(nq,{projectId:e,folder:x,markdown:a,entries:r}):v=f.jsx(QH,{text:a,path:n.path}),f.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:[f.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:[f.jsx(Ch,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[Hde()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:el(n.size)}),m&&f.jsx(Lt,{size:"small",active:_,"data-tip":_?Cv():Cd(),"data-tip-align":"end","aria-label":_?Cv():Cd(),onClick:()=>p(b=>!b),children:f.jsx(D3,{size:13})}),f.jsx(Cm,{size:"small",href:k,target:"_blank",rel:"noopener noreferrer","data-tip":XE(),"data-tip-align":"end","aria-label":XE(),children:f.jsx(Y_,{size:13})}),f.jsx(Lt,{size:"small","data-tip":QE(),"data-tip-align":"end","aria-label":QE(),onClick:()=>{window.confirm(Pk({path:Ne(n.path)}))&&t(n.path)},children:f.jsx(gf,{size:13})})]}),f.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&&!_?"doc":""}`,children:[v,c&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:pde()})]})]})}function rq({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,onCancelRename:_}){return f.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,ZLn)*14};if(p.isDir){const k=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.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:[f.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":k?F_e({name:Ne(p.name)}):ofe({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:f.jsx(Ba,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(Lt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":tde(),"data-tip-align":"end","aria-label":efe({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(Pk({path:Ne(p.path)}))&&o(p.path)},children:f.jsx(gf,{size:12})})]}),k&&(((x=p.children)==null?void 0:x.length)??0)>0&&f.jsx(rq,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,onCancelRename:_})]},p.path)}return c===p.path?f.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:[f.jsx(Ch,{name:p.name}),f.jsx(GH,{name:p.name,onCommit:k=>h(p.path,k),onCancel:_})]},p.path):f.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:OQ({path:Ne(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[f.jsx(Ch,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function iIn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=A.useState(null),[a,o]=A.useState(()=>tIn(e.id)),[c,u]=A.useState(eIn),[h,_]=A.useState(null),[p,m]=A.useState(null),x=A.useRef(null);A.useEffect(()=>{try{localStorage.setItem(`${JH}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=z=>{var I;z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId);const T=(I=x.current)==null?void 0:I.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=$=>{const q=Math.round($.clientX-((T==null?void 0:T.left)??0)),H=Math.min(Math.max(q,eq),tq);u(H);try{localStorage.setItem(ZH,String(H))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};A.useEffect(()=>{if(!s||!n)return;const z=K0(n.entries,s);(!z||z.isDir)&&i(null)},[s,n]);const v=z=>o(T=>{const j=new Set(T);return j.has(z)?j.delete(z):j.add(z),j}),b=z=>{(s===z||s!=null&&s.startsWith(z+"/"))&&i(null),Qbn(e.id,z).catch(()=>{})},w=async(z,T)=>{try{await Xbn(e.id,z,T),T.action==="rename"&&s===z&&i(null)}catch(j){mn(j instanceof Error?j.message:String(j),"error")}},y=z=>{n&&UH(n.dir,z)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(Kr,{className:"p-5",children:[f.jsx(Nt,{})," ",Dde()]})});const C=z=>f.jsx(rq,{entries:z,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(T,j)=>{_(VH(T,j))},onRename:(T,j)=>{m(null),w(T,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),N=s?K0(n.entries,s):null;return n.entries.length===0?f.jsx(hC,{icon:pS,title:Qde(),description:che()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.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:c},children:[f.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:k}),f.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&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:wde()})]})]}),N?f.jsx(sIn,{projectId:e.id,entry:N,onDelete:b,artifactEntries:n.entries},N.path):f.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:[f.jsx(Z4n,{size:22,strokeWidth:1.5}),f.jsx("span",{children:Hfe()})]}),h&&f.jsx(KH,{target:h,onOpen:()=>t(h.path),onRename:r(h.path)?()=>m(h.path):void 0,onDuplicate:()=>void w(h.path,{action:"duplicate"}),onCopyPath:()=>y(h.path),onDelete:()=>{window.confirm(Pk({path:Ne(h.path)}))&&b(h.path)},onClose:()=>_(null)})]})}const sq=20*1024*1024,iq="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",aq="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",aIn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",oIn="text-sm font-normal text-text",cIn="mt-1 mb-0 text-sm leading-relaxed text-text";function oq(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 lIn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function cq({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=A.useState(!1),a=A.useRef(null);return f.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 c=(u=o.dataTransfer.files)==null?void 0:u[0];c&&r(c)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var c;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(c=a.current)==null||c.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const c=(u=o.target.files)==null?void 0:u[0];c&&r(c),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{}),f.jsx("span",{children:Bon()})]}):f.jsxs(f.Fragment,{children:[f.jsx(N3n,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function lq({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[el(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",co(n)]})]})}function uIn({skill:e,onError:n}){const t=an({mutationFn:byn}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:oIn,children:e.name}),e.origin&&f.jsx(Ht,{size:"small",children:e.origin})]}),f.jsx(lq,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Lt,{size:"small","data-tip":e.origin?Hin():Ian(),"data-tip-align":"end","aria-label":e.origin?nan({name:Ne(e.name)}):Osn({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?Qin({name:Ne(e.name)}):Nsn({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(gf,{size:13})})]})}function _In({template:e,onError:n}){const t=an({mutationFn:myn}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:aIn,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:cIn,children:[e.entry,s>0&&(s===1?zin():lan({count:Wt(s)}))]})]}),f.jsx(lq,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Lt,{"data-tip":Uan(),"data-tip-align":"end","aria-label":Wsn({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(Fsn({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:f.jsx(gf,{size:13})})]})}function fIn(){var w;const e=an({mutationFn:vyn}),n=ut(uxn()),t=n.data,r=A.useRef(null),[s,i]=A.useState(!1),[a,o]=A.useState(!1),c=A.useCallback(()=>{const y=r.current;i(!!y&&y.scrollTop>1),o(!!y&&y.scrollHeight-y.scrollTop-y.clientHeight>1)},[]);A.useLayoutEffect(()=>{c();const y=r.current;if(!y)return;const C=new ResizeObserver(c);return C.observe(y),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(w=n.error)==null?void 0:w.message,[_,p]=A.useState(!1),[m,x]=A.useState(null),k=()=>{n.refetch()},v=A.useRef(!1),b=A.useCallback(async y=>{if(!v.current){if(x(null),!lIn(y.name)){x(Jon());return}if(y.size>sq){x(TL());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:y.name,contentBase64:await oq(y)})}catch(C){x(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:iq,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:Ron()}),f.jsxs(De,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[f.jsx(Pa,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),f.jsx("p",{className:aq,children:tin()}),f.jsx(cq,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:cin()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:ysn()})]}),onFile:y=>void b(y)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[man()," ",h]}),t===void 0?h?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",son()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:von()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(y=>f.jsx(uIn,{skill:y,onError:x},y.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function dIn(){var h;const e=an({mutationFn:pyn}),n=ut(lxn()),t=n.data,r=(h=n.error)==null?void 0:h.message,[s,i]=A.useState(!1),[a,o]=A.useState(null),c=A.useRef(!1),u=A.useCallback(async _=>{if(c.current)return;o(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(acn());return}if(_.size>sq){o(TL());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await oq(_)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return f.jsxs("section",{className:iq,children:[f.jsx("h3",{children:Yan()}),f.jsx("p",{className:aq,children:Von()}),f.jsx(cq,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:pin()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:Kfn()})]}),onFile:_=>void u(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[kan()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",_on()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Con()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(_In,{template:_,onError:o},_.name))})]})}function hIn(){return f.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:[f.jsx("h1",{children:Tan()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:Din()}),f.jsx(fIn,{}),f.jsx(dIn,{})]})}const pIn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Fc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return f.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?pIn:""}`,onClick:i,onDoubleClick:a,title:s?Pfn({label:n}):n,"aria-label":s?Mfn({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:dNe(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:f.jsx(or,{size:12})})]})}const RR=["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 mIn({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:RR,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:RR,href:Rb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Sv({name:Ne(t)}),children:[f.jsx("code",{children:t}),f.jsx(Fb,{size:12})]})}const g4=["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(" "),MR=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function OR(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function DR(e,n){return T0((e.endedAt??n)-e.createdAt)}function gIn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=r.some(h=>h.status==="running"||h.status==="starting"),[c,u]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!o)return;u(Date.now());const h=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(h)},[o]),f.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:f.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:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(al,{status:a?Qi(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(De,{...$r(h=>s(a.id,h)),children:[f.jsx(lo,{size:15}),XDe()]}),f.jsxs(De,{...$r(i),children:[f.jsx(Db,{size:15}),tDe()]})]}),e.description&&f.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:[f.jsx("h2",{children:wDe()}),f.jsx(Jo,{text:e.description})]}),f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:a?WOe():SLe()}),a&&f.jsxs(f.Fragment,{children:[f.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:[f.jsx(al,{status:Qi(a)}),f.jsx(jS,{backend:a.backend}),f.jsxs("span",{title:gLe(),children:[f.jsx(Iwn,{size:13}),OR(a.createdAt)]}),f.jsxs("span",{title:jDe(),children:[f.jsx(Xwn,{size:13}),DR(a,c)]}),a.commitSha&&f.jsxs("span",{title:cDe(),children:[f.jsx(E4n,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[LDe()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:MR,children:["$ ",a.command]}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx(Jo,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:"Git"}),f.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:[f.jsx(mIn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[qDe()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:OR(e.createdAt),children:[pDe()," ",co(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:MR,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:uLe()}),f.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((h,_)=>f.jsxs("button",{...$r(p=>s(h.id,p)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[rLe()," ",r.length-_]}),f.jsx(al,{status:Qi(h)}),f.jsx("span",{children:co(h.createdAt)}),f.jsx("span",{children:DR(h,c)}),f.jsx(lo,{size:13})]},h.id))})]})]})})}function LR(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}=Ib(t,!0);let i=!1,a=0,o=!1,c=!1;async function u(){if(o){c=!0;return}o=!0;try{for(;;){const _=await Ivn(e,a);if(i)return;if(_.dataBase64&&r.write(LR(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=vxn(e,_=>{if(i)return;const p=LR(_.dataBase64);!o&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function bIn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,_)=>_.createdAt-h.createdAt);return t==="overview"?f.jsx(gIn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,_)=>o("terminal",h,_),onOpenCode:h=>c("files",h)}):f.jsx(yIn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function yIn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=A.useState(null),[a,o]=A.useState(null),[c,u]=A.useState(!1),h=A.useRef(null),_=t?n.find(v=>v.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),x=v=>{const b=n.findIndex(w=>w.id===v);return b===-1?n.length:n.length-b};A.useEffect(()=>{if(!c)return;const v=b=>{var w;(w=h.current)!=null&&w.contains(b.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function k(){if(_){i(null),o(_.id);try{await BL(_.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.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:[f.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}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(De,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[f.jsx(OI,{size:13}),m?dze():AD()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[f.jsxs(De,{title:BMe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[f.jsxs("span",{children:[AN()," ",x(_.id)]}),f.jsx(al,{status:m?"cancelling":Qi(_)}),f.jsx(rc,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&f.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(v=>f.jsxs(Yn,{className:"justify-start",active:v.id===(_==null?void 0:_.id),onClick:()=>{r(v.id),u(!1)},children:[f.jsxs("span",{className:"font-medium",children:[AN()," ",x(v.id)]}),f.jsx(al,{status:Qi(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:co(v.createdAt)})]},v.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(vIn,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?ro():EMe()})})]})}let Y5=!1;function IR(e){Y5=!0;try{return window.confirm(e)}finally{Y5=!1}}const Z5=e=>e.replace(/\r\n/g,` -`),$R=(e,n,t)=>{const r=Z5(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},Gc=e=>e.draft!==e.baseline,xIn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),wIn=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function kIn(e,n,t){return!Gc(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class SIn{constructor(){Bs(this,"buffer",null);Bs(this,"listeners",new Set);Bs(this,"saving",!1);Bs(this,"saveError",null);Bs(this,"revision",0);Bs(this,"saveRevision",0);Bs(this,"getSnapshot",()=>this.buffer);Bs(this,"getRevision",()=>this.revision);Bs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Bs(this,"set",n=>{this.buffer=n,this.notify()});Bs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Bs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Bs(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&&(Gc(this.buffer)||this.buffer.conflict!==null)}}function CIn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var J,Z,B;const c=ut({...Xkn(),enabled:r,subscribed:r}),u=((J=c.data)==null?void 0:J.engine)??(c.isPending?void 0:null),h=((Z=c.data)==null?void 0:Z.hint)??null,_=((B=c.data)==null?void 0:B.installCommand)??null,[p,m]=A.useState(!1),[x,k]=A.useState(null),[v,b]=A.useState(null),[w,y]=A.useState(!1),[C,N]=A.useState(null),[z,T]=A.useState(null),[j,M]=A.useState(!1),[D,I]=A.useState(0),$=A.useCallback(L=>{M(L),L&&I(F=>F+1)},[]),q=A.useRef(o);q.current=o;const H=A.useRef(!1),Q=A.useRef(null),V=A.useCallback(()=>{if(H.current)return;Q.current=n,H.current=!0,m(!0);const L=q.current;T(null),b(null),N(null),Kvn(e,n,{sessionId:t}).then(F=>{var K,ne;const U=F.pdfPath;if(F.ok&&U){k(ce=>({path:U,version:((ce==null?void 0:ce.version)??0)+1,source:L})),y(F.hadErrors),N(F.note),F.hadErrors&&b(((K=F.log)==null?void 0:K.trim())||null),$(!0);return}k(null),y(!1),N(F.note),M(!1),b(((ne=F.log)==null?void 0:ne.trim())||oZe())}).catch(F=>{k(null),y(!1),N(null),M(!1),T(F instanceof Error?F.message:String(F))}).finally(()=>{H.current=!1,m(!1)})},[e,n,t,$]);return A.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&V()},[r,s,a,u,n,V]),{engine:u,installHint:h,installCommand:_,compiling:p,compiled:x,stale:x!==null&&x.source!==o,log:v,builtWithErrors:w,note:C,error:z,showPdf:j,setShowPdf:$,viewNonce:D,compile:()=>{i==null||i(),V()},dismiss:()=>{T(null),b(null)}}}const EIn=3e4,NIn=3e4,zIn=5*6e4;function jIn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var _e,se,G,oe;const u=A.useMemo(()=>Zkn(e,n,{sessionId:t}),[e,n,t]),h=ut({...u,enabled:r,subscribed:r}),_=((_e=h.data)==null?void 0:_e.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((G=h.data)==null?void 0:G.link)??null,x=!h.isPending,[k,v]=A.useState(null),[b,w]=A.useState(0),[y,C]=A.useState(!1),[N,z]=A.useState(null),[T,j]=A.useState(null),[M,D]=A.useState(!1),I=A.useCallback(le=>{Rn(u.queryKey)&&nt.setQueryData(u.queryKey,fe=>fe&&{...fe,hasSession:le})},[u]),$=A.useCallback(le=>{Rn(u.queryKey)&&nt.setQueryData(u.queryKey,le)},[u]);A.useEffect(()=>{z(null),w(0),L.current=!1,j(null),D(!1),V.current=!1},[r,e,n,t]),A.useEffect(()=>{D(!1)},[a]);const q=A.useRef(!1),H=A.useRef(c);H.current=c;const Q=A.useRef(o);Q.current=o;const V=A.useRef(!1),J=A.useCallback(le=>!_||!m||q.current||Q.current?!1:(q.current=!0,C(!0),j(null),rbn(e,n,{sessionId:t,resolve:le}).then(fe=>{V.current=!1,z(fe),fe.pulled.includes(n)&&(Q.current?D(!0):H.current(fe.pulled))}).catch(fe=>{V.current=!0,z(null),j(fe instanceof Error?fe.message:String(fe))}).finally(()=>{q.current=!1,C(!1)}),!0),[e,n,t,_,m]),Z=A.useRef(null),B=(k==null?void 0:k.state)==="live";A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||B)return;const le=`${n}:${m.projectId}:${a}`;Z.current!==le&&J()&&(Z.current=le)},[r,s,x,_,m,n,a,o,y,J,B]);const L=A.useRef(!1);!y&&N&&N.conflicts.length===0&&!T&&(L.current=!0);const F=r&&x&&!!m&&_&&p&&L.current,U=A.useRef(null),K=A.useRef(Promise.resolve()),ne=A.useRef(!1);ne.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ce=A.useRef(!1);return A.useEffect(()=>{if(!F)return;let le=!1;const fe=()=>{const Re=ce.current;ce.current=!1,!(!Re&&ne.current)&&(K.current=K.current.then(()=>{if(!le)return Zvn(e,n,{sessionId:t,retry:Re}).then(Oe=>{var Qe;le||((U.current===null||((Qe=Oe.status)==null?void 0:Qe.state)==="stopped")&&v(Oe.status),U.current=Oe.key)}).catch(Oe=>{le||v({state:"stopped",error:Oe instanceof Error?Oe.message:String(Oe),needsSession:!1,note:null})})}))};fe();const me=setInterval(fe,NIn);return()=>{le=!0,clearInterval(me),U.current=null,v(null),K.current=K.current.then(()=>Jvn(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),A.useEffect(()=>Sxn(le=>{if(le.key===U.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(Q.current?D(!0):H.current(le.paths))}}),[n]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||B)return;const le=setInterval(()=>{q.current||V.current||nt.fetchQuery({...Jkn(e,n,{sessionId:t}),staleTime:0}).then(fe=>{fe.remoteChanged&&J()}).catch(fe=>{V.current=!0,j(fe instanceof Error?fe.message:String(fe))})},EIn);return()=>clearInterval(le)},[r,s,x,_,m,o,e,n,t,J,B]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||!B)return;const le=setInterval(J,zIn);return()=>clearInterval(le)},[r,s,x,_,m,B,J]),{hasToken:_,hasSession:p,live:k,retryLive:()=>{ce.current=!0,w(le=>le+1)},link:m,loaded:x,syncing:y,last:N,error:T??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:ibn(e,n,{sessionId:t}),saveToken:async le=>{const fe=await FL(le);Z.current=null,V.current=!1,j(null),Rn(u.queryKey)&&nt.setQueryData(u.queryKey,me=>me&&{...me,hasToken:fe.hasToken})},saveSession:async le=>{const fe=await HL(le,{host:m==null?void 0:m.host});I(fe.hasSession),ce.current=!0,w(me=>me+1)},importSession:async()=>{const le=await Yvn({host:m==null?void 0:m.host});return I(le.hasSession),ce.current=!0,w(fe=>fe+1),le.source},linkProject:async le=>{z(null),v(null),L.current=!1,Z.current=null,$(await tbn(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{$(await nbn(e,n,{sessionId:t})),Z.current=null,V.current=!1,z(null),j(null)},sync:le=>{V.current=!1,J(le)&&(Z.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const BR=[{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"]}],TIn=4e6,AIn=200,PR=16e6,RIn=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)}),FR=e=>e.startsWith("//")?`https:${e}`:e;async function MIn(e,n){var s;let t=TIn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:c}of e){if(r.has(o)){const x=r.get(o);x&&i.setAttribute(a,x);continue}if(n.aborted)return;if(r.size>=AIn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!c.some(x=>h.startsWith(x))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await RIn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function OIn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(BR.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of BR){if(!o.matches(c))continue;const _=o.getAttribute(u);if(!_)continue;const p=n(_);p&&(p===_?o.setAttribute(u,FR(_)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await MIn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!w6(c)||(o.setAttribute("href",FR(c)),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 DIn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${PR-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>PR}}function LIn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=A.useState(null);return A.useEffect(()=>{let o=!1;const c=new AbortController;return a(null),DIn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await OIn(u,s,c.signal),partial:h})).then(u=>{o||a(u)}),()=>{o=!0,c.abort()}},[e,n,t,s]),i===null?f.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[f.jsx(Nt,{})," ",DD()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:bFe()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:EFe({name:Ne(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function IIn({overleaf:e}){var _;const n=A.useRef(null),{open:t,setOpen:r,ref:s}=_o(n),i=A.useId(),[a,o]=A.useState({top:0,left:0,maxHeight:0}),c=((_=e.last)==null?void 0:_.conflicts.length)??0,u=e.hasToken&&!!e.error,h=u?l3():c?cmt():!e.hasToken||!e.link?kbt():e.syncing?tL():e.blocked?eL():YD();return A.useEffect(()=>{c&&r(!0)},[c,r]),A.useEffect(()=>{u&&mn(l3(),"error",{id:i,duration:5e3})},[u,e.error,i]),A.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 k=()=>r(!1),v=b=>{var w;b.target instanceof Node&&!((w=s.current)!=null&&w.contains(b.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),f.jsxs(f.Fragment,{children:[f.jsx(Lt,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":xZ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?f.jsx(Nt,{}):f.jsx(e4n,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&oa.createPortal(f.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":yL(),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:[f.jsx("div",{className:"absolute end-3 top-3",children:f.jsx(Lt,{size:"small","aria-label":PPe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:f.jsx(or,{size:13})})}),f.jsx(HIn,{overleaf:e})]}),document.body)]})}const j1=e=>Gi(new Intl.ListFormat(E()).format(e.map(Ne)));function $In(e){if(e.error)return Wmt();if(e.syncing)return tL();if(e.blocked)return eL();const n=e.last;return n?n.pulled.length&&n.pushed.length?Lvt({pulled:j1(n.pulled),pushed:j1(n.pushed)}):n.pulled.length?jvt({paths:j1(n.pulled)}):n.pushed.length?qvt({paths:j1(n.pushed)}):n.conflicts.length?Qgt():YD():pvt()}function BIn({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:JD()})}function PIn(e){return e.state==="live"?pgt():e.state==="connecting"?cgt():e.error??jgt()}function HR({overleaf:e,replacing:n}){const[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[c,u]=A.useState(null),h=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)))},_=a?Lbt():n?Xvt():zmt();return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("p",{className:"text-sm text-subtext",children:_}),a&&f.jsx(Ir,{className:"basis-full min-w-0","aria-label":c3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:c3(),autoComplete:"off"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&f.jsx(Nt,{}),a?f.jsx(De,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?ia():tmt()}):f.jsx(De,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:Dmt()}),f.jsx(De,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?ZD():wvt()})]}),c&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function FIn({overleaf:e}){if(!e.hasSession)return f.jsx(HR,{overleaf:e});const n=e.live;if(!n)return f.jsx("p",{className:"text-sm text-subtext",children:Lgt()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),f.jsx("span",{className:"min-w-0 break-words",children:PIn(n)})]}),n.note&&f.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&f.jsx("div",{children:f.jsx(De,{onClick:e.retryLive,children:wgt()})}),t&&f.jsx(HR,{overleaf:e,replacing:!0})]})}function HIn({overleaf:e}){var p,m,x;const[n,t]=A.useState(""),[r,s]=A.useState(!1),[i,a]=A.useState(null),[o,c]=A.useState(!1),u=()=>{t(""),a(null),c(!0)},h=!e.hasToken||o;async function _(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){const k=((p=e.last)==null?void 0:p.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[f.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&f.jsx(Nt,{}),e.error?l3():$In(e)]}),e.error&&f.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),f.jsx(FIn,{overleaf:e}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(De,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?rbt():((m=e.live)==null?void 0:m.state)==="live"?Qbt():void 0,onClick:()=>e.sync(),children:e.error?Vs():H1t()}),f.jsxs(dh,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[j1t()," ",f.jsx(Y_,{size:12})]})]}),k.map(v=>f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsxs("p",{className:"break-words text-accent-red",children:[f.jsx("code",{className:"font-mono",children:v})," ",p1t()]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:w1t()}),f.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:cvt()})]})]},v)),((x=e.last)==null?void 0:x.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),f.jsxs("details",{className:"border-t border-border pt-3",children:[f.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:f.jsx("span",{className:"ms-2",children:tS()})}),f.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[f.jsx(De,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:dz()}),f.jsx(dh,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:JD()}),f.jsx(De,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:Q1t()})]})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:_,children:[f.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?cyt():pyt()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx(Ir,{className:"basis-full min-w-0","aria-label":h?_z():fz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?_z():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(De,{type:"submit",disabled:r||!n.trim(),children:r?h?ia():ta():h?mbt():tgt()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?pmt():fz()})]}),(i||e.error)&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(BIn,{href:e.uploadUrl}),o?f.jsx(De,{variant:"ghost",type:"button",onClick:()=>c(!1),children:ZD()}):e.hasToken&&f.jsx(De,{variant:"ghost",type:"button",onClick:u,children:dz()})]})]})}function qIn({command:e}){const[n,t]=A.useState("idle"),r=A.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 f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.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}),f.jsx(Lt,{"data-tip":n==="copied"?j0():n==="select"?iUe():KBe(),"aria-label":ePe(),onClick:()=>void s(),children:n==="copied"?f.jsx(Xi,{size:13}):f.jsx(Oh,{size:13})})]})}function qR(e){const[n,t]=A.useState(!1),[r,s]=A.useState(null);return{busy:n,error:r,trigger:async()=>{t(!0),s(null);try{await e()}catch(a){s(a instanceof Error?a.message:String(a))}finally{t(!1)}}}}function UIn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:_,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:w,showSource:y=!1,onShowSourceChange:C}){var yn,Hn;const N=K$(e,n,t??"repo",r,s),z=ut({...N,enabled:!k.saving}),T=z.data??null,j=((yn=z.error)==null?void 0:yn.message)??null,M=Ie=>{Vr(N.queryKey,Ke=>(typeof Ie=="function"?Ie(Ke??null):Ie)??void 0)},[D,I]=A.useState(0),$=t==="artifacts",q=t==="abs",H=fC(n),Q=qH(n),V=ULn(n),J=H||V,[Z,B]=A.useState(!1),L=!b||Z,F=()=>{B(!0),w==null||w()};A.useSyncExternalStore(k.subscribe,k.getRevision);const U=k.getSnapshot(),K=k.set,ne=k.saving,ce=k.setSaving,_e=k.saveRevision,se=k.saveError,G=k.setSaveError,oe=A.useRef(null),le=A.useRef(c),fe=(T==null?void 0:T.file)??null,me=U&&Gc(U)?U.path:(T==null?void 0:T.source)==="checkout"?T.file.path:n,Re=me.split("/").slice(0,-1).join("/"),Oe=(T==null?void 0:T.source)==="artifact",Qe=A.useCallback(Ie=>{var Ke;return((Ke=s5(Re,Ie,q))==null?void 0:Ke.path)??null},[q,Re]),qe=A.useCallback(Ie=>q?PL(Ie):Oe?Q_(e,Ie):g3(e,Ie,{sessionId:r,ref:s}),[Oe,s,q,e,r]),Se=A.useCallback(Ie=>{if(w6(Ie))return Ie;const Ke=s5(Re,Ie,q);return Ke?x7n(qe(Ke.path),Ke):null},[q,Re,qe]),at=XH(fe==null?void 0:fe.presentation),et=(T==null?void 0:T.source)==="artifact"&&!$,ct=$&&(T==null?void 0:T.source)==="checkout",wt=!s&&(T==null?void 0:T.source)==="checkout"&&fe!=null&&!fe.notFound,$t=r!=null&&(T==null?void 0:T.source)==="checkout"&&T.file.root==="clone",ht=wt&&fe!=null&&!fe.binary&&!fe.truncated&&!at&&!$t,dt=ht&&fe.version===void 0,Le=U!==null&&Gc(U),ge=!dt&&(ht&&typeof fe.version=="string"||Le),Te=(U==null?void 0:U.draft)??Z5((fe==null?void 0:fe.content)??""),Fe=(U==null?void 0:U.baseline)??Z5((fe==null?void 0:fe.content)??""),st=ge&&U!==null&&Gc(U),_t=async Ie=>{const Ke=k.getSnapshot();if(!ge||!Ke||!Gc(Ke))return!0;if(k.saving)return!1;if(Ke.conflict&&Ie===void 0)return G(Ke.conflict.exists?RN():ON()),!1;const Cn=Ke.draft,Zn=wIn(Ke);ce(!0),G(null);try{await nt.cancelQueries(N);const Xt=await Hvn(e,me,Zn,{sessionId:r,expectedVersion:Ie??Ke.version});return k.getSnapshot()?(k.saved(Cn,Xt.version),M(jn=>jn&&jn.source==="checkout"?{source:"checkout",file:{...jn.file,content:Zn,version:Xt.version}}:jn),!0):!1}catch(Xt){if(Xt instanceof m3){const Jt=k.getSnapshot();return!Jt||!Gc(Jt)||K({...Jt,conflict:{currentVersion:Xt.currentVersion,exists:Xt.exists}}),!1}return G(Xt instanceof Error?Xt.message:String(Xt)),!1}finally{ce(!1)}},mt=Q&&wt&&!$t,Ue=CIn({projectId:e,filePath:me,sessionId:r,enabled:mt,autoRun:L,onManualAction:F,ready:fe!=null&&!fe.notFound,source:ge?Te:(fe==null?void 0:fe.content)??""}),Gt=jIn({projectId:e,filePath:me,sessionId:r,enabled:mt,autoRun:L,onManualAction:F,savedSource:Fe,dirty:st,onPulled:A.useCallback(Ie=>{Ie.includes(me)&&I(Ke=>Ke+1)},[me])}),sn=Q&&Ue.showPdf&&Ue.compiled!=null,jt=dt&&Le,gt=(ge||jt)&&!(J&&!y)&&!sn,$n=Ue.compiled?`${g3(e,Ue.compiled.path,{sessionId:r})}&v=${Ue.compiled.version}`:null,Zt=$n?`${$n}&view=${Ue.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,gn=Ue.compiled?Ue.compiled.path.split("/").pop()??Ue.compiled.path:null,mr=async()=>{st&&!await _t()||Q&&Ue.engine&&Ue.compile()},Bn=async()=>{st&&(L?await mr():await _t())},Nn=qR(()=>Uvn(e,me,{sessionId:r})),zn=qR(()=>Gvn(e,me,{sessionId:r})),Pn=v?BHe():fe!=null&&fe.notFound?IN():s?RHe({branch:Ne(s)}):wt?null:VHe(),jr=A.useCallback(()=>{k.saving||I(Ie=>Ie+1)},[k]),Ct=()=>{K(null),G(null),jr()},tn=YH(qe(me),!s&&!ne);A.useEffect(()=>{if(!j||s)return;const Ie=window.setInterval(()=>{document.visibilityState!=="hidden"&&jr()},2e3);return()=>window.clearInterval(Ie)},[j,s,jr]);const vn=`${qe(me)}&v=${encodeURIComponent(tn??m??"")}&reload=${D}`;A.useEffect(()=>{var Cn,Zn;if(!T||k.saving)return;const Ie=T,Ke=k.getSnapshot();if(Ke&&Gc(Ke)){const Xt=Ie.source==="checkout"?Ie.file:null,Jt=Xt!==null&&Xt.path===Ke.path&&(!r||Xt.root==="worktree"),jn=kIn(Ke,Jt&&typeof Xt.version=="string"?Xt.version:null,Jt&&!Xt.notFound);jn&&(jn.currentVersion!==((Cn=Ke.conflict)==null?void 0:Cn.currentVersion)||jn.exists!==((Zn=Ke.conflict)==null?void 0:Zn.exists))?K({...Ke,conflict:jn}):!jn&&Ke.conflict&&K({...Ke,conflict:null})}(!Ke||!Gc(Ke))&&Ie.source==="checkout"&&!Ie.file.notFound&&!Ie.file.binary&&!Ie.file.truncated&&typeof Ie.file.version=="string"&&(K($R(Ie.file.path,Ie.file.content,Ie.file.version)),G(null))},[T,k,r,ne,_e]);const on=JSON.stringify(N.queryKey),gr=A.useRef({sourceKey:on,nonce:D,artifactVersion:m,diskVersion:tn});A.useEffect(()=>{const Ie=gr.current;gr.current={sourceKey:on,nonce:D,artifactVersion:m,diskVersion:tn},Ie.sourceKey===on&&(Ie.nonce!==D||Ie.diskVersion!==null&&Ie.diskVersion!==tn||Ie.artifactVersion!=null&&Ie.artifactVersion!==m)&&eSn(e,n,t??"repo",r,s)},[on,D,m,tn,e,n,t,r,s]),A.useLayoutEffect(()=>{const Ie=oe.current,Ke=le.current;!Ie||!fe||!Ke||(Ie.scrollTop=Ke.top,Ie.scrollLeft=Ke.left)},[fe]);const bn=Ie=>{if(Ie.source==="absolute")return iHe();if($)return GFe({root:r?Jg():Zg()});if(s)return ZFe({branch:Ne(s)});if(r&&Ie.source==="checkout"&&Ie.file.root==="clone")return sGe();const Ke=Ie.source==="checkout"?Ie.file.root:Ie.checkoutRoot;return fHe({root:Ke==="worktree"?Jg():Zg()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",children:[f.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:[f.jsx(Ch,{name:me}),f.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(me),children:me.split("/").pop()||me}),a&&f.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:FQ({branch:Ne(a)}),children:[f.jsx(Nm,{size:11}),a]}),gt&&(ne||st||se)&&f.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?ia():UUe()),children:ne?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Zqe()]}):se?Gqe():LD()}),Q&&Ue.compiled&&f.jsx(Lt,{size:"small",active:!Ue.showPdf,"data-tip":Ue.stale&&Ue.showPdf?dqe():Ue.showPdf?Cd():FN(),"data-tip-align":"end","aria-label":Ue.showPdf?Cd():FN(),onClick:()=>Ue.setShowPdf(!Ue.showPdf),children:Ue.showPdf?f.jsx(D3,{size:13}):f.jsx(Ob,{size:13,className:Ue.stale?"text-accent-amber":void 0})}),Q&&$n&&gn&&f.jsx(Cm,{size:"small","data-tip":Ue.stale?JPe({name:Ne(gn)}):BE({name:Ne(gn)}),"data-tip-align":"end","aria-label":BE({name:Ne(gn)}),href:$n,download:gn,children:f.jsx(fS,{size:13,className:Ue.stale?"text-accent-amber":void 0})}),mt&&f.jsx(IIn,{overleaf:Gt}),Q&&wt&&f.jsx(Lt,{size:"small","data-tip":Ue.compiled?BN():MN(),"data-tip-align":"end","aria-label":Ue.compiled?BN():MN(),disabled:Ue.compiling||!Ue.engine,onClick:()=>void mr(),children:Ue.compiling?f.jsx(Nt,{}):f.jsx(u4n,{size:13})}),J&&f.jsx(Lt,{size:"small",active:y,"data-tip":y?Cv():Cd(),"data-tip-align":"end","aria-label":y?Cv():Cd(),onClick:()=>C==null?void 0:C(!y),children:f.jsx(D3,{size:13})}),fe!=null&&f.jsxs(f.Fragment,{children:[f.jsx(Lt,{size:"small","data-tip":Pn??Nn.error??$N(),"data-tip-align":"end","aria-label":$N(),"aria-description":Pn??void 0,disabled:Nn.busy||Pn!=null,onClick:()=>void Nn.trigger(),children:Nn.busy?f.jsx(Nt,{}):f.jsx(Y_,{size:13})}),f.jsx(Lt,{size:"small","data-tip":Pn??zn.error??PN(),"data-tip-align":"end","aria-label":PN(),"aria-description":Pn??void 0,disabled:zn.busy||Pn!=null,onClick:()=>void zn.trigger(),children:zn.busy?f.jsx(Nt,{}):f.jsx(Su,{size:13})})]})]}),!j&&ct&&(T==null?void 0:T.source)==="checkout"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:bHe({root:T.file.root==="worktree"?Jg():Zg()})}),dt&&f.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:YUe()}),j&&fe!==null&&f.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:[LN()," ",Ne(j)]}),(U==null?void 0:U.conflict)&&f.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:[f.jsx("span",{className:"flex-1 min-w-0",role:"status",children:U.conflict.exists?RN():ON()}),((Hn=U==null?void 0:U.conflict)==null?void 0:Hn.exists)&&U.conflict.currentVersion&&f.jsx(De,{disabled:ne,onPointerDown:Ie=>Ie.preventDefault(),onClick:()=>{var Ie;return void _t(((Ie=U.conflict)==null?void 0:Ie.currentVersion)??void 0)},children:aqe()}),f.jsx(De,{disabled:ne,onPointerDown:Ie=>Ie.preventDefault(),onClick:Ct,children:Rqe()})]}),(Ue.error||Ue.log)&&f.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:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:`flex-1 min-w-0 text-sm ${Ue.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Ue.error??(Ue.builtWithErrors?PBe():NBe())}),f.jsx(Lt,{"data-tip":EPe(),"data-tip-align":"end","aria-label":MPe(),onClick:Ue.dismiss,children:f.jsx(or,{size:13})})]}),Ue.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Ue.log})]}),mt&&Gt.staleOnDisk&&f.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:[f.jsx("span",{className:"flex-1 min-w-0",children:JHe()}),f.jsx(De,{onClick:()=>{Gt.reloaded(),I(Ie=>Ie+1)},children:dPe()})]}),Q&&wt&&Ue.engine===null&&Ue.installHint&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Ue.installHint,Ue.installCommand&&f.jsx(qIn,{command:Ue.installCommand})]}),Ue.note&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Ue.note}),sn&&Ue.stale&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:SUe()}),f.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ie=>{const Ke={top:Math.max(0,Ie.currentTarget.scrollTop),left:Math.max(0,Ie.currentTarget.scrollLeft)};le.current=Ke,u==null||u(Ke)},children:[!gt&&!j&&!$&&(T==null?void 0:T.source)==="checkout"&&!T.file.notFound&&!s&&r&&T.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:AUe()}),!gt&&!j&&(T==null?void 0:T.source)==="artifact"&&!T.file.notFound&&et&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:oBe({root:T.checkoutRoot==="worktree"?Jg():Zg()})}),j&&fe===null?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[LN()," ",Ne(j)]}):fe===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:DD()}):gt?f.jsx(I$,{value:Te,onChange:Ie=>{const Ke=k.getSnapshot()??(fe&&typeof fe.version=="string"?$R(fe.path,fe.content,fe.version):null);Ke&&K(xIn(Ke,Ie)),p==null||p(),se&&G(null)},onSave:()=>void Bn(),onBlur:()=>{Y5||Bn()},readOnly:jt,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_,scrollPosition:le.current,onScrollPositionChange:Ie=>{le.current=Ie,u==null||u(Ie)}}):fe.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:T?bn(T):IN()}):at?f.jsx(X5,{kind:at,url:vn,name:n.split("/").pop()??n}):fe.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[hBe()," ",f.jsx("a",{href:vn,download:n.split("/").pop()??n,children:OD()})]}):sn&&Zt&&gn?f.jsx(X5,{kind:"pdf",url:Zt,name:gn,downloadBar:!1},Zt):H&&!y?f.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:Oe?f.jsx(nq,{projectId:e,folder:Re,markdown:fe.content,entries:x}):f.jsx(Jo,{text:fe.content,resolveFilePath:Qe,resolveImageSrc:Se,onOpenFile:o&&((Ie,Ke,Cn,Zn,Xt)=>o(Ie,r,s,Xt))})}):V&&!y?f.jsx(LIn,{html:fe.content,truncated:fe.truncated,url:vn,name:me,resolveSrc:Se}):f.jsxs(f.Fragment,{children:[f.jsx(QH,{text:fe.content,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_}),fe.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:fFe()})]})]})]})}const v4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function GIn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=_o(),c=A.useRef(null);return A.useEffect(()=>{if(!i)return;const u=h=>{var _;h.key==="Escape"&&((_=c.current)==null||_.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),f.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:f.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[f.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[f.jsx(Lt,{size:"small",className:"project-back text-text","aria-label":qN(),onClick:n,children:f.jsx(A0,{size:18})}),f.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:BQe()}),s&&f.jsx(Lt,{size:"small","data-tip":UN(),"data-tip-align":"end","aria-label":UN(),onClick:s,children:f.jsx(qI,{size:18})})]}),f.jsxs("button",{ref:c,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:[f.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),f.jsx(rc,{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&&f.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:[f.jsx(Yn,{onClick:()=>{a(!1),r()},children:f.jsxs("span",{className:v4,children:[f.jsx($I,{size:14}),bQe()]})}),f.jsx(Yn,{onClick:()=>{a(!1),n()},children:f.jsxs("span",{className:v4,children:[f.jsx(PI,{size:14}),qN()]})}),f.jsx(Yn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:f.jsxs("span",{className:v4,children:[f.jsx(v4n,{size:14}),EQe()]})})]})]})})}function VIn({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:a}){const[o,c]=A.useState(new Set),[u,h]=A.useState(null),_=new Map;for(const x of e){const k=_.get(x.experimentId);k?k.push(x):_.set(x.experimentId,[x])}for(const x of _.values())x.sort((k,v)=>v.createdAt-k.createdAt);const p=[...n].sort((x,k)=>{var w,y,C,N;const v=((y=(w=_.get(x.id))==null?void 0:w[0])==null?void 0:y.createdAt)??x.createdAt;return(((N=(C=_.get(k.id))==null?void 0:C[0])==null?void 0:N.createdAt)??k.createdAt)-v});if(p.length===0)return f.jsx(hC,{icon:hh,title:t??GLe(),description:t?void 0:ALe()});async function m(x){h(null),c(k=>new Set(k).add(x));try{await a(x)}catch(k){c(v=>{const b=new Set(v);return b.delete(x),b}),h(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[a$e()," ",u]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":KIe(),children:p.map(x=>{const k=_.get(x.id)??[],v=k[0]??null,b=k.find(N=>N.status==="running"||N.status==="starting"),w=b??v,y=!!(b&&(b.cancelRequested||o.has(b.id))),C=b?y?"cancelling":Qi(b):v?Qi(v):"idle";return f.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:[f.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[f.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...$r(N=>r(x,N),{stopPropagation:!0}),children:x.title||x.slug}),f.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:[f.jsx(Nm,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:x.branchName})]})]}),f.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:[f.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:f.jsx(al,{status:C})}),f.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:f.jsx("span",{children:k.length===1?iIe():bIe({count:Wt(k.length)})})}),f.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:f.jsx("span",{children:v?co(v.createdAt):ZLe()})})]}),f.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":NQ({name:x.title||x.slug}),onClick:N=>N.stopPropagation(),onDoubleClick:N=>N.stopPropagation(),onAuxClick:N=>N.stopPropagation(),children:[f.jsxs(De,{size:"small",disabled:!w,title:w?fIe():$Le(),...$r(N=>{w&&s(x.id,w.id,N)},{stopPropagation:!0}),children:[f.jsx(lo,{size:15}),a3()]}),f.jsxs(De,{size:"small",title:pD({branch:Ne(x.branchName)}),...$r(N=>i(x.id,N),{stopPropagation:!0}),children:[f.jsx(Db,{size:15}),PIe()]}),b&&f.jsxs(De,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?EIe():MIe(),onClick:()=>void m(b.id),children:[f.jsx(OI,{size:15}),y?Oje():AD()]})]})]},x.id)})})]})}function KIn({onClose:e,onCreateProject:n}){const[t,r]=A.useState(!1),[s,i]=A.useState(null),a=A.useRef(null),o=A.useCallback(c=>{t||(r(!0),i(null),c().catch(()=>i(Wdn())).finally(()=>r(!1)))},[t]);return A.useEffect(()=>{const c=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),A.useEffect(()=>{const c=a.current;if(!c)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const _=p=>{if(p.key!=="Tab")return;const m=h();if(m.length===0){p.preventDefault(),c.focus();return}const x=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0),u==null||u.focus()}},[]),oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:f.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:[f.jsx(Lt,{className:"absolute end-3.5 top-3.5","aria-label":p3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:f.jsx(or,{size:16})}),f.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[f.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:f.jsx(zS,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:ydn()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:chn()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[thn()," ",f.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:Odn()}),edn()]}),f.jsx("p",{dir:"auto",children:Ndn()})]}),s&&f.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),f.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[f.jsx(De,{onClick:()=>o(n),disabled:t,children:ddn()}),f.jsx(De,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?ia():Fdn()})]})]})}),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 Oy(){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}})}av.prototype=Oy.prototype={constructor:av,on:function(e,n){var t=this._,r=QIn(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)),GR.hasOwnProperty(n)?{space:GR[n],local:e}:e}function YIn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===J5&&n.documentElement.namespaceURI===J5?n.createElement(e):n.createElementNS(t,e)}}function ZIn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uq(e){var n=Dy(e);return(n.local?ZIn:YIn)(n)}function JIn(){}function pC(e){return e==null?JIn:function(){return this.querySelector(e)}}function e$n(e){typeof e!="function"&&(e=pC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=w+1);!(N=v[y])&&++y=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function C$n(e){e||(e=E$n);function n(_,p){return _&&p?e(_.__data__,p.__data__):!_-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function N$n(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function z$n(){return Array.from(this)}function j$n(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?P$n:typeof n=="function"?H$n:F$n)(e,n,t??"")):Eh(this.node(),e)}function Eh(e,n){return e.style.getPropertyValue(n)||pq(e).getComputedStyle(e,null).getPropertyValue(n)}function U$n(e){return function(){delete this[e]}}function G$n(e,n){return function(){this[e]=n}}function V$n(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function K$n(e,n){return arguments.length>1?this.each((n==null?U$n:typeof n=="function"?V$n:G$n)(e,n)):this.node()[e]}function mq(e){return e.trim().split(/^|\s+/)}function mC(e){return e.classList||new gq(e)}function gq(e){this._node=e,this._names=mq(e.getAttribute("class")||"")}gq.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 vq(e,n){for(var t=mC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function xBn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function ek(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}ek.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ABn(e){return!e.ctrlKey&&!e.button}function RBn(){return this.parentNode}function MBn(e,n){return n??{x:e.x,y:e.y}}function OBn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Sq(){var e=ABn,n=RBn,t=MBn,r=OBn,s={},i=Oy("start","drag","end"),a=0,o,c,u,h,_=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,TBn).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var z=y(this,n.call(this,C,N),C,N,"mouse");z&&(Vi(C.view).on("mousemove.drag",x,W0).on("mouseup.drag",k,W0),wq(C.view),b4(C),u=!1,o=C.clientX,c=C.clientY,z("start",C))}}function x(C){if(Fd(C),!u){var N=C.clientX-o,z=C.clientY-c;u=N*N+z*z>_}s.mouse("drag",C)}function k(C){Vi(C.view).on("mousemove.drag mouseup.drag",null),kq(C.view,u),Fd(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var z=C.changedTouches,T=n.call(this,C,N),j=z.length,M,D;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?A1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?A1(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=LBn.exec(e))?new Ti(n[1],n[2],n[3],1):(n=IBn.exec(e))?new Ti(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=$Bn.exec(e))?A1(n[1],n[2],n[3],n[4]):(n=BBn.exec(e))?A1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=PBn.exec(e))?ZR(n[1],n[2]/100,n[3]/100,1):(n=FBn.exec(e))?ZR(n[1],n[2]/100,n[3]/100,n[4]):VR.hasOwnProperty(e)?QR(VR[e]):e==="transparent"?new Ti(NaN,NaN,NaN,0):null}function QR(e){return new Ti(e>>16&255,e>>8&255,e&255,1)}function A1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ti(e,n,t,r)}function UBn(e){return e instanceof Bm||(e=rf(e)),e?(e=e.rgb(),new Ti(e.r,e.g,e.b,e.opacity)):new Ti}function tk(e,n,t,r){return arguments.length===1?UBn(e):new Ti(e,n,t,r??1)}function Ti(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}gC(Ti,tk,Cq(Bm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new Ti(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q0:Math.pow(Q0,e),new Ti(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ti(U_(this.r),U_(this.g),U_(this.b),_b(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:XR,formatHex:XR,formatHex8:GBn,formatRgb:YR,toString:YR}));function XR(){return`#${S_(this.r)}${S_(this.g)}${S_(this.b)}`}function GBn(){return`#${S_(this.r)}${S_(this.g)}${S_(this.b)}${S_((isNaN(this.opacity)?1:this.opacity)*255)}`}function YR(){const e=_b(this.opacity);return`${e===1?"rgb(":"rgba("}${U_(this.r)}, ${U_(this.g)}, ${U_(this.b)}${e===1?")":`, ${e})`}`}function _b(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function U_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function S_(e){return e=U_(e),(e<16?"0":"")+e.toString(16)}function ZR(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new no(e,n,t,r)}function Eq(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Bm||(e=rf(e)),!e)return new no;if(e instanceof no)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,c=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&c<1?0:a,new no(a,o,c,e.opacity)}function VBn(e,n,t,r){return arguments.length===1?Eq(e):new no(e,n,t,r??1)}function no(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}gC(no,VBn,Cq(Bm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q0:Math.pow(Q0,e),new no(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 Ti(y4(e>=240?e-240:e+120,s,r),y4(e,s,r),y4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new no(JR(this.h),R1(this.s),R1(this.l),_b(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=_b(this.opacity);return`${e===1?"hsl(":"hsla("}${JR(this.h)}, ${R1(this.s)*100}%, ${R1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function JR(e){return e=(e||0)%360,e<0?e+360:e}function R1(e){return Math.max(0,Math.min(1,e||0))}function y4(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 vC=e=>()=>e;function KBn(e,n){return function(t){return e+t*n}}function WBn(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 QBn(e){return(e=+e)==1?Nq:function(n,t){return t-n?WBn(n,t,e):vC(isNaN(n)?t:n)}}function Nq(e,n){var t=n-e;return t?KBn(e,t):vC(isNaN(e)?n:e)}const fb=(function e(n){var t=QBn(n);function r(s,i){var a=t((s=tk(s)).r,(i=tk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=Nq(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function XBn(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,c.push({i:a,x:Uo(r,s)})),t=x4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:_.push(s(_)+"rotate(",null,r)-2,x:Uo(u,h)})):h&&_.push(s(_)+"rotate("+h+r)}function o(u,h,_,p){u!==h?p.push({i:_.push(s(_)+"skewX(",null,r)-2,x:Uo(u,h)}):h&&_.push(s(_)+"skewX("+h+r)}function c(u,h,_,p,m,x){if(u!==_||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");x.push({i:k-4,x:Uo(u,_)},{i:k-2,x:Uo(h,p)})}else(_!==1||p!==1)&&m.push(s(m)+"scale("+_+","+p+")")}return function(u,h){var _=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,_,p),a(u.rotate,h.rotate,_,p),o(u.skewX,h.skewX,_,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,_,p),u=h=null,function(m){for(var x=-1,k=p.length,v;++x=0&&e._call.call(void 0,n),e=e._next;--Nh}function nM(){sf=(hb=Y0.now())+Ly,Nh=s0=0;try{_Pn()}finally{Nh=0,dPn(),sf=0}}function fPn(){var e=Y0.now(),n=e-hb;n>Aq&&(Ly-=n,hb=e)}function dPn(){for(var e,n=db,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:db=t);i0=e,sk(r)}function sk(e){if(!Nh){s0&&(s0=clearTimeout(s0));var n=e-sf;n>24?(e<1/0&&(s0=setTimeout(nM,e-Y0.now()-Ly)),Xp&&(Xp=clearInterval(Xp))):(Xp||(hb=Y0.now(),Xp=setInterval(fPn,Aq)),Nh=1,Rq(nM))}}function rM(e,n,t){var r=new pb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var hPn=Oy("start","end","cancel","interrupt"),pPn=[],Oq=0,sM=1,ik=2,cv=3,iM=4,ak=5,lv=6;function Iy(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;mPn(e,t,{name:n,index:r,group:s,on:hPn,tween:pPn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Oq})}function yC(e,n){var t=fo(e,n);if(t.state>Oq)throw new Error("too late; already scheduled");return t}function lc(e,n){var t=fo(e,n);if(t.state>cv)throw new Error("too late; already running");return t}function fo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function mPn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=Mq(i,0,t.time);function i(u){t.state=sM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,_,p,m;if(t.state!==sM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===cv)return rM(a);m.state===iM?(m.state=lv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hik&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function VPn(e,n,t){var r,s,i=GPn(n)?yC:lc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function KPn(e,n){var t=this._id;return arguments.length<2?fo(this.node(),t).on.on(e):this.each(VPn(t,e,n))}function WPn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function QPn(){return this.on("end.remove",WPn(this._id))}function XPn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=pC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function xFn(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 rl(e,n,t){this.k=e,this.x=n,this.y=t}rl.prototype={constructor:rl,scale:function(e){return e===1?this:new rl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new rl(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 $y=new rl(1,0,0);$q.prototype=rl.prototype;function $q(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $y;return e.__zoom}function w4(e){e.stopImmediatePropagation()}function Yp(e){e.preventDefault(),e.stopImmediatePropagation()}function wFn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function kFn(){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 aM(){return this.__zoom||$y}function SFn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function CFn(){return navigator.maxTouchPoints||"ontouchstart"in this}function EFn(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 Bq(){var e=wFn,n=kFn,t=EFn,r=SFn,s=CFn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=ov,u=Oy("start","zoom","end"),h,_,p,m=500,x=150,k=0,v=10;function b(H){H.property("__zoom",aM).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(H,Q,V,J){var Z=H.selection?H.selection():H;Z.property("__zoom",aM),H!==Z?N(H,Q,V,J):Z.interrupt().each(function(){z(this,arguments).event(J).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(H,Q,V,J){b.scaleTo(H,function(){var Z=this.__zoom.k,B=typeof Q=="function"?Q.apply(this,arguments):Q;return Z*B},V,J)},b.scaleTo=function(H,Q,V,J){b.transform(H,function(){var Z=n.apply(this,arguments),B=this.__zoom,L=V==null?C(Z):typeof V=="function"?V.apply(this,arguments):V,F=B.invert(L),U=typeof Q=="function"?Q.apply(this,arguments):Q;return t(y(w(B,U),L,F),Z,a)},V,J)},b.translateBy=function(H,Q,V,J){b.transform(H,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),a)},null,J)},b.translateTo=function(H,Q,V,J,Z){b.transform(H,function(){var B=n.apply(this,arguments),L=this.__zoom,F=J==null?C(B):typeof J=="function"?J.apply(this,arguments):J;return t($y.translate(F[0],F[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof V=="function"?-V.apply(this,arguments):-V),B,a)},J,Z)};function w(H,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===H.k?H:new rl(Q,H.x,H.y)}function y(H,Q,V){var J=Q[0]-V[0]*H.k,Z=Q[1]-V[1]*H.k;return J===H.x&&Z===H.y?H:new rl(H.k,J,Z)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function N(H,Q,V,J){H.on("start.zoom",function(){z(this,arguments).event(J).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(J).end()}).tween("zoom",function(){var Z=this,B=arguments,L=z(Z,B).event(J),F=n.apply(Z,B),U=V==null?C(F):typeof V=="function"?V.apply(Z,B):V,K=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ne=Z.__zoom,ce=typeof Q=="function"?Q.apply(Z,B):Q,_e=c(ne.invert(U).concat(K/ne.k),ce.invert(U).concat(K/ce.k));return function(se){if(se===1)se=ce;else{var G=_e(se),oe=K/G[2];se=new rl(oe,U[0]-G[0]*oe,U[1]-G[1]*oe)}L.zoom(null,se)}})}function z(H,Q,V){return!V&&H.__zooming||new T(H,Q)}function T(H,Q){this.that=H,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(H,Q),this.taps=0}T.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,Q){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Q=Vi(this.that).datum();u.call(H,this.that,new xFn(H,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function j(H,...Q){if(!e.apply(this,arguments))return;var V=z(this,Q).event(H),J=this.__zoom,Z=Math.max(i[0],Math.min(i[1],J.k*Math.pow(2,r.apply(this,arguments)))),B=Ya(H);if(V.wheel)(V.mouse[0][0]!==B[0]||V.mouse[0][1]!==B[1])&&(V.mouse[1]=J.invert(V.mouse[0]=B)),clearTimeout(V.wheel);else{if(J.k===Z)return;V.mouse=[B,J.invert(B)],uv(this),V.start()}Yp(H),V.wheel=setTimeout(L,x),V.zoom("mouse",t(y(w(J,Z),V.mouse[0],V.mouse[1]),V.extent,a));function L(){V.wheel=null,V.end()}}function M(H,...Q){if(p||!e.apply(this,arguments))return;var V=H.currentTarget,J=z(this,Q,!0).event(H),Z=Vi(H.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",K,!0),B=Ya(H,V),L=H.clientX,F=H.clientY;wq(H.view),w4(H),J.mouse=[B,this.__zoom.invert(B)],uv(this),J.start();function U(ne){if(Yp(ne),!J.moved){var ce=ne.clientX-L,_e=ne.clientY-F;J.moved=ce*ce+_e*_e>k}J.event(ne).zoom("mouse",t(y(J.that.__zoom,J.mouse[0]=Ya(ne,V),J.mouse[1]),J.extent,a))}function K(ne){Z.on("mousemove.zoom mouseup.zoom",null),kq(ne.view,J.moved),Yp(ne),J.event(ne).end()}}function D(H,...Q){if(e.apply(this,arguments)){var V=this.__zoom,J=Ya(H.changedTouches?H.changedTouches[0]:H,this),Z=V.invert(J),B=V.k*(H.shiftKey?.5:2),L=t(y(w(V,B),J,Z),n.apply(this,Q),a);Yp(H),o>0?Vi(this).transition().duration(o).call(N,L,J,H):Vi(this).call(b.transform,L,J,H)}}function I(H,...Q){if(e.apply(this,arguments)){var V=H.touches,J=V.length,Z=z(this,Q,H.changedTouches.length===J).event(H),B,L,F,U;for(w4(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.`},Z0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Pq=["Enter"," ","Escape"],Fq={"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 zh;(function(e){e.Strict="strict",e.Loose="loose"})(zh||(zh={}));var G_;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(G_||(G_={}));var J0;(function(e){e.Partial="partial",e.Full="full"})(J0||(J0={}));const Hq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var iu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(iu||(iu={}));var mb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(mb||(mb={}));var Tt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Tt||(Tt={}));const oM={[Tt.Left]:Tt.Right,[Tt.Right]:Tt.Left,[Tt.Top]:Tt.Bottom,[Tt.Bottom]:Tt.Top};function qq(e){return e===null?null:e?"valid":"invalid"}const Uq=e=>"id"in e&&"source"in e&&"target"in e,NFn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),wC=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Pm=(e,n=[0,0])=>{const{width:t,height:r}=vl(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},zFn=(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):wC(s)?s:n.nodeLookup.get(s.id));const o=a?gb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return By(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Py(t)},Fm=(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=By(t,gb(s)),r=!0)}),r?Py(t):{x:0,y:0,width:0,height:0}},kC=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,u=n.width/s,h=n.height/s,_=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:k=!1}=p;if(a&&!x||k)continue;const v=m.width??p.width??p.initialWidth??0,b=m.height??p.height??p.initialHeight??0,{x:w,y}=p.internals.positionAbsolute,C=Wq(o,c,u,h,w,y,v,b),N=v*b,z=i&&C>0;(!p.internals.handleBounds||z||C>=N||p.dragging)&&_.push(p)}return _},jFn=(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 TFn(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 AFn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=TFn(e,a),c=Fm(o),u=CC(c,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 Gq({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:c,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},h=a.origin??r;let _=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",uo.error005());else{const m=o.measured.width,x=o.measured.height;m&&x&&(_=[[c,u],[c+m,u+x]])}else o&&of(a.extent)&&(_=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=of(_)?af(n,_,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",uo.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function RFn({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(k=>k.id===p.parentId);(m||x)&&a.push(p)}const o=new Set(n.map(p=>p.id)),c=r.filter(p=>p.deletable!==!1),h=jFn(a,c);for(const p of c)o.has(p.id)&&!h.find(x=>x.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const _=await s({nodes:a,edges:h});return typeof _=="boolean"?_?{edges:h,nodes:a}:{edges:[],nodes:[]}:_}const jh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),af=(e={x:0,y:0},n,t)=>({x:jh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:jh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function Vq(e,n,t){const{width:r,height:s}=vl(t),{x:i,y:a}=t.internals.positionAbsolute;return af(e,[[i,a],[i+r,a+s]],n)}const cM=(e,n,t)=>et?-jh(Math.abs(e-t),1,n)/n:0,SC=(e,n,t=15,r=40)=>{const s=cM(e.x,r,n.width-r)*t,i=cM(e.y,r,n.height-r)*t;return[s,i]},By=(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)}),ok=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Py=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),em=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=wC(e)?e.internals.positionAbsolute:Pm(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}},gb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=wC(e)?e.internals.positionAbsolute:Pm(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)}},Kq=(e,n)=>Py(By(ok(e),ok(n))),Wq=(e,n,t,r,s,i,a,o)=>{const c=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(c*u)},vb=(e,n)=>Wq(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),lM=e=>so(e.width)&&so(e.height)&&so(e.x)&&so(e.y),so=e=>!isNaN(e)&&isFinite(e),Qq=(e,n)=>(t,r)=>{},Hm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),qm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Hm(o,a):o},Th=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function md(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 MFn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=md(e,t),s=md(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=md(e.top??e.y??0,t),s=md(e.bottom??e.y??0,t),i=md(e.left??e.x??0,n),a=md(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 OFn(e,n,t,r,s,i){const{x:a,y:o}=Th(e,[n,t,r]),{x:c,y:u}=Th({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,_=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(_)}}const CC=(e,n,t,r,s,i)=>{const a=MFn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=jh(u,r,s),_=e.x+e.width/2,p=e.y+e.height/2,m=n/2-_*h,x=t/2-p*h,k=OFn(e,m,x,h,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:x-v.top+v.bottom,zoom:h}},tm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function of(e){return e!=null&&e!=="parent"}function vl(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 Xq(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 Yq(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 uM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function DFn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function LFn(e){return{...Fq,...e||{}}}function y0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=io(e),o=qm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Hm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const EC=e=>({width:e.offsetWidth,height:e.offsetHeight}),Zq=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},IFn=["INPUT","SELECT","TEXTAREA"];function Jq(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:IFn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const eU=e=>"clientX"in e,io=(e,n)=>{var i,a;const t=eU(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)}},_M=(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,...EC(a)}})};function tU({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const c=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,h=Math.abs(c-e),_=Math.abs(u-n);return[c,u,h,_]}function D1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function fM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Tt.Left:return[n-D1(n-r,i),t];case Tt.Right:return[n+D1(r-n,i),t];case Tt.Top:return[n,t-D1(t-s,i)];case Tt.Bottom:return[n,t+D1(s-t,i)]}}function nU({sourceX:e,sourceY:n,sourcePosition:t=Tt.Bottom,targetX:r,targetY:s,targetPosition:i=Tt.Top,curvature:a=.25}){const[o,c]=fM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=fM({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[_,p,m,x]=tU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${c} ${u},${h} ${r},${s}`,_,p,m,x]}function rU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const PFn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,FFn=(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)),HFn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",uo.error006()),n;const r=t.getEdgeId||PFn;let s;return Uq(e)?s={...e}:s={...e,id:r(e)},FFn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function sU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=rU({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const dM={[Tt.Left]:{x:-1,y:0},[Tt.Right]:{x:1,y:0},[Tt.Top]:{x:0,y:-1},[Tt.Bottom]:{x:0,y:1}},qFn=({source:e,sourcePosition:n=Tt.Bottom,target:t})=>n===Tt.Left||n===Tt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function UFn({source:e,sourcePosition:n=Tt.Bottom,target:t,targetPosition:r=Tt.Top,center:s,offset:i,stepPosition:a}){const o=dM[n],c=dM[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},_=qFn({source:u,sourcePosition:n,target:h}),p=_.x!==0?"x":"y",m=_[p];let x=[],k,v;const b={x:0,y:0},w={x:0,y:0},[,,y,C]=rU({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*c[p]===-1){p==="x"?(k=s.x??u.x+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?x=p==="x"?j:M:x=p==="x"?M:j}else{const j=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?x=o.x===m?M:j:x=o.y===m?j:M,n===r){const H=Math.abs(e[p]-t[p]);if(H<=i){const Q=Math.min(i-1,i-H);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:w[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const H=p==="x"?"y":"x",Q=o[p]===c[H],V=u[H]>h[H],J=u[H]=q?(k=(D.x+I.x)/2,v=x[0].y):(k=x[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},z={x:h.x+w.x,y:h.y+w.y};return[[e,...N.x!==x[0].x||N.y!==x[0].y?[N]:[],...x,...z.x!==x[x.length-1].x||z.y!==x[x.length-1].y?[z]:[],t],k,v,y,C]}function GFn(e,n,t,r){const s=Math.min(hM(e,n)/2,hM(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 lk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function KFn(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(c=>{if(c&&typeof c=="object"){const u=lk(c,n);i.has(u)||(a.push({id:u,color:c.color||t,...c}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const iU=1e3,WFn=10,NC={nodeOrigin:[0,0],nodeExtent:Z0,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},QFn={...NC,checkEquality:!0};function zC(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function XFn(e,n,t){const r=zC(NC,t);for(const s of e.values())if(s.parentId)TC(s,e,n,r);else{const i=Pm(s,r.nodeOrigin),a=of(s.extent)?s.extent:r.nodeExtent,o=af(i,a,vl(s));s.internals.positionAbsolute=o}}function YFn(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 jC(e){return e==="manual"}function uk(e,n,t,r={}){var h,_;const s=zC(QFn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!jC(s.zIndexMode)?iU:0;let c=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=Pm(p,s.nodeOrigin),k=of(p.extent)?p.extent:s.nodeExtent,v=af(x,k,vl(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(_=p.measured)==null?void 0:_.height},internals:{positionAbsolute:v,handleBounds:YFn(p,m),z:aU(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&&(c=!1),p.parentId&&TC(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function ZFn(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 TC(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=zC(NC,r),u=e.parentId,h=n.get(u);if(!h){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}ZFn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*WFn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const _=i&&!jC(c)?iU:0,{x:p,y:m,z:x}=JFn(e,h,a,o,_,c),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:x}})}function aU(e,n,t){const r=so(e.zIndex)?e.zIndex:0;return jC(t)?r:r+(e.selected?n:0)}function JFn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=vl(e),u=Pm(e,t),h=of(e.extent)?af(u,e.extent,c):u;let _=af({x:a+h.x,y:o+h.y},r,c);e.extent==="parent"&&(_=Vq(_,c,n));const p=aU(e,s,i),m=n.internals.z??0;return{x:_.x,y:_.y,z:m>=p?m+1:p}}function AC(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??em(c),h=Kq(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var y;const h=c.internals.positionAbsolute,_=vl(c),p=c.origin??r,m=o.x0||x>0||b||w)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-x+w}}),(y=t.get(u))==null||y.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}})})),(_.width0){const m=AC(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function tHn({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 vM(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 c=r.get(a)||new Map;if(r.set(a,c.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function oU(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,h=`${i}-${o}--${s}-${a}`;vM("source",c,h,e,s,a),vM("target",c,u,e,i,o),n.set(r.id,r)}}function cU(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:cU(t,n):!1}function bM(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 nHn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!cU(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 k4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const _=(a=t.get(u))==null?void 0:a.internals.userNode;_&&s.push({..._,position:h.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:((c=n.get(e))==null?void 0:c.position)||i.position,dragging:r}:s[0],s]}function rHn({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=Hm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function sHn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,c=!1,u={x:0,y:0},h=null,_=!1,p=null,m=!1,x=!1,k=null;function v({noDragClassName:w,handleSelector:y,domNode:C,isSelectable:N,nodeId:z,nodeClickDistance:T=0}){p=Vi(C);function j({x:$,y:q}){const{nodeLookup:H,nodeExtent:Q,snapGrid:V,snapToGrid:J,nodeOrigin:Z,onNodeDrag:B,onSelectionDrag:L,onError:F,updateNodePositions:U}=n();i={x:$,y:q};let K=!1;const ne=o.size>1,ce=ne&&Q?ok(Fm(o)):null,_e=ne&&J?rHn({dragItems:o,snapGrid:V,x:$,y:q}):null;for(const[se,G]of o){if(!H.has(se))continue;let oe={x:$-G.distance.x,y:q-G.distance.y};J&&(oe=_e?{x:Math.round(oe.x+_e.x),y:Math.round(oe.y+_e.y)}:Hm(oe,V));let le=null;if(ne&&Q&&!G.extent&&ce){const{positionAbsolute:Re}=G.internals,Oe=Re.x-ce.x+Q[0][0],Qe=Re.x+G.measured.width-ce.x2+Q[1][0],qe=Re.y-ce.y+Q[0][1],Se=Re.y+G.measured.height-ce.y2+Q[1][1];le=[[Oe,qe],[Qe,Se]]}const{position:fe,positionAbsolute:me}=Gq({nodeId:se,nextPosition:oe,nodeLookup:H,nodeExtent:le||Q,nodeOrigin:Z,onError:F});K=K||G.position.x!==fe.x||G.position.y!==fe.y,G.position=fe,G.internals.positionAbsolute=me}if(x=x||K,!!K&&(U(o,!0),k&&(r||B||!z&&L))){const[se,G]=k4({nodeId:z,dragItems:o,nodeLookup:H});r==null||r(k,o,se,G),B==null||B(k,se,G),z||L==null||L(k,G)}}async function M(){if(!h)return;const{transform:$,panBy:q,autoPanSpeed:H,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[V,J]=SC(u,h,H);(V!==0||J!==0)&&(i.x=(i.x??0)-V/$[2],i.y=(i.y??0)-J/$[2],await q({x:V,y:J})&&j(i)),a=requestAnimationFrame(M)}function D($){var ne;const{nodeLookup:q,multiSelectionActive:H,nodesDraggable:Q,transform:V,snapGrid:J,snapToGrid:Z,selectNodesOnDrag:B,onNodeDragStart:L,onSelectionDragStart:F,unselectNodesAndEdges:U}=n();_=!0,(!B||!N)&&!H&&z&&((ne=q.get(z))!=null&&ne.selected||U()),N&&B&&z&&(e==null||e(z));const K=y0($.sourceEvent,{transform:V,snapGrid:J,snapToGrid:Z,containerBounds:h});if(i=K,o=nHn(q,Q,K,z),o.size>0&&(t||L||!z&&F)){const[ce,_e]=k4({nodeId:z,dragItems:o,nodeLookup:q});t==null||t($.sourceEvent,o,ce,_e),L==null||L($.sourceEvent,ce,_e),z||F==null||F($.sourceEvent,_e)}}const I=Sq().clickDistance(T).on("start",$=>{const{domNode:q,nodeDragThreshold:H,transform:Q,snapGrid:V,snapToGrid:J}=n();h=(q==null?void 0:q.getBoundingClientRect())||null,m=!1,x=!1,k=$.sourceEvent,H===0&&D($),i=y0($.sourceEvent,{transform:Q,snapGrid:V,snapToGrid:J,containerBounds:h}),u=io($.sourceEvent,h)}).on("drag",$=>{const{autoPanOnNodeDrag:q,transform:H,snapGrid:Q,snapToGrid:V,nodeDragThreshold:J,nodeLookup:Z}=n(),B=y0($.sourceEvent,{transform:H,snapGrid:Q,snapToGrid:V,containerBounds:h});if(k=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||z&&!Z.has(z))&&(m=!0),!m){if(!c&&q&&_&&(c=!0,M()),!_){const L=io($.sourceEvent,h),F=L.x-u.x,U=L.y-u.y;Math.sqrt(F*F+U*U)>J&&D($)}(i.x!==B.xSnapped||i.y!==B.ySnapped)&&o&&_&&(u=io($.sourceEvent,h),j(B))}}).on("end",$=>{if(!_||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,_=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:q,updateNodePositions:H,onNodeDragStop:Q,onSelectionDragStop:V}=n();if(x&&(H(o,!1),x=!1),s||Q||!z&&V){const[J,Z]=k4({nodeId:z,dragItems:o,nodeLookup:q,dragging:!1});s==null||s($.sourceEvent,o,J,Z),Q==null||Q($.sourceEvent,J,Z),z||V==null||V($.sourceEvent,Z)}}}).filter($=>{const q=$.target;return!$.button&&(!w||!bM(q,`.${w}`,C))&&(!y||bM(q,y,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function iHn(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())vb(s,em(i))>0&&r.push(i);return r}const aHn=250;function oHn(e,n,t,r){var o,c;let s=[],i=1/0;const a=iHn(e,t,n+aHn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const _ of h){if(r.nodeId===_.nodeId&&r.type===_.type&&r.id===_.id)continue;const{x:p,y:m}=cf(u,_,_.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(h=>h.type===u)??s[0]}return s[0]}function lU(e,n,t,r,s,i=!1){var u,h,_;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((_=a.internals.handleBounds)==null?void 0:_.target)??[]],c=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return c&&i?{...c,...cf(a,c,c.position,!0)}:c}function uU(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function cHn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const _U=()=>!0;function lHn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:_,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:k,onConnectEnd:v,isValidConnection:b=_U,onReconnectEnd:w,updateConnection:y,getTransform:C,getFromHandle:N,autoPanSpeed:z,dragThreshold:T=1,handleDomNode:j}){const M=Zq(e.target);let D=0,I;const{x:$,y:q}=io(e),H=uU(i,j),Q=o==null?void 0:o.getBoundingClientRect();let V=!1;if(!Q||!H)return;const J=lU(s,H,r,c,n);if(!J)return;let Z=io(e,Q),B=!1,L=null,F=!1,U=null;function K(){if(!h||!Q)return;const[fe,me]=SC(Z,Q,z);p({x:fe,y:me}),D=requestAnimationFrame(K)}const ne={...J,nodeId:s,type:H,position:J.position},ce=c.get(s);let se={inProgress:!0,isValid:null,from:cf(ce,ne,Tt.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:ce,to:Z,toHandle:null,toPosition:oM[ne.position],toNode:null,pointer:Z};function G(){V=!0,y(se),x==null||x(e,{nodeId:s,handleId:r,handleType:H})}T===0&&G();function oe(fe){if(!V){const{x:Se,y:at}=io(fe),et=Se-$,ct=at-q;if(!(et*et+ct*ct>T*T))return;G()}if(!N()||!ne){le(fe);return}const me=C();Z=io(fe,Q),I=oHn(qm(Z,me,!1,[1,1]),t,c,ne),B||(K(),B=!0);const Re=fU(fe,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:_,nodeLookup:c});U=Re.handleDomNode,L=Re.connection,F=cHn(!!I,Re.isValid);const Oe=c.get(s),Qe=Oe?cf(Oe,ne,Tt.Left,!0):se.from,qe={...se,from:Qe,isValid:F,to:Re.toHandle&&F?Th({x:Re.toHandle.x,y:Re.toHandle.y},me):Z,toHandle:Re.toHandle,toPosition:F&&Re.toHandle?Re.toHandle.position:oM[ne.position],toNode:Re.toHandle?c.get(Re.toHandle.nodeId):null,pointer:Z};y(qe),se=qe}function le(fe){if(!("touches"in fe&&fe.touches.length>0)){if(V){(I||U)&&L&&F&&(k==null||k(L));const{inProgress:me,...Re}=se,Oe={...Re,toPosition:se.toHandle?se.toPosition:null};v==null||v(fe,Oe),i&&(w==null||w(fe,Oe))}m(),cancelAnimationFrame(D),B=!1,F=!1,L=null,U=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",le),M.addEventListener("touchmove",oe),M.addEventListener("touchend",le)}function fU(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=_U,nodeLookup:h}){const _=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=io(e),k=a.elementFromPoint(m,x),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const w=uU(void 0,v),y=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),z=v.classList.contains("connectableend");if(!y||!w)return b;const T={source:_?y:r,sourceHandle:_?C:s,target:_?r:y,targetHandle:_?s:C};b.connection=T;const M=N&&z&&(t===zh.Strict?_&&w==="source"||!_&&w==="target":y!==r||C!==s);b.isValid=M&&u(T),b.toHandle=lU(y,w,C,h,t,!0)}return b}const _k={onPointerDown:lHn,isValid:fU};function uHn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Vi(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:_=!0,zoomable:p=!0,inversePan:m=!1}){const x=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=y.sourceEvent.ctrlKey&&tm()?10:1,z=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*h,T=C[2]*Math.pow(2,z*N);n.scaleTo(T)};let k=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const N=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],z=[N[0]-k[0],N[1]-k[1]];k=N;const T=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-z[0]*T,y:C[1]-z[1]*T},M=[[0,0],[c,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},w=Bq().on("start",v).on("zoom",_?b:null).on("zoom.wheel",p?x:null);s.call(w,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:Ya}}const Fy=e=>({x:e.x,y:e.y,zoom:e.k}),S4=({x:e,y:n,zoom:t})=>$y.translate(e,n).scale(t),zd=(e,n)=>e.target.closest(`.${n}`),dU=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),_Hn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,C4=(e,n=0,t=_Hn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},hU=e=>{const n=e.ctrlKey&&tm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function fHn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(zd(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const _=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=Ya(h),b=hU(h),w=_*Math.pow(2,b);r.scaleTo(t,w,v,h);return}const p=h.deltaMode===1?20:1;let m=s===G_.Vertical?0:h.deltaX*p,x=s===G_.Horizontal?0:h.deltaY*p;!tm()&&h.shiftKey&&s!==G_.Vertical&&(m=h.deltaY*p,x=0),r.translateBy(t,-(m/_)*i,-(x/_)*i,{internal:!0});const k=Fy(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function dHn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=zd(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function hHn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=Fy(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 pHn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&dU(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,Fy(i.transform)))}}function mHn({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&&dU(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Fy(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function gHn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return _=>{var v;const p=e||n,m=t&&_.ctrlKey,x=_.type==="wheel";if(_.button===1&&_.type==="mousedown"&&(zd(_,`${u}-flow__node`)||zd(_,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!x||zd(_,o)&&x||zd(_,c)&&(!x||s&&x&&!e)||!t&&_.ctrlKey&&x)return!1;if(!t&&_.type==="touchstart"&&((v=_.touches)==null?void 0:v.length)>1)return _.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(_.type==="mousedown"||_.type==="touchstart")||Array.isArray(r)&&!r.includes(_.button)&&_.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(_.button)||!_.button||_.button<=1;return(!_.ctrlKey||x)&&k}}function vHn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),_=Bq().scaleExtent([n,t]).translateExtent(r),p=Vi(e).call(_);w({x:s.x,y:s.y,zoom:jh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");_.wheelDelta(hU);async function k(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?b0:ov).transform(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:$,onPaneContextMenu:q,userSelectionActive:H,panOnScroll:Q,panOnDrag:V,panOnScrollMode:J,panOnScrollSpeed:Z,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:F,zoomOnDoubleClick:U,zoomActivationKeyPressed:K,lib:ne,onTransformChange:ce,connectionInProgress:_e,paneClickDistance:se,selectionOnDrag:G}){H&&!u.isZoomingOrPanning&&b();const oe=Q&&!K&&!H;_.clickDistance(G?1/0:!so(se)||se<0?0:se);const le=oe?fHn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:_,panOnScrollMode:J,panOnScrollSpeed:Z,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):dHn({noWheelClassName:I,preventScrolling:B,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const fe=hHn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});_.on("start",fe);const me=pHn({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!q,onPanZoom:i,onTransformChange:ce});_.on("zoom",me);const Re=mHn({zoomPanValues:u,panOnDrag:V,panOnScroll:Q,onPaneContextMenu:q,onPanZoomEnd:o,onDraggingChange:c});_.on("end",Re);const Oe=gHn({zoomActivationKeyPressed:K,panOnDrag:V,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:U,zoomOnPinch:L,userSelectionActive:H,noPanClassName:$,noWheelClassName:I,lib:ne,connectionInProgress:_e});_.filter(Oe),U?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function b(){_.on("zoom",null)}async function w(I,$,q){const H=S4(I),Q=_==null?void 0:_.constrain()(H,$,q);return Q&&await k(Q),Q}async function y(I,$){const q=S4(I);return await k(q,$),q}function C(I){if(p){const $=S4(I),q=p.property("__zoom");(q.k!==I.zoom||q.x!==I.x||q.y!==I.y)&&(_==null||_.transform(p,$,null,{sync:!0}))}}function N(){const I=p?$q(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function z(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?b0:ov).scaleTo(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}async function T(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?b0:ov).scaleBy(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}function j(I){_==null||_.scaleExtent(I)}function M(I){_==null||_.translateExtent(I)}function D(I){const $=!so(I)||I<0?0:I;_==null||_.clickDistance($)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:w,getViewport:N,scaleTo:z,scaleBy:T,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Ah;(function(e){e.Line="line",e.Handle="handle"})(Ah||(Ah={}));function bHn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,c=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(c[0]=c[0]*-1),o&&i&&(c[1]=c[1]*-1),c}function yM(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 Jl(e,n){return Math.max(0,n-e)}function eu(e,n){return Math.max(0,e-n)}function L1(e,n,t){return Math.max(0,n-e,e-t)}function xM(e,n){return e?!n:n}function yHn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:_}=n,p=h&&_,{xSnapped:m,ySnapped:x}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:w}=r,{x:y,y:C,width:N,height:z,aspectRatio:T}=e;let j=Math.floor(h?m-e.pointerX:0),M=Math.floor(_?x-e.pointerY:0);const D=N+(c?-j:j),I=z+(u?-M:M),$=-i[0]*N,q=-i[1]*z;let H=L1(D,k,v),Q=L1(I,b,w);if(a){let Z=0,B=0;c&&j<0?Z=Jl(y+j+$,a[0][0]):!c&&j>0&&(Z=eu(y+D+$,a[1][0])),u&&M<0?B=Jl(C+M+q,a[0][1]):!u&&M>0&&(B=eu(C+I+q,a[1][1])),H=Math.max(H,Z),Q=Math.max(Q,B)}if(o){let Z=0,B=0;c&&j>0?Z=eu(y+j,o[0][0]):!c&&j<0&&(Z=Jl(y+D,o[1][0])),u&&M>0?B=eu(C+M,o[0][1]):!u&&M<0&&(B=Jl(C+I,o[1][1])),H=Math.max(H,Z),Q=Math.max(Q,B)}if(s){if(h){const Z=L1(D/T,b,w)*T;if(H=Math.max(H,Z),a){let B=0;!c&&!u||c&&!u&&p?B=eu(C+q+D/T,a[1][1])*T:B=Jl(C+q+(c?j:-j)/T,a[0][1])*T,H=Math.max(H,B)}if(o){let B=0;!c&&!u||c&&!u&&p?B=Jl(C+D/T,o[1][1])*T:B=eu(C+(c?j:-j)/T,o[0][1])*T,H=Math.max(H,B)}}if(_){const Z=L1(I*T,k,v)/T;if(Q=Math.max(Q,Z),a){let B=0;!c&&!u||u&&!c&&p?B=eu(y+I*T+$,a[1][0])/T:B=Jl(y+(u?M:-M)*T+$,a[0][0])/T,Q=Math.max(Q,B)}if(o){let B=0;!c&&!u||u&&!c&&p?B=Jl(y+I*T,o[1][0])/T:B=eu(y+(u?M:-M)*T,o[0][0])/T,Q=Math.max(Q,B)}}}M=M+(M<0?Q:-Q),j=j+(j<0?H:-H),s&&(p?D>I*T?M=(xM(c,u)?-j:j)/T:j=(xM(c,u)?-M:M)*T:h?(M=j/T,u=c):(j=M*T,c=u));const V=c?y+j:y,J=u?C+M:C;return{width:N+(c?-j:j),height:z+(u?-M:M),x:i[0]*j*(c?-1:1)+V,y:i[1]*M*(u?-1:1)+J}}const pU={width:0,height:0,x:0,y:0},xHn={...pU,pointerX:0,pointerY:0,aspectRatio:1};function wHn(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,c=t[1]*a;return[[r-o,s-c],[r+i-o,s+a-c]]}function kHn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Vi(e);let a={controlDirection:yM("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:h,keepAspectRatio:_,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:k,shouldResize:v}){let b={...pU},w={...xHn};a={boundaries:h,resizeDirection:p,keepAspectRatio:_,controlDirection:yM(u)};let y,C=null,N=[],z,T,j,M=!1;const D=Sq().on("start",I=>{const{nodeLookup:$,transform:q,snapGrid:H,snapToGrid:Q,nodeOrigin:V,paneDomNode:J}=t();if(y=$.get(n),!y)return;C=(J==null?void 0:J.getBoundingClientRect())??null;const{xSnapped:Z,ySnapped:B}=y0(I.sourceEvent,{transform:q,snapGrid:H,snapToGrid:Q,containerBounds:C});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...b,pointerX:Z,pointerY:B,aspectRatio:b.width/b.height},z=void 0,T=of(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(z=$.get(y.parentId)),z&&y.extent==="parent"&&(T=[[0,0],[z.measured.width,z.measured.height]]),N=[],j=void 0;for(const[L,F]of $)if(F.parentId===n&&(N.push({id:L,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const U=wHn(F,y,F.origin??V);j?j=[[Math.min(U[0][0],j[0][0]),Math.min(U[0][1],j[0][1])],[Math.max(U[1][0],j[1][0]),Math.max(U[1][1],j[1][1])]]:j=U}m==null||m(I,{...b})}).on("drag",I=>{const{transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q}=t(),V=y0(I.sourceEvent,{transform:$,snapGrid:q,snapToGrid:H,containerBounds:C}),J=[];if(!y)return;const{x:Z,y:B,width:L,height:F}=b,U={},K=y.origin??Q,{width:ne,height:ce,x:_e,y:se}=yHn(w,a.controlDirection,V,a.boundaries,a.keepAspectRatio,K,T,j),G=ne!==L,oe=ce!==F,le=_e!==Z&&G,fe=se!==B&&oe;if(!le&&!fe&&!G&&!oe)return;if((le||fe||K[0]===1||K[1]===1)&&(U.x=le?_e:b.x,U.y=fe?se:b.y,b.x=U.x,b.y=U.y,N.length>0)){const Qe=_e-Z,qe=se-B;for(const Se of N)Se.position={x:Se.position.x-Qe+K[0]*(ne-L),y:Se.position.y-qe+K[1]*(ce-F)},J.push(Se)}if((G||oe)&&(U.width=G&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ne:b.width,U.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ce:b.height,b.width=U.width,b.height=U.height),z&&y.expandParent){const Qe=K[0]*(U.width??0);U.x&&U.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const SHn={},wM=e=>{let n;const t=new Set,r=(h,_)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const m=n;n=_??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(SHn?"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,c);return c},CHn=e=>e?wM(e):wM,{useDebugValue:EHn}=tt,{useSyncExternalStoreWithSelector:NHn}=zW,zHn=e=>e;function mU(e,n=zHn,t){const r=NHn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return EHn(r),r}const kM=(e,n)=>{const t=CHn(e),r=(s,i=n)=>mU(t,s,i);return Object.assign(r,t),r},jHn=(e,n)=>e?kM(e,n):kM;function wr(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 Hy=A.createContext(null),THn=Hy.Provider,gU=uo.error001("react");function En(e,n){const t=A.useContext(Hy);if(t===null)throw new Error(gU);return mU(t,e,n)}function Sr(){const e=A.useContext(Hy);if(e===null)throw new Error(gU);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const SM={display:"none"},AHn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},vU="react-flow__node-desc",bU="react-flow__edge-desc",RHn="react-flow__aria-live",MHn=e=>e.ariaLiveMessage,OHn=e=>e.ariaLabelConfig;function DHn({rfId:e}){const n=En(MHn);return f.jsx("div",{id:`${RHn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:AHn,children:n})}function LHn({rfId:e,disableKeyboardA11y:n}){const t=En(OHn);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${vU}-${e}`,style:SM,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${bU}-${e}`,style:SM,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(DHn,{rfId:e})]})}const qy=A.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return f.jsx("div",{className:is(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});qy.displayName="Panel";const CM="https://reactflow.dev?utm_source=attribution";function IHn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(qy,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${CM}`,children:f.jsx("a",{href:CM,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const $Hn=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 BHn(e,n){return wr(e.selectedNodes.map(I1),n.selectedNodes.map(I1))&&wr(e.selectedEdges.map(I1),n.selectedEdges.map(I1))}function PHn({onSelectionChange:e}){const n=Sr(),{selectedNodes:t,selectedEdges:r}=En($Hn,BHn);return A.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const FHn=e=>!!e.onSelectionChangeHandlers;function HHn({onSelectionChange:e}){const n=En(FHn);return e||n?f.jsx(PHn,{onSelectionChange:e}):null}const yU=[0,0],qHn={x:0,y:0,zoom:1},UHn=["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"],EM=[...UHn,"rfId"],GHn=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}),NM={translateExtent:Z0,nodeOrigin:yU,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function VHn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=En(GHn,wr),u=Sr();A.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=NM,o()}),[]);const h=A.useRef(NM);return A.useEffect(()=>{for(const _ of EM){const p=e[_],m=h.current[_];p!==m&&(typeof e[_]>"u"||(_==="nodes"?n(p):_==="edges"?t(p):_==="minZoom"?r(p):_==="maxZoom"?s(p):_==="translateExtent"?i(p):_==="nodeExtent"?a(p):_==="ariaLabelConfig"?u.setState({ariaLabelConfig:LFn(p)}):_==="fitView"?u.setState({fitViewQueued:p}):_==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[_]:p})))}h.current=e},EM.map(_=>e[_])),null}function zM(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function KHn(e){var r;const[n,t]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){t(e);return}const s=zM(),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=zM())!=null&&r.matches?"dark":"light"}const jM=typeof document<"u"?document:null;function nm(e=null,n={target:jM,actInsideInputWithModifier:!0}){const[t,r]=A.useState(!1),s=A.useRef(!1),i=A.useRef(new Set([])),[a,o]=A.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(_=>typeof _=="string").map(_=>_.replace("+",` +${te.error}`:te.text,children:[te.dispatchState==="blocked"?f.jsx(bS,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(f4n,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?c8n(te.nextRetryAt,ha):y7e()}),te.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Hu(te.id),"aria-label":rJ({text:te.text}),disabled:on!==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:on===te.id?oL():Ws()}),f.jsx("button",{onClick:()=>fn(te.id),"aria-label":XZ({text:te.text}),disabled:on!==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:T5e()}),ve===Bs&&vefn(te.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:f.jsx(ur,{size:11})})]},te.id))}),kl&&f.jsxs("div",{id:Mf,role:"note",className:`composer-demo-hint ${zR}`,children:[f.jsx(mh,{size:16,className:"shrink-0 text-primary"}),f.jsx("span",{className:"flex-1",dir:"auto",children:d2e()}),f.jsx(It,{size:"small","aria-label":Xg(),title:Xg(),onClick:()=>{var te;G(!0),(te=ct.current)==null||te.focus()},children:f.jsx(ur,{size:14})})]}),b&&!oe&&c&&f.jsxs("div",{role:"note",className:`composer-demo-run-hint ${zR}`,children:[f.jsx(mh,{size:16,className:"shrink-0 text-primary"}),f.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[f.jsx("span",{children:uN()}),f.jsxs(De,{size:"small",onClick:()=>c(b,"keepOpen"),children:[f.jsx(lo,{size:14}),a3()]}),f.jsx("span",{children:lN()})]}),f.jsx(It,{size:"small","aria-label":Xg(),title:Xg(),onClick:()=>{var te;le(!0),(te=ct.current)==null||te.focus()},children:f.jsx(ur,{size:14})})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${uN()} ${a3()} ${lN()}`:""}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${Ps?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[st&&!st.agentReady&&f.jsx("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:st.catalogPending?f.jsxs("span",{children:[st.name," — ",W_()]}):f.jsxs(f.Fragment,{children:[f.jsxs("strong",{children:[st.name," ",Fwe()]})," ",st.agentNote?gh(st.agentNote):M7e()]})}),mi&&f.jsx(bDn,{skills:Lr,activeIndex:mr,onPick:mo,onHover:Ds}),sr&&f.jsx(SDn,{activeSessionId:Z,onClose:()=>Jn(!1),onResume:te=>{Jn(!1),ne("all"),y(te.id,{projectId:te.projectId})},onImport:te=>{Jn(!1),Ua(te)}}),pe.length>0&&f.jsx(VDn,{annotations:pe,onClear:()=>{be([]),window.requestAnimationFrame(()=>{var te;return(te=ct.current)==null?void 0:te.focus()})},onRemove:te=>{const ve=pe.filter(je=>je.id!==te);be(ve),ve.length===0&&window.requestAnimationFrame(()=>{var je;return(je=ct.current)==null?void 0:je.focus()})}}),qe.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:qe.map((te,ve)=>{const je=()=>He(X=>X.filter((ae,xe)=>xe!==ve));return te.mediaType==="application/pdf"?f.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:te.name,children:[f.jsx(Ob,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),f.jsx("button",{title:bN(),"aria-label":bN(),onClick:je,children:f.jsx(ur,{size:11})})]},ve):f.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:[f.jsx("img",{src:te.dataUrl,alt:ND()}),f.jsx("button",{title:yN(),"aria-label":yN(),onClick:je,children:f.jsx(ur,{size:11})})]},ve)})}),Ce&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Ce}),Le&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Le}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Ps?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:ct,"aria-describedby":kl?Mf:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:gi?hEe():pc&&st?x9e({harness:ze(su[st.id]),shortcut:ze(vc)}):$t?st!=null&&st.agentReady?Kge({harness:ze(su[$t.harness])}):Mge({harness:ze(su[$t.harness])}):Tpe(),rows:2,onPaste:vo,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),Ys(Array.from(te.dataTransfer.files)))},onChange:te=>{const ve=te.target.value,je=te.target.selectionStart;qn(je);const X=je>0&&/\s/.test(ve[je-1])&&!gi&&!Kr.current&&gR(ve)===null?o4(ve,je-1):null,ae=X&&H5(X.query),xe=X?(ve.slice(0,X.start)+ve.slice(X.end)).trim():"";if(X&&ae&&(ae==="plan"||!c4(ae)&&!xe)&&Ss.some(Re=>Re.name===ae)){Fu(ae,ve,X);return}_e(ve),Vr(!1)},onSelect:te=>qn(te.currentTarget.selectionStart),onCompositionStart:()=>{Kr.current=!0},onCompositionEnd:()=>{Kr.current=!1},onKeyDown:te=>{if(mi){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const ve=te.key==="ArrowDown"?1:-1;Ds((mr+ve+Lr.length)%Lr.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),mo(Lr[mr]);return}if(te.key==="Escape"){te.preventDefault(),Vr(!0);return}}if(te.key==="Backspace"&&go(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),Ps){Sl();return}Co({queue:te.metaKey||te.ctrlKey})}}}),f.jsx(vDn,{text:ce,editingTokenEnd:Gn==null?void 0:Gn.end,isCommand:yl,skills:Ss,projectId:e,textareaRef:ct})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:xn.ref,children:[f.jsx(It,{type:"button",className:"composer-bare",title:Q2(),"aria-label":Q2(),"aria-haspopup":"dialog","aria-expanded":xn.open,onClick:()=>xn.setOpen(te=>!te),children:f.jsx(I3n,{size:16})}),xn.open&&f.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:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:Q2()}),f.jsx(E8n,{})]})]}),f.jsx("input",{ref:en,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{Ys(Array.from(te.target.files??[])),te.target.value=""}}),f.jsx(It,{type:"button",className:"composer-attach",title:sN(),"aria-label":sN(),onClick:()=>{var te;return(te=en.current)==null?void 0:te.click()},children:f.jsx(g3n,{size:16})}),Bu&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:cN({goal:Vi(Bu)}),"aria-label":cN({goal:Vi(Bu)}),onClick:()=>void Ga("clear"),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(PI,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(ur,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{className:"truncate",children:Owe()})]}),bo&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:hN(),"aria-label":hN(),onClick:()=>void Pu(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Q4n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(ur,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:t3e()})]}),Ps&&f.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:dN(),"aria-label":dN(),onClick:Yh,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(vf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(ur,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:kD()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(fkn,{value:$t,onSelect:Ha,onOpenSettings:()=>a("harnesses"),permissionChoices:st!=null&&st.agentReady?(Wt==null?void 0:Wt.permissionModes)??[]:[],defaultPermissionId:(Wt==null?void 0:Wt.defaultPermissionMode)??null,onSelectPermission:qa,reasoningChoices:st!=null&&st.agentReady?Es.choices:[],defaultReasoningId:Es.defaultId,onSelectReasoning:$u,lockHarness:!!Gt,openRequest:ir}),f.jsx(xDn,{usage:Gt==null?void 0:Gt.contextUsage})]}),ar&&!gi?f.jsx(It,{className:"send-btn",variant:"stop",title:CN(),"aria-label":CN(),onClick:Eo,children:f.jsx(ur,{size:16})}):f.jsx(It,{className:`send-btn ${kl&&(st!=null&&st.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Ps?wN():i3(),"aria-label":Ps?wN():i3(),onClick:()=>void(Ps?Sl():Co()),disabled:Ps?!Zs||!Z&&!(st!=null&&st.agentReady):!(st!=null&&st.agentReady)||!ce.trim()&&qe.length===0&&pe.length===0,children:f.jsx(II,{size:16})})]})]})]})]})]})}const zR="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",ULn=[],GLn=[];function Aa({className:e,...n}){return f.jsx("div",{className:gs("relative flex min-h-0 flex-1 flex-col",e),...n})}function Hd({className:e,...n}){return f.jsx("div",{className:gs("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Vo({className:e,...n}){return f.jsx("div",{className:gs("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const jR=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function VLn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=ut(il(n)),h=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),_=A.useRef(null),p=A.useRef(null),m=A.useRef(!0);if(A.useLayoutEffect(()=>{m.current=!0;const v=_.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),A.useLayoutEffect(()=>{const v=_.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[h]),A.useEffect(()=>{const v=_.current,b=p.current;if(!v||!b)return;const w=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return w.observe(b),w.observe(v),()=>w.disconnect()},[h===null]),h===null)return f.jsx(Aa,{children:f.jsx("div",{className:jR,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Mfn()})})});let x=null;for(const v of h)if(x=cb(v.parts,t),x)break;return f.jsx(Aa,{children:f.jsx("div",{className:jR,ref:_,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:f.jsx("div",{ref:p,children:x?f.jsx(iH,{projectId:e,sessionId:n,children:f.jsx(ALn,{spawn:x,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Pfn()})})})})}function KLn({experiment:e}){var s;const n=ut(U$(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(Hd,{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?f.jsxs(Vo,{children:[The()," ",ze(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(TB,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(RB,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Uhe():khe()}):f.jsx(Vo,{children:Ihe()})})}function qH({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:c}){return f.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&&f.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":NNe(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:ONe()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:TD()})]}),r&&f.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:[f.jsx(Nm,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&f.jsx(Cm,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(Fb,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(It,{title:TN(),"aria-label":TN(),onClick:c,children:o?f.jsx(zt,{}):f.jsx(S3n,{size:13})})]})}const WLn=/\.(md|mdx|markdown)$/i,QLn=/\.tex$/i,XLn=/\.html?$/i,YLn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,ZLn=/\.(csv|tsv|xlsx?|ods)$/i,JLn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,eIn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,tIn=/\.pdf$/i,nIn=/\.(docx?|log|rtf|txt)$/i;function rIn(e){return YLn.test(e)}function fC(e){return WLn.test(e)}function UH(e){return QLn.test(e)}function sIn(e){return XLn.test(e)}function Nh({name:e}){const n=fC(e)?"markdown":rIn(e)?"image":ZLn.test(e)?"spreadsheet":JLn.test(e)?"code":eIn.test(e)?"archive":tIn.test(e)?"pdf":nIn.test(e)||UH(e)?"document":"file";let t;return n==="markdown"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),f.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=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),f.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),f.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=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=f.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=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),f.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),f.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 GH(e,n){const t=navigator.clipboard;if(!t){pn(OD(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>pn(K_(),"success")).catch(r=>pn(r instanceof Error?r.message:String(r),"error"))}function VH({name:e,onCommit:n,onCancel:t}){const[r,s]=A.useState(e),i=A.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(qr,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":tBe({path:ze(e)}),onFocus:o=>{const c=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,c>0?c: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 KH(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 WH({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=A.useRef(null),c=A.useRef(a);c.current=a;const[u,h]=A.useState({x:e.x,y:e.y});A.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return h({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))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),A.useEffect(()=>{const m=()=>c.current(),x=v=>{var b;(b=o.current)!=null&&b.contains(v.target instanceof Node?v.target:null)||c.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),c.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),c.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const _=m=>{c.current(),m()},p=(m,x,k=!1)=>f.jsx(Xn,{size:"compact",role:"menuitem",danger:k,onClick:()=>_(x),children:f.jsx("span",{children:m})});return oa.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":F$e({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 b,w;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((b=o.current)==null?void 0:b.querySelectorAll("button"))??[]],k=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),v=m.key==="ArrowDown"?1:-1;(w=x[(k+v+x.length)%x.length])==null||w.focus()},children:[p(W$e(),n),t&&p(CD(),t),r&&p(O$e(),r),p(wfe(),s),i&&p(SD(),i,!0)]}),document.body)}const Q5=["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(" "),TR=["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 AR(){return{dirs:new Map,files:[]}}function QH(e){const n=AR();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?f.jsx(rc,{size:13,className:TR}):f.jsx(Ba,{size:13,className:TR}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(dC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function dC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(iIn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&u)return f.jsxs("div",{className:Q5,style:{paddingInlineStart:8+t*14},children:[f.jsx(Nh,{name:p}),f.jsx(VH,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const x=Ur(k=>i(m,k));return f.jsxs("button",{type:"button",className:Q5,style:{paddingInlineStart:8+t*14},...x,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}x.onKeyDown(k)},title:wY({name:ze(m)}),children:[f.jsx(Nh,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function aIn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,z;const c=t.branchName,u=ut({...V$(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=ut({...qv(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,x=U$(t.id),k=JV({queryKey:x.queryKey})>0,v=(z=h.data)!=null&&z.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},w=A.useMemo(()=>_?QH(_.entries):null,[_]),y=r==="files"?m:k,C=A.useCallback(T=>{const j=new Set(s);j.has(T)?j.delete(T):j.add(T),a(j)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(qH,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Rb(n.githubOwner,n.githubRepo,c):void 0,githubTitle:gD({branch:ze(c)}),refreshing:y,onRefresh:()=>r==="files"?b():void tt.invalidateQueries(x)}),r==="changes"?f.jsx(KLn,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Vo,{children:KNe()}),p&&w&&f.jsxs(Vo,{children:[oze()," ",ze(p)]}),f.jsx(Hd,{children:w?w.dirs.size===0&&w.files.length===0?f.jsx(Vo,{children:eze()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(dC,{node:w,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(T,j)=>v?o(T,v,void 0,j):o(T,void 0,c,j)})}):f.jsx(Vo,{children:p?qk({error:ze(p)}):Uk()})})]})]})}function hC({icon:e,title:n,description:t}){return f.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:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function oIn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var B,L,F;const c=n.id,h=((B=ut(La(c)).data)==null?void 0:B.some(U=>U.id===e&&U.busy))??!1,_=ut({...qv(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=ut({...V$(c,m),enabled:!e||_.isSuccess,refetchInterval:h?5e3:!1}),k=x.data,v=(L=_.error??x.error)==null?void 0:L.message,b=_.isFetching||x.isFetching,[w,y]=A.useState(null),[C,N]=A.useState(null),z=A.useCallback(()=>{e&&tt.invalidateQueries(qv(e)),tt.invalidateQueries({queryKey:Nt("getCodeTree",c),predicate:U=>!lD(U)})},[e,c]),T=A.useRef(h);A.useEffect(()=>{T.current&&!h&&z(),T.current=h},[h,z]);const j=A.useMemo(()=>k?QH(k.entries):null,[k]),M=A.useCallback(U=>{const K=new Set(r);K.has(U)?K.delete(U):K.add(U),i(K)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?G1n({branch:ze(D.baselineBranch)}):Xk()),$=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,q=D?A1n({branch:ze(`${I}${$>0?"*":""}`)}):$1n({branch:ze(n.baselineBranch)}),H=D?D.branch:n.baselineBranch,Q=(U,K)=>D?a(U,e,void 0,K):a(U,void 0,n.baselineBranch,K),V=(k==null?void 0:k.root)==="worktree",J=async(U,K)=>{try{await rbn(c,U,K,{sessionId:e}),z()}catch(ne){pn(ne instanceof Error?ne.message:String(ne),"error")}},Z=U=>{const K=(k==null?void 0:k.path)??n.repoPath;GH(K,U)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(qH,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:q,branchTitle:q,githubHref:n.githubEnabled&&H?Rb(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?gD({branch:ze(H)}):void 0,refreshing:b,onRefresh:z}),v&&(p||k)&&f.jsxs(Vo,{children:[Evn()," ",ze(v)]}),!k||e&&!p?f.jsx(Hd,{children:f.jsx(Vo,{children:v?qk({error:ze(v)}):Uk()})}):D&&t==="changes"?f.jsx(Hd,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:$===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:fvn()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(TB,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(RB,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(Hd,{children:[k.truncated&&f.jsx(Vo,{children:Z1n()}),j?j.dirs.size===0&&j.files.length===0?f.jsx(hC,{icon:Su,title:bvn(),description:CGe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(dC,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(U,K)=>{y(KH(U,K))},onRename:(U,K)=>{N(null),J(U,{action:"rename",newName:K})},onCancelRename:()=>N(null)})}):f.jsx(Vo,{children:ivn()})]}),w&&f.jsx(WH,{target:w,onOpen:()=>Q(w.path,"keepOpen"),onRename:V&&o(w.path)?()=>N(w.path):void 0,onDuplicate:V?()=>void J(w.path,{action:"duplicate"}):void 0,onCopyPath:()=>Z(w.path),onDelete:V?()=>{window.confirm(N$e({path:ze(w.path)}))&&J(w.path,{action:"delete"})}:void 0,onClose:()=>y(null)})]})}function XH({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=A.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` +`),_=L$(h,TS(n));return h.endsWith(` +`)?_.slice(0,-1):_},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=A.useRef(null);A.useEffect(()=>{var h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=v$(i.length),u=A.useMemo(()=>i.map((h,_)=>f.jsxs("div",{ref:_+1===a?o:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${g$} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${Fv} ${m$}`,children:I$(h)?f.jsx("br",{}):h})]},_)),[i,c,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Fv}`,children:[i.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}function YH(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function RR({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[ctt()," ",f.jsxs("a",{href:e,download:n,children:[Ev()," ",ze(n)]})]})}function X5({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=A.useState(!1);if(A.useEffect(()=>i(!1),[e,n]),s)return f.jsx(RR,{url:n,name:t});let a;return e==="image"?a=f.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:f.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.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=f.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:f.jsx(RR,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a,r&&f.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:f.jsxs("a",{href:n,download:t,children:[Ev()," ",t]})})]})}const cIn=e=>({queryKey:Nt("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 ZH(e,n=!0){return ut({...cIn(e),enabled:n,subscribed:n}).data??null}function lIn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function uIn(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),c=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 h=u.join("/");if(!h)return null;const _=new URLSearchParams(c);_.delete("path");const p=_.toString();return{path:h,url:`${X_(e,h)}${p?`&${p}`:""}${i}`}}function _In(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const JH="orx:files-tree-width",eq="orx:artifacts-collapsed:",tq=180,nq=320,fIn=8,dIn=280;function hIn(){try{const e=Number(localStorage.getItem(JH));if(Number.isFinite(e)&&e>=tq&&e<=nq)return e}catch{}return dIn}function pIn(e){try{const n=localStorage.getItem(`${eq}${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 K0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=K0(t.children??[],n);if(r)return r}}return null}function rq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(lIn(i))return i;const a=uIn(e,n,i);if(!a)return null;const o=K0(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};return f.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:f.jsx(Jzn,{remarkPlugins:[eH,[tH,oH]],rehypePlugins:[jF],components:{a:({href:i,children:a,...o})=>{const c=!i||i.startsWith("#"),u=c?i:s(i);return u?f.jsx("a",{...o,href:u,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...cH},children:rH(_In(t))})})}function mIn(e){return e.presentation==="text"&&fC(e.name)?"markdown":YH(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function gIn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=WL,i=u6(e,n.path),a=ut({...i,enabled:s,subscribed:s}),o=A.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});A.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&tt.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((u=a.error)==null?void 0:u.message)??(c===null?jfe():null),wantsText:s}}function vIn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=mIn(n),i=ZH(X_(e,n.path)),{text:a,binary:o,truncated:c,error:u,wantsText:h}=gIn(e,n,s,i),[_,p]=A.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),k=`${X_(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let v;return s==="image"||s==="audio"||s==="video"||s==="pdf"?v=f.jsx(X5,{kind:s,url:k,name:n.name}):s==="download"||!h||o?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?pfe():mhe()," ",f.jsx("a",{href:k,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?DD():Lfe()})]}):u?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[lde()," ",ze(u)]}):a===null?v=f.jsxs(Gr,{children:[f.jsx(zt,{})," ",xD()]}):m&&!_?v=f.jsx(rq,{projectId:e,folder:x,markdown:a,entries:r}):v=f.jsx(XH,{text:a,path:n.path}),f.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:[f.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:[f.jsx(Nh,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":ze(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[qde()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:el(n.size)}),m&&f.jsx(It,{size:"small",active:_,"data-tip":_?Cv():Nd(),"data-tip-align":"end","aria-label":_?Cv():Nd(),onClick:()=>p(b=>!b),children:f.jsx(D3,{size:13})}),f.jsx(Cm,{size:"small",href:k,target:"_blank",rel:"noopener noreferrer","data-tip":XE(),"data-tip-align":"end","aria-label":XE(),children:f.jsx(Z_,{size:13})}),f.jsx(It,{size:"small","data-tip":QE(),"data-tip-align":"end","aria-label":QE(),onClick:()=>{window.confirm(Pk({path:ze(n.path)}))&&t(n.path)},children:f.jsx(bf,{size:13})})]}),f.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&&!_?"doc":""}`,children:[v,c&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:mde()})]})]})}function sq({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,onCancelRename:_}){return f.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,fIn)*14};if(p.isDir){const k=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.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:[f.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":k?H_e({name:ze(p.name)}):cfe({name:ze(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:f.jsx(Ba,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(It,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":nde(),"data-tip-align":"end","aria-label":tfe({name:ze(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(Pk({path:ze(p.path)}))&&o(p.path)},children:f.jsx(bf,{size:12})})]}),k&&(((x=p.children)==null?void 0:x.length)??0)>0&&f.jsx(sq,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,onCancelRename:_})]},p.path)}return c===p.path?f.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:[f.jsx(Nh,{name:p.name}),f.jsx(VH,{name:p.name,onCommit:k=>h(p.path,k),onCancel:_})]},p.path):f.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:DQ({path:ze(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[f.jsx(Nh,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function bIn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=A.useState(null),[a,o]=A.useState(()=>pIn(e.id)),[c,u]=A.useState(hIn),[h,_]=A.useState(null),[p,m]=A.useState(null),x=A.useRef(null);A.useEffect(()=>{try{localStorage.setItem(`${eq}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=z=>{var I;z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId);const T=(I=x.current)==null?void 0:I.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=$=>{const q=Math.round($.clientX-((T==null?void 0:T.left)??0)),H=Math.min(Math.max(q,tq),nq);u(H);try{localStorage.setItem(JH,String(H))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};A.useEffect(()=>{if(!s||!n)return;const z=K0(n.entries,s);(!z||z.isDir)&&i(null)},[s,n]);const v=z=>o(T=>{const j=new Set(T);return j.has(z)?j.delete(z):j.add(z),j}),b=z=>{(s===z||s!=null&&s.startsWith(z+"/"))&&i(null),lyn(e.id,z).catch(()=>{})},w=async(z,T)=>{try{await uyn(e.id,z,T),T.action==="rename"&&s===z&&i(null)}catch(j){pn(j instanceof Error?j.message:String(j),"error")}},y=z=>{n&&GH(n.dir,z)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(Gr,{className:"p-5",children:[f.jsx(zt,{})," ",Lde()]})});const C=z=>f.jsx(sq,{entries:z,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(T,j)=>{_(KH(T,j))},onRename:(T,j)=>{m(null),w(T,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),N=s?K0(n.entries,s):null;return n.entries.length===0?f.jsx(hC,{icon:pS,title:Xde(),description:lhe()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.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:c},children:[f.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:k}),f.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&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:kde()})]})]}),N?f.jsx(vIn,{projectId:e.id,entry:N,onDelete:b,artifactEntries:n.entries},N.path):f.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:[f.jsx(f3n,{size:22,strokeWidth:1.5}),f.jsx("span",{children:qfe()})]}),h&&f.jsx(WH,{target:h,onOpen:()=>t(h.path),onRename:r(h.path)?()=>m(h.path):void 0,onDuplicate:()=>void w(h.path,{action:"duplicate"}),onCopyPath:()=>y(h.path),onDelete:()=>{window.confirm(Pk({path:ze(h.path)}))&&b(h.path)},onClose:()=>_(null)})]})}const iq=20*1024*1024,aq="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",oq="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",yIn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",xIn="text-sm font-normal text-text",wIn="mt-1 mb-0 text-sm leading-relaxed text-text";function cq(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 kIn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function lq({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=A.useState(!1),a=A.useRef(null);return f.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 c=(u=o.dataTransfer.files)==null?void 0:u[0];c&&r(c)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var c;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(c=a.current)==null||c.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const c=(u=o.target.files)==null?void 0:u[0];c&&r(c),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(zt,{}),f.jsx("span",{children:Jon()})]}):f.jsxs(f.Fragment,{children:[f.jsx(F3n,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function uq({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[el(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",co(n)]})]})}function SIn({skill:e,onError:n}){const t=an({mutationFn:Myn}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:xIn,children:e.name}),e.origin&&f.jsx(Ut,{size:"small",children:e.origin})]}),f.jsx(uq,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(It,{size:"small","data-tip":e.origin?nan():Yan(),"data-tip-align":"end","aria-label":e.origin?man({name:ze(e.name)}):Wsn({name:ze(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?lan({name:ze(e.name)}):Fsn({name:ze(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(bf,{size:13})})]})}function CIn({template:e,onError:n}){const t=an({mutationFn:Tyn}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:yIn,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:wIn,children:[e.entry,s>0&&(s===1?Hin():kan({count:Xt(s)}))]})]}),f.jsx(uq,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(It,{"data-tip":son(),"data-tip-align":"end","aria-label":cin({name:ze(e.name)}),disabled:r,onClick:()=>{window.confirm(tin({name:ze(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:f.jsx(bf,{size:13})})]})}function EIn(){var w;const e=an({mutationFn:Ryn}),n=ut(Sxn()),t=n.data,r=A.useRef(null),[s,i]=A.useState(!1),[a,o]=A.useState(!1),c=A.useCallback(()=>{const y=r.current;i(!!y&&y.scrollTop>1),o(!!y&&y.scrollHeight-y.scrollTop-y.clientHeight>1)},[]);A.useLayoutEffect(()=>{c();const y=r.current;if(!y)return;const C=new ResizeObserver(c);return C.observe(y),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(w=n.error)==null?void 0:w.message,[_,p]=A.useState(!1),[m,x]=A.useState(null),k=()=>{n.refetch()},v=A.useRef(!1),b=A.useCallback(async y=>{if(!v.current){if(x(null),!kIn(y.name)){x(dcn());return}if(y.size>iq){x(AL());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:y.name,contentBase64:await cq(y)})}catch(C){x(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:aq,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:Von()}),f.jsxs(De,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[f.jsx(Pa,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",km()]})]}),f.jsx("p",{className:oq,children:pin()}),f.jsx(lq,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:win()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:Osn()})]}),onFile:y=>void b(y)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Tan()," ",h]}),t===void 0?h?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(zt,{})," ",von()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Ron()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(y=>f.jsx(SIn,{skill:y,onError:x},y.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function NIn(){var h;const e=an({mutationFn:jyn}),n=ut(kxn()),t=n.data,r=(h=n.error)==null?void 0:h.message,[s,i]=A.useState(!1),[a,o]=A.useState(null),c=A.useRef(!1),u=A.useCallback(async _=>{if(c.current)return;o(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(ycn());return}if(_.size>iq){o(AL());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await cq(_)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return f.jsxs("section",{className:aq,children:[f.jsx("h3",{children:_on()}),f.jsx("p",{className:oq,children:acn()}),f.jsx(lq,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:jin()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:odn()})]}),onFile:_=>void u(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Ian()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(zt,{})," ",Con()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Bon()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(CIn,{template:_,onError:o},_.name))})]})}function zIn(){return f.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:[f.jsx("h1",{children:Uan()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:Qin()}),f.jsx(EIn,{}),f.jsx(NIn,{})]})}const jIn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Fc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return f.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?jIn:""}`,onClick:i,onDoubleClick:a,title:s?edn({label:n}):n,"aria-label":s?Kfn({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:hNe(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:f.jsx(ur,{size:12})})]})}const MR=["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 TIn({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:MR,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:MR,href:Rb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Sv({name:ze(t)}),children:[f.jsx("code",{children:t}),f.jsx(Fb,{size:12})]})}const g4=["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(" "),OR=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function DR(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function LR(e,n){return T0((e.endedAt??n)-e.createdAt)}function AIn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=r.some(h=>h.status==="running"||h.status==="starting"),[c,u]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!o)return;u(Date.now());const h=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(h)},[o]),f.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:f.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:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(al,{status:a?Xi(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(De,{...Ur(h=>s(a.id,h)),children:[f.jsx(lo,{size:15}),YDe()]}),f.jsxs(De,{...Ur(i),children:[f.jsx(Db,{size:15}),nDe()]})]}),e.description&&f.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:[f.jsx("h2",{children:kDe()}),f.jsx(Jo,{text:e.description})]}),f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:a?QOe():CLe()}),a&&f.jsxs(f.Fragment,{children:[f.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:[f.jsx(al,{status:Xi(a)}),f.jsx(jS,{backend:a.backend}),f.jsxs("span",{title:vLe(),children:[f.jsx(Ywn,{size:13}),DR(a.createdAt)]}),f.jsxs("span",{title:TDe(),children:[f.jsx(u4n,{size:13}),LR(a,c)]}),a.commitSha&&f.jsxs("span",{title:lDe(),children:[f.jsx(P4n,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[IDe()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:OR,children:["$ ",a.command]}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx(Jo,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:"Git"}),f.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:[f.jsx(TIn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[UDe()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:DR(e.createdAt),children:[mDe()," ",co(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:OR,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:g4,children:[f.jsx("h2",{children:_Le()}),f.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((h,_)=>f.jsxs("button",{...Ur(p=>s(h.id,p)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[sLe()," ",r.length-_]}),f.jsx(al,{status:Xi(h)}),f.jsx("span",{children:co(h.createdAt)}),f.jsx("span",{children:LR(h,c)}),f.jsx(lo,{size:13})]},h.id))})]})]})})}function IR(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}=Ib(t,!0);let i=!1,a=0,o=!1,c=!1;async function u(){if(o){c=!0;return}o=!0;try{for(;;){const _=await Yvn(e,a);if(i)return;if(_.dataBase64&&r.write(IR(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=Rxn(e,_=>{if(i)return;const p=IR(_.dataBase64);!o&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function MIn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,_)=>_.createdAt-h.createdAt);return t==="overview"?f.jsx(AIn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,_)=>o("terminal",h,_),onOpenCode:h=>c("files",h)}):f.jsx(OIn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function OIn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=A.useState(null),[a,o]=A.useState(null),[c,u]=A.useState(!1),h=A.useRef(null),_=t?n.find(v=>v.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),x=v=>{const b=n.findIndex(w=>w.id===v);return b===-1?n.length:n.length-b};A.useEffect(()=>{if(!c)return;const v=b=>{var w;(w=h.current)!=null&&w.contains(b.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function k(){if(_){i(null),o(_.id);try{await PL(_.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.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:[f.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}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(De,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[f.jsx(DI,{size:13}),m?hze():RD()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[f.jsxs(De,{title:PMe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[f.jsxs("span",{children:[AN()," ",x(_.id)]}),f.jsx(al,{status:m?"cancelling":Xi(_)}),f.jsx(rc,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&f.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(v=>f.jsxs(Xn,{className:"justify-start",active:v.id===(_==null?void 0:_.id),onClick:()=>{r(v.id),u(!1)},children:[f.jsxs("span",{className:"font-medium",children:[AN()," ",x(v.id)]}),f.jsx(al,{status:Xi(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:co(v.createdAt)})]},v.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(RIn,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?ro():NMe()})})]})}let Y5=!1;function $R(e){Y5=!0;try{return window.confirm(e)}finally{Y5=!1}}const Z5=e=>e.replace(/\r\n/g,` +`),BR=(e,n,t)=>{const r=Z5(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r +`),conflict:null}},Gc=e=>e.draft!==e.baseline,DIn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),LIn=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function IIn(e,n,t){return!Gc(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class $In{constructor(){Fs(this,"buffer",null);Fs(this,"listeners",new Set);Fs(this,"saving",!1);Fs(this,"saveError",null);Fs(this,"revision",0);Fs(this,"saveRevision",0);Fs(this,"getSnapshot",()=>this.buffer);Fs(this,"getRevision",()=>this.revision);Fs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Fs(this,"set",n=>{this.buffer=n,this.notify()});Fs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Fs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Fs(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&&(Gc(this.buffer)||this.buffer.conflict!==null)}}function BIn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var J,Z,B;const c=ut({...uSn(),enabled:r,subscribed:r}),u=((J=c.data)==null?void 0:J.engine)??(c.isPending?void 0:null),h=((Z=c.data)==null?void 0:Z.hint)??null,_=((B=c.data)==null?void 0:B.installCommand)??null,[p,m]=A.useState(!1),[x,k]=A.useState(null),[v,b]=A.useState(null),[w,y]=A.useState(!1),[C,N]=A.useState(null),[z,T]=A.useState(null),[j,M]=A.useState(!1),[D,I]=A.useState(0),$=A.useCallback(L=>{M(L),L&&I(F=>F+1)},[]),q=A.useRef(o);q.current=o;const H=A.useRef(!1),Q=A.useRef(null),V=A.useCallback(()=>{if(H.current)return;Q.current=n,H.current=!0,m(!0);const L=q.current;T(null),b(null),N(null),obn(e,n,{sessionId:t}).then(F=>{var K,ne;const U=F.pdfPath;if(F.ok&&U){k(ce=>({path:U,version:((ce==null?void 0:ce.version)??0)+1,source:L})),y(F.hadErrors),N(F.note),F.hadErrors&&b(((K=F.log)==null?void 0:K.trim())||null),$(!0);return}k(null),y(!1),N(F.note),M(!1),b(((ne=F.log)==null?void 0:ne.trim())||xZe())}).catch(F=>{k(null),y(!1),N(null),M(!1),T(F instanceof Error?F.message:String(F))}).finally(()=>{H.current=!1,m(!1)})},[e,n,t,$]);return A.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&V()},[r,s,a,u,n,V]),{engine:u,installHint:h,installCommand:_,compiling:p,compiled:x,stale:x!==null&&x.source!==o,log:v,builtWithErrors:w,note:C,error:z,showPdf:j,setShowPdf:$,viewNonce:D,compile:()=>{i==null||i(),V()},dismiss:()=>{T(null),b(null)}}}const PIn=3e4,FIn=3e4,HIn=5*6e4;function qIn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var _e,se,G,oe;const u=A.useMemo(()=>fSn(e,n,{sessionId:t}),[e,n,t]),h=ut({...u,enabled:r,subscribed:r}),_=((_e=h.data)==null?void 0:_e.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((G=h.data)==null?void 0:G.link)??null,x=!h.isPending,[k,v]=A.useState(null),[b,w]=A.useState(0),[y,C]=A.useState(!1),[N,z]=A.useState(null),[T,j]=A.useState(null),[M,D]=A.useState(!1),I=A.useCallback(le=>{An(u.queryKey)&&tt.setQueryData(u.queryKey,pe=>pe&&{...pe,hasSession:le})},[u]),$=A.useCallback(le=>{An(u.queryKey)&&tt.setQueryData(u.queryKey,le)},[u]);A.useEffect(()=>{z(null),w(0),L.current=!1,j(null),D(!1),V.current=!1},[r,e,n,t]),A.useEffect(()=>{D(!1)},[a]);const q=A.useRef(!1),H=A.useRef(c);H.current=c;const Q=A.useRef(o);Q.current=o;const V=A.useRef(!1),J=A.useCallback(le=>!_||!m||q.current||Q.current?!1:(q.current=!0,C(!0),j(null),gbn(e,n,{sessionId:t,resolve:le}).then(pe=>{V.current=!1,z(pe),pe.pulled.includes(n)&&(Q.current?D(!0):H.current(pe.pulled))}).catch(pe=>{V.current=!0,z(null),j(pe instanceof Error?pe.message:String(pe))}).finally(()=>{q.current=!1,C(!1)}),!0),[e,n,t,_,m]),Z=A.useRef(null),B=(k==null?void 0:k.state)==="live";A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||B)return;const le=`${n}:${m.projectId}:${a}`;Z.current!==le&&J()&&(Z.current=le)},[r,s,x,_,m,n,a,o,y,J,B]);const L=A.useRef(!1);!y&&N&&N.conflicts.length===0&&!T&&(L.current=!0);const F=r&&x&&!!m&&_&&p&&L.current,U=A.useRef(null),K=A.useRef(Promise.resolve()),ne=A.useRef(!1);ne.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ce=A.useRef(!1);return A.useEffect(()=>{if(!F)return;let le=!1;const pe=()=>{const Me=ce.current;ce.current=!1,!(!Me&&ne.current)&&(K.current=K.current.then(()=>{if(!le)return fbn(e,n,{sessionId:t,retry:Me}).then(we=>{var qe;le||((U.current===null||((qe=we.status)==null?void 0:qe.state)==="stopped")&&v(we.status),U.current=we.key)}).catch(we=>{le||v({state:"stopped",error:we instanceof Error?we.message:String(we),needsSession:!1,note:null})})}))};pe();const be=setInterval(pe,FIn);return()=>{le=!0,clearInterval(be),U.current=null,v(null),K.current=K.current.then(()=>dbn(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),A.useEffect(()=>$xn(le=>{if(le.key===U.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(Q.current?D(!0):H.current(le.paths))}}),[n]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||B)return;const le=setInterval(()=>{q.current||V.current||tt.fetchQuery({...dSn(e,n,{sessionId:t}),staleTime:0}).then(pe=>{pe.remoteChanged&&J()}).catch(pe=>{V.current=!0,j(pe instanceof Error?pe.message:String(pe))})},PIn);return()=>clearInterval(le)},[r,s,x,_,m,o,e,n,t,J,B]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||!B)return;const le=setInterval(J,HIn);return()=>clearInterval(le)},[r,s,x,_,m,B,J]),{hasToken:_,hasSession:p,live:k,retryLive:()=>{ce.current=!0,w(le=>le+1)},link:m,loaded:x,syncing:y,last:N,error:T??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:bbn(e,n,{sessionId:t}),saveToken:async le=>{const pe=await HL(le);Z.current=null,V.current=!1,j(null),An(u.queryKey)&&tt.setQueryData(u.queryKey,be=>be&&{...be,hasToken:pe.hasToken})},saveSession:async le=>{const pe=await qL(le,{host:m==null?void 0:m.host});I(pe.hasSession),ce.current=!0,w(be=>be+1)},importSession:async()=>{const le=await _bn({host:m==null?void 0:m.host});return I(le.hasSession),ce.current=!0,w(pe=>pe+1),le.source},linkProject:async le=>{z(null),v(null),L.current=!1,Z.current=null,$(await pbn(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{$(await mbn(e,n,{sessionId:t})),Z.current=null,V.current=!1,z(null),j(null)},sync:le=>{V.current=!1,J(le)&&(Z.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const PR=[{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"]}],UIn=4e6,GIn=200,FR=16e6,VIn=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)}),HR=e=>e.startsWith("//")?`https:${e}`:e;async function KIn(e,n){var s;let t=UIn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:c}of e){if(r.has(o)){const x=r.get(o);x&&i.setAttribute(a,x);continue}if(n.aborted)return;if(r.size>=GIn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!c.some(x=>h.startsWith(x))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await VIn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function WIn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(PR.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of PR){if(!o.matches(c))continue;const _=o.getAttribute(u);if(!_)continue;const p=n(_);p&&(p===_?o.setAttribute(u,HR(_)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await KIn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!w6(c)||(o.setAttribute("href",HR(c)),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 QIn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${FR-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>FR}}function XIn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=A.useState(null);return A.useEffect(()=>{let o=!1;const c=new AbortController;return a(null),QIn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await WIn(u,s,c.signal),partial:h})).then(u=>{o||a(u)}),()=>{o=!0,c.abort()}},[e,n,t,s]),i===null?f.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[f.jsx(zt,{})," ",LD()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:MFe()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:PFe({name:ze(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function YIn({overleaf:e}){var _;const n=A.useRef(null),{open:t,setOpen:r,ref:s}=_o(n),i=A.useId(),[a,o]=A.useState({top:0,left:0,maxHeight:0}),c=((_=e.last)==null?void 0:_.conflicts.length)??0,u=e.hasToken&&!!e.error,h=u?l3():c?wmt():!e.hasToken||!e.link?Ibt():e.syncing?nL():e.blocked?tL():ZD();return A.useEffect(()=>{c&&r(!0)},[c,r]),A.useEffect(()=>{u&&pn(l3(),"error",{id:i,duration:5e3})},[u,e.error,i]),A.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 k=()=>r(!1),v=b=>{var w;b.target instanceof Node&&!((w=s.current)!=null&&w.contains(b.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),f.jsxs(f.Fragment,{children:[f.jsx(It,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":wZ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?f.jsx(zt,{}):f.jsx(h4n,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&oa.createPortal(f.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":xL(),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:[f.jsx("div",{className:"absolute end-3 top-3",children:f.jsx(It,{size:"small","aria-label":eFe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:f.jsx(ur,{size:13})})}),f.jsx(n$n,{overleaf:e})]}),document.body)]})}const j1=e=>Vi(new Intl.ListFormat(E()).format(e.map(ze)));function ZIn(e){if(e.error)return cgt();if(e.syncing)return nL();if(e.blocked)return tL();const n=e.last;return n?n.pulled.length&&n.pushed.length?Xvt({pulled:j1(n.pulled),pushed:j1(n.pushed)}):n.pulled.length?qvt({paths:j1(n.pulled)}):n.pushed.length?rbt({paths:j1(n.pushed)}):n.conflicts.length?l1t():ZD():jvt()}function JIn({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:eL()})}function e$n(e){return e.state==="live"?jgt():e.state==="connecting"?wgt():e.error??qgt()}function qR({overleaf:e,replacing:n}){const[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[c,u]=A.useState(null),h=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)))},_=a?Xbt():n?ubt():Hmt();return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("p",{className:"text-sm text-subtext",children:_}),a&&f.jsx(qr,{className:"basis-full min-w-0","aria-label":c3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:c3(),autoComplete:"off"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&f.jsx(zt,{}),a?f.jsx(De,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?ia():pmt()}):f.jsx(De,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:Qmt()}),f.jsx(De,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?JD():Lvt()})]}),c&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function t$n({overleaf:e}){if(!e.hasSession)return f.jsx(qR,{overleaf:e});const n=e.live;if(!n)return f.jsx("p",{className:"text-sm text-subtext",children:Xgt()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),f.jsx("span",{className:"min-w-0 break-words",children:e$n(n)})]}),n.note&&f.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&f.jsx("div",{children:f.jsx(De,{onClick:e.retryLive,children:Lgt()})}),t&&f.jsx(qR,{overleaf:e,replacing:!0})]})}function n$n({overleaf:e}){var p,m,x;const[n,t]=A.useState(""),[r,s]=A.useState(!1),[i,a]=A.useState(null),[o,c]=A.useState(!1),u=()=>{t(""),a(null),c(!0)},h=!e.hasToken||o;async function _(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){const k=((p=e.last)==null?void 0:p.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[f.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&f.jsx(zt,{}),e.error?l3():ZIn(e)]}),e.error&&f.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),f.jsx(t$n,{overleaf:e}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(De,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?gbt():((m=e.live)==null?void 0:m.state)==="live"?lyt():void 0,onClick:()=>e.sync(),children:e.error?Ws():nvt()}),f.jsxs(ph,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[q1t()," ",f.jsx(Z_,{size:12})]})]}),k.map(v=>f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsxs("p",{className:"break-words text-accent-red",children:[f.jsx("code",{className:"font-mono",children:v})," ",j1t()]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:L1t()}),f.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:wvt()})]})]},v)),((x=e.last)==null?void 0:x.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),f.jsxs("details",{className:"border-t border-border pt-3",children:[f.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:f.jsx("span",{className:"ms-2",children:tS()})}),f.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[f.jsx(De,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:hz()}),f.jsx(ph,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:eL()}),f.jsx(De,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:lvt()})]})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:_,children:[f.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?wyt():jyt()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx(qr,{className:"basis-full min-w-0","aria-label":h?fz():dz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?fz():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(De,{type:"submit",disabled:r||!n.trim(),children:r?h?ia():ta():h?Tbt():pgt()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?jmt():dz()})]}),(i||e.error)&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(JIn,{href:e.uploadUrl}),o?f.jsx(De,{variant:"ghost",type:"button",onClick:()=>c(!1),children:JD()}):e.hasToken&&f.jsx(De,{variant:"ghost",type:"button",onClick:u,children:hz()})]})]})}function r$n({command:e}){const[n,t]=A.useState("idle"),r=A.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 f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.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}),f.jsx(It,{"data-tip":n==="copied"?K_():n==="select"?bUe():WBe(),"aria-label":hPe(),onClick:()=>void s(),children:n==="copied"?f.jsx(Ai,{size:13}):f.jsx(gf,{size:13})})]})}function UR(e){const[n,t]=A.useState(!1),[r,s]=A.useState(null);return{busy:n,error:r,trigger:async()=>{t(!0),s(null);try{await e()}catch(a){s(a instanceof Error?a.message:String(a))}finally{t(!1)}}}}function s$n({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:_,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:w,showSource:y=!1,onShowSourceChange:C}){var _n,wr;const N=W$(e,n,t??"repo",r,s),z=ut({...N,enabled:!k.saving}),T=z.data??null,j=((_n=z.error)==null?void 0:_n.message)??null,M=Ve=>{Jr(N.queryKey,ct=>(typeof Ve=="function"?Ve(ct??null):Ve)??void 0)},[D,I]=A.useState(0),$=t==="artifacts",q=t==="abs",H=fC(n),Q=UH(n),V=sIn(n),J=H||V,[Z,B]=A.useState(!1),L=!b||Z,F=()=>{B(!0),w==null||w()};A.useSyncExternalStore(k.subscribe,k.getRevision);const U=k.getSnapshot(),K=k.set,ne=k.saving,ce=k.setSaving,_e=k.saveRevision,se=k.saveError,G=k.setSaveError,oe=A.useRef(null),le=A.useRef(null),[pe,be]=A.useState(!1),Me=A.useRef(c),we=(T==null?void 0:T.file)??null,qe=U&&Gc(U)?U.path:(T==null?void 0:T.source)==="checkout"?T.file.path:n,He=qe.split("/").slice(0,-1).join("/"),Ce=(T==null?void 0:T.source)==="artifact",ot=A.useCallback(Ve=>{var ct;return((ct=s5(He,Ve,q))==null?void 0:ct.path)??null},[q,He]),Qe=A.useCallback(Ve=>q?FL(Ve):Ce?X_(e,Ve):g3(e,Ve,{sessionId:r,ref:s}),[Ce,s,q,e,r]),it=A.useCallback(Ve=>{if(w6(Ve))return Ve;const ct=s5(He,Ve,q);return ct?D7n(Qe(ct.path),ct):null},[q,He,Qe]),Ct=YH(we==null?void 0:we.presentation),Ht=(T==null?void 0:T.source)==="artifact"&&!$,pt=$&&(T==null?void 0:T.source)==="checkout",_t=!s&&(T==null?void 0:T.source)==="checkout"&&we!=null&&!we.notFound,Le=r!=null&&(T==null?void 0:T.source)==="checkout"&&T.file.root==="clone",me=_t&&we!=null&&!we.binary&&!we.truncated&&!Ct&&!Le,Ae=me&&we.version===void 0,Be=U!==null&&Gc(U),rt=!Ae&&(me&&typeof we.version=="string"||Be),ft=(U==null?void 0:U.draft)??Z5((we==null?void 0:we.content)??""),St=(U==null?void 0:U.baseline)??Z5((we==null?void 0:we.content)??""),gt=rt&&U!==null&&Gc(U),Kt=async Ve=>{const ct=k.getSnapshot();if(!rt||!ct||!Gc(ct))return!0;if(k.saving)return!1;if(ct.conflict&&Ve===void 0)return G(ct.conflict.exists?RN():DN()),!1;const sr=ct.draft,Jn=LIn(ct);ce(!0),G(null);try{await tt.cancelQueries(N);const xn=await nbn(e,qe,Jn,{sessionId:r,expectedVersion:Ve??ct.version});return k.getSnapshot()?(k.saved(sr,xn.version),M(Hn=>Hn&&Hn.source==="checkout"?{source:"checkout",file:{...Hn.file,content:Jn,version:xn.version}}:Hn),!0):!1}catch(xn){if(xn instanceof m3){const Tr=k.getSnapshot();return!Tr||!Gc(Tr)||K({...Tr,conflict:{currentVersion:xn.currentVersion,exists:xn.exists}}),!1}return G(xn instanceof Error?xn.message:String(xn)),!1}finally{ce(!1)}},en=Q&&_t&&!Le,Ke=BIn({projectId:e,filePath:qe,sessionId:r,enabled:en,autoRun:L,onManualAction:F,ready:we!=null&&!we.notFound,source:rt?ft:(we==null?void 0:we.content)??""}),vt=qIn({projectId:e,filePath:qe,sessionId:r,enabled:en,autoRun:L,onManualAction:F,savedSource:St,dirty:gt,onPulled:A.useCallback(Ve=>{Ve.includes(qe)&&I(ct=>ct+1)},[qe])}),In=Q&&Ke.showPdf&&Ke.compiled!=null,tn=Ae&&Be,yn=(rt||tn)&&!(J&&!y)&&!In,yr=we!==null&&!we.notFound&&!we.binary&&!Ct&&!In,Pn=yr&&!yn&&(!V||y),$n=async()=>{if(we)try{if(we.truncated&&!yn){const Ve=fetch(Qe(qe)).then(async ct=>{if(!ct.ok)throw new Error;return new Blob([await ct.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":Ve})])}else await navigator.clipboard.writeText(yn?ft:we.content);be(!0),window.setTimeout(()=>be(!1),1500)}catch{pn(oPe(),"error")}},Fn=Ve=>{if(!Ve.metaKey&&!Ve.ctrlKey||Ve.altKey||Ve.shiftKey||Ve.key.toLowerCase()!=="a"||!(Ve.target instanceof Node)||!Ve.currentTarget.contains(Ve.target))return;const ct=le.current;if(!ct)return;Ve.preventDefault();const sr=document.createRange();sr.selectNodeContents(ct);const Jn=window.getSelection();Jn==null||Jn.removeAllRanges(),Jn==null||Jn.addRange(sr)},Yn=Ke.compiled?`${g3(e,Ke.compiled.path,{sessionId:r})}&v=${Ke.compiled.version}`:null,Dr=Yn?`${Yn}&view=${Ke.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,bt=Ke.compiled?Ke.compiled.path.split("/").pop()??Ke.compiled.path:null,ln=async()=>{gt&&!await Kt()||Q&&Ke.engine&&Ke.compile()},En=async()=>{gt&&(L?await ln():await Kt())},on=UR(()=>sbn(e,qe,{sessionId:r})),dr=UR(()=>ibn(e,qe,{sessionId:r})),sn=v?JHe():we!=null&&we.notFound?$N():s?VHe({branch:ze(s)}):_t?null:aqe(),gn=A.useCallback(()=>{k.saving||I(Ve=>Ve+1)},[k]),Zn=()=>{K(null),G(null),gn()},yt=ZH(Qe(qe),!s&&!ne);A.useEffect(()=>{if(!j||s)return;const Ve=window.setInterval(()=>{document.visibilityState!=="hidden"&&gn()},2e3);return()=>window.clearInterval(Ve)},[j,s,gn]);const jt=`${Qe(qe)}&v=${encodeURIComponent(yt??m??"")}&reload=${D}`;A.useEffect(()=>{var sr,Jn;if(!T||k.saving)return;const Ve=T,ct=k.getSnapshot();if(ct&&Gc(ct)){const xn=Ve.source==="checkout"?Ve.file:null,Tr=xn!==null&&xn.path===ct.path&&(!r||xn.root==="worktree"),Hn=IIn(ct,Tr&&typeof xn.version=="string"?xn.version:null,Tr&&!xn.notFound);Hn&&(Hn.currentVersion!==((sr=ct.conflict)==null?void 0:sr.currentVersion)||Hn.exists!==((Jn=ct.conflict)==null?void 0:Jn.exists))?K({...ct,conflict:Hn}):!Hn&&ct.conflict&&K({...ct,conflict:null})}(!ct||!Gc(ct))&&Ve.source==="checkout"&&!Ve.file.notFound&&!Ve.file.binary&&!Ve.file.truncated&&typeof Ve.file.version=="string"&&(K(BR(Ve.file.path,Ve.file.content,Ve.file.version)),G(null))},[T,k,r,ne,_e]);const zn=JSON.stringify(N.queryKey),xr=A.useRef({sourceKey:zn,nonce:D,artifactVersion:m,diskVersion:yt});A.useEffect(()=>{const Ve=xr.current;xr.current={sourceKey:zn,nonce:D,artifactVersion:m,diskVersion:yt},Ve.sourceKey===zn&&(Ve.nonce!==D||Ve.diskVersion!==null&&Ve.diskVersion!==yt||Ve.artifactVersion!=null&&Ve.artifactVersion!==m)&&hSn(e,n,t??"repo",r,s)},[zn,D,m,yt,e,n,t,r,s]),A.useLayoutEffect(()=>{const Ve=oe.current,ct=Me.current;!Ve||!we||!ct||(Ve.scrollTop=ct.top,Ve.scrollLeft=ct.left)},[we]);const rr=Ve=>{if(Ve.source==="absolute")return bHe();if($)return iHe({root:r?Jg():Zg()});if(s)return fHe({branch:ze(s)});if(r&&Ve.source==="checkout"&&Ve.file.root==="clone")return vGe();const ct=Ve.source==="checkout"?Ve.file.root:Ve.checkoutRoot;return EHe({root:ct==="worktree"?Jg():Zg()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:Fn,children:[f.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:[f.jsx(Nh,{name:qe}),f.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":ze(qe),children:qe.split("/").pop()||qe}),a&&f.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:HQ({branch:ze(a)}),children:[f.jsx(Nm,{size:11}),a]}),yn&&(ne||gt||se)&&f.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?ia():sGe()),children:ne?f.jsxs(f.Fragment,{children:[f.jsx(zt,{})," ",fUe()]}):se?iUe():ID()}),Q&&Ke.compiled&&f.jsx(It,{size:"small",active:!Ke.showPdf,"data-tip":Ke.stale&&Ke.showPdf?Nqe():Ke.showPdf?Nd():HN(),"data-tip-align":"end","aria-label":Ke.showPdf?Nd():HN(),onClick:()=>Ke.setShowPdf(!Ke.showPdf),children:Ke.showPdf?f.jsx(D3,{size:13}):f.jsx(Ob,{size:13,className:Ke.stale?"text-accent-amber":void 0})}),Q&&Yn&&bt&&f.jsx(Cm,{size:"small","data-tip":Ke.stale?dFe({name:ze(bt)}):BE({name:ze(bt)}),"data-tip-align":"end","aria-label":BE({name:ze(bt)}),href:Yn,download:bt,children:f.jsx(fS,{size:13,className:Ke.stale?"text-accent-amber":void 0})}),en&&f.jsx(YIn,{overleaf:vt}),Q&&_t&&f.jsx(It,{size:"small","data-tip":Ke.compiled?PN():MN(),"data-tip-align":"end","aria-label":Ke.compiled?PN():MN(),disabled:Ke.compiling||!Ke.engine,onClick:()=>void ln(),children:Ke.compiling?f.jsx(zt,{}):f.jsx(S4n,{size:13})}),J&&f.jsx(It,{size:"small",active:y,"data-tip":y?Cv():Nd(),"data-tip-align":"end","aria-label":y?Cv():Nd(),onClick:()=>C==null?void 0:C(!y),children:f.jsx(D3,{size:13})}),yr&&f.jsx(It,{size:"small","data-tip":pe?K_():ON(),"data-tip-align":"end","aria-label":pe?K_():ON(),onClick:()=>void $n(),children:pe?f.jsx(Ai,{size:13}):f.jsx(gf,{size:13})}),we!=null&&f.jsxs(f.Fragment,{children:[f.jsx(It,{size:"small","data-tip":sn??on.error??BN(),"data-tip-align":"end","aria-label":BN(),"aria-description":sn??void 0,disabled:on.busy||sn!=null,onClick:()=>void on.trigger(),children:on.busy?f.jsx(zt,{}):f.jsx(Z_,{size:13})}),f.jsx(It,{size:"small","data-tip":sn??dr.error??FN(),"data-tip-align":"end","aria-label":FN(),"aria-description":sn??void 0,disabled:dr.busy||sn!=null,onClick:()=>void dr.trigger(),children:dr.busy?f.jsx(zt,{}):f.jsx(Su,{size:13})})]})]}),!j&&pt&&(T==null?void 0:T.source)==="checkout"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:MHe({root:T.file.root==="worktree"?Jg():Zg()})}),Ae&&f.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:_Ge()}),j&&we!==null&&f.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:[IN()," ",ze(j)]}),(U==null?void 0:U.conflict)&&f.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:[f.jsx("span",{className:"flex-1 min-w-0",role:"status",children:U.conflict.exists?RN():DN()}),((wr=U==null?void 0:U.conflict)==null?void 0:wr.exists)&&U.conflict.currentVersion&&f.jsx(De,{disabled:ne,onPointerDown:Ve=>Ve.preventDefault(),onClick:()=>{var Ve;return void Kt(((Ve=U.conflict)==null?void 0:Ve.currentVersion)??void 0)},children:yqe()}),f.jsx(De,{disabled:ne,onPointerDown:Ve=>Ve.preventDefault(),onClick:Zn,children:Vqe()})]}),(Ke.error||Ke.log)&&f.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:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:`flex-1 min-w-0 text-sm ${Ke.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Ke.error??(Ke.builtWithErrors?FBe():zBe())}),f.jsx(It,{"data-tip":PPe(),"data-tip-align":"end","aria-label":KPe(),onClick:Ke.dismiss,children:f.jsx(ur,{size:13})})]}),Ke.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Ke.log})]}),en&&vt.staleOnDisk&&f.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:[f.jsx("span",{className:"flex-1 min-w-0",children:dqe()}),f.jsx(De,{onClick:()=>{vt.reloaded(),I(Ve=>Ve+1)},children:NPe()})]}),Q&&_t&&Ke.engine===null&&Ke.installHint&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Ke.installHint,Ke.installCommand&&f.jsx(r$n,{command:Ke.installCommand})]}),Ke.note&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Ke.note}),In&&Ke.stale&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:$Ue()}),f.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:Pn?0:void 0,onScroll:Ve=>{const ct={top:Math.max(0,Ve.currentTarget.scrollTop),left:Math.max(0,Ve.currentTarget.scrollLeft)};Me.current=ct,u==null||u(ct)},children:[!yn&&!j&&!$&&(T==null?void 0:T.source)==="checkout"&&!T.file.notFound&&!s&&r&&T.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:GUe()}),!yn&&!j&&(T==null?void 0:T.source)==="artifact"&&!T.file.notFound&&Ht&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:cBe({root:T.checkoutRoot==="worktree"?Jg():Zg()})}),j&&we===null?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[IN()," ",ze(j)]}):we===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:LD()}):yn?f.jsx($$,{value:ft,onChange:Ve=>{const ct=k.getSnapshot()??(we&&typeof we.version=="string"?BR(we.path,we.content,we.version):null);ct&&K(DIn(ct,Ve)),p==null||p(),se&&G(null)},onSave:()=>void En(),onBlur:()=>{Y5||En()},readOnly:tn,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_,scrollPosition:Me.current,onScrollPositionChange:Ve=>{Me.current=Ve,u==null||u(Ve)}}):we.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:T?rr(T):$N()}):Ct?f.jsx(X5,{kind:Ct,url:jt,name:n.split("/").pop()??n}):we.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[pBe()," ",f.jsx("a",{href:jt,download:n.split("/").pop()??n,children:DD()})]}):In&&Dr&&bt?f.jsx(X5,{kind:"pdf",url:Dr,name:bt,downloadBar:!1},Dr):H&&!y?f.jsx("div",{ref:le,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:Ce?f.jsx(rq,{projectId:e,folder:He,markdown:we.content,entries:x}):f.jsx(Jo,{text:we.content,resolveFilePath:ot,resolveImageSrc:it,onOpenFile:o&&((Ve,ct,sr,Jn,xn)=>o(Ve,r,s,xn))})}):V&&!y?f.jsx(XIn,{html:we.content,truncated:we.truncated,url:jt,name:qe,resolveSrc:it}):f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:le,children:f.jsx(XH,{text:we.content,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_})}),we.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:EFe()})]})]})]})}const v4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function i$n({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=_o(),c=A.useRef(null);return A.useEffect(()=>{if(!i)return;const u=h=>{var _;h.key==="Escape"&&((_=c.current)==null||_.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),f.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:f.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[f.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[f.jsx(It,{size:"small",className:"project-back text-text","aria-label":UN(),onClick:n,children:f.jsx(A0,{size:18})}),f.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:JQe()}),s&&f.jsx(It,{size:"small","data-tip":GN(),"data-tip-align":"end","aria-label":GN(),onClick:s,children:f.jsx(UI,{size:18})})]}),f.jsxs("button",{ref:c,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:[f.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),f.jsx(rc,{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&&f.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:[f.jsx(Xn,{onClick:()=>{a(!1),r()},children:f.jsxs("span",{className:v4,children:[f.jsx(BI,{size:14}),MQe()]})}),f.jsx(Xn,{onClick:()=>{a(!1),n()},children:f.jsxs("span",{className:v4,children:[f.jsx(FI,{size:14}),UN()]})}),f.jsx(Xn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:f.jsxs("span",{className:v4,children:[f.jsx(R4n,{size:14}),PQe()]})})]})]})})}function a$n({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:a}){const[o,c]=A.useState(new Set),[u,h]=A.useState(null),_=new Map;for(const x of e){const k=_.get(x.experimentId);k?k.push(x):_.set(x.experimentId,[x])}for(const x of _.values())x.sort((k,v)=>v.createdAt-k.createdAt);const p=[...n].sort((x,k)=>{var w,y,C,N;const v=((y=(w=_.get(x.id))==null?void 0:w[0])==null?void 0:y.createdAt)??x.createdAt;return(((N=(C=_.get(k.id))==null?void 0:C[0])==null?void 0:N.createdAt)??k.createdAt)-v});if(p.length===0)return f.jsx(hC,{icon:mh,title:t??VLe(),description:t?void 0:RLe()});async function m(x){h(null),c(k=>new Set(k).add(x));try{await a(x)}catch(k){c(v=>{const b=new Set(v);return b.delete(x),b}),h(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[o$e()," ",u]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":WIe(),children:p.map(x=>{const k=_.get(x.id)??[],v=k[0]??null,b=k.find(N=>N.status==="running"||N.status==="starting"),w=b??v,y=!!(b&&(b.cancelRequested||o.has(b.id))),C=b?y?"cancelling":Xi(b):v?Xi(v):"idle";return f.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:[f.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[f.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...Ur(N=>r(x,N),{stopPropagation:!0}),children:x.title||x.slug}),f.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:[f.jsx(Nm,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:x.branchName})]})]}),f.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:[f.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:f.jsx(al,{status:C})}),f.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:f.jsx("span",{children:k.length===1?aIe():yIe({count:Xt(k.length)})})}),f.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:f.jsx("span",{children:v?co(v.createdAt):JLe()})})]}),f.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":zQ({name:x.title||x.slug}),onClick:N=>N.stopPropagation(),onDoubleClick:N=>N.stopPropagation(),onAuxClick:N=>N.stopPropagation(),children:[f.jsxs(De,{size:"small",disabled:!w,title:w?dIe():BLe(),...Ur(N=>{w&&s(x.id,w.id,N)},{stopPropagation:!0}),children:[f.jsx(lo,{size:15}),a3()]}),f.jsxs(De,{size:"small",title:mD({branch:ze(x.branchName)}),...Ur(N=>i(x.id,N),{stopPropagation:!0}),children:[f.jsx(Db,{size:15}),FIe()]}),b&&f.jsxs(De,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?NIe():OIe(),onClick:()=>void m(b.id),children:[f.jsx(DI,{size:15}),y?Dje():RD()]})]})]},x.id)})})]})}function o$n({onClose:e,onCreateProject:n}){const[t,r]=A.useState(!1),[s,i]=A.useState(null),a=A.useRef(null),o=A.useCallback(c=>{t||(r(!0),i(null),c().catch(()=>i(chn())).finally(()=>r(!1)))},[t]);return A.useEffect(()=>{const c=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),A.useEffect(()=>{const c=a.current;if(!c)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const _=p=>{if(p.key!=="Tab")return;const m=h();if(m.length===0){p.preventDefault(),c.focus();return}const x=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0),u==null||u.focus()}},[]),oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:f.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:[f.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":p3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:f.jsx(ur,{size:16})}),f.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[f.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:f.jsx(zS,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Odn()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:whn()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[phn()," ",f.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:Wdn()}),hdn()]}),f.jsx("p",{dir:"auto",children:Fdn()})]}),s&&f.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),f.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[f.jsx(De,{onClick:()=>o(n),disabled:t,children:Ndn()}),f.jsx(De,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?ia():thn()})]})]})}),document.body)}function us(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Oy(){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}})}av.prototype=Oy.prototype={constructor:av,on:function(e,n){var t=this._,r=l$n(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)),VR.hasOwnProperty(n)?{space:VR[n],local:e}:e}function _$n(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===J5&&n.documentElement.namespaceURI===J5?n.createElement(e):n.createElementNS(t,e)}}function f$n(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function _q(e){var n=Dy(e);return(n.local?f$n:_$n)(n)}function d$n(){}function pC(e){return e==null?d$n:function(){return this.querySelector(e)}}function h$n(e){typeof e!="function"&&(e=pC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=w+1);!(N=v[y])&&++y=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function B$n(e){e||(e=P$n);function n(_,p){return _&&p?e(_.__data__,p.__data__):!_-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function F$n(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function H$n(){return Array.from(this)}function q$n(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?eBn:typeof n=="function"?nBn:tBn)(e,n,t??"")):zh(this.node(),e)}function zh(e,n){return e.style.getPropertyValue(n)||mq(e).getComputedStyle(e,null).getPropertyValue(n)}function sBn(e){return function(){delete this[e]}}function iBn(e,n){return function(){this[e]=n}}function aBn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function oBn(e,n){return arguments.length>1?this.each((n==null?sBn:typeof n=="function"?aBn:iBn)(e,n)):this.node()[e]}function gq(e){return e.trim().split(/^|\s+/)}function mC(e){return e.classList||new vq(e)}function vq(e){this._node=e,this._names=gq(e.getAttribute("class")||"")}vq.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 bq(e,n){for(var t=mC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function DBn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function ek(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}ek.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function GBn(e){return!e.ctrlKey&&!e.button}function VBn(){return this.parentNode}function KBn(e,n){return n??{x:e.x,y:e.y}}function WBn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cq(){var e=GBn,n=VBn,t=KBn,r=WBn,s={},i=Oy("start","drag","end"),a=0,o,c,u,h,_=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,UBn).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var z=y(this,n.call(this,C,N),C,N,"mouse");z&&(Ki(C.view).on("mousemove.drag",x,W0).on("mouseup.drag",k,W0),kq(C.view),b4(C),u=!1,o=C.clientX,c=C.clientY,z("start",C))}}function x(C){if(qd(C),!u){var N=C.clientX-o,z=C.clientY-c;u=N*N+z*z>_}s.mouse("drag",C)}function k(C){Ki(C.view).on("mousemove.drag mouseup.drag",null),Sq(C.view,u),qd(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var z=C.changedTouches,T=n.call(this,C,N),j=z.length,M,D;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?A1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?A1(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=XBn.exec(e))?new Ti(n[1],n[2],n[3],1):(n=YBn.exec(e))?new Ti(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=ZBn.exec(e))?A1(n[1],n[2],n[3],n[4]):(n=JBn.exec(e))?A1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=ePn.exec(e))?JR(n[1],n[2]/100,n[3]/100,1):(n=tPn.exec(e))?JR(n[1],n[2]/100,n[3]/100,n[4]):KR.hasOwnProperty(e)?XR(KR[e]):e==="transparent"?new Ti(NaN,NaN,NaN,0):null}function XR(e){return new Ti(e>>16&255,e>>8&255,e&255,1)}function A1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ti(e,n,t,r)}function sPn(e){return e instanceof Bm||(e=sf(e)),e?(e=e.rgb(),new Ti(e.r,e.g,e.b,e.opacity)):new Ti}function tk(e,n,t,r){return arguments.length===1?sPn(e):new Ti(e,n,t,r??1)}function Ti(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}gC(Ti,tk,Eq(Bm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new Ti(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q0:Math.pow(Q0,e),new Ti(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ti(U_(this.r),U_(this.g),U_(this.b),_b(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:YR,formatHex:YR,formatHex8:iPn,formatRgb:ZR,toString:ZR}));function YR(){return`#${S_(this.r)}${S_(this.g)}${S_(this.b)}`}function iPn(){return`#${S_(this.r)}${S_(this.g)}${S_(this.b)}${S_((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZR(){const e=_b(this.opacity);return`${e===1?"rgb(":"rgba("}${U_(this.r)}, ${U_(this.g)}, ${U_(this.b)}${e===1?")":`, ${e})`}`}function _b(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function U_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function S_(e){return e=U_(e),(e<16?"0":"")+e.toString(16)}function JR(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new no(e,n,t,r)}function Nq(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Bm||(e=sf(e)),!e)return new no;if(e instanceof no)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,c=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&c<1?0:a,new no(a,o,c,e.opacity)}function aPn(e,n,t,r){return arguments.length===1?Nq(e):new no(e,n,t,r??1)}function no(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}gC(no,aPn,Eq(Bm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q0:Math.pow(Q0,e),new no(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 Ti(y4(e>=240?e-240:e+120,s,r),y4(e,s,r),y4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new no(eM(this.h),R1(this.s),R1(this.l),_b(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=_b(this.opacity);return`${e===1?"hsl(":"hsla("}${eM(this.h)}, ${R1(this.s)*100}%, ${R1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function eM(e){return e=(e||0)%360,e<0?e+360:e}function R1(e){return Math.max(0,Math.min(1,e||0))}function y4(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 vC=e=>()=>e;function oPn(e,n){return function(t){return e+t*n}}function cPn(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 lPn(e){return(e=+e)==1?zq:function(n,t){return t-n?cPn(n,t,e):vC(isNaN(n)?t:n)}}function zq(e,n){var t=n-e;return t?oPn(e,t):vC(isNaN(e)?n:e)}const fb=(function e(n){var t=lPn(n);function r(s,i){var a=t((s=tk(s)).r,(i=tk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=zq(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function uPn(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,c.push({i:a,x:Uo(r,s)})),t=x4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:_.push(s(_)+"rotate(",null,r)-2,x:Uo(u,h)})):h&&_.push(s(_)+"rotate("+h+r)}function o(u,h,_,p){u!==h?p.push({i:_.push(s(_)+"skewX(",null,r)-2,x:Uo(u,h)}):h&&_.push(s(_)+"skewX("+h+r)}function c(u,h,_,p,m,x){if(u!==_||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");x.push({i:k-4,x:Uo(u,_)},{i:k-2,x:Uo(h,p)})}else(_!==1||p!==1)&&m.push(s(m)+"scale("+_+","+p+")")}return function(u,h){var _=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,_,p),a(u.rotate,h.rotate,_,p),o(u.skewX,h.skewX,_,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,_,p),u=h=null,function(m){for(var x=-1,k=p.length,v;++x=0&&e._call.call(void 0,n),e=e._next;--jh}function rM(){af=(hb=Y0.now())+Ly,jh=i0=0;try{CPn()}finally{jh=0,NPn(),af=0}}function EPn(){var e=Y0.now(),n=e-hb;n>Rq&&(Ly-=n,hb=e)}function NPn(){for(var e,n=db,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:db=t);a0=e,sk(r)}function sk(e){if(!jh){i0&&(i0=clearTimeout(i0));var n=e-af;n>24?(e<1/0&&(i0=setTimeout(rM,e-Y0.now()-Ly)),Yp&&(Yp=clearInterval(Yp))):(Yp||(hb=Y0.now(),Yp=setInterval(EPn,Rq)),jh=1,Mq(rM))}}function sM(e,n,t){var r=new pb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var zPn=Oy("start","end","cancel","interrupt"),jPn=[],Dq=0,iM=1,ik=2,cv=3,aM=4,ak=5,lv=6;function Iy(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;TPn(e,t,{name:n,index:r,group:s,on:zPn,tween:jPn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Dq})}function yC(e,n){var t=fo(e,n);if(t.state>Dq)throw new Error("too late; already scheduled");return t}function lc(e,n){var t=fo(e,n);if(t.state>cv)throw new Error("too late; already running");return t}function fo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function TPn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=Oq(i,0,t.time);function i(u){t.state=iM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,_,p,m;if(t.state!==iM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===cv)return sM(a);m.state===aM?(m.state=lv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hik&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function aFn(e,n,t){var r,s,i=iFn(n)?yC:lc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function oFn(e,n){var t=this._id;return arguments.length<2?fo(this.node(),t).on.on(e):this.each(aFn(t,e,n))}function cFn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function lFn(){return this.on("end.remove",cFn(this._id))}function uFn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=pC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function DFn(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 rl(e,n,t){this.k=e,this.x=n,this.y=t}rl.prototype={constructor:rl,scale:function(e){return e===1?this:new rl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new rl(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 $y=new rl(1,0,0);Bq.prototype=rl.prototype;function Bq(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $y;return e.__zoom}function w4(e){e.stopImmediatePropagation()}function Zp(e){e.preventDefault(),e.stopImmediatePropagation()}function LFn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function IFn(){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 oM(){return this.__zoom||$y}function $Fn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function BFn(){return navigator.maxTouchPoints||"ontouchstart"in this}function PFn(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 Pq(){var e=LFn,n=IFn,t=PFn,r=$Fn,s=BFn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=ov,u=Oy("start","zoom","end"),h,_,p,m=500,x=150,k=0,v=10;function b(H){H.property("__zoom",oM).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(H,Q,V,J){var Z=H.selection?H.selection():H;Z.property("__zoom",oM),H!==Z?N(H,Q,V,J):Z.interrupt().each(function(){z(this,arguments).event(J).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(H,Q,V,J){b.scaleTo(H,function(){var Z=this.__zoom.k,B=typeof Q=="function"?Q.apply(this,arguments):Q;return Z*B},V,J)},b.scaleTo=function(H,Q,V,J){b.transform(H,function(){var Z=n.apply(this,arguments),B=this.__zoom,L=V==null?C(Z):typeof V=="function"?V.apply(this,arguments):V,F=B.invert(L),U=typeof Q=="function"?Q.apply(this,arguments):Q;return t(y(w(B,U),L,F),Z,a)},V,J)},b.translateBy=function(H,Q,V,J){b.transform(H,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),a)},null,J)},b.translateTo=function(H,Q,V,J,Z){b.transform(H,function(){var B=n.apply(this,arguments),L=this.__zoom,F=J==null?C(B):typeof J=="function"?J.apply(this,arguments):J;return t($y.translate(F[0],F[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof V=="function"?-V.apply(this,arguments):-V),B,a)},J,Z)};function w(H,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===H.k?H:new rl(Q,H.x,H.y)}function y(H,Q,V){var J=Q[0]-V[0]*H.k,Z=Q[1]-V[1]*H.k;return J===H.x&&Z===H.y?H:new rl(H.k,J,Z)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function N(H,Q,V,J){H.on("start.zoom",function(){z(this,arguments).event(J).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(J).end()}).tween("zoom",function(){var Z=this,B=arguments,L=z(Z,B).event(J),F=n.apply(Z,B),U=V==null?C(F):typeof V=="function"?V.apply(Z,B):V,K=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ne=Z.__zoom,ce=typeof Q=="function"?Q.apply(Z,B):Q,_e=c(ne.invert(U).concat(K/ne.k),ce.invert(U).concat(K/ce.k));return function(se){if(se===1)se=ce;else{var G=_e(se),oe=K/G[2];se=new rl(oe,U[0]-G[0]*oe,U[1]-G[1]*oe)}L.zoom(null,se)}})}function z(H,Q,V){return!V&&H.__zooming||new T(H,Q)}function T(H,Q){this.that=H,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(H,Q),this.taps=0}T.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,Q){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Q=Ki(this.that).datum();u.call(H,this.that,new DFn(H,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function j(H,...Q){if(!e.apply(this,arguments))return;var V=z(this,Q).event(H),J=this.__zoom,Z=Math.max(i[0],Math.min(i[1],J.k*Math.pow(2,r.apply(this,arguments)))),B=Ya(H);if(V.wheel)(V.mouse[0][0]!==B[0]||V.mouse[0][1]!==B[1])&&(V.mouse[1]=J.invert(V.mouse[0]=B)),clearTimeout(V.wheel);else{if(J.k===Z)return;V.mouse=[B,J.invert(B)],uv(this),V.start()}Zp(H),V.wheel=setTimeout(L,x),V.zoom("mouse",t(y(w(J,Z),V.mouse[0],V.mouse[1]),V.extent,a));function L(){V.wheel=null,V.end()}}function M(H,...Q){if(p||!e.apply(this,arguments))return;var V=H.currentTarget,J=z(this,Q,!0).event(H),Z=Ki(H.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",K,!0),B=Ya(H,V),L=H.clientX,F=H.clientY;kq(H.view),w4(H),J.mouse=[B,this.__zoom.invert(B)],uv(this),J.start();function U(ne){if(Zp(ne),!J.moved){var ce=ne.clientX-L,_e=ne.clientY-F;J.moved=ce*ce+_e*_e>k}J.event(ne).zoom("mouse",t(y(J.that.__zoom,J.mouse[0]=Ya(ne,V),J.mouse[1]),J.extent,a))}function K(ne){Z.on("mousemove.zoom mouseup.zoom",null),Sq(ne.view,J.moved),Zp(ne),J.event(ne).end()}}function D(H,...Q){if(e.apply(this,arguments)){var V=this.__zoom,J=Ya(H.changedTouches?H.changedTouches[0]:H,this),Z=V.invert(J),B=V.k*(H.shiftKey?.5:2),L=t(y(w(V,B),J,Z),n.apply(this,Q),a);Zp(H),o>0?Ki(this).transition().duration(o).call(N,L,J,H):Ki(this).call(b.transform,L,J,H)}}function I(H,...Q){if(e.apply(this,arguments)){var V=H.touches,J=V.length,Z=z(this,Q,H.changedTouches.length===J).event(H),B,L,F,U;for(w4(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.`},Z0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Fq=["Enter"," ","Escape"],Hq={"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 Th;(function(e){e.Strict="strict",e.Loose="loose"})(Th||(Th={}));var G_;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(G_||(G_={}));var J0;(function(e){e.Partial="partial",e.Full="full"})(J0||(J0={}));const qq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var iu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(iu||(iu={}));var mb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(mb||(mb={}));var Rt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Rt||(Rt={}));const cM={[Rt.Left]:Rt.Right,[Rt.Right]:Rt.Left,[Rt.Top]:Rt.Bottom,[Rt.Bottom]:Rt.Top};function Uq(e){return e===null?null:e?"valid":"invalid"}const Gq=e=>"id"in e&&"source"in e&&"target"in e,FFn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),wC=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Pm=(e,n=[0,0])=>{const{width:t,height:r}=vl(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},HFn=(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):wC(s)?s:n.nodeLookup.get(s.id));const o=a?gb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return By(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Py(t)},Fm=(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=By(t,gb(s)),r=!0)}),r?Py(t):{x:0,y:0,width:0,height:0}},kC=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,u=n.width/s,h=n.height/s,_=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:k=!1}=p;if(a&&!x||k)continue;const v=m.width??p.width??p.initialWidth??0,b=m.height??p.height??p.initialHeight??0,{x:w,y}=p.internals.positionAbsolute,C=Qq(o,c,u,h,w,y,v,b),N=v*b,z=i&&C>0;(!p.internals.handleBounds||z||C>=N||p.dragging)&&_.push(p)}return _},qFn=(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 UFn(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 GFn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=UFn(e,a),c=Fm(o),u=CC(c,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 Vq({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:c,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},h=a.origin??r;let _=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",uo.error005());else{const m=o.measured.width,x=o.measured.height;m&&x&&(_=[[c,u],[c+m,u+x]])}else o&&cf(a.extent)&&(_=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=cf(_)?of(n,_,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",uo.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function VFn({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(k=>k.id===p.parentId);(m||x)&&a.push(p)}const o=new Set(n.map(p=>p.id)),c=r.filter(p=>p.deletable!==!1),h=qFn(a,c);for(const p of c)o.has(p.id)&&!h.find(x=>x.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const _=await s({nodes:a,edges:h});return typeof _=="boolean"?_?{edges:h,nodes:a}:{edges:[],nodes:[]}:_}const Ah=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),of=(e={x:0,y:0},n,t)=>({x:Ah(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:Ah(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function Kq(e,n,t){const{width:r,height:s}=vl(t),{x:i,y:a}=t.internals.positionAbsolute;return of(e,[[i,a],[i+r,a+s]],n)}const lM=(e,n,t)=>et?-Ah(Math.abs(e-t),1,n)/n:0,SC=(e,n,t=15,r=40)=>{const s=lM(e.x,r,n.width-r)*t,i=lM(e.y,r,n.height-r)*t;return[s,i]},By=(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)}),ok=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Py=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),em=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=wC(e)?e.internals.positionAbsolute:Pm(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}},gb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=wC(e)?e.internals.positionAbsolute:Pm(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)}},Wq=(e,n)=>Py(By(ok(e),ok(n))),Qq=(e,n,t,r,s,i,a,o)=>{const c=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(c*u)},vb=(e,n)=>Qq(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),uM=e=>so(e.width)&&so(e.height)&&so(e.x)&&so(e.y),so=e=>!isNaN(e)&&isFinite(e),Xq=(e,n)=>(t,r)=>{},Hm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),qm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Hm(o,a):o},Rh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function vd(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 KFn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=vd(e,t),s=vd(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=vd(e.top??e.y??0,t),s=vd(e.bottom??e.y??0,t),i=vd(e.left??e.x??0,n),a=vd(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 WFn(e,n,t,r,s,i){const{x:a,y:o}=Rh(e,[n,t,r]),{x:c,y:u}=Rh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,_=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(_)}}const CC=(e,n,t,r,s,i)=>{const a=KFn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=Ah(u,r,s),_=e.x+e.width/2,p=e.y+e.height/2,m=n/2-_*h,x=t/2-p*h,k=WFn(e,m,x,h,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:x-v.top+v.bottom,zoom:h}},tm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function cf(e){return e!=null&&e!=="parent"}function vl(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 Yq(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 Zq(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 _M(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function QFn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function XFn(e){return{...Hq,...e||{}}}function x0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=io(e),o=qm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Hm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const EC=e=>({width:e.offsetWidth,height:e.offsetHeight}),Jq=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},YFn=["INPUT","SELECT","TEXTAREA"];function eU(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:YFn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const tU=e=>"clientX"in e,io=(e,n)=>{var i,a;const t=tU(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)}},fM=(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,...EC(a)}})};function nU({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const c=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,h=Math.abs(c-e),_=Math.abs(u-n);return[c,u,h,_]}function D1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function dM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Rt.Left:return[n-D1(n-r,i),t];case Rt.Right:return[n+D1(r-n,i),t];case Rt.Top:return[n,t-D1(t-s,i)];case Rt.Bottom:return[n,t+D1(s-t,i)]}}function rU({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top,curvature:a=.25}){const[o,c]=dM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=dM({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[_,p,m,x]=nU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${c} ${u},${h} ${r},${s}`,_,p,m,x]}function sU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const eHn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,tHn=(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)),nHn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",uo.error006()),n;const r=t.getEdgeId||eHn;let s;return Gq(e)?s={...e}:s={...e,id:r(e)},tHn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function iU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=sU({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const hM={[Rt.Left]:{x:-1,y:0},[Rt.Right]:{x:1,y:0},[Rt.Top]:{x:0,y:-1},[Rt.Bottom]:{x:0,y:1}},rHn=({source:e,sourcePosition:n=Rt.Bottom,target:t})=>n===Rt.Left||n===Rt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function sHn({source:e,sourcePosition:n=Rt.Bottom,target:t,targetPosition:r=Rt.Top,center:s,offset:i,stepPosition:a}){const o=hM[n],c=hM[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},_=rHn({source:u,sourcePosition:n,target:h}),p=_.x!==0?"x":"y",m=_[p];let x=[],k,v;const b={x:0,y:0},w={x:0,y:0},[,,y,C]=sU({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*c[p]===-1){p==="x"?(k=s.x??u.x+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?x=p==="x"?j:M:x=p==="x"?M:j}else{const j=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?x=o.x===m?M:j:x=o.y===m?j:M,n===r){const H=Math.abs(e[p]-t[p]);if(H<=i){const Q=Math.min(i-1,i-H);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:w[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const H=p==="x"?"y":"x",Q=o[p]===c[H],V=u[H]>h[H],J=u[H]=q?(k=(D.x+I.x)/2,v=x[0].y):(k=x[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},z={x:h.x+w.x,y:h.y+w.y};return[[e,...N.x!==x[0].x||N.y!==x[0].y?[N]:[],...x,...z.x!==x[x.length-1].x||z.y!==x[x.length-1].y?[z]:[],t],k,v,y,C]}function iHn(e,n,t,r){const s=Math.min(pM(e,n)/2,pM(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 lk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function oHn(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(c=>{if(c&&typeof c=="object"){const u=lk(c,n);i.has(u)||(a.push({id:u,color:c.color||t,...c}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const aU=1e3,cHn=10,NC={nodeOrigin:[0,0],nodeExtent:Z0,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},lHn={...NC,checkEquality:!0};function zC(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function uHn(e,n,t){const r=zC(NC,t);for(const s of e.values())if(s.parentId)TC(s,e,n,r);else{const i=Pm(s,r.nodeOrigin),a=cf(s.extent)?s.extent:r.nodeExtent,o=of(i,a,vl(s));s.internals.positionAbsolute=o}}function _Hn(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 jC(e){return e==="manual"}function uk(e,n,t,r={}){var h,_;const s=zC(lHn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!jC(s.zIndexMode)?aU:0;let c=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=Pm(p,s.nodeOrigin),k=cf(p.extent)?p.extent:s.nodeExtent,v=of(x,k,vl(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(_=p.measured)==null?void 0:_.height},internals:{positionAbsolute:v,handleBounds:_Hn(p,m),z:oU(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&&(c=!1),p.parentId&&TC(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function fHn(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 TC(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=zC(NC,r),u=e.parentId,h=n.get(u);if(!h){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}fHn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*cHn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const _=i&&!jC(c)?aU:0,{x:p,y:m,z:x}=dHn(e,h,a,o,_,c),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:x}})}function oU(e,n,t){const r=so(e.zIndex)?e.zIndex:0;return jC(t)?r:r+(e.selected?n:0)}function dHn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=vl(e),u=Pm(e,t),h=cf(e.extent)?of(u,e.extent,c):u;let _=of({x:a+h.x,y:o+h.y},r,c);e.extent==="parent"&&(_=Kq(_,c,n));const p=oU(e,s,i),m=n.internals.z??0;return{x:_.x,y:_.y,z:m>=p?m+1:p}}function AC(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??em(c),h=Wq(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var y;const h=c.internals.positionAbsolute,_=vl(c),p=c.origin??r,m=o.x0||x>0||b||w)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-x+w}}),(y=t.get(u))==null||y.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}})})),(_.width0){const m=AC(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function pHn({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 bM(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 c=r.get(a)||new Map;if(r.set(a,c.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function cU(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,h=`${i}-${o}--${s}-${a}`;bM("source",c,h,e,s,a),bM("target",c,u,e,i,o),n.set(r.id,r)}}function lU(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:lU(t,n):!1}function yM(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 mHn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!lU(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 k4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const _=(a=t.get(u))==null?void 0:a.internals.userNode;_&&s.push({..._,position:h.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:((c=n.get(e))==null?void 0:c.position)||i.position,dragging:r}:s[0],s]}function gHn({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=Hm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function vHn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,c=!1,u={x:0,y:0},h=null,_=!1,p=null,m=!1,x=!1,k=null;function v({noDragClassName:w,handleSelector:y,domNode:C,isSelectable:N,nodeId:z,nodeClickDistance:T=0}){p=Ki(C);function j({x:$,y:q}){const{nodeLookup:H,nodeExtent:Q,snapGrid:V,snapToGrid:J,nodeOrigin:Z,onNodeDrag:B,onSelectionDrag:L,onError:F,updateNodePositions:U}=n();i={x:$,y:q};let K=!1;const ne=o.size>1,ce=ne&&Q?ok(Fm(o)):null,_e=ne&&J?gHn({dragItems:o,snapGrid:V,x:$,y:q}):null;for(const[se,G]of o){if(!H.has(se))continue;let oe={x:$-G.distance.x,y:q-G.distance.y};J&&(oe=_e?{x:Math.round(oe.x+_e.x),y:Math.round(oe.y+_e.y)}:Hm(oe,V));let le=null;if(ne&&Q&&!G.extent&&ce){const{positionAbsolute:Me}=G.internals,we=Me.x-ce.x+Q[0][0],qe=Me.x+G.measured.width-ce.x2+Q[1][0],He=Me.y-ce.y+Q[0][1],Ce=Me.y+G.measured.height-ce.y2+Q[1][1];le=[[we,He],[qe,Ce]]}const{position:pe,positionAbsolute:be}=Vq({nodeId:se,nextPosition:oe,nodeLookup:H,nodeExtent:le||Q,nodeOrigin:Z,onError:F});K=K||G.position.x!==pe.x||G.position.y!==pe.y,G.position=pe,G.internals.positionAbsolute=be}if(x=x||K,!!K&&(U(o,!0),k&&(r||B||!z&&L))){const[se,G]=k4({nodeId:z,dragItems:o,nodeLookup:H});r==null||r(k,o,se,G),B==null||B(k,se,G),z||L==null||L(k,G)}}async function M(){if(!h)return;const{transform:$,panBy:q,autoPanSpeed:H,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[V,J]=SC(u,h,H);(V!==0||J!==0)&&(i.x=(i.x??0)-V/$[2],i.y=(i.y??0)-J/$[2],await q({x:V,y:J})&&j(i)),a=requestAnimationFrame(M)}function D($){var ne;const{nodeLookup:q,multiSelectionActive:H,nodesDraggable:Q,transform:V,snapGrid:J,snapToGrid:Z,selectNodesOnDrag:B,onNodeDragStart:L,onSelectionDragStart:F,unselectNodesAndEdges:U}=n();_=!0,(!B||!N)&&!H&&z&&((ne=q.get(z))!=null&&ne.selected||U()),N&&B&&z&&(e==null||e(z));const K=x0($.sourceEvent,{transform:V,snapGrid:J,snapToGrid:Z,containerBounds:h});if(i=K,o=mHn(q,Q,K,z),o.size>0&&(t||L||!z&&F)){const[ce,_e]=k4({nodeId:z,dragItems:o,nodeLookup:q});t==null||t($.sourceEvent,o,ce,_e),L==null||L($.sourceEvent,ce,_e),z||F==null||F($.sourceEvent,_e)}}const I=Cq().clickDistance(T).on("start",$=>{const{domNode:q,nodeDragThreshold:H,transform:Q,snapGrid:V,snapToGrid:J}=n();h=(q==null?void 0:q.getBoundingClientRect())||null,m=!1,x=!1,k=$.sourceEvent,H===0&&D($),i=x0($.sourceEvent,{transform:Q,snapGrid:V,snapToGrid:J,containerBounds:h}),u=io($.sourceEvent,h)}).on("drag",$=>{const{autoPanOnNodeDrag:q,transform:H,snapGrid:Q,snapToGrid:V,nodeDragThreshold:J,nodeLookup:Z}=n(),B=x0($.sourceEvent,{transform:H,snapGrid:Q,snapToGrid:V,containerBounds:h});if(k=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||z&&!Z.has(z))&&(m=!0),!m){if(!c&&q&&_&&(c=!0,M()),!_){const L=io($.sourceEvent,h),F=L.x-u.x,U=L.y-u.y;Math.sqrt(F*F+U*U)>J&&D($)}(i.x!==B.xSnapped||i.y!==B.ySnapped)&&o&&_&&(u=io($.sourceEvent,h),j(B))}}).on("end",$=>{if(!_||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,_=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:q,updateNodePositions:H,onNodeDragStop:Q,onSelectionDragStop:V}=n();if(x&&(H(o,!1),x=!1),s||Q||!z&&V){const[J,Z]=k4({nodeId:z,dragItems:o,nodeLookup:q,dragging:!1});s==null||s($.sourceEvent,o,J,Z),Q==null||Q($.sourceEvent,J,Z),z||V==null||V($.sourceEvent,Z)}}}).filter($=>{const q=$.target;return!$.button&&(!w||!yM(q,`.${w}`,C))&&(!y||yM(q,y,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function bHn(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())vb(s,em(i))>0&&r.push(i);return r}const yHn=250;function xHn(e,n,t,r){var o,c;let s=[],i=1/0;const a=bHn(e,t,n+yHn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const _ of h){if(r.nodeId===_.nodeId&&r.type===_.type&&r.id===_.id)continue;const{x:p,y:m}=lf(u,_,_.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(h=>h.type===u)??s[0]}return s[0]}function uU(e,n,t,r,s,i=!1){var u,h,_;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((_=a.internals.handleBounds)==null?void 0:_.target)??[]],c=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return c&&i?{...c,...lf(a,c,c.position,!0)}:c}function _U(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function wHn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const fU=()=>!0;function kHn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:_,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:k,onConnectEnd:v,isValidConnection:b=fU,onReconnectEnd:w,updateConnection:y,getTransform:C,getFromHandle:N,autoPanSpeed:z,dragThreshold:T=1,handleDomNode:j}){const M=Jq(e.target);let D=0,I;const{x:$,y:q}=io(e),H=_U(i,j),Q=o==null?void 0:o.getBoundingClientRect();let V=!1;if(!Q||!H)return;const J=uU(s,H,r,c,n);if(!J)return;let Z=io(e,Q),B=!1,L=null,F=!1,U=null;function K(){if(!h||!Q)return;const[pe,be]=SC(Z,Q,z);p({x:pe,y:be}),D=requestAnimationFrame(K)}const ne={...J,nodeId:s,type:H,position:J.position},ce=c.get(s);let se={inProgress:!0,isValid:null,from:lf(ce,ne,Rt.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:ce,to:Z,toHandle:null,toPosition:cM[ne.position],toNode:null,pointer:Z};function G(){V=!0,y(se),x==null||x(e,{nodeId:s,handleId:r,handleType:H})}T===0&&G();function oe(pe){if(!V){const{x:Ce,y:ot}=io(pe),Qe=Ce-$,it=ot-q;if(!(Qe*Qe+it*it>T*T))return;G()}if(!N()||!ne){le(pe);return}const be=C();Z=io(pe,Q),I=xHn(qm(Z,be,!1,[1,1]),t,c,ne),B||(K(),B=!0);const Me=dU(pe,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:_,nodeLookup:c});U=Me.handleDomNode,L=Me.connection,F=wHn(!!I,Me.isValid);const we=c.get(s),qe=we?lf(we,ne,Rt.Left,!0):se.from,He={...se,from:qe,isValid:F,to:Me.toHandle&&F?Rh({x:Me.toHandle.x,y:Me.toHandle.y},be):Z,toHandle:Me.toHandle,toPosition:F&&Me.toHandle?Me.toHandle.position:cM[ne.position],toNode:Me.toHandle?c.get(Me.toHandle.nodeId):null,pointer:Z};y(He),se=He}function le(pe){if(!("touches"in pe&&pe.touches.length>0)){if(V){(I||U)&&L&&F&&(k==null||k(L));const{inProgress:be,...Me}=se,we={...Me,toPosition:se.toHandle?se.toPosition:null};v==null||v(pe,we),i&&(w==null||w(pe,we))}m(),cancelAnimationFrame(D),B=!1,F=!1,L=null,U=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",le),M.addEventListener("touchmove",oe),M.addEventListener("touchend",le)}function dU(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=fU,nodeLookup:h}){const _=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=io(e),k=a.elementFromPoint(m,x),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const w=_U(void 0,v),y=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),z=v.classList.contains("connectableend");if(!y||!w)return b;const T={source:_?y:r,sourceHandle:_?C:s,target:_?r:y,targetHandle:_?s:C};b.connection=T;const M=N&&z&&(t===Th.Strict?_&&w==="source"||!_&&w==="target":y!==r||C!==s);b.isValid=M&&u(T),b.toHandle=uU(y,w,C,h,t,!0)}return b}const _k={onPointerDown:kHn,isValid:dU};function SHn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Ki(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:_=!0,zoomable:p=!0,inversePan:m=!1}){const x=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=y.sourceEvent.ctrlKey&&tm()?10:1,z=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*h,T=C[2]*Math.pow(2,z*N);n.scaleTo(T)};let k=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const N=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],z=[N[0]-k[0],N[1]-k[1]];k=N;const T=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-z[0]*T,y:C[1]-z[1]*T},M=[[0,0],[c,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},w=Pq().on("start",v).on("zoom",_?b:null).on("zoom.wheel",p?x:null);s.call(w,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:Ya}}const Fy=e=>({x:e.x,y:e.y,zoom:e.k}),S4=({x:e,y:n,zoom:t})=>$y.translate(e,n).scale(t),Td=(e,n)=>e.target.closest(`.${n}`),hU=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),CHn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,C4=(e,n=0,t=CHn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},pU=e=>{const n=e.ctrlKey&&tm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function EHn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(Td(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const _=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=Ya(h),b=pU(h),w=_*Math.pow(2,b);r.scaleTo(t,w,v,h);return}const p=h.deltaMode===1?20:1;let m=s===G_.Vertical?0:h.deltaX*p,x=s===G_.Horizontal?0:h.deltaY*p;!tm()&&h.shiftKey&&s!==G_.Vertical&&(m=h.deltaY*p,x=0),r.translateBy(t,-(m/_)*i,-(x/_)*i,{internal:!0});const k=Fy(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function NHn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=Td(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function zHn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=Fy(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 jHn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&hU(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,Fy(i.transform)))}}function THn({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&&hU(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Fy(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function AHn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return _=>{var v;const p=e||n,m=t&&_.ctrlKey,x=_.type==="wheel";if(_.button===1&&_.type==="mousedown"&&(Td(_,`${u}-flow__node`)||Td(_,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!x||Td(_,o)&&x||Td(_,c)&&(!x||s&&x&&!e)||!t&&_.ctrlKey&&x)return!1;if(!t&&_.type==="touchstart"&&((v=_.touches)==null?void 0:v.length)>1)return _.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(_.type==="mousedown"||_.type==="touchstart")||Array.isArray(r)&&!r.includes(_.button)&&_.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(_.button)||!_.button||_.button<=1;return(!_.ctrlKey||x)&&k}}function RHn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),_=Pq().scaleExtent([n,t]).translateExtent(r),p=Ki(e).call(_);w({x:s.x,y:s.y,zoom:Ah(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");_.wheelDelta(pU);async function k(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?y0:ov).transform(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:$,onPaneContextMenu:q,userSelectionActive:H,panOnScroll:Q,panOnDrag:V,panOnScrollMode:J,panOnScrollSpeed:Z,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:F,zoomOnDoubleClick:U,zoomActivationKeyPressed:K,lib:ne,onTransformChange:ce,connectionInProgress:_e,paneClickDistance:se,selectionOnDrag:G}){H&&!u.isZoomingOrPanning&&b();const oe=Q&&!K&&!H;_.clickDistance(G?1/0:!so(se)||se<0?0:se);const le=oe?EHn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:_,panOnScrollMode:J,panOnScrollSpeed:Z,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):NHn({noWheelClassName:I,preventScrolling:B,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const pe=zHn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});_.on("start",pe);const be=jHn({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!q,onPanZoom:i,onTransformChange:ce});_.on("zoom",be);const Me=THn({zoomPanValues:u,panOnDrag:V,panOnScroll:Q,onPaneContextMenu:q,onPanZoomEnd:o,onDraggingChange:c});_.on("end",Me);const we=AHn({zoomActivationKeyPressed:K,panOnDrag:V,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:U,zoomOnPinch:L,userSelectionActive:H,noPanClassName:$,noWheelClassName:I,lib:ne,connectionInProgress:_e});_.filter(we),U?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function b(){_.on("zoom",null)}async function w(I,$,q){const H=S4(I),Q=_==null?void 0:_.constrain()(H,$,q);return Q&&await k(Q),Q}async function y(I,$){const q=S4(I);return await k(q,$),q}function C(I){if(p){const $=S4(I),q=p.property("__zoom");(q.k!==I.zoom||q.x!==I.x||q.y!==I.y)&&(_==null||_.transform(p,$,null,{sync:!0}))}}function N(){const I=p?Bq(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function z(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?y0:ov).scaleTo(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}async function T(I,$){return p?new Promise(q=>{_==null||_.interpolate(($==null?void 0:$.interpolate)==="linear"?y0:ov).scaleBy(C4(p,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>q(!0)),I)}):!1}function j(I){_==null||_.scaleExtent(I)}function M(I){_==null||_.translateExtent(I)}function D(I){const $=!so(I)||I<0?0:I;_==null||_.clickDistance($)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:w,getViewport:N,scaleTo:z,scaleBy:T,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Mh;(function(e){e.Line="line",e.Handle="handle"})(Mh||(Mh={}));function MHn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,c=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(c[0]=c[0]*-1),o&&i&&(c[1]=c[1]*-1),c}function xM(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 Jl(e,n){return Math.max(0,n-e)}function eu(e,n){return Math.max(0,e-n)}function L1(e,n,t){return Math.max(0,n-e,e-t)}function wM(e,n){return e?!n:n}function OHn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:_}=n,p=h&&_,{xSnapped:m,ySnapped:x}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:w}=r,{x:y,y:C,width:N,height:z,aspectRatio:T}=e;let j=Math.floor(h?m-e.pointerX:0),M=Math.floor(_?x-e.pointerY:0);const D=N+(c?-j:j),I=z+(u?-M:M),$=-i[0]*N,q=-i[1]*z;let H=L1(D,k,v),Q=L1(I,b,w);if(a){let Z=0,B=0;c&&j<0?Z=Jl(y+j+$,a[0][0]):!c&&j>0&&(Z=eu(y+D+$,a[1][0])),u&&M<0?B=Jl(C+M+q,a[0][1]):!u&&M>0&&(B=eu(C+I+q,a[1][1])),H=Math.max(H,Z),Q=Math.max(Q,B)}if(o){let Z=0,B=0;c&&j>0?Z=eu(y+j,o[0][0]):!c&&j<0&&(Z=Jl(y+D,o[1][0])),u&&M>0?B=eu(C+M,o[0][1]):!u&&M<0&&(B=Jl(C+I,o[1][1])),H=Math.max(H,Z),Q=Math.max(Q,B)}if(s){if(h){const Z=L1(D/T,b,w)*T;if(H=Math.max(H,Z),a){let B=0;!c&&!u||c&&!u&&p?B=eu(C+q+D/T,a[1][1])*T:B=Jl(C+q+(c?j:-j)/T,a[0][1])*T,H=Math.max(H,B)}if(o){let B=0;!c&&!u||c&&!u&&p?B=Jl(C+D/T,o[1][1])*T:B=eu(C+(c?j:-j)/T,o[0][1])*T,H=Math.max(H,B)}}if(_){const Z=L1(I*T,k,v)/T;if(Q=Math.max(Q,Z),a){let B=0;!c&&!u||u&&!c&&p?B=eu(y+I*T+$,a[1][0])/T:B=Jl(y+(u?M:-M)*T+$,a[0][0])/T,Q=Math.max(Q,B)}if(o){let B=0;!c&&!u||u&&!c&&p?B=Jl(y+I*T,o[1][0])/T:B=eu(y+(u?M:-M)*T,o[0][0])/T,Q=Math.max(Q,B)}}}M=M+(M<0?Q:-Q),j=j+(j<0?H:-H),s&&(p?D>I*T?M=(wM(c,u)?-j:j)/T:j=(wM(c,u)?-M:M)*T:h?(M=j/T,u=c):(j=M*T,c=u));const V=c?y+j:y,J=u?C+M:C;return{width:N+(c?-j:j),height:z+(u?-M:M),x:i[0]*j*(c?-1:1)+V,y:i[1]*M*(u?-1:1)+J}}const mU={width:0,height:0,x:0,y:0},DHn={...mU,pointerX:0,pointerY:0,aspectRatio:1};function LHn(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,c=t[1]*a;return[[r-o,s-c],[r+i-o,s+a-c]]}function IHn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Ki(e);let a={controlDirection:xM("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:h,keepAspectRatio:_,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:k,shouldResize:v}){let b={...mU},w={...DHn};a={boundaries:h,resizeDirection:p,keepAspectRatio:_,controlDirection:xM(u)};let y,C=null,N=[],z,T,j,M=!1;const D=Cq().on("start",I=>{const{nodeLookup:$,transform:q,snapGrid:H,snapToGrid:Q,nodeOrigin:V,paneDomNode:J}=t();if(y=$.get(n),!y)return;C=(J==null?void 0:J.getBoundingClientRect())??null;const{xSnapped:Z,ySnapped:B}=x0(I.sourceEvent,{transform:q,snapGrid:H,snapToGrid:Q,containerBounds:C});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...b,pointerX:Z,pointerY:B,aspectRatio:b.width/b.height},z=void 0,T=cf(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(z=$.get(y.parentId)),z&&y.extent==="parent"&&(T=[[0,0],[z.measured.width,z.measured.height]]),N=[],j=void 0;for(const[L,F]of $)if(F.parentId===n&&(N.push({id:L,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const U=LHn(F,y,F.origin??V);j?j=[[Math.min(U[0][0],j[0][0]),Math.min(U[0][1],j[0][1])],[Math.max(U[1][0],j[1][0]),Math.max(U[1][1],j[1][1])]]:j=U}m==null||m(I,{...b})}).on("drag",I=>{const{transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q}=t(),V=x0(I.sourceEvent,{transform:$,snapGrid:q,snapToGrid:H,containerBounds:C}),J=[];if(!y)return;const{x:Z,y:B,width:L,height:F}=b,U={},K=y.origin??Q,{width:ne,height:ce,x:_e,y:se}=OHn(w,a.controlDirection,V,a.boundaries,a.keepAspectRatio,K,T,j),G=ne!==L,oe=ce!==F,le=_e!==Z&&G,pe=se!==B&&oe;if(!le&&!pe&&!G&&!oe)return;if((le||pe||K[0]===1||K[1]===1)&&(U.x=le?_e:b.x,U.y=pe?se:b.y,b.x=U.x,b.y=U.y,N.length>0)){const qe=_e-Z,He=se-B;for(const Ce of N)Ce.position={x:Ce.position.x-qe+K[0]*(ne-L),y:Ce.position.y-He+K[1]*(ce-F)},J.push(Ce)}if((G||oe)&&(U.width=G&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ne:b.width,U.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ce:b.height,b.width=U.width,b.height=U.height),z&&y.expandParent){const qe=K[0]*(U.width??0);U.x&&U.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const $Hn={},kM=e=>{let n;const t=new Set,r=(h,_)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const m=n;n=_??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{($Hn?"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,c);return c},BHn=e=>e?kM(e):kM,{useDebugValue:PHn}=et,{useSyncExternalStoreWithSelector:FHn}=jW,HHn=e=>e;function gU(e,n=HHn,t){const r=FHn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return PHn(r),r}const SM=(e,n)=>{const t=BHn(e),r=(s,i=n)=>gU(t,s,i);return Object.assign(r,t),r},qHn=(e,n)=>e?SM(e,n):SM;function Nr(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 Hy=A.createContext(null),UHn=Hy.Provider,vU=uo.error001("react");function Nn(e,n){const t=A.useContext(Hy);if(t===null)throw new Error(vU);return gU(t,e,n)}function jr(){const e=A.useContext(Hy);if(e===null)throw new Error(vU);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const CM={display:"none"},GHn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},bU="react-flow__node-desc",yU="react-flow__edge-desc",VHn="react-flow__aria-live",KHn=e=>e.ariaLiveMessage,WHn=e=>e.ariaLabelConfig;function QHn({rfId:e}){const n=Nn(KHn);return f.jsx("div",{id:`${VHn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:GHn,children:n})}function XHn({rfId:e,disableKeyboardA11y:n}){const t=Nn(WHn);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${bU}-${e}`,style:CM,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${yU}-${e}`,style:CM,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(QHn,{rfId:e})]})}const qy=A.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return f.jsx("div",{className:us(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});qy.displayName="Panel";const EM="https://reactflow.dev?utm_source=attribution";function YHn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(qy,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${EM}`,children:f.jsx("a",{href:EM,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const ZHn=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 JHn(e,n){return Nr(e.selectedNodes.map(I1),n.selectedNodes.map(I1))&&Nr(e.selectedEdges.map(I1),n.selectedEdges.map(I1))}function eqn({onSelectionChange:e}){const n=jr(),{selectedNodes:t,selectedEdges:r}=Nn(ZHn,JHn);return A.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const tqn=e=>!!e.onSelectionChangeHandlers;function nqn({onSelectionChange:e}){const n=Nn(tqn);return e||n?f.jsx(eqn,{onSelectionChange:e}):null}const xU=[0,0],rqn={x:0,y:0,zoom:1},sqn=["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"],NM=[...sqn,"rfId"],iqn=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}),zM={translateExtent:Z0,nodeOrigin:xU,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function aqn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=Nn(iqn,Nr),u=jr();A.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=zM,o()}),[]);const h=A.useRef(zM);return A.useEffect(()=>{for(const _ of NM){const p=e[_],m=h.current[_];p!==m&&(typeof e[_]>"u"||(_==="nodes"?n(p):_==="edges"?t(p):_==="minZoom"?r(p):_==="maxZoom"?s(p):_==="translateExtent"?i(p):_==="nodeExtent"?a(p):_==="ariaLabelConfig"?u.setState({ariaLabelConfig:XFn(p)}):_==="fitView"?u.setState({fitViewQueued:p}):_==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[_]:p})))}h.current=e},NM.map(_=>e[_])),null}function jM(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function oqn(e){var r;const[n,t]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){t(e);return}const s=jM(),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=jM())!=null&&r.matches?"dark":"light"}const TM=typeof document<"u"?document:null;function nm(e=null,n={target:TM,actInsideInputWithModifier:!0}){const[t,r]=A.useState(!1),s=A.useRef(!1),i=A.useRef(new Set([])),[a,o]=A.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(_=>typeof _=="string").map(_=>_.replace("+",` `).replace(` `,` +`).split(` -`)),h=u.reduce((_,p)=>_.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return A.useEffect(()=>{const c=(n==null?void 0:n.target)??jM,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&Jq(m))return!1;const k=AM(m.code,o);if(i.current.add(m[k]),TM(a,i.current,!1)){const w=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},_=m=>{const x=AM(m.code,o);TM(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 c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",_),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",_),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function TM(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function AM(e,n){return n.includes(e)?"code":"key"}const WHn=()=>{const e=Sr();return A.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(),c=CC(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(c,{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:c}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-c},h=t.snapGrid??s,_=t.snapToGrid??i;return qm(u,r,_,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Th(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function xU(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 c of a)QHn(c,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 QHn(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 XHn(e,n){return xU(e,n)}function YHn(e,n){return xU(e,n)}function b_(e,n){return{id:e,type:"select",selected:n}}function jd(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(b_(i.id,a)))}return r}function RM({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),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==a&&t.push({id:a.id,item:a,type:"replace"}),c===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 MM(e){return{id:e.id,type:"remove"}}const ZHn=Qq();function JHn(e,n,t={}){return HFn(e,n,{...t,onError:t.onError??ZHn})}const OM=e=>NFn(e),eqn=e=>Uq(e);function wU(e){return A.forwardRef(e)}const tqn=typeof window<"u"?A.useLayoutEffect:A.useEffect;function DM(e){const[n,t]=A.useState(BigInt(0)),[r]=A.useState(()=>nqn(()=>t(s=>s+BigInt(1))));return tqn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function nqn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const kU=A.createContext(null);function rqn({children:e}){const n=Sr(),t=A.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:_,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=RM({items:k,lookup:p});for(const b of x.values())v=b(v);h&&u(k),v.length>0?_==null||_(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:w,setNodes:y}=n.getState();b&&y(w)})},[]),r=DM(t),s=A.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:_,edgeLookup:p}=n.getState();let m=c;for(const x of o)m=typeof x=="function"?x(m):x;h?u(m):_&&_(RM({items:m,lookup:p}))},[]),i=DM(s),a=A.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(kU.Provider,{value:a,children:e})}function sqn(){const e=A.useContext(kU);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const iqn=e=>!!e.panZoom;function RC(){const e=WHn(),n=Sr(),t=sqn(),r=En(iqn),s=A.useMemo(()=>{const i=_=>n.getState().nodeLookup.get(_),a=_=>{t.nodeQueue.push(_)},o=_=>{t.edgeQueue.push(_)},c=_=>{var b,w;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=OM(_)?_:p.get(_.id),k=x.parentId?Yq(x.position,x.measured,x.parentId,p,m):x.position,v={...x,position:k,width:((b=x.measured)==null?void 0:b.width)??x.width,height:((w=x.measured)==null?void 0:w.height)??x.height};return em(v)},u=(_,p,m={replace:!1})=>{a(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&OM(v)?v:{...k,...v}}return k}))},h=(_,p,m={replace:!1})=>{o(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&eqn(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(_=>({..._})),getNode:_=>{var p;return(p=i(_))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:_=[]}=n.getState();return _.map(p=>({...p}))},getEdge:_=>n.getState().edgeLookup.get(_),setNodes:a,setEdges:o,addNodes:_=>{const p=Array.isArray(_)?_:[_];t.nodeQueue.push(m=>[...m,...p])},addEdges:_=>{const p=Array.isArray(_)?_:[_];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:_=[],edges:p=[],transform:m}=n.getState(),[x,k,v]=m;return{nodes:_.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x,y:k,zoom:v}}},deleteElements:async({nodes:_=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:N,edges:z}=await RFn({nodesToRemove:_,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),T=z.length>0,j=N.length>0;if(T){const M=z.map(MM);v==null||v(z),w(M)}if(j){const M=N.map(MM);k==null||k(N),b(M)}return(j||T)&&(y==null||y({nodes:N,edges:z})),{deletedNodes:N,deletedEdges:z}},getIntersectingNodes:(_,p=!0,m)=>{const x=lM(_),k=x?_:c(_),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const w=n.getState().nodeLookup.get(b.id);if(w&&!x&&(b.id===_.id||!w.internals.positionAbsolute))return!1;const y=em(v?b:w),C=vb(y,k);return p&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(_,p,m=!0)=>{const k=lM(_)?_:c(_);if(!k)return!1;const v=vb(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(_,p,m={replace:!1})=>{u(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},updateEdge:h,updateEdgeData:(_,p,m={replace:!1})=>{h(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},getNodesBounds:_=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return zFn(_,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:_,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${_}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:_,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${_?p?`-${_}-${p}`:`-${_}`:""}`))==null?void 0:x.values())??[])},fitView:async _=>{const p=n.getState().fitViewResolver??DFn();return n.setState({fitViewQueued:!0,fitViewOptions:_,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return A.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const LM=e=>e.selected,aqn=typeof window<"u"?window:void 0;function oqn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Sr(),{deleteElements:r}=RC(),s=nm(e,{actInsideInputWithModifier:!1}),i=nm(n,{target:aqn});A.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(LM),edges:a.filter(LM)}),t.setState({nodesSelectionActive:!1})}},[s]),A.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function cqn(e){const n=Sr();A.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=EC(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",uo.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 Uy={position:"absolute",width:"100%",height:"100%",top:0,left:0},lqn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function uqn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=G_.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:_,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:C}){const N=Sr(),z=A.useRef(null),{userSelectionActive:T,lib:j,connectionInProgress:M}=En(lqn,wr),D=nm(p),I=A.useRef();cqn(z);const $=A.useCallback(q=>{b==null||b({x:q[0],y:q[1],zoom:q[2]}),w||N.setState({transform:q})},[b,w]);return A.useEffect(()=>{if(z.current){I.current=vHn({domNode:z.current,minZoom:h,maxZoom:_,translateExtent:u,viewport:c,onDraggingChange:V=>N.setState(J=>J.paneDragging===V?J:{paneDragging:V}),onPanZoomStart:(V,J)=>{const{onViewportChangeStart:Z,onMoveStart:B}=N.getState();B==null||B(V,J),Z==null||Z(J)},onPanZoom:(V,J)=>{const{onViewportChange:Z,onMove:B}=N.getState();B==null||B(V,J),Z==null||Z(J)},onPanZoomEnd:(V,J)=>{const{onViewportChangeEnd:Z,onMoveEnd:B}=N.getState();B==null||B(V,J),Z==null||Z(J)}});const{x:q,y:H,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[q,H,Q],domNode:z.current.closest(".react-flow")}),()=>{var V;(V=I.current)==null||V.destroy()}}},[]),A.useEffect(()=>{var q;(q=I.current)==null||q.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:v,userSelectionActive:T,noWheelClassName:k,lib:j,onTransformChange:$,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,i,a,o,D,m,v,T,k,j,$,M,C,y]),f.jsx("div",{className:"react-flow__renderer",ref:z,style:Uy,children:x})}const _qn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function fqn(){const{userSelectionActive:e,userSelectionRect:n}=En(_qn,wr);return e&&n?f.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 E4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},dqn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function hqn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=J0.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:_,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:k}){const v=A.useRef(0),b=Sr(),{userSelectionActive:w,elementsSelectable:y,dragging:C,panBy:N,autoPanSpeed:z}=En(dqn,wr),T=y&&(e||w),j=A.useRef(null),M=A.useRef(),D=A.useRef(new Set),I=A.useRef(new Set),$=A.useRef(!1),q=A.useRef(!1),H=A.useRef({x:0,y:0}),Q=A.useRef(!1),V=G=>{if(q.current||$.current||b.getState().connection.inProgress){q.current=!1,$.current=!1;return}u==null||u(G),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},J=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}h==null||h(G)},Z=_?G=>_(G):void 0,B=G=>{q.current&&(G.stopPropagation(),q.current=!1)},L=G=>{var Se,at;const{domNode:oe,transform:le}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const fe=G.target===j.current;if(!fe&&!!G.target.closest(".nokey")||!e||!(a&&fe||n)||G.button!==0||!G.isPrimary)return;(at=(Se=G.target)==null?void 0:Se.setPointerCapture)==null||at.call(Se,G.pointerId),q.current=!1;const{x:Oe,y:Qe}=io(G.nativeEvent,M.current),qe=qm({x:Oe,y:Qe},le);b.setState({userSelectionRect:{width:0,height:0,startX:qe.x,startY:qe.y,x:Oe,y:Qe}}),fe||(G.stopPropagation(),G.preventDefault())};function F(G,oe){const{userSelectionRect:le}=b.getState();if(!le)return;const{transform:fe,nodeLookup:me,edgeLookup:Re,connectionLookup:Oe,triggerNodeChanges:Qe,triggerEdgeChanges:qe,defaultEdgeOptions:Se}=b.getState(),at={x:le.startX,y:le.startY},{x:et,y:ct}=Th(at,fe),wt={startX:at.x,startY:at.y,x:GLe.id)),I.current=new Set;const dt=(Se==null?void 0:Se.selectable)??!0;for(const Le of D.current){const ge=Oe.get(Le);if(ge)for(const{edgeId:Te}of ge.values()){const Fe=Re.get(Te);Fe&&(Fe.selectable??dt)&&I.current.add(Te)}}if(!uM($t,D.current)){const Le=jd(me,D.current,!0);Qe(Le)}if(!uM(ht,I.current)){const Le=jd(Re,I.current);qe(Le)}b.setState({userSelectionRect:wt,userSelectionActive:!0,nodesSelectionActive:!1})}function U(){if(!s||!M.current)return;const[G,oe]=SC(H.current,M.current,z);N({x:G,y:oe}).then(le=>{if(!q.current||!le){v.current=requestAnimationFrame(U);return}const{x:fe,y:me}=H.current;F(fe,me),v.current=requestAnimationFrame(U)})}const K=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};A.useEffect(()=>()=>K(),[]);const ne=G=>{const{userSelectionRect:oe,transform:le,resetSelectedElements:fe}=b.getState();if(!M.current||!oe)return;const{x:me,y:Re}=io(G.nativeEvent,M.current);H.current={x:me,y:Re};const Oe=Th({x:oe.startX,y:oe.startY},le);if(!q.current){const Qe=n?0:i;if(Math.hypot(me-Oe.x,Re-Oe.y)<=Qe)return;fe(),o==null||o(G)}q.current=!0,Q.current||(U(),Q.current=!0),F(me,Re)},ce=G=>{var oe,le;if(!T){G.target===j.current&&b.getState().connection.inProgress&&($.current=!0);return}G.button===0&&((le=(oe=G.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,G.pointerId),!w&&G.target===j.current&&b.getState().userSelectionRect&&(V==null||V(G)),b.setState({userSelectionActive:!1,userSelectionRect:null}),q.current&&(c==null||c(G),b.setState({nodesSelectionActive:D.current.size>0})),K())},_e=G=>{var oe,le;(le=(oe=G.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,G.pointerId),K()},se=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:is(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:T?void 0:E4(V,j),onContextMenu:E4(J,j),onWheel:E4(Z,j),onPointerEnter:T?void 0:p,onPointerMove:T?ne:m,onPointerUp:ce,onPointerCancel:T?_e:void 0,onPointerDownCapture:T?L:void 0,onClickCapture:T?B:void 0,onPointerLeave:x,ref:j,style:Uy,children:[k,f.jsx(fqn,{})]})}function fk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:c}=n.getState(),u=o.get(e);if(!u){c==null||c("012",uo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function SU({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Sr(),[c,u]=A.useState(!1),h=A.useRef();return A.useEffect(()=>{h.current=sHn({getStoreItems:()=>o.getState(),onNodeMouseDown:_=>{fk({id:_,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),A.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var _;(_=h.current)==null||_.destroy()}},[t,r,n,i,e,s,a]),c}const pqn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function CU(){const e=Sr();return A.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),_=new Map,p=pqn(a),m=s?i[0]:5,x=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*x*t.factor;for(const[,b]of u){if(!p(b))continue;let w={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(w=Hm(w,i));const{position:y,positionAbsolute:C}=Gq({nodeId:b.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=y,b.internals.positionAbsolute=C,_.set(b.id,b)}c(_)},[])}const MC=A.createContext(null),mqn=MC.Provider;MC.Consumer;const EU=()=>A.useContext(MC),gqn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),NU=A.createContext(null);function vqn({children:e}){const n=En(gqn,wr);return f.jsx(NU.Provider,{value:n,children:e})}function bqn(){const e=A.useContext(NU);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const yqn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},xqn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return yqn;const h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===zh.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:h&&u}};function wqn({type:e="source",position:n=Tt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:_,...p},m){var Q,V;const x=a||null,k=e==="target",v=Sr(),b=EU(),{connectOnClick:w,noPanClassName:y,rfId:C}=bqn(),{connectingFrom:N,connectingTo:z,clickConnecting:T,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=En(xqn(b,x,e),wr);b||(V=(Q=v.getState()).onError)==null||V.call(Q,"010",uo.error010());const $=J=>{const{defaultEdgeOptions:Z,onConnect:B,hasDefaultEdges:L}=v.getState(),F={...Z,...J};if(L){const{edges:U,setEdges:K,onError:ne}=v.getState();K(JHn(F,U,{onError:ne}))}B==null||B(F),o==null||o(F)},q=J=>{if(!b)return;const Z=eU(J.nativeEvent);if(s&&(Z&&J.button===0||!Z)){const B=v.getState();_k.onPointerDown(J.nativeEvent,{handleDomNode:J.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:k,handleId:x,nodeId:b,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...L)=>{var F,U;return(U=(F=v.getState()).onConnectEnd)==null?void 0:U.call(F,...L)},updateConnection:B.updateConnection,onConnect:$,isValidConnection:t||((...L)=>{var F,U;return((U=(F=v.getState()).isValidConnection)==null?void 0:U.call(F,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}Z?h==null||h(J):_==null||_(J)},H=J=>{const{onClickConnectStart:Z,onClickConnectEnd:B,connectionClickStartHandle:L,connectionMode:F,isValidConnection:U,lib:K,rfId:ne,nodeLookup:ce,connection:_e}=v.getState();if(!b||!L&&!s)return;if(!L){Z==null||Z(J.nativeEvent,{nodeId:b,handleId:x,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:x}});return}const se=Zq(J.target),G=t||U,{connection:oe,isValid:le}=_k.isValid(J.nativeEvent,{handle:{nodeId:b,id:x,type:e},connectionMode:F,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:G,flowId:ne,doc:se,lib:K,nodeLookup:ce});le&&oe&&$(oe);const fe=structuredClone(_e);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,B==null||B(J,fe),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":x,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${x}-${e}`,className:is(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:T,connectingfrom:N,connectingto:z,valid:I,connectionindicator:r&&(!M||j)&&(M||D?i:s)}]),onMouseDown:q,onTouchStart:q,onClick:w?H:void 0,ref:m,...p,children:c})}const Au=A.memo(wU(wqn));function kqn({data:e,isConnectable:n,sourcePosition:t=Tt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Au,{type:"source",position:t,isConnectable:n})]})}function Sqn({data:e,isConnectable:n,targetPosition:t=Tt.Top,sourcePosition:r=Tt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Au,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Au,{type:"source",position:r,isConnectable:n})]})}function Cqn(){return null}function Eqn({data:e,isConnectable:n,targetPosition:t=Tt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Au,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const bb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},IM={input:kqn,default:Sqn,output:Eqn,group:Cqn};function Nqn(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 zqn=e=>{const{width:n,height:t,x:r,y:s}=Fm(e.nodeLookup,{filter:i=>!!i.selected});return{width:so(n)?n:null,height:so(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 jqn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Sr(),{width:s,height:i,transformString:a,userSelectionActive:o}=En(zqn,wr),c=CU(),u=A.useRef(null);A.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(SU({nodeRef:u,disabled:!h}),!h)return null;const _=e?m=>{const x=r.getState().nodes.filter(k=>k.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(bb,m.key)&&(m.preventDefault(),c({direction:bb[m.key],factor:m.shiftKey?4:1}))};return f.jsx("div",{className:is(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:_,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const $M=typeof window<"u"?window:void 0,Tqn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function zU({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:h,selectionMode:_,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:T,panOnDrag:j,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:$,maxZoom:q,preventScrolling:H,onSelectionContextMenu:Q,noWheelClassName:V,noPanClassName:J,disableKeyboardA11y:Z,onViewportChange:B,isControlledViewport:L}){const{nodesSelectionActive:F,userSelectionActive:U}=En(Tqn,wr),K=nm(u,{target:$M}),ne=nm(k,{target:$M}),ce=ne||j,_e=ne||C,se=h&&ce!==!0,G=K||U||se;return oqn({deleteKeyCode:c,multiSelectionKeyCode:x}),f.jsx(uqn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:_e,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:T,panOnDrag:!K&&ce,defaultViewport:D,translateExtent:I,minZoom:$,maxZoom:q,zoomActivationKeyCode:v,preventScrolling:H,noWheelClassName:V,noPanClassName:J,onViewportChange:B,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:f.jsxs(hqn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ce,autoPanOnSelection:M,isSelecting:!!G,selectionMode:_,selectionKeyPressed:K,paneClickDistance:o,selectionOnDrag:se,children:[e,F&&f.jsx(jqn,{onSelectionContextMenu:Q,noPanClassName:J,disableKeyboardA11y:Z})]})})}zU.displayName="FlowRenderer";const Aqn=A.memo(zU),Rqn=e=>n=>e?kC(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 Mqn(e){return En(A.useCallback(Rqn(e),[e]),wr)}const Oqn=e=>e.updateNodeInternals;function Dqn(){const e=En(Oqn),[n]=A.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 A.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function Lqn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Sr(),i=A.useRef(null),a=A.useRef(null),o=A.useRef(e.sourcePosition),c=A.useRef(e.targetPosition),u=A.useRef(n),h=t&&!!e.internals.handleBounds;return A.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,e.hidden]),A.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),A.useEffect(()=>{if(i.current){const _=u.current!==n,p=o.current!==e.sourcePosition,m=c.current!==e.targetPosition;(_||p||m)&&(u.current=n,o.current=e.sourcePosition,c.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 Iqn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:_,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:w}){const{node:y,internals:C,isParent:N}=En(G=>{const oe=G.nodeLookup.get(e),le=G.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:le}},wr);let z=y.type||"default",T=(v==null?void 0:v[z])||IM[z];T===void 0&&(w==null||w("003",uo.error003(z)),z="default",T=(v==null?void 0:v.default)||IM.default);const j=!!(y.draggable||o&&typeof y.draggable>"u"),M=!!(y.selectable||c&&typeof y.selectable>"u"),D=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||h&&typeof y.focusable>"u"),$=Sr(),q=Xq(y),H=Lqn({node:y,nodeType:z,hasDimensions:q,resizeObserver:_}),Q=SU({nodeRef:H,disabled:y.hidden||!j,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),V=CU();if(y.hidden)return null;const J=vl(y),Z=Nqn(y),B=M||j||n||t||r||s,L=t?G=>t(G,{...C.userNode}):void 0,F=r?G=>r(G,{...C.userNode}):void 0,U=s?G=>s(G,{...C.userNode}):void 0,K=i?G=>i(G,{...C.userNode}):void 0,ne=a?G=>a(G,{...C.userNode}):void 0,ce=G=>{const{selectNodesOnDrag:oe,nodeDragThreshold:le}=$.getState();M&&(!oe||!j||le>0)&&fk({id:e,store:$,nodeRef:H}),n&&n(G,{...C.userNode})},_e=G=>{if(!(Jq(G.nativeEvent)||x)){if(Pq.includes(G.key)&&M){const oe=G.key==="Escape";fk({id:e,store:$,unselect:oe,nodeRef:H})}else if(j&&y.selected&&Object.prototype.hasOwnProperty.call(bb,G.key)){G.preventDefault();const{ariaLabelConfig:oe}=$.getState();$.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:bb[G.key],factor:G.shiftKey?4:1})}}},se=()=>{var Oe;if(x||!((Oe=H.current)!=null&&Oe.matches(":focus-visible")))return;const{transform:G,width:oe,height:le,autoPanOnNodeFocus:fe,setCenter:me}=$.getState();if(!fe)return;kC(new Map([[e,y]]),{x:0,y:0,width:oe,height:le},G,!0).length>0||me(y.position.x+J.width/2,y.position.y+J.height/2,{zoom:G[2]})};return f.jsx("div",{className:is(["react-flow__node",`react-flow__node-${z}`,{[m]:j},y.className,{selected:y.selected,selectable:M,parent:N,draggable:j,dragging:Q}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:q?"visible":"hidden",...y.style,...Z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:F,onMouseLeave:U,onContextMenu:K,onClick:ce,onDoubleClick:ne,onKeyDown:I?_e:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${vU}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:f.jsx(mqn,{value:e,children:f.jsx(T,{id:e,data:y.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:j,deletable:y.deletable??!0,isConnectable:D,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:Q,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...J})})})}var $qn=A.memo(Iqn);const Bqn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function jU(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=En(Bqn,wr),a=Mqn(e.onlyRenderVisibleElements),o=Dqn();return f.jsx("div",{className:"react-flow__nodes",style:Uy,children:a.map(c=>f.jsx($qn,{id:c,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},c))})}jU.displayName="NodeRenderer";const Pqn=A.memo(jU);function Fqn(e){return En(A.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&&BFn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),wr)}const Hqn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},qqn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},BM={[mb.Arrow]:Hqn,[mb.ArrowClosed]:qqn};function Uqn(e){const n=Sr();return A.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(BM,e)?BM[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",uo.error009(e)),null)},[e])}const Gqn=({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 c=Uqn(n);return c?f.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:f.jsx(c,{color:t,strokeWidth:a})}):null},TU=({defaultColor:e,rfId:n})=>{const t=En(i=>i.edges),r=En(i=>i.defaultEdgeOptions),s=A.useMemo(()=>KFn(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?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:s.map(i=>f.jsx(Gqn,{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};TU.displayName="MarkerDefinitions";var Vqn=A.memo(TU);function AU({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...h}){const[_,p]=A.useState({x:1,y:0,width:0,height:0}),m=is(["react-flow__edge-textwrapper",u]),x=A.useRef(null);return A.useEffect(()=>{if(x.current){const k=x.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-_.width/2} ${n-_.height/2})`,className:m,visibility:_.width?"visible":"hidden",...h,children:[s&&f.jsx("rect",{width:_.width+2*a[0],x:-a[0],y:-a[1],height:_.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:x,style:r,children:t}),c]}):null}AU.displayName="EdgeText";const Kqn=A.memo(AU);function Gy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:is(["react-flow__edge-path",h.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&so(n)&&so(t)?f.jsx(Kqn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function PM({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Tt.Left||e===Tt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function RU({sourceX:e,sourceY:n,sourcePosition:t=Tt.Bottom,targetX:r,targetY:s,targetPosition:i=Tt.Top}){const[a,o]=PM({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=PM({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,_,p,m]=tU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${o} ${c},${u} ${r},${s}`,h,_,p,m]}function MU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[w,y,C]=RU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return f.jsx(Gy,{id:N,path:w,labelX:y,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})})}const Wqn=MU({isInternal:!1}),OU=MU({isInternal:!0});Wqn.displayName="SimpleBezierEdge";OU.displayName="SimpleBezierEdgeInternal";function DU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,sourcePosition:m=Tt.Bottom,targetPosition:x=Tt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=ck({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),z=e.isInternal?void 0:n;return f.jsx(Gy,{id:z,path:y,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:k,markerStart:v,interactionWidth:w})})}const LU=DU({isInternal:!1}),IU=DU({isInternal:!0});LU.displayName="SmoothStepEdge";IU.displayName="SmoothStepEdgeInternal";function $U(e){return A.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(LU,{...t,id:r,pathOptions:A.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const Qqn=$U({isInternal:!1}),BU=$U({isInternal:!0});Qqn.displayName="StepEdge";BU.displayName="StepEdgeInternal";function PU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})=>{const[v,b,w]=sU({sourceX:t,sourceY:r,targetX:s,targetY:i}),y=e.isInternal?void 0:n;return f.jsx(Gy,{id:y,path:v,labelX:b,labelY:w,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})})}const Xqn=PU({isInternal:!1}),FU=PU({isInternal:!0});Xqn.displayName="StraightEdge";FU.displayName="StraightEdgeInternal";function HU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Tt.Bottom,targetPosition:o=Tt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=nU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),z=e.isInternal?void 0:n;return f.jsx(Gy,{id:z,path:y,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:w})})}const Yqn=HU({isInternal:!1}),qU=HU({isInternal:!0});Yqn.displayName="BezierEdge";qU.displayName="BezierEdgeInternal";const FM={default:qU,straight:FU,step:BU,smoothstep:IU,simplebezier:OU},HM={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Zqn=(e,n,t)=>t===Tt.Left?e-n:t===Tt.Right?e+n:e,Jqn=(e,n,t)=>t===Tt.Top?e-n:t===Tt.Bottom?e+n:e,qM="react-flow__edgeupdater";function UM({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:is([qM,`${qM}-${o}`]),cx:Zqn(n,r,e),cy:Jqn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function eUn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:_,setReconnecting:p,setUpdateHover:m}){const x=Sr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:T,connectionMode:j,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:$,nodeLookup:q,rfId:H,panBy:Q,updateConnection:V}=x.getState(),J=N.type==="target",Z=(F,U)=>{p(!1),_==null||_(F,t,N.type,U)},B=F=>u==null?void 0:u(t,F),L=(F,U)=>{p(!0),h==null||h(C,t,N.type),I==null||I(F,U)};_k.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:j,connectionRadius:M,domNode:T,handleId:N.id,nodeId:N.nodeId,nodeLookup:q,isTarget:J,edgeUpdaterType:N.type,lib:D,flowId:H,cancelConnection:$,panBy:Q,isValidConnection:(...F)=>{var U,K;return((K=(U=x.getState()).isValidConnection)==null?void 0:K.call(U,...F))??!0},onConnect:B,onConnectStart:L,onConnectEnd:(...F)=>{var U,K;return(K=(U=x.getState()).onConnectEnd)==null?void 0:K.call(U,...F)},onReconnectEnd:Z,updateConnection:V,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),w=()=>m(!0),y=()=>m(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(UM,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&f.jsx(UM,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function tUn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:w}){let y=En(me=>me.edgeLookup.get(e));const C=En(me=>me.defaultEdgeOptions);y=C?{...C,...y}:y;let N=y.type||"default",z=(k==null?void 0:k[N])||FM[N];z===void 0&&(b==null||b("011",uo.error011(N)),N="default",z=(k==null?void 0:k.default)||FM.default);const T=!!(y.focusable||n&&typeof y.focusable>"u"),j=typeof _<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),D=A.useRef(null),[I,$]=A.useState(!1),[q,H]=A.useState(!1),Q=Sr(),{zIndex:V=y.zIndex,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U}=En(A.useCallback(me=>{const Re=me.nodeLookup.get(y.source),Oe=me.nodeLookup.get(y.target);if(!Re||!Oe)return HM;const Qe=VFn({id:e,sourceNode:Re,targetNode:Oe,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:me.connectionMode,onError:b}),qe=$Fn({selected:y.selected,zIndex:y.zIndex,sourceNode:Re,targetNode:Oe,elevateOnSelect:me.elevateEdgesOnSelect,zIndexMode:me.zIndexMode});return{...Qe||HM,zIndex:qe}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),wr),K=A.useMemo(()=>y.markerStart?`url('#${lk(y.markerStart,x)}')`:void 0,[y.markerStart,x]),ne=A.useMemo(()=>y.markerEnd?`url('#${lk(y.markerEnd,x)}')`:void 0,[y.markerEnd,x]);if(y.hidden||J===null||Z===null||B===null||L===null)return null;const ce=me=>{var qe;const{addSelectedEdges:Re,unselectNodesAndEdges:Oe,multiSelectionActive:Qe}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),y.selected&&Qe?(Oe({nodes:[],edges:[y]}),(qe=D.current)==null||qe.blur()):Re([e])),s&&s(me,y)},_e=i?me=>{i(me,{...y})}:void 0,se=a?me=>{a(me,{...y})}:void 0,G=o?me=>{o(me,{...y})}:void 0,oe=c?me=>{c(me,{...y})}:void 0,le=u?me=>{u(me,{...y})}:void 0,fe=me=>{var Re;if(!w&&Pq.includes(me.key)&&M){const{unselectNodesAndEdges:Oe,addSelectedEdges:Qe}=Q.getState();me.key==="Escape"?((Re=D.current)==null||Re.blur(),Oe({edges:[y]})):Qe([e])}};return f.jsx("svg",{style:{zIndex:V},children:f.jsxs("g",{className:is(["react-flow__edge",`react-flow__edge-${N}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ce,onDoubleClick:_e,onContextMenu:se,onMouseEnter:G,onMouseMove:oe,onMouseLeave:le,onKeyDown:T?fe:void 0,tabIndex:T?0:void 0,role:y.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":T?`${bU}-${x}`:void 0,ref:D,...y.domAttributes,children:[!q&&f.jsx(z,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:K,markerEnd:ne,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),j&&f.jsx(eUn,{edge:y,isReconnectable:j,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U,setUpdateHover:$,setReconnecting:H})]})})}var nUn=A.memo(tUn);const rUn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function UU({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:_,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,onError:y}=En(rUn,wr),C=Fqn(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(Vqn,{defaultColor:e,rfId:t}),C.map(N=>f.jsx(nUn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:_,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},N))]})}UU.displayName="EdgeRenderer";const sUn=A.memo(UU),iUn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function aUn({children:e}){const n=En(iUn);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function oUn(e){const n=RC(),t=A.useRef(!1);A.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const cUn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function lUn(e){const n=En(cUn),t=Sr();return A.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function uUn(e){return e.connection.inProgress?{...e.connection,to:qm(e.connection.to,e.transform)}:{...e.connection}}function _Un(e){return uUn}function fUn(e){const n=_Un();return En(n,wr)}const dUn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function hUn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=En(dUn,wr);return!(i&&s&&c)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:is(["react-flow__connection",qq(o)]),children:f.jsx(GU,{style:n,type:t,CustomComponent:r,isValid:o})})})}const GU=({style:e,type:n=iu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,toHandle:_,toPosition:p,pointer:m}=fUn();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:qq(r),toNode:h,toHandle:_,pointer:m});let x="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case iu.Bezier:[x]=nU(k);break;case iu.SimpleBezier:[x]=RU(k);break;case iu.Step:[x]=ck({...k,borderRadius:0});break;case iu.SmoothStep:[x]=ck(k);break;default:[x]=sU(k)}return f.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};GU.displayName="ConnectionLine";const pUn={};function GM(e=pUn){A.useRef(e),Sr(),A.useEffect(()=>{},[e])}function mUn(){Sr(),A.useRef(!1),A.useEffect(()=>{},[])}function VU({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:_,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:T,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:$,minZoom:q,maxZoom:H,preventScrolling:Q,defaultMarkerColor:V,zoomOnScroll:J,zoomOnPinch:Z,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:U,panOnDrag:K,autoPanOnSelection:ne,onPaneClick:ce,onPaneMouseEnter:_e,onPaneMouseMove:se,onPaneMouseLeave:G,onPaneScroll:oe,onPaneContextMenu:le,paneClickDistance:fe,nodeClickDistance:me,onEdgeContextMenu:Re,onEdgeMouseEnter:Oe,onEdgeMouseMove:Qe,onEdgeMouseLeave:qe,reconnectRadius:Se,onReconnect:at,onReconnectStart:et,onReconnectEnd:ct,noDragClassName:wt,noWheelClassName:$t,noPanClassName:ht,disableKeyboardA11y:dt,nodeExtent:Le,rfId:ge,viewport:Te,onViewportChange:Fe}){return GM(e),GM(n),mUn(),oUn(t),lUn(Te),f.jsx(Aqn,{onPaneClick:ce,onPaneMouseEnter:_e,onPaneMouseMove:se,onPaneMouseLeave:G,onPaneContextMenu:le,onPaneScroll:oe,paneClickDistance:fe,deleteKeyCode:j,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:T,elementsSelectable:D,zoomOnScroll:J,zoomOnPinch:Z,zoomOnDoubleClick:U,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:K,autoPanOnSelection:ne,defaultViewport:I,translateExtent:$,minZoom:q,maxZoom:H,onSelectionContextMenu:_,preventScrolling:Q,noDragClassName:wt,noWheelClassName:$t,noPanClassName:ht,disableKeyboardA11y:dt,onViewportChange:Fe,isControlledViewport:!!Te,children:f.jsxs(aUn,{children:[f.jsx(sUn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:at,onReconnectStart:et,onReconnectEnd:ct,onlyRenderVisibleElements:M,onEdgeContextMenu:Re,onEdgeMouseEnter:Oe,onEdgeMouseMove:Qe,onEdgeMouseLeave:qe,reconnectRadius:Se,defaultMarkerColor:V,noPanClassName:ht,disableKeyboardA11y:dt,rfId:ge}),f.jsx(hUn,{style:k,type:x,component:v,containerStyle:b}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(Pqn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:me,onlyRenderVisibleElements:M,noPanClassName:ht,noDragClassName:wt,disableKeyboardA11y:dt,nodeExtent:Le,rfId:ge}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}VU.displayName="GraphView";const gUn=A.memo(VU),vUn=Qq(),VM=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:_,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,k=new Map,v=new Map,b=r??n??[],w=t??e??[],y=h??[0,0],C=_??Z0;oU(k,v,b);const{nodesInitialized:N}=uk(w,m,x,{nodeOrigin:y,nodeExtent:C,zIndexMode:p});let z=[0,0,1];if(a&&s&&i){const T=Fm(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:j,y:M,zoom:D}=CC(T,s,i,c,u,(o==null?void 0:o.padding)??.1);z=[j,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:z,nodes:w,nodesInitialized:N,nodeLookup:m,parentLookup:x,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Z0,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:zh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:{...Hq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:vUn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Fq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},bUn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p})=>jHn((m,x)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:w,fitViewResolver:y,width:C,height:N,minZoom:z,maxZoom:T}=x();b&&(await AFn({nodes:v,width:C,height:N,panZoom:b,minZoom:z,maxZoom:T},w),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...VM({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:_,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:z,nodesSelectionActive:T}=x(),{nodesInitialized:j,hasSelectedNodes:M}=uk(v,b,w,{nodeOrigin:y,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z}),D=T&&M;N&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:w}=x();oU(b,w,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:w}=x();w(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:w}=x();w(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:w,parentLookup:y,domNode:C,nodeOrigin:N,nodeExtent:z,debug:T,fitViewQueued:j,zIndexMode:M}=x(),{changes:D,updatedInternals:I}=eHn(v,w,y,C,N,z,M);I&&(XFn(w,y,{nodeOrigin:N,nodeExtent:z,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(T&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const w=[];let y=[];const{nodeLookup:C,triggerNodeChanges:N,connection:z,updateConnection:T,onNodesChangeMiddlewareMap:j}=x();for(const[M,D]of v){const I=C.get(M),$=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),q={id:M,type:"position",position:$?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&z.inProgress&&z.fromNode.id===I.id){const H=cf(I,z.fromHandle,Tt.Left,!0);T({...z,from:H})}$&&I.parentId&&w.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),y.push(q)}if(w.length>0){const{parentLookup:M,nodeOrigin:D}=x(),I=AC(w,C,M,D);y.push(...I)}for(const M of j.values())y=M(y);N(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:w,nodes:y,hasDefaultNodes:C,debug:N}=x();if(v!=null&&v.length){if(C){const z=XHn(v,y);w(z)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:w,edges:y,hasDefaultEdges:C,debug:N}=x();if(v!=null&&v.length){if(C){const z=YHn(v,y);w(z)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const z=v.map(T=>b_(T,!0));C(z);return}C(jd(y,new Set([...v]),!0)),N(jd(w))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const z=v.map(T=>b_(T,!0));N(z);return}N(jd(w,new Set([...v]))),C(jd(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:w,nodes:y,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:z}=x(),T=v||y,j=b||w,M=[];for(const I of T){if(!I.selected)continue;const $=C.get(I.id);$&&($.selected=!1),M.push(b_(I.id,!1))}const D=[];for(const I of j)I.selected&&D.push(b_(I.id,!1));N(M),z(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:w}=x();b==null||b.setScaleExtent([v,w]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:w}=x();b==null||b.setScaleExtent([w,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=x().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:C}=x();if(!C)return;const N=b.reduce((T,j)=>j.selected?[...T,b_(j.id,!1)]:T,[]),z=v.reduce((T,j)=>j.selected?[...T,b_(j.id,!1)]:T,[]);w(N),y(z)},setNodeExtent:v=>{const{nodes:b,nodeLookup:w,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:z,zIndexMode:T}=x();v[0][0]===z[0][0]&&v[0][1]===z[0][1]&&v[1][0]===z[1][0]&&v[1][1]===z[1][1]||(uk(b,w,y,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:T}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:w,height:y,panZoom:C,translateExtent:N}=x();return tHn({delta:v,panZoom:C,transform:b,translateExtent:N,width:w,height:y})},setCenter:async(v,b,w)=>{const{width:y,height:C,maxZoom:N,panZoom:z}=x();if(!z)return!1;const T=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:N;return await z.setViewport({x:y/2-v*T,y:C/2-b*T,zoom:T},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),!0},cancelConnection:()=>{m({connection:{...Hq}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...VM()})}},Object.is);function yUn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p,children:m}){const[x]=A.useState(()=>bUn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:_,zIndexMode:p}));return f.jsx(THn,{value:x,children:f.jsx(rqn,{children:f.jsx(vqn,{children:m})})})}function xUn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m}){return A.useContext(Hy)?f.jsx(f.Fragment,{children:e}):f.jsx(yUn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m,children:e})}const wUn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function kUn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:_,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:$,onSelectionChange:q,onSelectionDragStart:H,onSelectionDrag:Q,onSelectionDragStop:V,onSelectionContextMenu:J,onSelectionStart:Z,onSelectionEnd:B,onBeforeDelete:L,connectionMode:F,connectionLineType:U=iu.Bezier,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:ce,deleteKeyCode:_e="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:G=!1,selectionMode:oe=J0.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:fe=tm()?"Meta":"Control",zoomActivationKeyCode:me=tm()?"Meta":"Control",snapToGrid:Re,snapGrid:Oe,onlyRenderVisibleElements:Qe=!1,selectNodesOnDrag:qe,nodesDraggable:Se,autoPanOnNodeFocus:at,nodesConnectable:et,nodesFocusable:ct,nodeOrigin:wt=yU,edgesFocusable:$t,edgesReconnectable:ht,elementsSelectable:dt=!0,defaultViewport:Le=qHn,minZoom:ge=.5,maxZoom:Te=2,translateExtent:Fe=Z0,preventScrolling:st=!0,nodeExtent:_t,defaultMarkerColor:mt="#b1b1b7",zoomOnScroll:Ue=!0,zoomOnPinch:Gt=!0,panOnScroll:sn=!1,panOnScrollSpeed:jt=.5,panOnScrollMode:gt=G_.Free,zoomOnDoubleClick:$n=!0,panOnDrag:Zt=!0,onPaneClick:gn,onPaneMouseEnter:mr,onPaneMouseMove:Bn,onPaneMouseLeave:Nn,onPaneScroll:zn,onPaneContextMenu:Pn,paneClickDistance:jr=1,nodeClickDistance:Ct=0,children:tn,onReconnect:vn,onReconnectStart:on,onReconnectEnd:gr,onEdgeContextMenu:bn,onEdgeDoubleClick:yn,onEdgeMouseEnter:Hn,onEdgeMouseMove:Ie,onEdgeMouseLeave:Ke,reconnectRadius:Cn=10,onNodesChange:Zn,onEdgesChange:Xt,noDragClassName:Jt="nodrag",noWheelClassName:jn="nowheel",noPanClassName:Wr="nopan",fitView:qn,fitViewOptions:ps,connectOnClick:hi,attributionPosition:Rs,proOptions:Qs,defaultEdgeOptions:ms,elevateNodesOnSelect:ua=!0,elevateEdgesOnSelect:Ms=!1,disableKeyboardA11y:_a=!1,autoPanOnConnect:Br,autoPanOnNodeDrag:nr,autoPanOnSelection:ho=!0,autoPanSpeed:po,connectionRadius:Un,isValidConnection:Pr,onError:mo,style:go,id:Xs,nodeDragThreshold:vo,connectionDragThreshold:qt,viewport:Fa,onViewportChange:Gn,width:Fr,height:it,colorMode:Vt="light",debug:xs,onScroll:Ys,ariaLabelConfig:pi,zIndexMode:Vn="basic",..._r},Os){const Ds=Xs||"1",Tr=KHn(Vt),mi=A.useCallback(fr=>{fr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ys==null||Ys(fr)},[Ys]);return f.jsx("div",{"data-testid":"rf__wrapper",..._r,onScroll:mi,style:{...go,...wUn},ref:Os,className:is(["react-flow",s,Tr]),id:Xs,role:"application",children:f.jsxs(xUn,{nodes:e,edges:n,width:Fr,height:it,fitView:qn,fitViewOptions:ps,minZoom:ge,maxZoom:Te,nodeOrigin:wt,nodeExtent:_t,zIndexMode:Vn,children:[f.jsx(VHn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Se,autoPanOnNodeFocus:at,nodesConnectable:et,nodesFocusable:ct,edgesFocusable:$t,edgesReconnectable:ht,elementsSelectable:dt,elevateNodesOnSelect:ua,elevateEdgesOnSelect:Ms,minZoom:ge,maxZoom:Te,nodeExtent:_t,onNodesChange:Zn,onEdgesChange:Xt,snapToGrid:Re,snapGrid:Oe,connectionMode:F,translateExtent:Fe,connectOnClick:hi,defaultEdgeOptions:ms,fitView:qn,fitViewOptions:ps,onNodesDelete:D,onEdgesDelete:I,onDelete:$,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:H,onSelectionDragStop:V,onMove:h,onMoveStart:_,onMoveEnd:p,noPanClassName:Wr,nodeOrigin:wt,rfId:Ds,autoPanOnConnect:Br,autoPanOnNodeDrag:nr,autoPanSpeed:po,onError:mo,connectionRadius:Un,isValidConnection:Pr,selectNodesOnDrag:qe,nodeDragThreshold:vo,connectionDragThreshold:qt,onBeforeDelete:L,debug:xs,ariaLabelConfig:pi,zIndexMode:Vn}),f.jsx(gUn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,nodeTypes:i,edgeTypes:a,connectionLineType:U,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:ce,selectionKeyCode:se,selectionOnDrag:G,selectionMode:oe,deleteKeyCode:_e,multiSelectionKeyCode:fe,panActivationKeyCode:le,zoomActivationKeyCode:me,onlyRenderVisibleElements:Qe,defaultViewport:Le,translateExtent:Fe,minZoom:ge,maxZoom:Te,preventScrolling:st,zoomOnScroll:Ue,zoomOnPinch:Gt,zoomOnDoubleClick:$n,panOnScroll:sn,panOnScrollSpeed:jt,panOnScrollMode:gt,panOnDrag:Zt,autoPanOnSelection:ho,onPaneClick:gn,onPaneMouseEnter:mr,onPaneMouseMove:Bn,onPaneMouseLeave:Nn,onPaneScroll:zn,onPaneContextMenu:Pn,paneClickDistance:jr,nodeClickDistance:Ct,onSelectionContextMenu:J,onSelectionStart:Z,onSelectionEnd:B,onReconnect:vn,onReconnectStart:on,onReconnectEnd:gr,onEdgeContextMenu:bn,onEdgeDoubleClick:yn,onEdgeMouseEnter:Hn,onEdgeMouseMove:Ie,onEdgeMouseLeave:Ke,reconnectRadius:Cn,defaultMarkerColor:mt,noDragClassName:Jt,noWheelClassName:jn,noPanClassName:Wr,rfId:Ds,disableKeyboardA11y:_a,nodeExtent:_t,viewport:Fa,onViewportChange:Gn}),f.jsx(HHn,{onSelectionChange:q}),tn,f.jsx(IHn,{proOptions:Qs,position:Rs}),f.jsx(LHn,{rfId:Ds,disableKeyboardA11y:_a})]})})}var SUn=wU(kUn);function CUn({dimensions:e,lineWidth:n,variant:t,className:r}){return f.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 EUn({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:is(["react-flow__background-pattern","dots",n])})}var cl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(cl||(cl={}));const NUn={[cl.Dots]:1,[cl.Lines]:1,[cl.Cross]:6},zUn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function KU({id:e,variant:n=cl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const _=A.useRef(null),{transform:p,patternId:m}=En(zUn,wr),x=r||NUn[n],k=n===cl.Dots,v=n===cl.Cross,b=Array.isArray(t)?t:[t,t],w=[b[0]*p[2]||1,b[1]*p[2]||1],y=x*p[2],C=Array.isArray(i)?i:[i,i],N=v?[y,y]:w,z=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],T=`${m}${e||""}`;return f.jsxs("svg",{className:is(["react-flow__background",u]),style:{...c,...Uy,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:_,"data-testid":"rf__background",children:[f.jsx("pattern",{id:T,x:p[0]%w[0],y:p[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:k?f.jsx(EUn,{radius:y/2,className:h}):f.jsx(CUn,{dimensions:N,lineWidth:s,variant:n,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}KU.displayName="Background";const jUn=A.memo(KU);function TUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function AUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function RUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.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 MUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 OUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 $1({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:is(["react-flow__controls-button",n]),...t,children:e})}const DUn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function WU({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:_="bottom-left",orientation:p="vertical","aria-label":m}){const x=Sr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:w}=En(DUn,wr),{zoomIn:y,zoomOut:C,fitView:N}=RC(),z=()=>{y(),i==null||i()},T=()=>{C(),a==null||a()},j=()=>{N(s),o==null||o()},M=()=>{x.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},D=p==="horizontal"?"horizontal":"vertical";return f.jsxs(qy,{className:is(["react-flow__controls",D,u]),position:_,style:e,"data-testid":"rf__controls","aria-label":m??w["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx($1,{onClick:z,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:b,children:f.jsx(TUn,{})}),f.jsx($1,{onClick:T,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(AUn,{})})]}),t&&f.jsx($1,{className:"react-flow__controls-fitview",onClick:j,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:f.jsx(RUn,{})}),r&&f.jsx($1,{className:"react-flow__controls-interactive",onClick:M,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:k?f.jsx(OUn,{}):f.jsx(MUn,{})}),h]})}WU.displayName="Controls";A.memo(WU);function LUn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:_,selected:p,onClick:m}){const{background:x,backgroundColor:k}=i||{},v=a||x||k;return f.jsx("rect",{className:is(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:_,onClick:m?b=>m(b,e):void 0})}const IUn=A.memo(LUn),$Un=e=>e.nodes.map(n=>n.id),N4=e=>e instanceof Function?e:()=>e;function BUn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=IUn,onClick:a}){const o=En($Un,wr),c=N4(n),u=N4(e),h=N4(t),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(p=>f.jsx(FUn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:_},p))})}function PUn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,y:_,width:p,height:m}=En(x=>{const k=x.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:b,y:w}=k.internals.positionAbsolute,{width:y,height:C}=vl(v);return{node:v,x:b,y:w,width:y,height:C}},wr);return!u||u.hidden||!Xq(u)?null:f.jsx(o,{x:h,y:_,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:c,id:u.id})}const FUn=A.memo(PUn);var HUn=A.memo(BUn);const qUn=200,UUn=150,GUn=e=>!e.hidden,VUn=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?Kq(Fm(e.nodeLookup,{filter:GUn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},KUn="react-flow__minimap-desc";function QU({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:_,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:w,zoomStep:y=1,offsetScale:C=5}){const N=Sr(),z=A.useRef(null),{boundingRect:T,viewBB:j,rfId:M,panZoom:D,translateExtent:I,flowWidth:$,flowHeight:q,ariaLabelConfig:H}=En(VUn,wr),Q=(e==null?void 0:e.width)??qUn,V=(e==null?void 0:e.height)??UUn,J=T.width/Q,Z=T.height/V,B=Math.max(J,Z),L=B*Q,F=B*V,U=C*B,K=T.x-(L-T.width)/2-U,ne=T.y-(F-T.height)/2-U,ce=L+U*2,_e=F+U*2,se=`${KUn}-${M}`,G=A.useRef(0),oe=A.useRef();G.current=B,A.useEffect(()=>{if(z.current&&D)return oe.current=uHn({domNode:z.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>G.current}),()=>{var Re;(Re=oe.current)==null||Re.destroy()}},[D]),A.useEffect(()=>{var Re;(Re=oe.current)==null||Re.update({translateExtent:I,width:$,height:q,inversePan:w,pannable:k,zoomStep:y,zoomable:v})},[k,v,w,y,I,$,q]);const le=m?Re=>{var qe;const[Oe,Qe]=((qe=oe.current)==null?void 0:qe.pointer(Re))||[0,0];m(Re,{x:Oe,y:Qe})}:void 0,fe=x?A.useCallback((Re,Oe)=>{const Qe=N.getState().nodeLookup.get(Oe).internals.userNode;x(Re,Qe)},[]):void 0,me=b??H["minimap.ariaLabel"];return f.jsx(qy,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof _=="number"?_*B: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:is(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:Q,height:V,viewBox:`${K} ${ne} ${ce} ${_e}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:z,onClick:le,children:[me&&f.jsx("title",{id:se,children:me}),f.jsx(HUn,{onClick:fe,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-U},${ne-U}h${ce+U*2}v${_e+U*2}h${-ce-U*2}z - M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}QU.displayName="MiniMap";A.memo(QU);const WUn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,QUn={[Ah.Line]:"right",[Ah.Handle]:"bottom-right"};function XUn({nodeId:e,position:n,variant:t=Ah.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:k,onResize:v,onResizeEnd:b}){const w=EU(),y=typeof e=="string"?e:w,C=Sr(),N=A.useRef(null),z=t===Ah.Handle,T=En(A.useCallback(WUn(z&&m),[z,m]),wr),j=A.useRef(null),M=n??QUn[t];A.useEffect(()=>{if(!(!N.current||!y))return j.current||(j.current=kHn({domNode:N.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q,domNode:V}=C.getState();return{nodeLookup:I,transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q,paneDomNode:V}},onChange:(I,$)=>{const{triggerNodeChanges:q,nodeLookup:H,parentLookup:Q,nodeOrigin:V}=C.getState(),J=[],Z={x:I.x,y:I.y},B=H.get(y);if(B&&B.expandParent&&B.parentId){const L=B.origin??V,F=I.width??B.measured.width??0,U=I.height??B.measured.height??0,K={id:B.id,parentId:B.parentId,rect:{width:F,height:U,...Yq({x:I.x??B.position.x,y:I.y??B.position.y},{width:F,height:U},B.parentId,H,L)}},ne=AC([K],H,Q,V);J.push(...ne),Z.x=I.x?Math.max(L[0]*F,I.x):void 0,Z.y=I.y?Math.max(L[1]*U,I.y):void 0}if(Z.x!==void 0&&Z.y!==void 0){const L={id:y,type:"position",position:{...Z}};J.push(L)}if(I.width!==void 0&&I.height!==void 0){const F={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};J.push(F)}for(const L of $){const F={...L,type:"position"};J.push(F)}q(J)},onEnd:({width:I,height:$})=>{const q={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:$}};C.getState().triggerNodeChanges([q])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:_,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:x}),()=>{var I;(I=j.current)==null||I.destroy()}},[M,o,c,u,h,_,k,v,b,x]);const D=M.split("-");return f.jsx("div",{className:is(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:T,...a&&{[z?"backgroundColor":"borderColor"]:a}},children:i})}A.memo(XUn);function YUn(){const[e,n]=A.useState(0),[t,r]=A.useState(0);return{ref:A.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),c=new MutationObserver(a);return o.observe(i),c.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const B1=8;function ZUn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=A.useState({viewWidth:0,viewHeight:0});A.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const _=o,p=c;o=Math.min(Math.max(o,B1),i-t-B1),c=Math.min(Math.max(c,B1),s-r-B1),u=e.anchor==="left"||e.anchor==="right"?p-c:_-o}return{x:o,y:c,arrowAdjustment:u}}const z4=380,j4=12,JUn=350,eGn=150,dk=new EventTarget;function tGn(){dk.dispatchEvent(new Event("move"))}function nGn(e,n){const[t,r]=A.useState(null),s=A.useRef(void 0),i=A.useRef(void 0);A.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return dk.addEventListener("move",u),()=>{dk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),A.useEffect(()=>{r(u=>{var _;if(!u)return u;const h=((_=e.current)==null?void 0:_.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[e,n]);const a=A.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)},JUn)},[e]),o=A.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),eGn)},[]),c=A.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function rGn(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(E(),t)}function sGn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=YUn(),h=s.right+j4+z4<=window.innerWidth,_=s.x-j4-z4>=0,p=h?"right":_?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=ZUn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:j4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ut({...Wkn(k??""),enabled:!!k,subscribed:!!k}),b=A.useMemo(()=>{if(!v)return null;const I=v;let $=I.diff;if(I.truncated){const V=$.lastIndexOf(` +`)),h=u.reduce((_,p)=>_.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return A.useEffect(()=>{const c=(n==null?void 0:n.target)??TM,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&eU(m))return!1;const k=RM(m.code,o);if(i.current.add(m[k]),AM(a,i.current,!1)){const w=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},_=m=>{const x=RM(m.code,o);AM(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 c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",_),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",_),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function AM(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function RM(e,n){return n.includes(e)?"code":"key"}const cqn=()=>{const e=jr();return A.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(),c=CC(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(c,{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:c}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-c},h=t.snapGrid??s,_=t.snapToGrid??i;return qm(u,r,_,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Rh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function wU(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 c of a)lqn(c,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 lqn(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 uqn(e,n){return wU(e,n)}function _qn(e,n){return wU(e,n)}function b_(e,n){return{id:e,type:"select",selected:n}}function Ad(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(b_(i.id,a)))}return r}function MM({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),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==a&&t.push({id:a.id,item:a,type:"replace"}),c===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 OM(e){return{id:e.id,type:"remove"}}const fqn=Xq();function dqn(e,n,t={}){return nHn(e,n,{...t,onError:t.onError??fqn})}const DM=e=>FFn(e),hqn=e=>Gq(e);function kU(e){return A.forwardRef(e)}const pqn=typeof window<"u"?A.useLayoutEffect:A.useEffect;function LM(e){const[n,t]=A.useState(BigInt(0)),[r]=A.useState(()=>mqn(()=>t(s=>s+BigInt(1))));return pqn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function mqn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const SU=A.createContext(null);function gqn({children:e}){const n=jr(),t=A.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:_,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=MM({items:k,lookup:p});for(const b of x.values())v=b(v);h&&u(k),v.length>0?_==null||_(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:w,setNodes:y}=n.getState();b&&y(w)})},[]),r=LM(t),s=A.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:_,edgeLookup:p}=n.getState();let m=c;for(const x of o)m=typeof x=="function"?x(m):x;h?u(m):_&&_(MM({items:m,lookup:p}))},[]),i=LM(s),a=A.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(SU.Provider,{value:a,children:e})}function vqn(){const e=A.useContext(SU);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const bqn=e=>!!e.panZoom;function RC(){const e=cqn(),n=jr(),t=vqn(),r=Nn(bqn),s=A.useMemo(()=>{const i=_=>n.getState().nodeLookup.get(_),a=_=>{t.nodeQueue.push(_)},o=_=>{t.edgeQueue.push(_)},c=_=>{var b,w;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=DM(_)?_:p.get(_.id),k=x.parentId?Zq(x.position,x.measured,x.parentId,p,m):x.position,v={...x,position:k,width:((b=x.measured)==null?void 0:b.width)??x.width,height:((w=x.measured)==null?void 0:w.height)??x.height};return em(v)},u=(_,p,m={replace:!1})=>{a(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&DM(v)?v:{...k,...v}}return k}))},h=(_,p,m={replace:!1})=>{o(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&hqn(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(_=>({..._})),getNode:_=>{var p;return(p=i(_))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:_=[]}=n.getState();return _.map(p=>({...p}))},getEdge:_=>n.getState().edgeLookup.get(_),setNodes:a,setEdges:o,addNodes:_=>{const p=Array.isArray(_)?_:[_];t.nodeQueue.push(m=>[...m,...p])},addEdges:_=>{const p=Array.isArray(_)?_:[_];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:_=[],edges:p=[],transform:m}=n.getState(),[x,k,v]=m;return{nodes:_.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x,y:k,zoom:v}}},deleteElements:async({nodes:_=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:N,edges:z}=await VFn({nodesToRemove:_,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),T=z.length>0,j=N.length>0;if(T){const M=z.map(OM);v==null||v(z),w(M)}if(j){const M=N.map(OM);k==null||k(N),b(M)}return(j||T)&&(y==null||y({nodes:N,edges:z})),{deletedNodes:N,deletedEdges:z}},getIntersectingNodes:(_,p=!0,m)=>{const x=uM(_),k=x?_:c(_),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const w=n.getState().nodeLookup.get(b.id);if(w&&!x&&(b.id===_.id||!w.internals.positionAbsolute))return!1;const y=em(v?b:w),C=vb(y,k);return p&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(_,p,m=!0)=>{const k=uM(_)?_:c(_);if(!k)return!1;const v=vb(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(_,p,m={replace:!1})=>{u(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},updateEdge:h,updateEdgeData:(_,p,m={replace:!1})=>{h(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},getNodesBounds:_=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return HFn(_,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:_,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${_}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:_,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${_?p?`-${_}-${p}`:`-${_}`:""}`))==null?void 0:x.values())??[])},fitView:async _=>{const p=n.getState().fitViewResolver??QFn();return n.setState({fitViewQueued:!0,fitViewOptions:_,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return A.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const IM=e=>e.selected,yqn=typeof window<"u"?window:void 0;function xqn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=jr(),{deleteElements:r}=RC(),s=nm(e,{actInsideInputWithModifier:!1}),i=nm(n,{target:yqn});A.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(IM),edges:a.filter(IM)}),t.setState({nodesSelectionActive:!1})}},[s]),A.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function wqn(e){const n=jr();A.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=EC(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",uo.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 Uy={position:"absolute",width:"100%",height:"100%",top:0,left:0},kqn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Sqn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=G_.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:_,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:C}){const N=jr(),z=A.useRef(null),{userSelectionActive:T,lib:j,connectionInProgress:M}=Nn(kqn,Nr),D=nm(p),I=A.useRef();wqn(z);const $=A.useCallback(q=>{b==null||b({x:q[0],y:q[1],zoom:q[2]}),w||N.setState({transform:q})},[b,w]);return A.useEffect(()=>{if(z.current){I.current=RHn({domNode:z.current,minZoom:h,maxZoom:_,translateExtent:u,viewport:c,onDraggingChange:V=>N.setState(J=>J.paneDragging===V?J:{paneDragging:V}),onPanZoomStart:(V,J)=>{const{onViewportChangeStart:Z,onMoveStart:B}=N.getState();B==null||B(V,J),Z==null||Z(J)},onPanZoom:(V,J)=>{const{onViewportChange:Z,onMove:B}=N.getState();B==null||B(V,J),Z==null||Z(J)},onPanZoomEnd:(V,J)=>{const{onViewportChangeEnd:Z,onMoveEnd:B}=N.getState();B==null||B(V,J),Z==null||Z(J)}});const{x:q,y:H,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[q,H,Q],domNode:z.current.closest(".react-flow")}),()=>{var V;(V=I.current)==null||V.destroy()}}},[]),A.useEffect(()=>{var q;(q=I.current)==null||q.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:v,userSelectionActive:T,noWheelClassName:k,lib:j,onTransformChange:$,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,i,a,o,D,m,v,T,k,j,$,M,C,y]),f.jsx("div",{className:"react-flow__renderer",ref:z,style:Uy,children:x})}const Cqn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Eqn(){const{userSelectionActive:e,userSelectionRect:n}=Nn(Cqn,Nr);return e&&n?f.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 E4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},Nqn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function zqn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=J0.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:_,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:k}){const v=A.useRef(0),b=jr(),{userSelectionActive:w,elementsSelectable:y,dragging:C,panBy:N,autoPanSpeed:z}=Nn(Nqn,Nr),T=y&&(e||w),j=A.useRef(null),M=A.useRef(),D=A.useRef(new Set),I=A.useRef(new Set),$=A.useRef(!1),q=A.useRef(!1),H=A.useRef({x:0,y:0}),Q=A.useRef(!1),V=G=>{if(q.current||$.current||b.getState().connection.inProgress){q.current=!1,$.current=!1;return}u==null||u(G),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},J=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}h==null||h(G)},Z=_?G=>_(G):void 0,B=G=>{q.current&&(G.stopPropagation(),q.current=!1)},L=G=>{var Ce,ot;const{domNode:oe,transform:le}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const pe=G.target===j.current;if(!pe&&!!G.target.closest(".nokey")||!e||!(a&&pe||n)||G.button!==0||!G.isPrimary)return;(ot=(Ce=G.target)==null?void 0:Ce.setPointerCapture)==null||ot.call(Ce,G.pointerId),q.current=!1;const{x:we,y:qe}=io(G.nativeEvent,M.current),He=qm({x:we,y:qe},le);b.setState({userSelectionRect:{width:0,height:0,startX:He.x,startY:He.y,x:we,y:qe}}),pe||(G.stopPropagation(),G.preventDefault())};function F(G,oe){const{userSelectionRect:le}=b.getState();if(!le)return;const{transform:pe,nodeLookup:be,edgeLookup:Me,connectionLookup:we,triggerNodeChanges:qe,triggerEdgeChanges:He,defaultEdgeOptions:Ce}=b.getState(),ot={x:le.startX,y:le.startY},{x:Qe,y:it}=Rh(ot,pe),Ct={startX:ot.x,startY:ot.y,x:GLe.id)),I.current=new Set;const _t=(Ce==null?void 0:Ce.selectable)??!0;for(const Le of D.current){const me=we.get(Le);if(me)for(const{edgeId:Ae}of me.values()){const Be=Me.get(Ae);Be&&(Be.selectable??_t)&&I.current.add(Ae)}}if(!_M(Ht,D.current)){const Le=Ad(be,D.current,!0);qe(Le)}if(!_M(pt,I.current)){const Le=Ad(Me,I.current);He(Le)}b.setState({userSelectionRect:Ct,userSelectionActive:!0,nodesSelectionActive:!1})}function U(){if(!s||!M.current)return;const[G,oe]=SC(H.current,M.current,z);N({x:G,y:oe}).then(le=>{if(!q.current||!le){v.current=requestAnimationFrame(U);return}const{x:pe,y:be}=H.current;F(pe,be),v.current=requestAnimationFrame(U)})}const K=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};A.useEffect(()=>()=>K(),[]);const ne=G=>{const{userSelectionRect:oe,transform:le,resetSelectedElements:pe}=b.getState();if(!M.current||!oe)return;const{x:be,y:Me}=io(G.nativeEvent,M.current);H.current={x:be,y:Me};const we=Rh({x:oe.startX,y:oe.startY},le);if(!q.current){const qe=n?0:i;if(Math.hypot(be-we.x,Me-we.y)<=qe)return;pe(),o==null||o(G)}q.current=!0,Q.current||(U(),Q.current=!0),F(be,Me)},ce=G=>{var oe,le;if(!T){G.target===j.current&&b.getState().connection.inProgress&&($.current=!0);return}G.button===0&&((le=(oe=G.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,G.pointerId),!w&&G.target===j.current&&b.getState().userSelectionRect&&(V==null||V(G)),b.setState({userSelectionActive:!1,userSelectionRect:null}),q.current&&(c==null||c(G),b.setState({nodesSelectionActive:D.current.size>0})),K())},_e=G=>{var oe,le;(le=(oe=G.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,G.pointerId),K()},se=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:us(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:T?void 0:E4(V,j),onContextMenu:E4(J,j),onWheel:E4(Z,j),onPointerEnter:T?void 0:p,onPointerMove:T?ne:m,onPointerUp:ce,onPointerCancel:T?_e:void 0,onPointerDownCapture:T?L:void 0,onClickCapture:T?B:void 0,onPointerLeave:x,ref:j,style:Uy,children:[k,f.jsx(Eqn,{})]})}function fk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:c}=n.getState(),u=o.get(e);if(!u){c==null||c("012",uo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function CU({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=jr(),[c,u]=A.useState(!1),h=A.useRef();return A.useEffect(()=>{h.current=vHn({getStoreItems:()=>o.getState(),onNodeMouseDown:_=>{fk({id:_,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),A.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var _;(_=h.current)==null||_.destroy()}},[t,r,n,i,e,s,a]),c}const jqn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function EU(){const e=jr();return A.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),_=new Map,p=jqn(a),m=s?i[0]:5,x=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*x*t.factor;for(const[,b]of u){if(!p(b))continue;let w={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(w=Hm(w,i));const{position:y,positionAbsolute:C}=Vq({nodeId:b.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=y,b.internals.positionAbsolute=C,_.set(b.id,b)}c(_)},[])}const MC=A.createContext(null),Tqn=MC.Provider;MC.Consumer;const NU=()=>A.useContext(MC),Aqn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),zU=A.createContext(null);function Rqn({children:e}){const n=Nn(Aqn,Nr);return f.jsx(zU.Provider,{value:n,children:e})}function Mqn(){const e=A.useContext(zU);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const Oqn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Dqn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return Oqn;const h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Th.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:h&&u}};function Lqn({type:e="source",position:n=Rt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:_,...p},m){var Q,V;const x=a||null,k=e==="target",v=jr(),b=NU(),{connectOnClick:w,noPanClassName:y,rfId:C}=Mqn(),{connectingFrom:N,connectingTo:z,clickConnecting:T,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=Nn(Dqn(b,x,e),Nr);b||(V=(Q=v.getState()).onError)==null||V.call(Q,"010",uo.error010());const $=J=>{const{defaultEdgeOptions:Z,onConnect:B,hasDefaultEdges:L}=v.getState(),F={...Z,...J};if(L){const{edges:U,setEdges:K,onError:ne}=v.getState();K(dqn(F,U,{onError:ne}))}B==null||B(F),o==null||o(F)},q=J=>{if(!b)return;const Z=tU(J.nativeEvent);if(s&&(Z&&J.button===0||!Z)){const B=v.getState();_k.onPointerDown(J.nativeEvent,{handleDomNode:J.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:k,handleId:x,nodeId:b,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...L)=>{var F,U;return(U=(F=v.getState()).onConnectEnd)==null?void 0:U.call(F,...L)},updateConnection:B.updateConnection,onConnect:$,isValidConnection:t||((...L)=>{var F,U;return((U=(F=v.getState()).isValidConnection)==null?void 0:U.call(F,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}Z?h==null||h(J):_==null||_(J)},H=J=>{const{onClickConnectStart:Z,onClickConnectEnd:B,connectionClickStartHandle:L,connectionMode:F,isValidConnection:U,lib:K,rfId:ne,nodeLookup:ce,connection:_e}=v.getState();if(!b||!L&&!s)return;if(!L){Z==null||Z(J.nativeEvent,{nodeId:b,handleId:x,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:x}});return}const se=Jq(J.target),G=t||U,{connection:oe,isValid:le}=_k.isValid(J.nativeEvent,{handle:{nodeId:b,id:x,type:e},connectionMode:F,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:G,flowId:ne,doc:se,lib:K,nodeLookup:ce});le&&oe&&$(oe);const pe=structuredClone(_e);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,B==null||B(J,pe),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":x,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${x}-${e}`,className:us(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:T,connectingfrom:N,connectingto:z,valid:I,connectionindicator:r&&(!M||j)&&(M||D?i:s)}]),onMouseDown:q,onTouchStart:q,onClick:w?H:void 0,ref:m,...p,children:c})}const Au=A.memo(kU(Lqn));function Iqn({data:e,isConnectable:n,sourcePosition:t=Rt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Au,{type:"source",position:t,isConnectable:n})]})}function $qn({data:e,isConnectable:n,targetPosition:t=Rt.Top,sourcePosition:r=Rt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Au,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Au,{type:"source",position:r,isConnectable:n})]})}function Bqn(){return null}function Pqn({data:e,isConnectable:n,targetPosition:t=Rt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Au,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const bb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},$M={input:Iqn,default:$qn,output:Pqn,group:Bqn};function Fqn(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 Hqn=e=>{const{width:n,height:t,x:r,y:s}=Fm(e.nodeLookup,{filter:i=>!!i.selected});return{width:so(n)?n:null,height:so(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 qqn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=jr(),{width:s,height:i,transformString:a,userSelectionActive:o}=Nn(Hqn,Nr),c=EU(),u=A.useRef(null);A.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(CU({nodeRef:u,disabled:!h}),!h)return null;const _=e?m=>{const x=r.getState().nodes.filter(k=>k.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(bb,m.key)&&(m.preventDefault(),c({direction:bb[m.key],factor:m.shiftKey?4:1}))};return f.jsx("div",{className:us(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:_,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const BM=typeof window<"u"?window:void 0,Uqn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function jU({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:h,selectionMode:_,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:T,panOnDrag:j,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:$,maxZoom:q,preventScrolling:H,onSelectionContextMenu:Q,noWheelClassName:V,noPanClassName:J,disableKeyboardA11y:Z,onViewportChange:B,isControlledViewport:L}){const{nodesSelectionActive:F,userSelectionActive:U}=Nn(Uqn,Nr),K=nm(u,{target:BM}),ne=nm(k,{target:BM}),ce=ne||j,_e=ne||C,se=h&&ce!==!0,G=K||U||se;return xqn({deleteKeyCode:c,multiSelectionKeyCode:x}),f.jsx(Sqn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:_e,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:T,panOnDrag:!K&&ce,defaultViewport:D,translateExtent:I,minZoom:$,maxZoom:q,zoomActivationKeyCode:v,preventScrolling:H,noWheelClassName:V,noPanClassName:J,onViewportChange:B,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:f.jsxs(zqn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ce,autoPanOnSelection:M,isSelecting:!!G,selectionMode:_,selectionKeyPressed:K,paneClickDistance:o,selectionOnDrag:se,children:[e,F&&f.jsx(qqn,{onSelectionContextMenu:Q,noPanClassName:J,disableKeyboardA11y:Z})]})})}jU.displayName="FlowRenderer";const Gqn=A.memo(jU),Vqn=e=>n=>e?kC(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 Kqn(e){return Nn(A.useCallback(Vqn(e),[e]),Nr)}const Wqn=e=>e.updateNodeInternals;function Qqn(){const e=Nn(Wqn),[n]=A.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 A.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function Xqn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=jr(),i=A.useRef(null),a=A.useRef(null),o=A.useRef(e.sourcePosition),c=A.useRef(e.targetPosition),u=A.useRef(n),h=t&&!!e.internals.handleBounds;return A.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,e.hidden]),A.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),A.useEffect(()=>{if(i.current){const _=u.current!==n,p=o.current!==e.sourcePosition,m=c.current!==e.targetPosition;(_||p||m)&&(u.current=n,o.current=e.sourcePosition,c.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 Yqn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:_,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:w}){const{node:y,internals:C,isParent:N}=Nn(G=>{const oe=G.nodeLookup.get(e),le=G.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:le}},Nr);let z=y.type||"default",T=(v==null?void 0:v[z])||$M[z];T===void 0&&(w==null||w("003",uo.error003(z)),z="default",T=(v==null?void 0:v.default)||$M.default);const j=!!(y.draggable||o&&typeof y.draggable>"u"),M=!!(y.selectable||c&&typeof y.selectable>"u"),D=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||h&&typeof y.focusable>"u"),$=jr(),q=Yq(y),H=Xqn({node:y,nodeType:z,hasDimensions:q,resizeObserver:_}),Q=CU({nodeRef:H,disabled:y.hidden||!j,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),V=EU();if(y.hidden)return null;const J=vl(y),Z=Fqn(y),B=M||j||n||t||r||s,L=t?G=>t(G,{...C.userNode}):void 0,F=r?G=>r(G,{...C.userNode}):void 0,U=s?G=>s(G,{...C.userNode}):void 0,K=i?G=>i(G,{...C.userNode}):void 0,ne=a?G=>a(G,{...C.userNode}):void 0,ce=G=>{const{selectNodesOnDrag:oe,nodeDragThreshold:le}=$.getState();M&&(!oe||!j||le>0)&&fk({id:e,store:$,nodeRef:H}),n&&n(G,{...C.userNode})},_e=G=>{if(!(eU(G.nativeEvent)||x)){if(Fq.includes(G.key)&&M){const oe=G.key==="Escape";fk({id:e,store:$,unselect:oe,nodeRef:H})}else if(j&&y.selected&&Object.prototype.hasOwnProperty.call(bb,G.key)){G.preventDefault();const{ariaLabelConfig:oe}=$.getState();$.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:bb[G.key],factor:G.shiftKey?4:1})}}},se=()=>{var we;if(x||!((we=H.current)!=null&&we.matches(":focus-visible")))return;const{transform:G,width:oe,height:le,autoPanOnNodeFocus:pe,setCenter:be}=$.getState();if(!pe)return;kC(new Map([[e,y]]),{x:0,y:0,width:oe,height:le},G,!0).length>0||be(y.position.x+J.width/2,y.position.y+J.height/2,{zoom:G[2]})};return f.jsx("div",{className:us(["react-flow__node",`react-flow__node-${z}`,{[m]:j},y.className,{selected:y.selected,selectable:M,parent:N,draggable:j,dragging:Q}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:q?"visible":"hidden",...y.style,...Z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:F,onMouseLeave:U,onContextMenu:K,onClick:ce,onDoubleClick:ne,onKeyDown:I?_e:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${bU}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:f.jsx(Tqn,{value:e,children:f.jsx(T,{id:e,data:y.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:j,deletable:y.deletable??!0,isConnectable:D,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:Q,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...J})})})}var Zqn=A.memo(Yqn);const Jqn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function TU(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=Nn(Jqn,Nr),a=Kqn(e.onlyRenderVisibleElements),o=Qqn();return f.jsx("div",{className:"react-flow__nodes",style:Uy,children:a.map(c=>f.jsx(Zqn,{id:c,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},c))})}TU.displayName="NodeRenderer";const eUn=A.memo(TU);function tUn(e){return Nn(A.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&&JFn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Nr)}const nUn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},rUn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},PM={[mb.Arrow]:nUn,[mb.ArrowClosed]:rUn};function sUn(e){const n=jr();return A.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(PM,e)?PM[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",uo.error009(e)),null)},[e])}const iUn=({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 c=sUn(n);return c?f.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:f.jsx(c,{color:t,strokeWidth:a})}):null},AU=({defaultColor:e,rfId:n})=>{const t=Nn(i=>i.edges),r=Nn(i=>i.defaultEdgeOptions),s=A.useMemo(()=>oHn(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?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:s.map(i=>f.jsx(iUn,{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};AU.displayName="MarkerDefinitions";var aUn=A.memo(AU);function RU({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...h}){const[_,p]=A.useState({x:1,y:0,width:0,height:0}),m=us(["react-flow__edge-textwrapper",u]),x=A.useRef(null);return A.useEffect(()=>{if(x.current){const k=x.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-_.width/2} ${n-_.height/2})`,className:m,visibility:_.width?"visible":"hidden",...h,children:[s&&f.jsx("rect",{width:_.width+2*a[0],x:-a[0],y:-a[1],height:_.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:x,style:r,children:t}),c]}):null}RU.displayName="EdgeText";const oUn=A.memo(RU);function Gy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:us(["react-flow__edge-path",h.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&so(n)&&so(t)?f.jsx(oUn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function FM({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Rt.Left||e===Rt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function MU({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top}){const[a,o]=FM({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=FM({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,_,p,m]=nU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${o} ${c},${u} ${r},${s}`,h,_,p,m]}function OU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[w,y,C]=MU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return f.jsx(Gy,{id:N,path:w,labelX:y,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})})}const cUn=OU({isInternal:!1}),DU=OU({isInternal:!0});cUn.displayName="SimpleBezierEdge";DU.displayName="SimpleBezierEdgeInternal";function LU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,sourcePosition:m=Rt.Bottom,targetPosition:x=Rt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=ck({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),z=e.isInternal?void 0:n;return f.jsx(Gy,{id:z,path:y,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:k,markerStart:v,interactionWidth:w})})}const IU=LU({isInternal:!1}),$U=LU({isInternal:!0});IU.displayName="SmoothStepEdge";$U.displayName="SmoothStepEdgeInternal";function BU(e){return A.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(IU,{...t,id:r,pathOptions:A.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const lUn=BU({isInternal:!1}),PU=BU({isInternal:!0});lUn.displayName="StepEdge";PU.displayName="StepEdgeInternal";function FU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})=>{const[v,b,w]=iU({sourceX:t,sourceY:r,targetX:s,targetY:i}),y=e.isInternal?void 0:n;return f.jsx(Gy,{id:y,path:v,labelX:b,labelY:w,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})})}const uUn=FU({isInternal:!1}),HU=FU({isInternal:!0});uUn.displayName="StraightEdge";HU.displayName="StraightEdgeInternal";function qU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Rt.Bottom,targetPosition:o=Rt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=rU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),z=e.isInternal?void 0:n;return f.jsx(Gy,{id:z,path:y,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:w})})}const _Un=qU({isInternal:!1}),UU=qU({isInternal:!0});_Un.displayName="BezierEdge";UU.displayName="BezierEdgeInternal";const HM={default:UU,straight:HU,step:PU,smoothstep:$U,simplebezier:DU},qM={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},fUn=(e,n,t)=>t===Rt.Left?e-n:t===Rt.Right?e+n:e,dUn=(e,n,t)=>t===Rt.Top?e-n:t===Rt.Bottom?e+n:e,UM="react-flow__edgeupdater";function GM({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:us([UM,`${UM}-${o}`]),cx:fUn(n,r,e),cy:dUn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function hUn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:_,setReconnecting:p,setUpdateHover:m}){const x=jr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:T,connectionMode:j,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:$,nodeLookup:q,rfId:H,panBy:Q,updateConnection:V}=x.getState(),J=N.type==="target",Z=(F,U)=>{p(!1),_==null||_(F,t,N.type,U)},B=F=>u==null?void 0:u(t,F),L=(F,U)=>{p(!0),h==null||h(C,t,N.type),I==null||I(F,U)};_k.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:j,connectionRadius:M,domNode:T,handleId:N.id,nodeId:N.nodeId,nodeLookup:q,isTarget:J,edgeUpdaterType:N.type,lib:D,flowId:H,cancelConnection:$,panBy:Q,isValidConnection:(...F)=>{var U,K;return((K=(U=x.getState()).isValidConnection)==null?void 0:K.call(U,...F))??!0},onConnect:B,onConnectStart:L,onConnectEnd:(...F)=>{var U,K;return(K=(U=x.getState()).onConnectEnd)==null?void 0:K.call(U,...F)},onReconnectEnd:Z,updateConnection:V,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),w=()=>m(!0),y=()=>m(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(GM,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&f.jsx(GM,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function pUn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:w}){let y=Nn(be=>be.edgeLookup.get(e));const C=Nn(be=>be.defaultEdgeOptions);y=C?{...C,...y}:y;let N=y.type||"default",z=(k==null?void 0:k[N])||HM[N];z===void 0&&(b==null||b("011",uo.error011(N)),N="default",z=(k==null?void 0:k.default)||HM.default);const T=!!(y.focusable||n&&typeof y.focusable>"u"),j=typeof _<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),D=A.useRef(null),[I,$]=A.useState(!1),[q,H]=A.useState(!1),Q=jr(),{zIndex:V=y.zIndex,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U}=Nn(A.useCallback(be=>{const Me=be.nodeLookup.get(y.source),we=be.nodeLookup.get(y.target);if(!Me||!we)return qM;const qe=aHn({id:e,sourceNode:Me,targetNode:we,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:be.connectionMode,onError:b}),He=ZFn({selected:y.selected,zIndex:y.zIndex,sourceNode:Me,targetNode:we,elevateOnSelect:be.elevateEdgesOnSelect,zIndexMode:be.zIndexMode});return{...qe||qM,zIndex:He}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Nr),K=A.useMemo(()=>y.markerStart?`url('#${lk(y.markerStart,x)}')`:void 0,[y.markerStart,x]),ne=A.useMemo(()=>y.markerEnd?`url('#${lk(y.markerEnd,x)}')`:void 0,[y.markerEnd,x]);if(y.hidden||J===null||Z===null||B===null||L===null)return null;const ce=be=>{var He;const{addSelectedEdges:Me,unselectNodesAndEdges:we,multiSelectionActive:qe}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),y.selected&&qe?(we({nodes:[],edges:[y]}),(He=D.current)==null||He.blur()):Me([e])),s&&s(be,y)},_e=i?be=>{i(be,{...y})}:void 0,se=a?be=>{a(be,{...y})}:void 0,G=o?be=>{o(be,{...y})}:void 0,oe=c?be=>{c(be,{...y})}:void 0,le=u?be=>{u(be,{...y})}:void 0,pe=be=>{var Me;if(!w&&Fq.includes(be.key)&&M){const{unselectNodesAndEdges:we,addSelectedEdges:qe}=Q.getState();be.key==="Escape"?((Me=D.current)==null||Me.blur(),we({edges:[y]})):qe([e])}};return f.jsx("svg",{style:{zIndex:V},children:f.jsxs("g",{className:us(["react-flow__edge",`react-flow__edge-${N}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ce,onDoubleClick:_e,onContextMenu:se,onMouseEnter:G,onMouseMove:oe,onMouseLeave:le,onKeyDown:T?pe:void 0,tabIndex:T?0:void 0,role:y.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":T?`${yU}-${x}`:void 0,ref:D,...y.domAttributes,children:[!q&&f.jsx(z,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:K,markerEnd:ne,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),j&&f.jsx(hUn,{edge:y,isReconnectable:j,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,sourceX:J,sourceY:Z,targetX:B,targetY:L,sourcePosition:F,targetPosition:U,setUpdateHover:$,setReconnecting:H})]})})}var mUn=A.memo(pUn);const gUn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function GU({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:_,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,onError:y}=Nn(gUn,Nr),C=tUn(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(aUn,{defaultColor:e,rfId:t}),C.map(N=>f.jsx(mUn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:_,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},N))]})}GU.displayName="EdgeRenderer";const vUn=A.memo(GU),bUn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function yUn({children:e}){const n=Nn(bUn);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function xUn(e){const n=RC(),t=A.useRef(!1);A.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const wUn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function kUn(e){const n=Nn(wUn),t=jr();return A.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function SUn(e){return e.connection.inProgress?{...e.connection,to:qm(e.connection.to,e.transform)}:{...e.connection}}function CUn(e){return SUn}function EUn(e){const n=CUn();return Nn(n,Nr)}const NUn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function zUn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=Nn(NUn,Nr);return!(i&&s&&c)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:us(["react-flow__connection",Uq(o)]),children:f.jsx(VU,{style:n,type:t,CustomComponent:r,isValid:o})})})}const VU=({style:e,type:n=iu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,toHandle:_,toPosition:p,pointer:m}=EUn();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:Uq(r),toNode:h,toHandle:_,pointer:m});let x="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case iu.Bezier:[x]=rU(k);break;case iu.SimpleBezier:[x]=MU(k);break;case iu.Step:[x]=ck({...k,borderRadius:0});break;case iu.SmoothStep:[x]=ck(k);break;default:[x]=iU(k)}return f.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};VU.displayName="ConnectionLine";const jUn={};function VM(e=jUn){A.useRef(e),jr(),A.useEffect(()=>{},[e])}function TUn(){jr(),A.useRef(!1),A.useEffect(()=>{},[])}function KU({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:_,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:T,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:$,minZoom:q,maxZoom:H,preventScrolling:Q,defaultMarkerColor:V,zoomOnScroll:J,zoomOnPinch:Z,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:U,panOnDrag:K,autoPanOnSelection:ne,onPaneClick:ce,onPaneMouseEnter:_e,onPaneMouseMove:se,onPaneMouseLeave:G,onPaneScroll:oe,onPaneContextMenu:le,paneClickDistance:pe,nodeClickDistance:be,onEdgeContextMenu:Me,onEdgeMouseEnter:we,onEdgeMouseMove:qe,onEdgeMouseLeave:He,reconnectRadius:Ce,onReconnect:ot,onReconnectStart:Qe,onReconnectEnd:it,noDragClassName:Ct,noWheelClassName:Ht,noPanClassName:pt,disableKeyboardA11y:_t,nodeExtent:Le,rfId:me,viewport:Ae,onViewportChange:Be}){return VM(e),VM(n),TUn(),xUn(t),kUn(Ae),f.jsx(Gqn,{onPaneClick:ce,onPaneMouseEnter:_e,onPaneMouseMove:se,onPaneMouseLeave:G,onPaneContextMenu:le,onPaneScroll:oe,paneClickDistance:pe,deleteKeyCode:j,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:T,elementsSelectable:D,zoomOnScroll:J,zoomOnPinch:Z,zoomOnDoubleClick:U,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:K,autoPanOnSelection:ne,defaultViewport:I,translateExtent:$,minZoom:q,maxZoom:H,onSelectionContextMenu:_,preventScrolling:Q,noDragClassName:Ct,noWheelClassName:Ht,noPanClassName:pt,disableKeyboardA11y:_t,onViewportChange:Be,isControlledViewport:!!Ae,children:f.jsxs(yUn,{children:[f.jsx(vUn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:ot,onReconnectStart:Qe,onReconnectEnd:it,onlyRenderVisibleElements:M,onEdgeContextMenu:Me,onEdgeMouseEnter:we,onEdgeMouseMove:qe,onEdgeMouseLeave:He,reconnectRadius:Ce,defaultMarkerColor:V,noPanClassName:pt,disableKeyboardA11y:_t,rfId:me}),f.jsx(zUn,{style:k,type:x,component:v,containerStyle:b}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(eUn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:be,onlyRenderVisibleElements:M,noPanClassName:pt,noDragClassName:Ct,disableKeyboardA11y:_t,nodeExtent:Le,rfId:me}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}KU.displayName="GraphView";const AUn=A.memo(KU),RUn=Xq(),KM=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:_,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,k=new Map,v=new Map,b=r??n??[],w=t??e??[],y=h??[0,0],C=_??Z0;cU(k,v,b);const{nodesInitialized:N}=uk(w,m,x,{nodeOrigin:y,nodeExtent:C,zIndexMode:p});let z=[0,0,1];if(a&&s&&i){const T=Fm(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:j,y:M,zoom:D}=CC(T,s,i,c,u,(o==null?void 0:o.padding)??.1);z=[j,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:z,nodes:w,nodesInitialized:N,nodeLookup:m,parentLookup:x,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Z0,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Th.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:{...qq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:RUn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Hq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},MUn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p})=>qHn((m,x)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:w,fitViewResolver:y,width:C,height:N,minZoom:z,maxZoom:T}=x();b&&(await GFn({nodes:v,width:C,height:N,panZoom:b,minZoom:z,maxZoom:T},w),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...KM({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:_,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:z,nodesSelectionActive:T}=x(),{nodesInitialized:j,hasSelectedNodes:M}=uk(v,b,w,{nodeOrigin:y,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z}),D=T&&M;N&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:w}=x();cU(b,w,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:w}=x();w(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:w}=x();w(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:w,parentLookup:y,domNode:C,nodeOrigin:N,nodeExtent:z,debug:T,fitViewQueued:j,zIndexMode:M}=x(),{changes:D,updatedInternals:I}=hHn(v,w,y,C,N,z,M);I&&(uHn(w,y,{nodeOrigin:N,nodeExtent:z,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(T&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const w=[];let y=[];const{nodeLookup:C,triggerNodeChanges:N,connection:z,updateConnection:T,onNodesChangeMiddlewareMap:j}=x();for(const[M,D]of v){const I=C.get(M),$=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),q={id:M,type:"position",position:$?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&z.inProgress&&z.fromNode.id===I.id){const H=lf(I,z.fromHandle,Rt.Left,!0);T({...z,from:H})}$&&I.parentId&&w.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),y.push(q)}if(w.length>0){const{parentLookup:M,nodeOrigin:D}=x(),I=AC(w,C,M,D);y.push(...I)}for(const M of j.values())y=M(y);N(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:w,nodes:y,hasDefaultNodes:C,debug:N}=x();if(v!=null&&v.length){if(C){const z=uqn(v,y);w(z)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:w,edges:y,hasDefaultEdges:C,debug:N}=x();if(v!=null&&v.length){if(C){const z=_qn(v,y);w(z)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const z=v.map(T=>b_(T,!0));C(z);return}C(Ad(y,new Set([...v]),!0)),N(Ad(w))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const z=v.map(T=>b_(T,!0));N(z);return}N(Ad(w,new Set([...v]))),C(Ad(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:w,nodes:y,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:z}=x(),T=v||y,j=b||w,M=[];for(const I of T){if(!I.selected)continue;const $=C.get(I.id);$&&($.selected=!1),M.push(b_(I.id,!1))}const D=[];for(const I of j)I.selected&&D.push(b_(I.id,!1));N(M),z(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:w}=x();b==null||b.setScaleExtent([v,w]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:w}=x();b==null||b.setScaleExtent([w,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=x().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:C}=x();if(!C)return;const N=b.reduce((T,j)=>j.selected?[...T,b_(j.id,!1)]:T,[]),z=v.reduce((T,j)=>j.selected?[...T,b_(j.id,!1)]:T,[]);w(N),y(z)},setNodeExtent:v=>{const{nodes:b,nodeLookup:w,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:z,zIndexMode:T}=x();v[0][0]===z[0][0]&&v[0][1]===z[0][1]&&v[1][0]===z[1][0]&&v[1][1]===z[1][1]||(uk(b,w,y,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:T}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:w,height:y,panZoom:C,translateExtent:N}=x();return pHn({delta:v,panZoom:C,transform:b,translateExtent:N,width:w,height:y})},setCenter:async(v,b,w)=>{const{width:y,height:C,maxZoom:N,panZoom:z}=x();if(!z)return!1;const T=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:N;return await z.setViewport({x:y/2-v*T,y:C/2-b*T,zoom:T},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),!0},cancelConnection:()=>{m({connection:{...qq}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...KM()})}},Object.is);function OUn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p,children:m}){const[x]=A.useState(()=>MUn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:_,zIndexMode:p}));return f.jsx(UHn,{value:x,children:f.jsx(gqn,{children:f.jsx(Rqn,{children:m})})})}function DUn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m}){return A.useContext(Hy)?f.jsx(f.Fragment,{children:e}):f.jsx(OUn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m,children:e})}const LUn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function IUn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:_,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:$,onSelectionChange:q,onSelectionDragStart:H,onSelectionDrag:Q,onSelectionDragStop:V,onSelectionContextMenu:J,onSelectionStart:Z,onSelectionEnd:B,onBeforeDelete:L,connectionMode:F,connectionLineType:U=iu.Bezier,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:ce,deleteKeyCode:_e="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:G=!1,selectionMode:oe=J0.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:pe=tm()?"Meta":"Control",zoomActivationKeyCode:be=tm()?"Meta":"Control",snapToGrid:Me,snapGrid:we,onlyRenderVisibleElements:qe=!1,selectNodesOnDrag:He,nodesDraggable:Ce,autoPanOnNodeFocus:ot,nodesConnectable:Qe,nodesFocusable:it,nodeOrigin:Ct=xU,edgesFocusable:Ht,edgesReconnectable:pt,elementsSelectable:_t=!0,defaultViewport:Le=rqn,minZoom:me=.5,maxZoom:Ae=2,translateExtent:Be=Z0,preventScrolling:rt=!0,nodeExtent:ft,defaultMarkerColor:St="#b1b1b7",zoomOnScroll:gt=!0,zoomOnPinch:Kt=!0,panOnScroll:en=!1,panOnScrollSpeed:Ke=.5,panOnScrollMode:vt=G_.Free,zoomOnDoubleClick:In=!0,panOnDrag:tn=!0,onPaneClick:yn,onPaneMouseEnter:yr,onPaneMouseMove:Pn,onPaneMouseLeave:$n,onPaneScroll:Fn,onPaneContextMenu:Yn,paneClickDistance:Dr=1,nodeClickDistance:bt=0,children:ln,onReconnect:En,onReconnectStart:on,onReconnectEnd:dr,onEdgeContextMenu:sn,onEdgeDoubleClick:gn,onEdgeMouseEnter:Zn,onEdgeMouseMove:yt,onEdgeMouseLeave:jt,reconnectRadius:zn=10,onNodesChange:xr,onEdgesChange:rr,noDragClassName:_n="nodrag",noWheelClassName:wr="nowheel",noPanClassName:Ve="nopan",fitView:ct,fitViewOptions:sr,connectOnClick:Jn,attributionPosition:xn,proOptions:Tr,defaultEdgeOptions:Hn,elevateNodesOnSelect:ua=!0,elevateEdgesOnSelect:Ds=!1,disableKeyboardA11y:_a=!1,autoPanOnConnect:Vr,autoPanOnNodeDrag:ir,autoPanOnSelection:ho=!0,autoPanSpeed:po,connectionRadius:qn,isValidConnection:Kr,onError:mo,style:go,id:Ys,nodeDragThreshold:vo,connectionDragThreshold:Gt,viewport:Fa,onViewportChange:Un,width:Wr,height:st,colorMode:Wt="light",debug:Ss,onScroll:Zs,ariaLabelConfig:pi,zIndexMode:Gn="basic",...pr},Ls){const Is=Ys||"1",Lr=oqn(Wt),mi=A.useCallback(mr=>{mr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Zs==null||Zs(mr)},[Zs]);return f.jsx("div",{"data-testid":"rf__wrapper",...pr,onScroll:mi,style:{...go,...LUn},ref:Ls,className:us(["react-flow",s,Lr]),id:Ys,role:"application",children:f.jsxs(DUn,{nodes:e,edges:n,width:Wr,height:st,fitView:ct,fitViewOptions:sr,minZoom:me,maxZoom:Ae,nodeOrigin:Ct,nodeExtent:ft,zIndexMode:Gn,children:[f.jsx(aqn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Ce,autoPanOnNodeFocus:ot,nodesConnectable:Qe,nodesFocusable:it,edgesFocusable:Ht,edgesReconnectable:pt,elementsSelectable:_t,elevateNodesOnSelect:ua,elevateEdgesOnSelect:Ds,minZoom:me,maxZoom:Ae,nodeExtent:ft,onNodesChange:xr,onEdgesChange:rr,snapToGrid:Me,snapGrid:we,connectionMode:F,translateExtent:Be,connectOnClick:Jn,defaultEdgeOptions:Hn,fitView:ct,fitViewOptions:sr,onNodesDelete:D,onEdgesDelete:I,onDelete:$,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:H,onSelectionDragStop:V,onMove:h,onMoveStart:_,onMoveEnd:p,noPanClassName:Ve,nodeOrigin:Ct,rfId:Is,autoPanOnConnect:Vr,autoPanOnNodeDrag:ir,autoPanSpeed:po,onError:mo,connectionRadius:qn,isValidConnection:Kr,selectNodesOnDrag:He,nodeDragThreshold:vo,connectionDragThreshold:Gt,onBeforeDelete:L,debug:Ss,ariaLabelConfig:pi,zIndexMode:Gn}),f.jsx(AUn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,nodeTypes:i,edgeTypes:a,connectionLineType:U,connectionLineStyle:K,connectionLineComponent:ne,connectionLineContainerStyle:ce,selectionKeyCode:se,selectionOnDrag:G,selectionMode:oe,deleteKeyCode:_e,multiSelectionKeyCode:pe,panActivationKeyCode:le,zoomActivationKeyCode:be,onlyRenderVisibleElements:qe,defaultViewport:Le,translateExtent:Be,minZoom:me,maxZoom:Ae,preventScrolling:rt,zoomOnScroll:gt,zoomOnPinch:Kt,zoomOnDoubleClick:In,panOnScroll:en,panOnScrollSpeed:Ke,panOnScrollMode:vt,panOnDrag:tn,autoPanOnSelection:ho,onPaneClick:yn,onPaneMouseEnter:yr,onPaneMouseMove:Pn,onPaneMouseLeave:$n,onPaneScroll:Fn,onPaneContextMenu:Yn,paneClickDistance:Dr,nodeClickDistance:bt,onSelectionContextMenu:J,onSelectionStart:Z,onSelectionEnd:B,onReconnect:En,onReconnectStart:on,onReconnectEnd:dr,onEdgeContextMenu:sn,onEdgeDoubleClick:gn,onEdgeMouseEnter:Zn,onEdgeMouseMove:yt,onEdgeMouseLeave:jt,reconnectRadius:zn,defaultMarkerColor:St,noDragClassName:_n,noWheelClassName:wr,noPanClassName:Ve,rfId:Is,disableKeyboardA11y:_a,nodeExtent:ft,viewport:Fa,onViewportChange:Un}),f.jsx(nqn,{onSelectionChange:q}),ln,f.jsx(YHn,{proOptions:Tr,position:xn}),f.jsx(XHn,{rfId:Is,disableKeyboardA11y:_a})]})})}var $Un=kU(IUn);function BUn({dimensions:e,lineWidth:n,variant:t,className:r}){return f.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:us(["react-flow__background-pattern",t,r])})}function PUn({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:us(["react-flow__background-pattern","dots",n])})}var cl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(cl||(cl={}));const FUn={[cl.Dots]:1,[cl.Lines]:1,[cl.Cross]:6},HUn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function WU({id:e,variant:n=cl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const _=A.useRef(null),{transform:p,patternId:m}=Nn(HUn,Nr),x=r||FUn[n],k=n===cl.Dots,v=n===cl.Cross,b=Array.isArray(t)?t:[t,t],w=[b[0]*p[2]||1,b[1]*p[2]||1],y=x*p[2],C=Array.isArray(i)?i:[i,i],N=v?[y,y]:w,z=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],T=`${m}${e||""}`;return f.jsxs("svg",{className:us(["react-flow__background",u]),style:{...c,...Uy,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:_,"data-testid":"rf__background",children:[f.jsx("pattern",{id:T,x:p[0]%w[0],y:p[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:k?f.jsx(PUn,{radius:y/2,className:h}):f.jsx(BUn,{dimensions:N,lineWidth:s,variant:n,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}WU.displayName="Background";const qUn=A.memo(WU);function UUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function GUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function VUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.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 KUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 WUn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 $1({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:us(["react-flow__controls-button",n]),...t,children:e})}const QUn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function QU({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:_="bottom-left",orientation:p="vertical","aria-label":m}){const x=jr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:w}=Nn(QUn,Nr),{zoomIn:y,zoomOut:C,fitView:N}=RC(),z=()=>{y(),i==null||i()},T=()=>{C(),a==null||a()},j=()=>{N(s),o==null||o()},M=()=>{x.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},D=p==="horizontal"?"horizontal":"vertical";return f.jsxs(qy,{className:us(["react-flow__controls",D,u]),position:_,style:e,"data-testid":"rf__controls","aria-label":m??w["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx($1,{onClick:z,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:b,children:f.jsx(UUn,{})}),f.jsx($1,{onClick:T,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(GUn,{})})]}),t&&f.jsx($1,{className:"react-flow__controls-fitview",onClick:j,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:f.jsx(VUn,{})}),r&&f.jsx($1,{className:"react-flow__controls-interactive",onClick:M,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:k?f.jsx(WUn,{}):f.jsx(KUn,{})}),h]})}QU.displayName="Controls";A.memo(QU);function XUn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:_,selected:p,onClick:m}){const{background:x,backgroundColor:k}=i||{},v=a||x||k;return f.jsx("rect",{className:us(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:_,onClick:m?b=>m(b,e):void 0})}const YUn=A.memo(XUn),ZUn=e=>e.nodes.map(n=>n.id),N4=e=>e instanceof Function?e:()=>e;function JUn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=YUn,onClick:a}){const o=Nn(ZUn,Nr),c=N4(n),u=N4(e),h=N4(t),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(p=>f.jsx(tGn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:_},p))})}function eGn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,y:_,width:p,height:m}=Nn(x=>{const k=x.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:b,y:w}=k.internals.positionAbsolute,{width:y,height:C}=vl(v);return{node:v,x:b,y:w,width:y,height:C}},Nr);return!u||u.hidden||!Yq(u)?null:f.jsx(o,{x:h,y:_,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:c,id:u.id})}const tGn=A.memo(eGn);var nGn=A.memo(JUn);const rGn=200,sGn=150,iGn=e=>!e.hidden,aGn=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?Wq(Fm(e.nodeLookup,{filter:iGn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},oGn="react-flow__minimap-desc";function XU({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:_,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:w,zoomStep:y=1,offsetScale:C=5}){const N=jr(),z=A.useRef(null),{boundingRect:T,viewBB:j,rfId:M,panZoom:D,translateExtent:I,flowWidth:$,flowHeight:q,ariaLabelConfig:H}=Nn(aGn,Nr),Q=(e==null?void 0:e.width)??rGn,V=(e==null?void 0:e.height)??sGn,J=T.width/Q,Z=T.height/V,B=Math.max(J,Z),L=B*Q,F=B*V,U=C*B,K=T.x-(L-T.width)/2-U,ne=T.y-(F-T.height)/2-U,ce=L+U*2,_e=F+U*2,se=`${oGn}-${M}`,G=A.useRef(0),oe=A.useRef();G.current=B,A.useEffect(()=>{if(z.current&&D)return oe.current=SHn({domNode:z.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>G.current}),()=>{var Me;(Me=oe.current)==null||Me.destroy()}},[D]),A.useEffect(()=>{var Me;(Me=oe.current)==null||Me.update({translateExtent:I,width:$,height:q,inversePan:w,pannable:k,zoomStep:y,zoomable:v})},[k,v,w,y,I,$,q]);const le=m?Me=>{var He;const[we,qe]=((He=oe.current)==null?void 0:He.pointer(Me))||[0,0];m(Me,{x:we,y:qe})}:void 0,pe=x?A.useCallback((Me,we)=>{const qe=N.getState().nodeLookup.get(we).internals.userNode;x(Me,qe)},[]):void 0,be=b??H["minimap.ariaLabel"];return f.jsx(qy,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof _=="number"?_*B: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:us(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:Q,height:V,viewBox:`${K} ${ne} ${ce} ${_e}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:z,onClick:le,children:[be&&f.jsx("title",{id:se,children:be}),f.jsx(nGn,{onClick:pe,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-U},${ne-U}h${ce+U*2}v${_e+U*2}h${-ce-U*2}z + M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}XU.displayName="MiniMap";A.memo(XU);const cGn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,lGn={[Mh.Line]:"right",[Mh.Handle]:"bottom-right"};function uGn({nodeId:e,position:n,variant:t=Mh.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:k,onResize:v,onResizeEnd:b}){const w=NU(),y=typeof e=="string"?e:w,C=jr(),N=A.useRef(null),z=t===Mh.Handle,T=Nn(A.useCallback(cGn(z&&m),[z,m]),Nr),j=A.useRef(null),M=n??lGn[t];A.useEffect(()=>{if(!(!N.current||!y))return j.current||(j.current=IHn({domNode:N.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q,domNode:V}=C.getState();return{nodeLookup:I,transform:$,snapGrid:q,snapToGrid:H,nodeOrigin:Q,paneDomNode:V}},onChange:(I,$)=>{const{triggerNodeChanges:q,nodeLookup:H,parentLookup:Q,nodeOrigin:V}=C.getState(),J=[],Z={x:I.x,y:I.y},B=H.get(y);if(B&&B.expandParent&&B.parentId){const L=B.origin??V,F=I.width??B.measured.width??0,U=I.height??B.measured.height??0,K={id:B.id,parentId:B.parentId,rect:{width:F,height:U,...Zq({x:I.x??B.position.x,y:I.y??B.position.y},{width:F,height:U},B.parentId,H,L)}},ne=AC([K],H,Q,V);J.push(...ne),Z.x=I.x?Math.max(L[0]*F,I.x):void 0,Z.y=I.y?Math.max(L[1]*U,I.y):void 0}if(Z.x!==void 0&&Z.y!==void 0){const L={id:y,type:"position",position:{...Z}};J.push(L)}if(I.width!==void 0&&I.height!==void 0){const F={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};J.push(F)}for(const L of $){const F={...L,type:"position"};J.push(F)}q(J)},onEnd:({width:I,height:$})=>{const q={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:$}};C.getState().triggerNodeChanges([q])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:_,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:x}),()=>{var I;(I=j.current)==null||I.destroy()}},[M,o,c,u,h,_,k,v,b,x]);const D=M.split("-");return f.jsx("div",{className:us(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:T,...a&&{[z?"backgroundColor":"borderColor"]:a}},children:i})}A.memo(uGn);function _Gn(){const[e,n]=A.useState(0),[t,r]=A.useState(0);return{ref:A.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),c=new MutationObserver(a);return o.observe(i),c.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const B1=8;function fGn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=A.useState({viewWidth:0,viewHeight:0});A.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const _=o,p=c;o=Math.min(Math.max(o,B1),i-t-B1),c=Math.min(Math.max(c,B1),s-r-B1),u=e.anchor==="left"||e.anchor==="right"?p-c:_-o}return{x:o,y:c,arrowAdjustment:u}}const z4=380,j4=12,dGn=350,hGn=150,dk=new EventTarget;function pGn(){dk.dispatchEvent(new Event("move"))}function mGn(e,n){const[t,r]=A.useState(null),s=A.useRef(void 0),i=A.useRef(void 0);A.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return dk.addEventListener("move",u),()=>{dk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),A.useEffect(()=>{r(u=>{var _;if(!u)return u;const h=((_=e.current)==null?void 0:_.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[e,n]);const a=A.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)},dGn)},[e]),o=A.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),hGn)},[]),c=A.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function gGn(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(E(),t)}function vGn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=_Gn(),h=s.right+j4+z4<=window.innerWidth,_=s.x-j4-z4>=0,p=h?"right":_?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=fGn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:j4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ut({...cSn(k??""),enabled:!!k,subscribed:!!k}),b=A.useMemo(()=>{if(!v)return null;const I=v;let $=I.diff;if(I.truncated){const V=$.lastIndexOf(` diff --git `);$=V!==-1?$.slice(0,V+1):$.slice(0,$.lastIndexOf(` -`)+1)}let q=[];try{q=$.trim()?W3($):[]}catch{return null}if(I.truncated&&q.every(V=>V.hunks.length===0))return null;let H=0,Q=0;for(const V of q){const J=oy(V);H+=J.additions,Q+=J.deletions}return{fileCount:q.length,additions:H,deletions:Q,truncated:I.truncated}},[v]),w={done:0,failed:0,cancelled:0,live:0};for(const I of n)I.status==="done"?w.done+=1:I.status==="failed"?w.failed+=1:I.status==="cancelled"?w.cancelled+=1:w.live+=1;const y=t?T0((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,z=A.useRef(null),[T,j]=A.useState(!1),[M,D]=A.useState(!1);return A.useEffect(()=>{j(!1)},[N]),A.useEffect(()=>{const I=z.current;I&&D(I.scrollHeight>I.clientHeight+1)},[N,T]),oa.createPortal(f.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:z4,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:c,children:[f.jsxs("div",{className:"hc-head",children:[f.jsx("span",{className:"hc-slug",children:e.slug}),f.jsx(al,{status:t?Qi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[i&&f.jsxs("button",{type:"button",...$r(i),children:[f.jsx(lo,{size:13}),FOe()]}),f.jsxs("button",{type:"button",...$r(a),children:[f.jsx(Db,{size:13}),yOe()]})]}),N&&f.jsx("div",{className:`hc-body${T?" expanded":""}`,ref:z,children:N}),N&&(M||T)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>j(I=>!I),children:T?TD():xje()}),C&&f.jsx("div",{className:"hc-failure",children:C}),f.jsxs("div",{className:"hc-stats",children:[f.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?FXe():WXe({count:Wt(n.length)}),...w.done>0?[JQe({count:Wt(w.done)})]:[],...w.failed>0?[aXe({count:Wt(w.failed)})]:[],...w.cancelled>0?[VQe({count:Wt(w.cancelled)})]:[],...w.live>0?[NXe({count:Wt(w.live)})]:[]])}),t&&nS(t.backend)&&f.jsx(jS,{backend:t.backend}),y&&f.jsx("span",{children:y}),t&&f.jsx("span",{children:co(t.createdAt)})]}),f.jsxs("div",{className:"hc-git",children:[f.jsxs("div",{className:"hc-git-row",children:[f.jsxs("span",{className:"hc-branch",title:e.branchName,children:[f.jsx(Nm,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[OOe()," ",f.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:b.truncated?xX({parent:Ne(r??"parent")}):hX({parent:Ne(r??"parent")}),children:f.jsxs("span",{children:[b.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?OXe():b.truncated?yXe({count:Wt(b.fileCount)}):dXe({count:Wt(b.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[NOe()," ",rGn(e.createdAt)]})]})]}),document.body)}const KM=["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(" "),iGn=264,WM=132,_v=44,aGn=72,oGn=148,cGn=44;function lGn(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 uGn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),0);return t.set(o,c),c},s=new Map,i=o=>{const c=s.get(o)??(n(o)||o.children.some(i));return s.set(o,c),c};function a(o){if(n(o)){const h=[];let _=0;for(const p of o.children)i(p)?h.push(...a(p)):_+=r(p);return _>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:_,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(_){c+=1;for(const p of _.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function hk(e){return e.kind==="exp"?iGn:oGn}function P1(e){return e.kind==="exp"?e.exp.id:e.id}function fv(e){if(e.children.length===0)return hk(e);const n=e.children.reduce((t,r)=>t+fv(r),0)+_v*(e.children.length-1);return Math.max(hk(e),n)}function _Gn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const fGn=A.memo(function({data:n}){hf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h}=n,_=r?Qi(r):void 0,p=_==="running"||_==="starting"||_==="cancelling",m=i?phn():p?Hhn():Vc(),x=s.slice(-8),k=A.useRef(null),v=nGn(k,n);return f.jsxs("div",{ref:k,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:v.onMouseEnter,onMouseLeave:v.onMouseLeave,children:[f.jsx(Au,{type:"target",position:Tt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...$r(b=>u(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:m}),f.jsx(al,{status:_??"idle"})]}),f.jsx("div",{className:"node-head",children:f.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&f.jsx("div",{className:"node-title",children:t.title||t.description}),f.jsxs("div",{className:"node-meta",children:[f.jsx("span",{children:r0n()}),x.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(b=>f.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 ${_Gn(Qi(b))}`,title:_6(Qi(b))},b.id))}):f.jsx("span",{children:Lpn()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:co(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:qpn(),...$r(b=>u(t.id,"terminal",b)),children:[f.jsx(lo,{size:13}),ML()]}),f.jsxs("button",{className:"node-action",title:pD({branch:Ne(t.branchName)}),...$r(b=>h(t.id,t.branchName,"files",b)),children:[f.jsx(Db,{size:13}),lpn()]}),o&&c&&f.jsx("a",{className:"node-action node-action-ext",title:Sv({name:Ne(t.branchName)}),"aria-label":Sv({name:Ne(t.branchName)}),href:Rb(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(Fb,{size:13})})]}),f.jsx(Au,{type:"source",position:Tt.Bottom}),v.rect&&f.jsx(sGn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:v.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>h(t.id,t.branchName,"files",b),onMouseEnter:v.keepOpen,onMouseLeave:v.onMouseLeave})]})}),dGn=A.memo(function({data:n}){hf();const{count:t,onShowProjectScope:r}=n;return f.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:u0n(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Au,{type:"target",position:Tt.Top}),f.jsx(dS,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?Dhn():zhn({count:Wt(t)}),f.jsx("span",{className:"elided-node-sub",children:Xpn()})]}),f.jsx(Au,{type:"source",position:Tt.Bottom})]})}),hGn={exp:fGn,elided:dGn},XU={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},pGn={...XU.style,strokeDasharray:"4 4"};function mGn({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:a,viewport:o,onViewportChange:c}){const{nodes:u,edges:h}=A.useMemo(()=>{const _=new Map;for(const y of n){const C=_.get(y.experimentId);C?C.push(y):_.set(y.experimentId,[y])}for(const y of _.values())y.sort((C,N)=>C.createdAt-N.createdAt);const p=[],m=[],x=y=>!i||y.exp.chatSessionId===i,k=uGn(lGn(e),x),v=new Map(e.map(y=>[y.id,y.slug]));function b(y,C,N){const z=C-hk(y)/2;if(y.kind==="exp"){const M=_.get(y.exp.id)??[];p.push({id:y.exp.id,type:"exp",position:{x:z,y:N},data:{exp:y.exp,latestRun:M[M.length-1]??null,runs:M,isBaseline:!y.exp.parentExperimentId,parentSlug:y.exp.parentExperimentId?v.get(y.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else p.push({id:y.id,type:"elided",position:{x:z,y:N+(WM-cGn)/2},data:{count:y.count,onShowProjectScope:a}});if(y.children.length===0)return;const T=y.children.reduce((M,D)=>M+fv(D),0)+_v*(y.children.length-1);let j=C-T/2;for(const M of y.children){const D=fv(M),I=y.kind==="elided"||M.kind==="elided";m.push({id:`e-${P1(y)}-${P1(M)}`,source:P1(y),target:P1(M),...I?{style:pGn}:{}}),b(M,j+D/2,N+WM+aGn),j+=D+_v}}let w=0;for(const y of k){const C=fv(y);b(y,w+C/2,0),w+=C+_v}return{nodes:p,edges:m}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,a]);return e.length===0?f.jsxs("div",{className:KM,children:[f.jsx("p",{className:"empty-state-title",children:jpn()}),f.jsx("p",{className:"empty-state-hint",children:npn()})]}):u.length===0&&i?f.jsxs("div",{className:KM,children:[f.jsx("p",{className:"empty-state-title",children:wpn()}),f.jsx("p",{className:"empty-state-hint",children:Qhn()})]}):f.jsx(SUn,{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:u,edges:h,nodeTypes:hGn,defaultEdgeOptions:XU,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:tGn,onMoveEnd:(_,p)=>{_&&c(p)},minZoom:.15,defaultViewport:o??void 0,fitView:o===null,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(jUn,{variant:cl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const Zp=["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 gGn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vGn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),c=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("~/")||k6(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,k]=[m(i),m(p)];return x===k?"":x.startsWith(`${k}/`)?x.slice(k.length).replace(/^\/+/,""):null},h=i.startsWith("/")&&c?u(c):null,_=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(_!==null)i=_;else{const p=s?gGn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(a=x[1],i=x[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function bGn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const yGn=10,QM=1448,xGn=80,wGn=48;function XM(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 YM(e){const n=A.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function kGn({runtime:e,projectId:n,pane:t}){var te,be,ze;const r=an({mutationFn:xvn}),s=_i(),i=oD({select:X=>X.location}),a=Z_(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",c=A.useRef(null),u=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,_=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=A.useState(null),[x,k]=A.useState(0),v=A.useRef({href:"",jump:0,value:0});(v.current.href!==i.href||v.current.jump!==x)&&(v.current={href:i.href,jump:x,value:v.current.value+1});const b=A.useMemo(()=>{const X=t?Ja(t):"experiments";return typeof X=="object"&&"path"in X&&X.line&&p!==v.current.value?{...X,lineScrollRequest:v.current.value}:X},[t,p,i.href,x]),w=ut(La(n)),y=A.useMemo(()=>{var X;return((X=w.data)==null?void 0:X.map(ae=>ae.id))??null},[w.data]),C=A.useRef(new Set),N=A.useRef(new Set),z=A.useRef({}),[T,j]=A.useState(0),M=A.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 D=A.useCallback((X,ae=!1)=>{const xe=M.current;xe.projectId&&s.navigate({href:X1(xe.projectId,xe.activeSessionId,X),replace:ae})},[s]),I=A.useCallback(X=>{const ae=tl(X);D(ae.kind==="file"?{...ae,line:void 0}:ae)},[D]),$=A.useCallback(()=>D(void 0),[D]),q=A.useCallback(X=>{(t==null?void 0:t.kind)==="experiment"&&D({...t,runId:X??void 0})},[t,D]),H=A.useCallback(X=>{s.navigate({href:X?`/projects/${encodeURIComponent(X)}`:"/projects"})},[s]),Q=A.useCallback(X=>{var ae;if(n)if(X==="chat"){const xe=c.current;s.navigate({href:X1(n,xe,(ae=yu(Ga.current,xe??"new"))==null?void 0:ae.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${X==="skills"?"skills":`settings/${X}`}`})},[s,n]),V=hf(),{status:J}=o6(e.kind==="local"),Z=A.useMemo(()=>_h(),[n]),B=ut(Z),L=B.data??null,F=A.useCallback(X=>{Vr(Z.queryKey,ae=>(typeof X=="function"?X(ae??null):X)??void 0)},[Z]),U=A.useMemo(()=>Sm(),[n]),K=ut(U),ne=K.data??null,ce=A.useCallback(X=>{Vr(U.queryKey,ae=>(typeof X=="function"?X(ae??null):X)??void 0)},[U]),_e=A.useRef(void 0);_e.current=ne==null?void 0:ne.tourCompleted;const se=[!w.data&&w.error?xD():null,!B.data&&B.error?l0():null,!K.data&&K.error?a_e():null].filter(X=>X!==null),G=se.length?d_e({items:new Intl.ListFormat(V).format(se)}):null,oe=A.useRef(null),le=ut(T3(n)),fe=le.data??[],me=!le.isPending,[Re,Oe]=A.useState(!1),qe=ut(mu(n)).data??[],Se=A.useRef(qe);Se.current=qe;const at=A.useRef(new Map),et=A.useRef(new Set),ct=A.useRef(null),wt=A.useRef(!1),$t=A.useRef(new Map),ht=A.useRef(new Map),dt=A.useRef(0),Le=A.useRef(fe);Le.current=fe;const Te=ut(Qkn(n)).data??null,[Fe,st]=A.useState("table"),[_t,mt]=A.useState("project"),Ue=A.useRef(null),{open:Gt,setOpen:sn,ref:jt}=_o(Ue),[gt,$n]=A.useState(!1),Zt=fe.every(X=>X.chatSessionId),gn=u&&Zt?_t:"project",mr=A.useMemo(()=>gn!=="agent"?fe:fe.filter(X=>X.chatSessionId===u),[fe,gn,u]),Bn=A.useMemo(()=>{if(gn!=="agent")return qe;const X=new Set(mr.map(ae=>ae.id));return qe.filter(ae=>X.has(ae.experimentId))},[qe,mr,gn]),[Nn,zn]=A.useState([]),[Pn,jr]=A.useState(!1),[Ct,tn]=A.useState(!1),[vn,on]=A.useState(!1),[gr,bn]=A.useState(!1),[yn,Hn]=A.useState(null),[Ie,Ke]=A.useState([]),[Cn,Zn]=A.useState([]),Xt=A.useRef(new Map),Jt=A.useRef(new Map),jn=X=>{let ae=Jt.current.get(X);return ae||(ae=new SIn,Jt.current.set(X,ae)),ae},[Wr,qn]=A.useState([]),[ps,hi]=A.useState([]),[Rs,Qs]=A.useState([]),[ms,ua]=A.useState([]),[Ms,_a]=A.useState(null),[Br,nr]=A.useState("files"),[ho,po]=A.useState(new Set),[Un,Pr]=A.useState(!1),[mo,go]=A.useState(null),[Xs,vo]=A.useState(o$),[qt,Fa]=A.useState(()=>window.innerWidth>=QM),Gn=o==="chat"&&!h&&qt,[Fr,it]=A.useState(!0),[Vt,xs]=A.useState(!1),Ys=A.useRef(CS()),pi=A.useRef(u);pi.current=u;const Vn=A.useRef(Nn);Vn.current=Nn;const _r=A.useRef(ms);_r.current=ms;const Os=A.useRef(null),Ds=A.useCallback(X=>{const ae=[...X];_r.current=ae,ua(ae)},[]),Tr=A.useCallback(X=>{Os.current=X,_a(X)},[]),mi=A.useCallback(X=>{const ae=At(X);Ke(ke=>Pp(ke,ae)),Zn(ke=>Pp(ke,ae)),qn(ke=>Pp(ke,ae)),hi(ke=>Pp(ke,ae)),Qs(ke=>Pp(ke,ae));const xe=Is.current;if(xe&&"path"in X){const ke=As(xe,pi.current,X);Xt.current.delete(ke),Jt.current.delete(ke),N.current.delete(ke),C.current.delete(ke)}const Ae=Vn.current.filter(ke=>At(ke)!==ae);Vn.current=Ae,zn(Ae)},[]),fr=A.useCallback(X=>{const ae=At(X),xe=[...Vn.current.filter(Ae=>At(Ae)!==ae),c1(X)];Vn.current=xe,zn(xe),I(X)},[I]),ws=A.useCallback((X,ae,xe)=>{const Ae=At(X),ke=Os.current,He=DMn({order:_r.current,previewKey:ke?At(ke):null},Ae,ae);He.replacedKey&&ke&&typeof ke!="string"&&At(ke)===He.replacedKey&&mi(ke),Ds(He.order),He.previewKey===null?Tr(null):He.previewKey===Ae&&Tr(c1(X));const Xe=[...Vn.current.filter(Mt=>At(Mt)!==Ae),c1(X)];Vn.current=Xe,zn(Xe),D(tl(X,xe))},[mi,Ds,Tr,D]),Dt=A.useCallback(X=>{const ae=Os.current;ae&&At(ae)===At(X)&&Tr(null)},[Tr]);A.useEffect(()=>{let X=!1;const ae=Ae=>{const ke=Os.current,He=Ae.target;if(He instanceof Element&&He.closest("input, textarea, [contenteditable='true']")!==null){X=!1;return}if(ke&&At(ke)===At(Ys.current.rightTab)&&(Ae.metaKey||Ae.ctrlKey)&&!Ae.altKey&&!Ae.shiftKey&&Ae.key.toLowerCase()==="k"){Ae.preventDefault(),X=!0;return}if(X&&Ae.key==="Enter"){Ae.preventDefault(),X=!1;const Mt=Os.current;Mt&&Dt(Mt);return}X=!1},xe=()=>{X=!1};return window.addEventListener("keydown",ae),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",ae),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[Dt]);const ks=A.useCallback((X,ae)=>{const xe=At(X),Ae=Os.current;Ae&&At(Ae)===xe&&Tr(null);const ke=LMn({order:_r.current,previewKey:Ae?At(Ae):null},xe,Vn.current.map(At));Ds(ke.order);const He=Vn.current.filter(Mt=>At(Mt)!==xe);if(Vn.current=He,zn(He),!ae)return;const Xe=ke.fallbackKey?He.find(Mt=>At(Mt)===ke.fallbackKey):void 0;Xe?I(Xe):($(),Pr(!1))},[Ds,Tr,I,$]),Ha=Q,Ss=A.useMemo(()=>({rightTab:c1(b),tabHistory:Nn,experimentsTabOpen:Pn,filesTabOpen:Ct,artifactsTabOpen:vn,terminalTabOpen:gr,expTabs:Ie,fileTabs:Cn,planTabs:Wr,subagentTabs:ps,codeTabs:Rs,contentTabOrder:_r.current,previewTab:Os.current,filesView:Br,filesToggled:ho,selectedRunId:_,scope:_t,panelOpen:h,panelMax:Un,treeViewport:mo}),[b,Nn,Pn,Ct,vn,gr,Ie,Cn,Wr,ps,Rs,ms,Ms,Br,ho,_,_t,h,Un,mo]);Ys.current=Ss;const qa=A.useCallback(()=>Object.fromEntries(Xt.current),[]),$u=A.useRef(void 0),Bu=A.useCallback(()=>{clearTimeout($u.current),$u.current=setTimeout(()=>j(X=>X+1),200)},[]);A.useEffect(()=>()=>clearTimeout($u.current),[]);const bo=A.useCallback((X,ae,xe)=>{if(zn(X.tabHistory),Vn.current=X.tabHistory,jr(X.experimentsTabOpen),tn(X.filesTabOpen),on(X.artifactsTabOpen),bn(X.terminalTabOpen),Ke(X.expTabs),Zn(X.fileTabs),qn(ke=>ke===X.planTabs?ke:X.planTabs.map(He=>{var Xe;return{...He,plan:((Xe=ke.find(Mt=>Mt.sessionId===He.sessionId&&Mt.promptId===He.promptId))==null?void 0:Xe.plan)??""}})),hi(X.subagentTabs),Qs(X.codeTabs),Ds(X.contentTabOrder),Tr(X.previewTab),nr(X.filesView),po(X.filesToggled),mt(X.scope),Pr(X.panelMax),go(X.treeViewport),$n(M.current.activeSessionId===Od&&X.fileTabs.some(ke=>__(ke,{path:tw,source:"artifacts"}))),xe){for(const[ke,He]of Object.entries((ae==null?void 0:ae.scroll)??{}))Xt.current.set(ke,He);Object.assign(z.current,ae==null?void 0:ae.sourceModes)}const Ae=M.current;if(Ae.projectId)for(const ke of X.fileTabs){const He=As(Ae.projectId,Ae.activeSessionId,ke);N.current.has(He)||C.current.add(He)}},[Ds,Tr]),{ready:Ar,loaded:Pu,error:yo,retry:fa,capture:Ua,workspace:Ga}=n5n({projectId:ne&&y!==null&&((a==null?void 0:a.kind)!=="task"||!u||y.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ne==null?void 0:ne.tourCompleted)===!1,state:Ss,apply:bo,getScroll:qa,sourceModes:z.current,revision:T}),bl=A.useRef(null);A.useLayoutEffect(()=>{if(!Ar||!me||(a==null?void 0:a.kind)!=="task")return;const X=bl.current;(X==null?void 0:X.projectId)===n&&X.taskId===u&&X.scope!==gn&&go(null),bl.current={projectId:n,taskId:u,scope:gn}},[Ar,me,a==null?void 0:a.kind,n,u,gn]);const Fu=A.useCallback((X,ae)=>{var Mt;const xe=(ae==null?void 0:ae.projectId)??n;if(!xe)return;const Ae=xe===n;X&&Ae&&ae!=null&&ae.replace&&u===null&&(Ua(),e5n(xe,X));const ke=yu(r$(xe),X??"new"),He=ke?ke.active:Uc(xe)?(Mt=ES(X??void 0,_e.current===!1))==null?void 0:Mt.active:void 0,Xe=Ae&&(ae!=null&&ae.replace)&&X&&u===null?M.current.pane:He;s.navigate({href:X1(xe,X,Xe),replace:Ae&&(ae==null?void 0:ae.replace)})},[s,n,u,Ua]);A.useEffect(()=>{Ar&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Ga.current.lastTaskId&&(y!=null&&y.includes(Ga.current.lastTaskId))&&(c.current=Ga.current.lastTaskId,j(X=>X+1))},[Ar,a==null?void 0:a.kind,Ga,y]),rQ({shouldBlockFn:({next:X})=>{var ae;return((ae=Z_(X.pathname))==null?void 0:ae.projectId)!==n&&[...Jt.current.values()].some(xe=>xe.needsProtection)&&!IR(DN())},enableBeforeUnload:()=>[...Jt.current.values()].some(X=>X.needsProtection)});const Ls=A.useRef(null);A.useEffect(()=>{const X=Lb(i.href);!ne||!Ar||!X||(Bb.queue({lastLocation:X,railOpen:Fr,panelWidth:Xs,experimentsView:Fe},Ls.current===X?250:0),Ls.current=X)},[i.href,ne,Ar,Fr,Xs,Fe]);const as=(ne==null?void 0:ne.onboardingCompleted)??!1,[uc,da]=A.useState(!1),[ur,_c]=A.useState(null),[rr,Sf]=A.useState(0),xo=A.useCallback(()=>da(!0),[]),wo=A.useCallback(async X=>{const ae=_e.current===!1,xe=await r.mutateAsync({tourCompleted:!0});ae&&ru({name:"demo_welcome_choice",choice:X}),ce(Ae=>Ae&&{...Ae,tourCompleted:xe.tourCompleted}),da(!1),X==="explore_demo"&&Sf(Ae=>Ae+1)},[]),Ri=A.useCallback(async()=>{await wo("create_project"),xs(!0)},[wo]);A.useEffect(()=>{!n||!Uc(n)||!as||ne!=null&&ne.tourCompleted||xo()},[n,as,xo,ne==null?void 0:ne.tourCompleted]);const Bt=(L==null?void 0:L.find(X=>X.id===n))??null;A.useEffect(()=>{const X=G||ne===null?null:Bt==null?void 0:Bt.name;document.title=X?`${Gi(X)} — OpenResearch`:"OpenResearch"},[G,ne,Bt]);const Is=A.useRef(n);Is.current=n;const Zs=A.useCallback(X=>{n&&ru({name:"first_action",surface:Uc(n)?"demo":"project",action:X})},[n]);A.useEffect(()=>{o!=="chat"&&o!=="skills"&&Zs("open_settings")},[o,Zs]);const ha=A.useCallback((X=!1)=>{X&&(!M.current.isTask||M.current.pane)||(Zs("open_experiment"),jr(!0),D({kind:"home",view:"experiments"},X))},[D,Zs]),Cf=()=>{B.refetch(),K.refetch(),w.refetch()},fc=A.useRef(!1);A.useEffect(()=>{if(!ne||fc.current)return;fc.current=!0,oe.current=ne.preferredAgent;const X=kS()??ne.workspace;X&&(it(X.railOpen),vo(Math.min(X.panelWidth,n0())),st(X.experimentsView))},[ne]),A.useEffect(()=>{y&&c.current&&!y.includes(c.current)&&(c.current=null)},[y]);const dc=A.useRef(Promise.resolve()),Mi=A.useRef(0),sr=A.useCallback(X=>{const ae=++Mi.current;ce(Ae=>Ae&&{...Ae,preferredAgent:X});const xe=dc.current.then(()=>r.mutateAsync({preferredAgent:X})).then(Ae=>{oe.current=Ae.preferredAgent,ae===Mi.current&&ce(ke=>ke&&{...ke,preferredAgent:Ae.preferredAgent})}).catch(Ae=>{throw ae===Mi.current&&ce(ke=>ke&&{...ke,preferredAgent:oe.current}),Ae});return dc.current=xe.catch(()=>{}),xe},[]);A.useEffect(()=>{const X=()=>{vo(ae=>Math.min(ae,n0())),Fa(window.innerWidth>=QM)};return window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[]);const hc=A.useCallback(X=>{wt.current=!1,$t.current.clear(),ht.current.clear();const ae=++dt.current;nt.fetchQuery(mu(X)).then(xe=>{if(Is.current!==X||ct.current!==X||dt.current!==ae)return;$t.current=new Map(xe.map(ke=>[ke.id,ke]));const Ae=[...ht.current.values()].some(ke=>{const He=$t.current.get(ke.id);return!He||He.status!=="running"&&He.updatedAt<=ke.updatedAt});ht.current.clear();for(const ke of xe){const He=at.current.get(ke.id);(!He||He.updatedAt{var He;return xe.some(Xe=>Xe.id===ke&&Xe.status==="running")?ke:((He=xe.find(Xe=>Xe.status==="running"))==null?void 0:He.id)??null}),Ae&&ha(!0)}).catch(()=>{dt.current===ae&&(ht.current.clear(),Oe(!0))})},[ha]);A.useEffect(()=>{if(n)return ct.current=n,at.current.clear(),et.current.clear(),Mvn(n).catch(()=>{}),hc(n),()=>{dt.current++}},[hc,n]);const Cs=A.useCallback(()=>{on(!0),fr("artifacts")},[fr]),gi=A.useCallback(()=>{bn(!0),fr("terminal")},[fr]),$s=u??(n?`project:${n}`:null);A.useEffect(()=>{Hn(h?b==="terminal"?$s:X=>X===$s?X:null:null)},[h,b,$s]),Axn({onReconnect:()=>{const X=Is.current;X&&(ct.current=X,at.current.clear(),et.current.clear(),hc(X))},onRun:X=>{if(X.projectId!==Is.current||X.projectId!==ct.current)return;const ae=at.current.get(X.id),xe=et.current.has(X.id);if(ae&&ae.updatedAt>X.updatedAt||(at.current.set(X.id,X),et.current.add(X.id),Uc(X.projectId)&&_c(He=>X.status==="running"?He??X.id:He===X.id?null:He),X.status!=="running"||(ae==null?void 0:ae.status)==="running"))return;const Ae=$t.current.get(X.id),ke=wt.current&&(!Ae||Ae.status!=="running"&&Ae.updatedAt<=X.updatedAt);xe&&ae||ke?ha(!0):wt.current||ht.current.set(X.id,X)}});const yl=A.useCallback(()=>mt("project"),[]),Oi=A.useCallback((X,ae="overview",xe="preview",Ae)=>{Zs("open_experiment");const ke={id:X,view:ae};Ke(He=>He.some(Xe=>cw(Xe,ke))?He:[...He,ke]),ws(ke,xe,Ae)},[ws]),Di=A.useCallback((X,ae="preview")=>{const xe=Se.current.filter(ke=>ke.id===X||ke.id.startsWith(X)),Ae=xe.length===1?xe[0]:null;Ae&&Oi(Ae.experimentId,"terminal",ae,Ae.id)},[Oi]),Ef=A.useMemo(()=>new Map(fe.map(X=>{var ae;return[X.id,((ae=X.title)==null?void 0:ae.trim())||X.slug||Vc()]})),[fe,V]),ko=YM(Ef),Vh=A.useMemo(()=>{const X=new Map;for(const ae of qe)X.set(ae.id,ko.get(ae.experimentId)??Vc());return X},[ko,qe,V]),pc=YM(Vh),mc=A.useCallback(X=>{const ae=pc.get(X);if(ae)return ae;const xe=[...pc].filter(([Ae])=>Ae.startsWith(X));return xe.length===1?xe[0][1]:""},[pc]),Nf=A.useCallback(X=>{const ae=ko.get(X);if(ae)return ae;const xe=[...ko].filter(([Ae])=>Ae.startsWith(X));return xe.length===1?xe[0][1]:""},[ko]),zf=A.useCallback((X,ae="preview")=>{const xe=Le.current.filter(Ae=>Ae.id===X||Ae.id.startsWith(X));xe.length===1&&Oi(xe[0].id,"overview",ae)},[Oi]),xl=A.useCallback(X=>{const ae=Ie.findIndex(xe=>cw(xe,X));ae!==-1&&(Ke(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,At(b)===At(X)))},[Ie,ks,b]),Js=A.useCallback((X,ae="preview")=>{X.line!=null&&k(ke=>ke+1);const xe=Is.current;if(xe){const ke=As(xe,pi.current,X);Ys.current.fileTabs.some(He=>__(He,X))||C.current.delete(ke),N.current.add(ke)}const Ae=t$(X);Zn(ke=>{const He=ke.findIndex(Mt=>__(Mt,X));if(He===-1)return[...ke,Ae];const Xe=ke.slice();return Xe[He]=Ae,Xe}),ws(X,ae)},[ws]),wl=A.useCallback((X,ae,xe,Ae,ke,He)=>{const Xe=L==null?void 0:L.find(vr=>vr.id===n),Mt=vGn(X,Xe==null?void 0:Xe.repoPath,ae,(Xe==null?void 0:Xe.artifactsDir)??(Xe==null?void 0:Xe.filesDir),Xe==null?void 0:Xe.slug);if(!Mt)return null;const Kn=ke?Le.current.find(vr=>vr.id===ke||ke.length>=6&&vr.id.startsWith(ke)):void 0,Hr=xe??(Kn==null?void 0:Kn.branchName),qr=Mt.source==null||Mt.source==="repo";return Hr&&qr&&(Mt.ref=Hr),He&&!Mt.ref&&qr&&(Mt.branchLabel=He),Ae!=null&&(Mt.line=Ae),Mt},[L,n]),So=A.useCallback((X,ae,xe,Ae,ke,He,Xe="preview")=>{const Mt=wl(X,ae,xe,Ae,ke,He);Mt&&Js(Mt,Xe)},[Js,wl]),jf=A.useCallback(X=>Js({path:X,source:"artifacts"},"keepOpen"),[Js]),gc=A.useCallback((X,ae,xe,Ae,ke,He="preview")=>{const Xe=wl(X,ae,ke,xe,Ae);Xe&&Js(Xe,He)},[Js,wl]),ei=A.useCallback((X,ae)=>{Dt(X),ae()},[Dt]),Kh=A.useCallback(X=>{var Ae;const ae=Cn.findIndex(ke=>__(ke,X));if(ae===-1)return;const xe=n?As(n,u,X):null;xe&&((Ae=Jt.current.get(xe))!=null&&Ae.needsProtection)&&!IR(DN())||(Zn(ke=>ke.filter((He,Xe)=>Xe!==ae)),xe&&(Xt.current.delete(xe),Jt.current.delete(xe),N.current.delete(xe),C.current.delete(xe),delete z.current[xe]),u===Od&&__(X,{path:tw,source:"artifacts"})&&$n(!1),ks(X,At(b)===At(X)))},[u,Cn,ks,n,b]),Tf=A.useCallback(X=>{X.lineScrollRequest!==void 0&&m(X.lineScrollRequest)},[]),Wh=A.useCallback((X,ae,xe,Ae="preview")=>{const ke={kind:"plan",sessionId:ae,promptId:xe,plan:X};qn(He=>{const Xe=He.findIndex(Kn=>Kn.promptId===xe);if(Xe===-1)return[...He,ke];const Mt=He.slice();return Mt[Xe]=ke,Mt}),ws(ke,Ae)},[ws]),Af=A.useCallback(X=>{const ae=Wr.findIndex(xe=>xe.promptId===X.promptId);ae!==-1&&(qn(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,At(b)===At(X)))},[ks,Wr,b]),kl=A.useCallback((X,ae,xe,Ae="preview")=>{const ke={kind:"subagent",sessionId:X,spawnPartId:ae,label:xe};hi(He=>He.some(Xe=>Xe.spawnPartId===ae)?He:[...He,ke]),ws(ke,Ae)},[ws]),Qh=A.useCallback(X=>{const ae=ps.findIndex(xe=>xe.spawnPartId===X.spawnPartId);ae!==-1&&(hi(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,At(b)===At(X)))},[ks,b,ps]),[pa,Rf]=A.useState({});A.useEffect(()=>{if(Rf(Xe=>{const Mt=new Set(ps.map(Kn=>Kn.spawnPartId));return Object.keys(Xe).every(Kn=>Mt.has(Kn))?Xe:Object.fromEntries(Object.entries(Xe).filter(([Kn])=>Mt.has(Kn)))}),ps.length===0)return;let X=!0;const ae=new Set,xe=(Xe,Mt,Kn)=>{Rf(Hr=>{var vr;let qr=Hr;for(const ti of Mt)if(!(Kn&&ae.has(ti.spawnPartId)))for(const Wn of Xe){const va=cb(Wn.parts,ti.spawnPartId);if(!va)continue;Kn||ae.add(ti.spawnPartId);const xc={label:pLn(va),running:((vr=va.state)==null?void 0:vr.status)==="running"},ba=qr[ti.spawnPartId];(!ba||ba.label!==xc.label||ba.running!==xc.running)&&(qr===Hr&&(qr={...Hr}),qr[ti.spawnPartId]=xc);break}return qr})};let Ae=0;const ke=()=>{const Xe=++Ae;for(const Mt of new Set(ps.map(Kn=>Kn.sessionId)))nt.fetchQuery({...il(Mt),staleTime:0}).then(({messages:Kn})=>{X&&Xe===Ae&&xe(Kn,ps.filter(Hr=>Hr.sessionId===Mt),!0)}).catch(()=>{})};ke();const He=Ov(Xe=>{if(Xe.type==="reconnected"){ae.clear(),ke();return}if(Xe.type!=="message")return;const Mt=ps.filter(Kn=>Kn.sessionId===Xe.sessionId);Mt.length&&xe([Xe.message],Mt,!1)});return()=>{X=!1,He()}},[ps]);const Co=A.useCallback((X,ae,xe="files",Ae="preview")=>{const ke={code:!0,experimentId:X,branch:ae,view:xe,toggled:new Set};Qs(He=>He.some(Xe=>ud(Xe,ke))?He.map(Xe=>ud(Xe,ke)?{...Xe,experimentId:X,view:xe}:Xe):[...He,ke]),ws(ke,Ae)},[ws]),ma=A.useCallback((X,ae)=>{Qs(xe=>xe.map(Ae=>ud(Ae,X)?{...Ae,...ae}:Ae)),ae.view&&D(tl({...X,...ae}))},[]),Xh=A.useCallback(X=>{const ae=Rs.findIndex(xe=>ud(xe,X));ae!==-1&&(Qs(xe=>xe.filter((Ae,ke)=>ke!==ae)),ks(X,At(b)===At(X)))},[Rs,ks,b]),Sl=A.useCallback(()=>{tn(!0),fr("files")},[fr]),Eo=A.useCallback(X=>{X==="experiments"?jr(!1):X==="files"?tn(!1):X==="terminal"?(bn(!1),Hn(null)):on(!1),ks(X,b===X)},[ks,b]),Mf=X=>{X.preventDefault(),X.currentTarget.setPointerCapture(X.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const Ae=Un,ke=X.clientX,He=Xs;let Xe=!1;function Mt(){window.removeEventListener("pointermove",Kn),window.removeEventListener("pointerup",Mt),window.removeEventListener("pointercancel",Mt),document.body.style.userSelect=xe}function Kn(Hr){if(Ae){const Wn=Hr.clientX-ke;if(Xe||Wnvr+xGn){Pr(!0);return}Pr(!1);const ti=Math.min(Math.max(qr,Bv),vr);vo(ti)}window.addEventListener("pointermove",Kn),window.addEventListener("pointerup",Mt),window.addEventListener("pointercancel",Mt)},Of=(X,ae)=>{F(xe=>xe?XM(xe,X):[X]),s.navigate({href:`/projects/${encodeURIComponent(X.id)}${ae?"/settings/git":""}`}),ae&&mn(ae,"error")},Es=typeof b=="object"&&"id"in b?b:null,un=typeof b=="object"&&"path"in b?b:null,Hu=(un==null?void 0:un.source)==="artifacts"&&Te?K0(Te.entries,un.path):null,qu=Hu?`${Hu.modifiedAt}:${Hu.size}`:null,Cl=u===Od&>?Cn.find(X=>__(X,{path:tw,source:"artifacts"})):void 0,Df=Cl?[Cl]:[],os=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,gs=os==null?void 0:os.sessionId,vi=os==null?void 0:os.promptId,Uu=!!(gs&&vi&&(y!=null&&y.includes(gs))),No=ut({...il(gs??""),enabled:Uu,subscribed:Uu}),vc=A.useMemo(()=>{var ae;if(!gs||!vi||!No.data)return null;const X=No.data.messages.flatMap(xe=>{const Ae=cb(xe.parts,vi);return Ae?[Ae]:[]})[0];return{key:`${gs}:${vi}`,text:((ae=X==null?void 0:X.prompt)==null?void 0:ae.plan)??null}},[gs,vi,No.data]),Qr=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,bc=typeof b=="object"&&"code"in b?b:null,Xr=bc?Rs.find(X=>ud(X,bc))??null:null,Gu=new Map;for(const X of[...Ie,...Cn,...Wr,...ps,...Rs])Gu.set(At(X),X);const Vu=Cl?At(Cl):null,Ku=ms.filter(X=>X!==Vu).map(X=>Gu.get(X)).filter(Y3n),zo=X=>Ms!==null&&At(Ms)===At(X),Wu=X=>f.jsx(Fc,{active:un!==null&&__(un,X),label:X.path.split("/").pop()||X.path,icon:f.jsx(II,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>fr(X),onPromote:()=>Dt(X),onClose:()=>Kh(X)},`file:${SS(X)}`),ga=Es?fe.find(X=>X.id===Es.id)??null:null,yc=Xr?fe.find(X=>X.id===Xr.experimentId&&X.branchName===Xr.branch)??null:null,Lf=X=>{var xe,Ae;if("path"in X)return Wu(X);if("id"in X){const ke=fe.find(He=>He.id===X.id);return f.jsx(Fc,{active:Es!==null&&cw(Es,X),label:ke?ke.title||ke.slug:"…",icon:X.view==="overview"?f.jsx(Bwn,{size:12,className:"shrink-0"}):f.jsx(lo,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>fr(X),onPromote:()=>Dt(X),onClose:()=>xl(X)},At(X))}if("kind"in X&&X.kind==="plan")return f.jsx(Fc,{active:os!==null&&os.promptId===X.promptId,label:ND(),icon:f.jsx(gS,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>fr(X),onPromote:()=>Dt(X),onClose:()=>Af(X)},At(X));if("kind"in X)return f.jsx(Fc,{active:Qr!==null&&Qr.spawnPartId===X.spawnPartId,label:((xe=pa[X.spawnPartId])==null?void 0:xe.label)??X.label??y_e(),shimmer:((Ae=pa[X.spawnPartId])==null?void 0:Ae.running)??!1,icon:f.jsx(yS,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>fr(X),onPromote:()=>Dt(X),onClose:()=>Qh(X)},At(X));const ae=fe.find(ke=>ke.id===X.experimentId);return f.jsx(Fc,{active:Xr!==null&&ud(Xr,X),label:(ae==null?void 0:ae.slug)??X.branch,icon:f.jsx(Su,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>fr(X),onPromote:()=>Dt(X),onClose:()=>Xh(X)},At(X))};if(!a||a.kind==="resume")return null;if(G)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:Zp,children:[f.jsx("p",{children:G}),f.jsx(De,{variant:"primary",onClick:Cf,children:Vs()})]}),e.kind==="ssh"&&f.jsx(P3,{runtime:e,corner:!0})]});if(L&&!Bt)return f.jsxs("div",{className:Zp,children:[ro(),f.jsx(De,{onClick:()=>H(null),children:l0()})]});if(yo&&!Ar)return f.jsxs("div",{className:Zp,children:[f.jsx("p",{role:"alert",children:yo}),f.jsx(De,{onClick:fa,children:Vs()})]});if(L===null||ne===null||!Pu||y===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:Zp,children:f.jsx(Nt,{})}),e.kind==="ssh"&&f.jsx(P3,{runtime:e,corner:!0})]});if(!Bt||(a==null?void 0:a.kind)==="task"&&u&&!(y!=null&&y.includes(u)))return f.jsxs("div",{className:Zp,children:[ro(),f.jsx(De,{onClick:()=>H(null),children:l0()})]});const vs=f.jsx(GIn,{projectName:((te=L.find(X=>X.id===n))==null?void 0:te.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>xs(!0),onRepository:()=>Ha("git"),onCollapse:()=>it(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(_$,{}),e.kind==="local"&&f.jsx(F$,{status:J}),yo&&f.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[f.jsx("span",{children:yo}),f.jsx(De,{onClick:fa,children:Vs()})]}),f.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${Gn?"workspace-card-visible":""}`,children:[n&&f.jsx(jLn,{projectId:n,projectName:(Bt==null?void 0:Bt.name)??"",railHeader:vs,railOpen:Fr,onShowRail:()=>it(!0),mainView:o,onSelectMainView:Ha,onOpenFile:gc,onOpenRun:Di,runExperimentName:mc,onOpenExperiment:zf,experimentName:Nf,onOpenPlan:Wh,onOpenSubagent:kl,composerFocusNonce:rr,demoRunningRunId:ur,runtime:e,onOpenDemoWelcome:Bt&&Uc(Bt.id)?xo:void 0,activeSessionId:u,onActiveSessionChange:Fu,preferredAgent:ne.preferredAgent,onPreferredAgentChange:sr,children:o==="skills"?f.jsx(hIn,{}):o!=="chat"?f.jsx(GOn,{remote:e.kind==="ssh",tab:o,project:Bt,onProjectUpdate:X=>{F(ae=>ae?XM(ae,X):[X])},onSelectTab:Ha}):null}),o==="chat"&&f.jsx(v7n,{expanded:Gn,experiments:fe,runs:qe,onOpenExperiment:(X,ae)=>Oi(X,"overview","preview",ae),rightOffset:h?Xs+28:void 0,activeView:h&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:Bt.id,onCompute:()=>Ha("compute"),sessionId:u,busy:((be=w.data)==null?void 0:be.some(X=>X.id===u&&X.busy))??!1,onChanges:()=>{nr("changes"),Sl()},onFiles:()=>{nr("files"),Sl()},onTerminal:gi,onArtifacts:Cs,onExperiments:()=>ha()}),o==="chat"&&h&&f.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 ${Un?"max":""}`,style:Un?void 0:{width:Xs},"data-onboarding":"experiments",children:[f.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 ${Un?"cursor-e-resize":"cursor-col-resize"}`,title:Un?mle():lle(),onPointerDown:Mf}),f.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:[f.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:[Df.map(Wu),Ct&&f.jsx(Fc,{active:b==="files",label:s3(),icon:f.jsx(Su,{size:12,className:"shrink-0"}),onSelect:()=>fr("files"),onClose:()=>Eo("files")}),gr&&f.jsx(Fc,{active:b==="terminal",label:Tv(),icon:f.jsx(lo,{size:12,className:"shrink-0"}),onSelect:()=>fr("terminal"),onClose:()=>Eo("terminal")}),vn&&f.jsx(Fc,{active:b==="artifacts",label:vD(),icon:f.jsx(pS,{size:12,className:"shrink-0"}),onSelect:()=>fr("artifacts"),onClose:()=>Eo("artifacts")}),Pn&&f.jsx(Fc,{active:b==="experiments",label:bD(),icon:f.jsx(hh,{size:12,className:"shrink-0"}),onSelect:()=>fr("experiments"),onClose:()=>Eo("experiments")}),Ku.map(Lf)]}),f.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[f.jsx(Lt,{title:Un?WE():KE(),"aria-label":Un?WE():KE(),onClick:()=>Pr(X=>!X),children:Un?f.jsx(U4n,{size:14}):f.jsx(F4n,{size:14})}),f.jsx(Lt,{title:z0(),"aria-label":z0(),onClick:()=>{$(),Pr(!1)},children:f.jsx(or,{size:14})})]})]}),b==="terminal"&&gr?null:!Ar||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!me||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Re?f.jsx(Aa,{children:f.jsx(Nt,{})}):Es&&(!ga||_&&!qe.some(X=>X.id===_&&X.experimentId===Es.id))||bc&&!yc||t&&"sessionId"in t&&t.sessionId&&!(y!=null&&y.includes(t.sessionId))?f.jsx(Aa,{children:f.jsx("div",{className:"p-6 text-subtext",children:ro()})}):b==="artifacts"?f.jsx(Aa,{children:Bt&&f.jsx(iIn,{project:Bt,artifacts:Te,onOpenFile:jf,canRenameFile:X=>{var ae;return!((ae=Jt.current.get(As(Bt.id,u,{path:X,source:"artifacts"})))!=null&&ae.needsProtection)}},Bt.id)}):b==="experiments"?f.jsxs(Aa,{children:[f.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[f.jsx("span",{className:"flex-1"}),f.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[f.jsxs("div",{className:"option-picker relative inline-flex",ref:jt,children:[f.jsx(Lt,{size:"small",ref:Ue,className:"experiment-scope-trigger",active:gn==="agent",title:Dle({scope:gn==="agent"?GE():VE()}),"aria-label":oue(),"aria-expanded":Gt,onClick:()=>sn(X=>!X),children:f.jsx(x4n,{size:16,strokeWidth:2.5})}),Gt&&f.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:[f.jsxs(Yn,{"aria-pressed":gn==="agent",disabled:!u||!Zt,title:u?Zt?void 0:hue():zue(),onClick:()=>{mt("agent"),sn(!1)},children:[f.jsx("span",{children:GE()}),gn==="agent"&&f.jsx(Xi,{size:13})]}),f.jsxs(Yn,{"aria-pressed":gn==="project",onClick:()=>{mt("project"),sn(!1)},children:[f.jsx("span",{children:VE()}),gn==="project"&&f.jsx(Xi,{size:13})]})]})]}),f.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":Hle(),children:[f.jsx("button",{className:Fe==="table"?"active":"","aria-pressed":Fe==="table",onClick:()=>st("table"),children:N_e()}),f.jsx("button",{className:Fe==="tree"?"active":"","aria-pressed":Fe==="tree",onClick:()=>st("tree"),children:O_e()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:Fe==="tree"?Bt&&f.jsx(mGn,{experiments:fe,runs:Bn,project:Bt,onOpenView:Oi,onOpenCode:Co,agentSessionId:gn==="agent"?u:null,onShowProjectScope:yl,viewport:mo,onViewportChange:go}):f.jsx(VIn,{runs:Bn,emptyHint:gn==="agent"&&fe.length>0?xue():void 0,experiments:mr,onOpen:(X,ae)=>{Oi(X.id,"overview",ae)},onOpenLogs:(X,ae,xe)=>{Oi(X,"terminal",xe,ae)},onOpenCode:(X,ae)=>{const xe=fe.find(Ae=>Ae.id===X);xe&&Co(xe.id,xe.branchName,"files",ae)},onCancel:BL})})]}):b==="files"?f.jsx(Aa,{children:Bt?f.jsx(KLn,{sessionId:u??void 0,project:Bt,view:Br,toggled:ho,onViewChange:nr,onToggledChange:po,canRenameFile:X=>{var ae;return!((ae=Jt.current.get(As(Bt.id,u,{path:X,source:"repo",sessionId:u??void 0})))!=null&&ae.needsProtection)},onOpenFile:(X,ae,xe,Ae)=>So(X,ae,xe,void 0,void 0,void 0,Ae)},`files:${u??`project:${Bt.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(Pd,{children:f.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:[f.jsx($I,{size:22}),f.jsx("p",{children:Jue()})]})})})}):un?f.jsx(Aa,{children:n&&f.jsx(UIn,{remote:e.kind==="ssh",restored:C.current.has(As(n,u,un)),onRestoreActivated:()=>{const X=As(n,u,un);C.current.delete(X),N.current.add(X)},showSource:z.current[As(n,u,un)]??!1,onShowSourceChange:X=>{z.current[As(n,u,un)]=X,j(ae=>ae+1)},projectId:n,path:un.path,source:un.source,sessionId:un.source==="artifacts"?u??void 0:un.sessionId,gitRef:un.ref,line:un.line,branchLabel:bGn(un,Bt==null?void 0:Bt.baselineBranch),artifactVersion:qu,artifactEntries:un.source==="artifacts"?Te==null?void 0:Te.entries:void 0,bufferSession:jn(As(n,u,un)),onOpenFile:(X,ae,xe,Ae)=>ei(un,()=>So(X,ae,xe,void 0,void 0,void 0,Ae)),scrollPosition:Xt.current.get(As(n,u,un)),onScrollPositionChange:X=>{Xt.current.set(As(n,u,un),X),Bu()},lineScrollRequest:un.lineScrollRequest,onLineScrollRequestHandled:()=>Tf(un),onEdit:()=>Dt(un)},As(n,u,un))}):os?f.jsx(Aa,{children:f.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:f.jsx(Jo,{text:(vc==null?void 0:vc.key)===`${os.sessionId}:${os.promptId}`?vc.text??ro():((ze=Wr.find(X=>X.promptId===os.promptId))==null?void 0:ze.plan)||yD(),onOpenFile:(X,ae,xe,Ae,ke)=>ei(os,()=>So(X,os.sessionId,Ae,ae,xe,void 0,ke))})})}):Qr?f.jsx(RLn,{projectId:n,sessionId:Qr.sessionId,spawnPartId:Qr.spawnPartId,onOpenFile:(X,ae,xe,Ae,ke)=>ei(Qr,()=>gc(X,Qr.sessionId,ae,xe,Ae,ke)),onOpenRun:(X,ae)=>ei(Qr,()=>Di(X,ae)),runExperimentName:mc,onOpenExperiment:(X,ae)=>ei(Qr,()=>zf(X,ae)),experimentName:Nf,onOpenSubagent:(X,ae,xe)=>ei(Qr,()=>kl(Qr.sessionId,X,ae,xe))},Qr.spawnPartId):Xr?f.jsx(Aa,{children:n&&Bt&&Xr&&yc&&f.jsx(VLn,{projectId:n,project:Bt,experiment:yc,view:Xr.view,toggled:Xr.toggled,onViewChange:X=>ma(Xr,{view:X}),onToggledChange:X=>ma(Xr,{toggled:X}),onOpenFile:(X,ae,xe,Ae)=>ei(Xr,()=>So(X,ae,xe,void 0,void 0,yc.branchName,Ae))},`code:${Xr.branch}`)}):f.jsx(Aa,{children:Es&&ga&&Bt&&f.jsx(bIn,{experiment:ga,project:Bt,view:Es.view,runs:qe,selectedRunId:_,onSelectRun:q,parentExperiment:fe.find(X=>X.id===ga.parentExperimentId)??null,onOpenView:(X,ae,xe)=>{ei(Es,()=>Oi(ga.id,X,xe,ae))},onOpenCode:(X,ae)=>ei(Es,()=>Co(ga.id,ga.branchName,X,ae))},`${Es.id}:${Es.view}`)}),gr&&yn!==null&&yn===$s&&Bt&&f.jsx(Aa,{className:b==="terminal"?void 0:"hidden",children:f.jsx(y7n,{projectId:Bt.id,sessionId:u,active:b==="terminal"},$s)})]})]}),Vt&&f.jsx(u$,{remote:e.kind==="ssh",onClose:()=>xs(!1),onCreated:(X,ae)=>{xs(!1),Of(X,ae)}}),uc&&Bt&&Uc(Bt.id)&&f.jsx(KIn,{onClose:wo,onCreateProject:Ri})]})}const pk=tc()({validateSearch:e=>({pane:xS(e.pane)}),beforeLoad:({location:e})=>{if(!Z_(e.pathname))throw TK()},component:SGn});function SGn(){const{projectId:e}=pk.useParams(),{pane:n}=pk.useSearch(),t=_i(),r=oD({select:s=>s.location});return A.useEffect(()=>{const s=CGn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),f.jsxs(f.Fragment,{children:[f.jsx(C0,{}),f.jsx(kGn,{projectId:e,pane:n,runtime:s$()},e)]})}function CGn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&xS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const YU=tc()({component:EGn});function EGn(){const{projectId:e}=YU.useParams();return f.jsx(Hkn,{projectId:e})}const NGn=tc()({}),zGn=tc()({}),jGn=tc()({}),TGn=tc()({}),AGn=Ukn.update({id:"/",path:"/",getParentRoute:()=>Pb}),OC=Gkn.update({id:"/projects",path:"/projects",getParentRoute:()=>Pb}),RGn=Vkn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>Pb}),MGn=Kkn.update({id:"/",path:"/",getParentRoute:()=>OC}),Gh=pk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>OC}),OGn=YU.update({id:"/",path:"/",getParentRoute:()=>Gh}),DGn=NGn.update({id:"/skills",path:"/skills",getParentRoute:()=>Gh}),LGn=zGn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>Gh}),IGn=jGn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>Gh}),$Gn=TGn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>Gh}),BGn={ProjectsProjectIdSkillsRoute:DGn,ProjectsProjectIdIndexRoute:OGn,ProjectsProjectIdSettingsTabRoute:LGn,ProjectsProjectIdTasksSessionIdRoute:IGn,ProjectsProjectIdTasksNewRoute:$Gn},PGn=Gh._addFileChildren(BGn),FGn={ProjectsProjectIdRoute:PGn,ProjectsIndexRoute:MGn},HGn=OC._addFileChildren(FGn),qGn={IndexRoute:AGn,ProjectsRoute:HGn,RemoteLaunchRoute:RGn},UGn=Pb._addFileChildren(qGn)._addFileTypes(),GGn=ZW({routeTree:UGn,context:{queryClient:nt},trailingSlash:"never",defaultPendingComponent:c6,defaultErrorComponent:l6,defaultNotFoundComponent:Pkn}),VGn=E();document.documentElement.lang=VGn;document.documentElement.dir="ltr";aK.createRoot(document.getElementById("root")).render(f.jsxs(A.StrictMode,{children:[f.jsx(yV,{client:nt,children:f.jsx(tQ,{router:GGn})}),f.jsx(ywn,{})]})); +`)+1)}let q=[];try{q=$.trim()?W3($):[]}catch{return null}if(I.truncated&&q.every(V=>V.hunks.length===0))return null;let H=0,Q=0;for(const V of q){const J=oy(V);H+=J.additions,Q+=J.deletions}return{fileCount:q.length,additions:H,deletions:Q,truncated:I.truncated}},[v]),w={done:0,failed:0,cancelled:0,live:0};for(const I of n)I.status==="done"?w.done+=1:I.status==="failed"?w.failed+=1:I.status==="cancelled"?w.cancelled+=1:w.live+=1;const y=t?T0((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,z=A.useRef(null),[T,j]=A.useState(!1),[M,D]=A.useState(!1);return A.useEffect(()=>{j(!1)},[N]),A.useEffect(()=>{const I=z.current;I&&D(I.scrollHeight>I.clientHeight+1)},[N,T]),oa.createPortal(f.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:z4,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:c,children:[f.jsxs("div",{className:"hc-head",children:[f.jsx("span",{className:"hc-slug",children:e.slug}),f.jsx(al,{status:t?Xi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[i&&f.jsxs("button",{type:"button",...Ur(i),children:[f.jsx(lo,{size:13}),HOe()]}),f.jsxs("button",{type:"button",...Ur(a),children:[f.jsx(Db,{size:13}),xOe()]})]}),N&&f.jsx("div",{className:`hc-body${T?" expanded":""}`,ref:z,children:N}),N&&(M||T)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>j(I=>!I),children:T?AD():wje()}),C&&f.jsx("div",{className:"hc-failure",children:C}),f.jsxs("div",{className:"hc-stats",children:[f.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?tYe():cYe({count:Xt(n.length)}),...w.done>0?[dXe({count:Xt(w.done)})]:[],...w.failed>0?[yXe({count:Xt(w.failed)})]:[],...w.cancelled>0?[aXe({count:Xt(w.cancelled)})]:[],...w.live>0?[FXe({count:Xt(w.live)})]:[]])}),t&&nS(t.backend)&&f.jsx(jS,{backend:t.backend}),y&&f.jsx("span",{children:y}),t&&f.jsx("span",{children:co(t.createdAt)})]}),f.jsxs("div",{className:"hc-git",children:[f.jsxs("div",{className:"hc-git-row",children:[f.jsxs("span",{className:"hc-branch",title:e.branchName,children:[f.jsx(Nm,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[DOe()," ",f.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:b.truncated?wX({parent:ze(r??"parent")}):pX({parent:ze(r??"parent")}),children:f.jsxs("span",{children:[b.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?WXe():b.truncated?OXe({count:Xt(b.fileCount)}):NXe({count:Xt(b.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[zOe()," ",gGn(e.createdAt)]})]})]}),document.body)}const WM=["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(" "),bGn=264,QM=132,_v=44,yGn=72,xGn=148,wGn=44;function kGn(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 SGn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),0);return t.set(o,c),c},s=new Map,i=o=>{const c=s.get(o)??(n(o)||o.children.some(i));return s.set(o,c),c};function a(o){if(n(o)){const h=[];let _=0;for(const p of o.children)i(p)?h.push(...a(p)):_+=r(p);return _>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:_,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(_){c+=1;for(const p of _.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function hk(e){return e.kind==="exp"?bGn:xGn}function P1(e){return e.kind==="exp"?e.exp.id:e.id}function fv(e){if(e.children.length===0)return hk(e);const n=e.children.reduce((t,r)=>t+fv(r),0)+_v*(e.children.length-1);return Math.max(hk(e),n)}function CGn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const EGn=A.memo(function({data:n}){pf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h}=n,_=r?Xi(r):void 0,p=_==="running"||_==="starting"||_==="cancelling",m=i?jhn():p?npn():Vc(),x=s.slice(-8),k=A.useRef(null),v=mGn(k,n);return f.jsxs("div",{ref:k,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:v.onMouseEnter,onMouseLeave:v.onMouseLeave,children:[f.jsx(Au,{type:"target",position:Rt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...Ur(b=>u(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:m}),f.jsx(al,{status:_??"idle"})]}),f.jsx("div",{className:"node-head",children:f.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&f.jsx("div",{className:"node-title",children:t.title||t.description}),f.jsxs("div",{className:"node-meta",children:[f.jsx("span",{children:g0n()}),x.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(b=>f.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 ${CGn(Xi(b))}`,title:_6(Xi(b))},b.id))}):f.jsx("span",{children:Xpn()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:co(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:r0n(),...Ur(b=>u(t.id,"terminal",b)),children:[f.jsx(lo,{size:13}),OL()]}),f.jsxs("button",{className:"node-action",title:mD({branch:ze(t.branchName)}),...Ur(b=>h(t.id,t.branchName,"files",b)),children:[f.jsx(Db,{size:13}),kpn()]}),o&&c&&f.jsx("a",{className:"node-action node-action-ext",title:Sv({name:ze(t.branchName)}),"aria-label":Sv({name:ze(t.branchName)}),href:Rb(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(Fb,{size:13})})]}),f.jsx(Au,{type:"source",position:Rt.Bottom}),v.rect&&f.jsx(vGn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:v.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>h(t.id,t.branchName,"files",b),onMouseEnter:v.keepOpen,onMouseLeave:v.onMouseLeave})]})}),NGn=A.memo(function({data:n}){pf();const{count:t,onShowProjectScope:r}=n;return f.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:S0n(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Au,{type:"target",position:Rt.Top}),f.jsx(dS,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?Qhn():Hhn({count:Xt(t)}),f.jsx("span",{className:"elided-node-sub",children:u0n()})]}),f.jsx(Au,{type:"source",position:Rt.Bottom})]})}),zGn={exp:EGn,elided:NGn},YU={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},jGn={...YU.style,strokeDasharray:"4 4"};function TGn({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:a,viewport:o,onViewportChange:c}){const{nodes:u,edges:h}=A.useMemo(()=>{const _=new Map;for(const y of n){const C=_.get(y.experimentId);C?C.push(y):_.set(y.experimentId,[y])}for(const y of _.values())y.sort((C,N)=>C.createdAt-N.createdAt);const p=[],m=[],x=y=>!i||y.exp.chatSessionId===i,k=SGn(kGn(e),x),v=new Map(e.map(y=>[y.id,y.slug]));function b(y,C,N){const z=C-hk(y)/2;if(y.kind==="exp"){const M=_.get(y.exp.id)??[];p.push({id:y.exp.id,type:"exp",position:{x:z,y:N},data:{exp:y.exp,latestRun:M[M.length-1]??null,runs:M,isBaseline:!y.exp.parentExperimentId,parentSlug:y.exp.parentExperimentId?v.get(y.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else p.push({id:y.id,type:"elided",position:{x:z,y:N+(QM-wGn)/2},data:{count:y.count,onShowProjectScope:a}});if(y.children.length===0)return;const T=y.children.reduce((M,D)=>M+fv(D),0)+_v*(y.children.length-1);let j=C-T/2;for(const M of y.children){const D=fv(M),I=y.kind==="elided"||M.kind==="elided";m.push({id:`e-${P1(y)}-${P1(M)}`,source:P1(y),target:P1(M),...I?{style:jGn}:{}}),b(M,j+D/2,N+QM+yGn),j+=D+_v}}let w=0;for(const y of k){const C=fv(y);b(y,w+C/2,0),w+=C+_v}return{nodes:p,edges:m}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,a]);return e.length===0?f.jsxs("div",{className:WM,children:[f.jsx("p",{className:"empty-state-title",children:qpn()}),f.jsx("p",{className:"empty-state-hint",children:mpn()})]}):u.length===0&&i?f.jsxs("div",{className:WM,children:[f.jsx("p",{className:"empty-state-title",children:Lpn()}),f.jsx("p",{className:"empty-state-hint",children:lpn()})]}):f.jsx($Un,{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:u,edges:h,nodeTypes:zGn,defaultEdgeOptions:YU,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:pGn,onMoveEnd:(_,p)=>{_&&c(p)},minZoom:.15,defaultViewport:o??void 0,fitView:o===null,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(qUn,{variant:cl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const Jp=["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 AGn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RGn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),c=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("~/")||k6(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,k]=[m(i),m(p)];return x===k?"":x.startsWith(`${k}/`)?x.slice(k.length).replace(/^\/+/,""):null},h=i.startsWith("/")&&c?u(c):null,_=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(_!==null)i=_;else{const p=s?AGn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(a=x[1],i=x[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function MGn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const OGn=10,XM=1448,DGn=80,LGn=48;function YM(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 ZM(e){const n=A.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function IGn({runtime:e,projectId:n,pane:t}){var te,ve,je;const r=an({mutationFn:Dvn}),s=fi(),i=cD({select:X=>X.location}),a=J_(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",c=A.useRef(null),u=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,_=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=A.useState(null),[x,k]=A.useState(0),v=A.useRef({href:"",jump:0,value:0});(v.current.href!==i.href||v.current.jump!==x)&&(v.current={href:i.href,jump:x,value:v.current.value+1});const b=A.useMemo(()=>{const X=t?Ja(t):"experiments";return typeof X=="object"&&"path"in X&&X.line&&p!==v.current.value?{...X,lineScrollRequest:v.current.value}:X},[t,p,i.href,x]),w=ut(La(n)),y=A.useMemo(()=>{var X;return((X=w.data)==null?void 0:X.map(ae=>ae.id))??null},[w.data]),C=A.useRef(new Set),N=A.useRef(new Set),z=A.useRef({}),[T,j]=A.useState(0),M=A.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 D=A.useCallback((X,ae=!1)=>{const xe=M.current;xe.projectId&&s.navigate({href:X1(xe.projectId,xe.activeSessionId,X),replace:ae})},[s]),I=A.useCallback(X=>{const ae=tl(X);D(ae.kind==="file"?{...ae,line:void 0}:ae)},[D]),$=A.useCallback(()=>D(void 0),[D]),q=A.useCallback(X=>{(t==null?void 0:t.kind)==="experiment"&&D({...t,runId:X??void 0})},[t,D]),H=A.useCallback(X=>{s.navigate({href:X?`/projects/${encodeURIComponent(X)}`:"/projects"})},[s]),Q=A.useCallback(X=>{var ae;if(n)if(X==="chat"){const xe=c.current;s.navigate({href:X1(n,xe,(ae=yu(Ga.current,xe??"new"))==null?void 0:ae.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${X==="skills"?"skills":`settings/${X}`}`})},[s,n]),V=pf(),{status:J}=o6(e.kind==="local"),Z=A.useMemo(()=>dh(),[n]),B=ut(Z),L=B.data??null,F=A.useCallback(X=>{Jr(Z.queryKey,ae=>(typeof X=="function"?X(ae??null):X)??void 0)},[Z]),U=A.useMemo(()=>Sm(),[n]),K=ut(U),ne=K.data??null,ce=A.useCallback(X=>{Jr(U.queryKey,ae=>(typeof X=="function"?X(ae??null):X)??void 0)},[U]),_e=A.useRef(void 0);_e.current=ne==null?void 0:ne.tourCompleted;const se=[!w.data&&w.error?wD():null,!B.data&&B.error?u0():null,!K.data&&K.error?o_e():null].filter(X=>X!==null),G=se.length?h_e({items:new Intl.ListFormat(V).format(se)}):null,oe=A.useRef(null),le=ut(T3(n)),pe=le.data??[],be=!le.isPending,[Me,we]=A.useState(!1),He=ut(mu(n)).data??[],Ce=A.useRef(He);Ce.current=He;const ot=A.useRef(new Map),Qe=A.useRef(new Set),it=A.useRef(null),Ct=A.useRef(!1),Ht=A.useRef(new Map),pt=A.useRef(new Map),_t=A.useRef(0),Le=A.useRef(pe);Le.current=pe;const Ae=ut(lSn(n)).data??null,[Be,rt]=A.useState("table"),[ft,St]=A.useState("project"),gt=A.useRef(null),{open:Kt,setOpen:en,ref:Ke}=_o(gt),[vt,In]=A.useState(!1),tn=pe.every(X=>X.chatSessionId),yn=u&&tn?ft:"project",yr=A.useMemo(()=>yn!=="agent"?pe:pe.filter(X=>X.chatSessionId===u),[pe,yn,u]),Pn=A.useMemo(()=>{if(yn!=="agent")return He;const X=new Set(yr.map(ae=>ae.id));return He.filter(ae=>X.has(ae.experimentId))},[He,yr,yn]),[$n,Fn]=A.useState([]),[Yn,Dr]=A.useState(!1),[bt,ln]=A.useState(!1),[En,on]=A.useState(!1),[dr,sn]=A.useState(!1),[gn,Zn]=A.useState(null),[yt,jt]=A.useState([]),[zn,xr]=A.useState([]),rr=A.useRef(new Map),_n=A.useRef(new Map),wr=X=>{let ae=_n.current.get(X);return ae||(ae=new $In,_n.current.set(X,ae)),ae},[Ve,ct]=A.useState([]),[sr,Jn]=A.useState([]),[xn,Tr]=A.useState([]),[Hn,ua]=A.useState([]),[Ds,_a]=A.useState(null),[Vr,ir]=A.useState("files"),[ho,po]=A.useState(new Set),[qn,Kr]=A.useState(!1),[mo,go]=A.useState(null),[Ys,vo]=A.useState(c$),[Gt,Fa]=A.useState(()=>window.innerWidth>=XM),Un=o==="chat"&&!h&&Gt,[Wr,st]=A.useState(!0),[Wt,Ss]=A.useState(!1),Zs=A.useRef(CS()),pi=A.useRef(u);pi.current=u;const Gn=A.useRef($n);Gn.current=$n;const pr=A.useRef(Hn);pr.current=Hn;const Ls=A.useRef(null),Is=A.useCallback(X=>{const ae=[...X];pr.current=ae,ua(ae)},[]),Lr=A.useCallback(X=>{Ls.current=X,_a(X)},[]),mi=A.useCallback(X=>{const ae=Mt(X);jt(Se=>Fp(Se,ae)),xr(Se=>Fp(Se,ae)),ct(Se=>Fp(Se,ae)),Jn(Se=>Fp(Se,ae)),Tr(Se=>Fp(Se,ae));const xe=Bs.current;if(xe&&"path"in X){const Se=Os(xe,pi.current,X);rr.current.delete(Se),_n.current.delete(Se),N.current.delete(Se),C.current.delete(Se)}const Re=Gn.current.filter(Se=>Mt(Se)!==ae);Gn.current=Re,Fn(Re)},[]),mr=A.useCallback(X=>{const ae=Mt(X),xe=[...Gn.current.filter(Re=>Mt(Re)!==ae),c1(X)];Gn.current=xe,Fn(xe),I(X)},[I]),Cs=A.useCallback((X,ae,xe)=>{const Re=Mt(X),Se=Ls.current,Fe=QMn({order:pr.current,previewKey:Se?Mt(Se):null},Re,ae);Fe.replacedKey&&Se&&typeof Se!="string"&&Mt(Se)===Fe.replacedKey&&mi(Se),Is(Fe.order),Fe.previewKey===null?Lr(null):Fe.previewKey===Re&&Lr(c1(X));const Xe=[...Gn.current.filter(Dt=>Mt(Dt)!==Re),c1(X)];Gn.current=Xe,Fn(Xe),D(tl(X,xe))},[mi,Is,Lr,D]),$t=A.useCallback(X=>{const ae=Ls.current;ae&&Mt(ae)===Mt(X)&&Lr(null)},[Lr]);A.useEffect(()=>{let X=!1;const ae=Re=>{const Se=Ls.current,Fe=Re.target;if(Fe instanceof Element&&Fe.closest("input, textarea, [contenteditable='true']")!==null){X=!1;return}if(Se&&Mt(Se)===Mt(Zs.current.rightTab)&&(Re.metaKey||Re.ctrlKey)&&!Re.altKey&&!Re.shiftKey&&Re.key.toLowerCase()==="k"){Re.preventDefault(),X=!0;return}if(X&&Re.key==="Enter"){Re.preventDefault(),X=!1;const Dt=Ls.current;Dt&&$t(Dt);return}X=!1},xe=()=>{X=!1};return window.addEventListener("keydown",ae),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",ae),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[$t]);const Es=A.useCallback((X,ae)=>{const xe=Mt(X),Re=Ls.current;Re&&Mt(Re)===xe&&Lr(null);const Se=XMn({order:pr.current,previewKey:Re?Mt(Re):null},xe,Gn.current.map(Mt));Is(Se.order);const Fe=Gn.current.filter(Dt=>Mt(Dt)!==xe);if(Gn.current=Fe,Fn(Fe),!ae)return;const Xe=Se.fallbackKey?Fe.find(Dt=>Mt(Dt)===Se.fallbackKey):void 0;Xe?I(Xe):($(),Kr(!1))},[Is,Lr,I,$]),Ha=Q,Ns=A.useMemo(()=>({rightTab:c1(b),tabHistory:$n,experimentsTabOpen:Yn,filesTabOpen:bt,artifactsTabOpen:En,terminalTabOpen:dr,expTabs:yt,fileTabs:zn,planTabs:Ve,subagentTabs:sr,codeTabs:xn,contentTabOrder:pr.current,previewTab:Ls.current,filesView:Vr,filesToggled:ho,selectedRunId:_,scope:ft,panelOpen:h,panelMax:qn,treeViewport:mo}),[b,$n,Yn,bt,En,dr,yt,zn,Ve,sr,xn,Hn,Ds,Vr,ho,_,ft,h,qn,mo]);Zs.current=Ns;const qa=A.useCallback(()=>Object.fromEntries(rr.current),[]),$u=A.useRef(void 0),Bu=A.useCallback(()=>{clearTimeout($u.current),$u.current=setTimeout(()=>j(X=>X+1),200)},[]);A.useEffect(()=>()=>clearTimeout($u.current),[]);const bo=A.useCallback((X,ae,xe)=>{if(Fn(X.tabHistory),Gn.current=X.tabHistory,Dr(X.experimentsTabOpen),ln(X.filesTabOpen),on(X.artifactsTabOpen),sn(X.terminalTabOpen),jt(X.expTabs),xr(X.fileTabs),ct(Se=>Se===X.planTabs?Se:X.planTabs.map(Fe=>{var Xe;return{...Fe,plan:((Xe=Se.find(Dt=>Dt.sessionId===Fe.sessionId&&Dt.promptId===Fe.promptId))==null?void 0:Xe.plan)??""}})),Jn(X.subagentTabs),Tr(X.codeTabs),Is(X.contentTabOrder),Lr(X.previewTab),ir(X.filesView),po(X.filesToggled),St(X.scope),Kr(X.panelMax),go(X.treeViewport),In(M.current.activeSessionId===Ld&&X.fileTabs.some(Se=>__(Se,{path:tw,source:"artifacts"}))),xe){for(const[Se,Fe]of Object.entries((ae==null?void 0:ae.scroll)??{}))rr.current.set(Se,Fe);Object.assign(z.current,ae==null?void 0:ae.sourceModes)}const Re=M.current;if(Re.projectId)for(const Se of X.fileTabs){const Fe=Os(Re.projectId,Re.activeSessionId,Se);N.current.has(Fe)||C.current.add(Fe)}},[Is,Lr]),{ready:Ir,loaded:Pu,error:yo,retry:fa,capture:Ua,workspace:Ga}=m5n({projectId:ne&&y!==null&&((a==null?void 0:a.kind)!=="task"||!u||y.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ne==null?void 0:ne.tourCompleted)===!1,state:Ns,apply:bo,getScroll:qa,sourceModes:z.current,revision:T}),bl=A.useRef(null);A.useLayoutEffect(()=>{if(!Ir||!be||(a==null?void 0:a.kind)!=="task")return;const X=bl.current;(X==null?void 0:X.projectId)===n&&X.taskId===u&&X.scope!==yn&&go(null),bl.current={projectId:n,taskId:u,scope:yn}},[Ir,be,a==null?void 0:a.kind,n,u,yn]);const Fu=A.useCallback((X,ae)=>{var Dt;const xe=(ae==null?void 0:ae.projectId)??n;if(!xe)return;const Re=xe===n;X&&Re&&ae!=null&&ae.replace&&u===null&&(Ua(),h5n(xe,X));const Se=yu(s$(xe),X??"new"),Fe=Se?Se.active:Uc(xe)?(Dt=ES(X??void 0,_e.current===!1))==null?void 0:Dt.active:void 0,Xe=Re&&(ae!=null&&ae.replace)&&X&&u===null?M.current.pane:Fe;s.navigate({href:X1(xe,X,Xe),replace:Re&&(ae==null?void 0:ae.replace)})},[s,n,u,Ua]);A.useEffect(()=>{Ir&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Ga.current.lastTaskId&&(y!=null&&y.includes(Ga.current.lastTaskId))&&(c.current=Ga.current.lastTaskId,j(X=>X+1))},[Ir,a==null?void 0:a.kind,Ga,y]),sQ({shouldBlockFn:({next:X})=>{var ae;return((ae=J_(X.pathname))==null?void 0:ae.projectId)!==n&&[..._n.current.values()].some(xe=>xe.needsProtection)&&!$R(LN())},enableBeforeUnload:()=>[..._n.current.values()].some(X=>X.needsProtection)});const $s=A.useRef(null);A.useEffect(()=>{const X=Lb(i.href);!ne||!Ir||!X||(Bb.queue({lastLocation:X,railOpen:Wr,panelWidth:Ys,experimentsView:Be},$s.current===X?250:0),$s.current=X)},[i.href,ne,Ir,Wr,Ys,Be]);const _s=(ne==null?void 0:ne.onboardingCompleted)??!1,[uc,da]=A.useState(!1),[hr,_c]=A.useState(null),[ar,Ef]=A.useState(0),xo=A.useCallback(()=>da(!0),[]),wo=A.useCallback(async X=>{const ae=_e.current===!1,xe=await r.mutateAsync({tourCompleted:!0});ae&&ru({name:"demo_welcome_choice",choice:X}),ce(Re=>Re&&{...Re,tourCompleted:xe.tourCompleted}),da(!1),X==="explore_demo"&&Ef(Re=>Re+1)},[]),Mi=A.useCallback(async()=>{await wo("create_project"),Ss(!0)},[wo]);A.useEffect(()=>{!n||!Uc(n)||!_s||ne!=null&&ne.tourCompleted||xo()},[n,_s,xo,ne==null?void 0:ne.tourCompleted]);const Pt=(L==null?void 0:L.find(X=>X.id===n))??null;A.useEffect(()=>{const X=G||ne===null?null:Pt==null?void 0:Pt.name;document.title=X?`${Vi(X)} — OpenResearch`:"OpenResearch"},[G,ne,Pt]);const Bs=A.useRef(n);Bs.current=n;const Js=A.useCallback(X=>{n&&ru({name:"first_action",surface:Uc(n)?"demo":"project",action:X})},[n]);A.useEffect(()=>{o!=="chat"&&o!=="skills"&&Js("open_settings")},[o,Js]);const ha=A.useCallback((X=!1)=>{X&&(!M.current.isTask||M.current.pane)||(Js("open_experiment"),Dr(!0),D({kind:"home",view:"experiments"},X))},[D,Js]),Nf=()=>{B.refetch(),K.refetch(),w.refetch()},fc=A.useRef(!1);A.useEffect(()=>{if(!ne||fc.current)return;fc.current=!0,oe.current=ne.preferredAgent;const X=kS()??ne.workspace;X&&(st(X.railOpen),vo(Math.min(X.panelWidth,r0())),rt(X.experimentsView))},[ne]),A.useEffect(()=>{y&&c.current&&!y.includes(c.current)&&(c.current=null)},[y]);const dc=A.useRef(Promise.resolve()),Oi=A.useRef(0),or=A.useCallback(X=>{const ae=++Oi.current;ce(Re=>Re&&{...Re,preferredAgent:X});const xe=dc.current.then(()=>r.mutateAsync({preferredAgent:X})).then(Re=>{oe.current=Re.preferredAgent,ae===Oi.current&&ce(Se=>Se&&{...Se,preferredAgent:Re.preferredAgent})}).catch(Re=>{throw ae===Oi.current&&ce(Se=>Se&&{...Se,preferredAgent:oe.current}),Re});return dc.current=xe.catch(()=>{}),xe},[]);A.useEffect(()=>{const X=()=>{vo(ae=>Math.min(ae,r0())),Fa(window.innerWidth>=XM)};return window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[]);const hc=A.useCallback(X=>{Ct.current=!1,Ht.current.clear(),pt.current.clear();const ae=++_t.current;tt.fetchQuery(mu(X)).then(xe=>{if(Bs.current!==X||it.current!==X||_t.current!==ae)return;Ht.current=new Map(xe.map(Se=>[Se.id,Se]));const Re=[...pt.current.values()].some(Se=>{const Fe=Ht.current.get(Se.id);return!Fe||Fe.status!=="running"&&Fe.updatedAt<=Se.updatedAt});pt.current.clear();for(const Se of xe){const Fe=ot.current.get(Se.id);(!Fe||Fe.updatedAt{var Fe;return xe.some(Xe=>Xe.id===Se&&Xe.status==="running")?Se:((Fe=xe.find(Xe=>Xe.status==="running"))==null?void 0:Fe.id)??null}),Re&&ha(!0)}).catch(()=>{_t.current===ae&&(pt.current.clear(),we(!0))})},[ha]);A.useEffect(()=>{if(n)return it.current=n,ot.current.clear(),Qe.current.clear(),Kvn(n).catch(()=>{}),hc(n),()=>{_t.current++}},[hc,n]);const zs=A.useCallback(()=>{on(!0),mr("artifacts")},[mr]),gi=A.useCallback(()=>{sn(!0),mr("terminal")},[mr]),Ps=u??(n?`project:${n}`:null);A.useEffect(()=>{Zn(h?b==="terminal"?Ps:X=>X===Ps?X:null:null)},[h,b,Ps]),Gxn({onReconnect:()=>{const X=Bs.current;X&&(it.current=X,ot.current.clear(),Qe.current.clear(),hc(X))},onRun:X=>{if(X.projectId!==Bs.current||X.projectId!==it.current)return;const ae=ot.current.get(X.id),xe=Qe.current.has(X.id);if(ae&&ae.updatedAt>X.updatedAt||(ot.current.set(X.id,X),Qe.current.add(X.id),Uc(X.projectId)&&_c(Fe=>X.status==="running"?Fe??X.id:Fe===X.id?null:Fe),X.status!=="running"||(ae==null?void 0:ae.status)==="running"))return;const Re=Ht.current.get(X.id),Se=Ct.current&&(!Re||Re.status!=="running"&&Re.updatedAt<=X.updatedAt);xe&&ae||Se?ha(!0):Ct.current||pt.current.set(X.id,X)}});const yl=A.useCallback(()=>St("project"),[]),Di=A.useCallback((X,ae="overview",xe="preview",Re)=>{Js("open_experiment");const Se={id:X,view:ae};jt(Fe=>Fe.some(Xe=>cw(Xe,Se))?Fe:[...Fe,Se]),Cs(Se,xe,Re)},[Cs]),Li=A.useCallback((X,ae="preview")=>{const xe=Ce.current.filter(Se=>Se.id===X||Se.id.startsWith(X)),Re=xe.length===1?xe[0]:null;Re&&Di(Re.experimentId,"terminal",ae,Re.id)},[Di]),zf=A.useMemo(()=>new Map(pe.map(X=>{var ae;return[X.id,((ae=X.title)==null?void 0:ae.trim())||X.slug||Vc()]})),[pe,V]),ko=ZM(zf),Kh=A.useMemo(()=>{const X=new Map;for(const ae of He)X.set(ae.id,ko.get(ae.experimentId)??Vc());return X},[ko,He,V]),pc=ZM(Kh),mc=A.useCallback(X=>{const ae=pc.get(X);if(ae)return ae;const xe=[...pc].filter(([Re])=>Re.startsWith(X));return xe.length===1?xe[0][1]:""},[pc]),jf=A.useCallback(X=>{const ae=ko.get(X);if(ae)return ae;const xe=[...ko].filter(([Re])=>Re.startsWith(X));return xe.length===1?xe[0][1]:""},[ko]),Tf=A.useCallback((X,ae="preview")=>{const xe=Le.current.filter(Re=>Re.id===X||Re.id.startsWith(X));xe.length===1&&Di(xe[0].id,"overview",ae)},[Di]),xl=A.useCallback(X=>{const ae=yt.findIndex(xe=>cw(xe,X));ae!==-1&&(jt(xe=>xe.filter((Re,Se)=>Se!==ae)),Es(X,Mt(b)===Mt(X)))},[yt,Es,b]),ei=A.useCallback((X,ae="preview")=>{X.line!=null&&k(Se=>Se+1);const xe=Bs.current;if(xe){const Se=Os(xe,pi.current,X);Zs.current.fileTabs.some(Fe=>__(Fe,X))||C.current.delete(Se),N.current.add(Se)}const Re=n$(X);xr(Se=>{const Fe=Se.findIndex(Dt=>__(Dt,X));if(Fe===-1)return[...Se,Re];const Xe=Se.slice();return Xe[Fe]=Re,Xe}),Cs(X,ae)},[Cs]),wl=A.useCallback((X,ae,xe,Re,Se,Fe)=>{const Xe=L==null?void 0:L.find(kr=>kr.id===n),Dt=RGn(X,Xe==null?void 0:Xe.repoPath,ae,(Xe==null?void 0:Xe.artifactsDir)??(Xe==null?void 0:Xe.filesDir),Xe==null?void 0:Xe.slug);if(!Dt)return null;const Vn=Se?Le.current.find(kr=>kr.id===Se||Se.length>=6&&kr.id.startsWith(Se)):void 0,Qr=xe??(Vn==null?void 0:Vn.branchName),Xr=Dt.source==null||Dt.source==="repo";return Qr&&Xr&&(Dt.ref=Qr),Fe&&!Dt.ref&&Xr&&(Dt.branchLabel=Fe),Re!=null&&(Dt.line=Re),Dt},[L,n]),So=A.useCallback((X,ae,xe,Re,Se,Fe,Xe="preview")=>{const Dt=wl(X,ae,xe,Re,Se,Fe);Dt&&ei(Dt,Xe)},[ei,wl]),Af=A.useCallback(X=>ei({path:X,source:"artifacts"},"keepOpen"),[ei]),gc=A.useCallback((X,ae,xe,Re,Se,Fe="preview")=>{const Xe=wl(X,ae,Se,xe,Re);Xe&&ei(Xe,Fe)},[ei,wl]),ti=A.useCallback((X,ae)=>{$t(X),ae()},[$t]),Wh=A.useCallback(X=>{var Re;const ae=zn.findIndex(Se=>__(Se,X));if(ae===-1)return;const xe=n?Os(n,u,X):null;xe&&((Re=_n.current.get(xe))!=null&&Re.needsProtection)&&!$R(LN())||(xr(Se=>Se.filter((Fe,Xe)=>Xe!==ae)),xe&&(rr.current.delete(xe),_n.current.delete(xe),N.current.delete(xe),C.current.delete(xe),delete z.current[xe]),u===Ld&&__(X,{path:tw,source:"artifacts"})&&In(!1),Es(X,Mt(b)===Mt(X)))},[u,zn,Es,n,b]),Rf=A.useCallback(X=>{X.lineScrollRequest!==void 0&&m(X.lineScrollRequest)},[]),Qh=A.useCallback((X,ae,xe,Re="preview")=>{const Se={kind:"plan",sessionId:ae,promptId:xe,plan:X};ct(Fe=>{const Xe=Fe.findIndex(Vn=>Vn.promptId===xe);if(Xe===-1)return[...Fe,Se];const Dt=Fe.slice();return Dt[Xe]=Se,Dt}),Cs(Se,Re)},[Cs]),Mf=A.useCallback(X=>{const ae=Ve.findIndex(xe=>xe.promptId===X.promptId);ae!==-1&&(ct(xe=>xe.filter((Re,Se)=>Se!==ae)),Es(X,Mt(b)===Mt(X)))},[Es,Ve,b]),kl=A.useCallback((X,ae,xe,Re="preview")=>{const Se={kind:"subagent",sessionId:X,spawnPartId:ae,label:xe};Jn(Fe=>Fe.some(Xe=>Xe.spawnPartId===ae)?Fe:[...Fe,Se]),Cs(Se,Re)},[Cs]),Xh=A.useCallback(X=>{const ae=sr.findIndex(xe=>xe.spawnPartId===X.spawnPartId);ae!==-1&&(Jn(xe=>xe.filter((Re,Se)=>Se!==ae)),Es(X,Mt(b)===Mt(X)))},[Es,b,sr]),[pa,Of]=A.useState({});A.useEffect(()=>{if(Of(Xe=>{const Dt=new Set(sr.map(Vn=>Vn.spawnPartId));return Object.keys(Xe).every(Vn=>Dt.has(Vn))?Xe:Object.fromEntries(Object.entries(Xe).filter(([Vn])=>Dt.has(Vn)))}),sr.length===0)return;let X=!0;const ae=new Set,xe=(Xe,Dt,Vn)=>{Of(Qr=>{var kr;let Xr=Qr;for(const ni of Dt)if(!(Vn&&ae.has(ni.spawnPartId)))for(const Kn of Xe){const va=cb(Kn.parts,ni.spawnPartId);if(!va)continue;Vn||ae.add(ni.spawnPartId);const xc={label:jLn(va),running:((kr=va.state)==null?void 0:kr.status)==="running"},ba=Xr[ni.spawnPartId];(!ba||ba.label!==xc.label||ba.running!==xc.running)&&(Xr===Qr&&(Xr={...Qr}),Xr[ni.spawnPartId]=xc);break}return Xr})};let Re=0;const Se=()=>{const Xe=++Re;for(const Dt of new Set(sr.map(Vn=>Vn.sessionId)))tt.fetchQuery({...il(Dt),staleTime:0}).then(({messages:Vn})=>{X&&Xe===Re&&xe(Vn,sr.filter(Qr=>Qr.sessionId===Dt),!0)}).catch(()=>{})};Se();const Fe=Ov(Xe=>{if(Xe.type==="reconnected"){ae.clear(),Se();return}if(Xe.type!=="message")return;const Dt=sr.filter(Vn=>Vn.sessionId===Xe.sessionId);Dt.length&&xe([Xe.message],Dt,!1)});return()=>{X=!1,Fe()}},[sr]);const Co=A.useCallback((X,ae,xe="files",Re="preview")=>{const Se={code:!0,experimentId:X,branch:ae,view:xe,toggled:new Set};Tr(Fe=>Fe.some(Xe=>fd(Xe,Se))?Fe.map(Xe=>fd(Xe,Se)?{...Xe,experimentId:X,view:xe}:Xe):[...Fe,Se]),Cs(Se,Re)},[Cs]),ma=A.useCallback((X,ae)=>{Tr(xe=>xe.map(Re=>fd(Re,X)?{...Re,...ae}:Re)),ae.view&&D(tl({...X,...ae}))},[]),Yh=A.useCallback(X=>{const ae=xn.findIndex(xe=>fd(xe,X));ae!==-1&&(Tr(xe=>xe.filter((Re,Se)=>Se!==ae)),Es(X,Mt(b)===Mt(X)))},[xn,Es,b]),Sl=A.useCallback(()=>{ln(!0),mr("files")},[mr]),Eo=A.useCallback(X=>{X==="experiments"?Dr(!1):X==="files"?ln(!1):X==="terminal"?(sn(!1),Zn(null)):on(!1),Es(X,b===X)},[Es,b]),Df=X=>{X.preventDefault(),X.currentTarget.setPointerCapture(X.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const Re=qn,Se=X.clientX,Fe=Ys;let Xe=!1;function Dt(){window.removeEventListener("pointermove",Vn),window.removeEventListener("pointerup",Dt),window.removeEventListener("pointercancel",Dt),document.body.style.userSelect=xe}function Vn(Qr){if(Re){const Kn=Qr.clientX-Se;if(Xe||Knkr+DGn){Kr(!0);return}Kr(!1);const ni=Math.min(Math.max(Xr,Bv),kr);vo(ni)}window.addEventListener("pointermove",Vn),window.addEventListener("pointerup",Dt),window.addEventListener("pointercancel",Dt)},Lf=(X,ae)=>{F(xe=>xe?YM(xe,X):[X]),s.navigate({href:`/projects/${encodeURIComponent(X.id)}${ae?"/settings/git":""}`}),ae&&pn(ae,"error")},js=typeof b=="object"&&"id"in b?b:null,fn=typeof b=="object"&&"path"in b?b:null,Hu=(fn==null?void 0:fn.source)==="artifacts"&&Ae?K0(Ae.entries,fn.path):null,qu=Hu?`${Hu.modifiedAt}:${Hu.size}`:null,Cl=u===Ld&&vt?zn.find(X=>__(X,{path:tw,source:"artifacts"})):void 0,If=Cl?[Cl]:[],fs=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,ys=fs==null?void 0:fs.sessionId,vi=fs==null?void 0:fs.promptId,Uu=!!(ys&&vi&&(y!=null&&y.includes(ys))),No=ut({...il(ys??""),enabled:Uu,subscribed:Uu}),vc=A.useMemo(()=>{var ae;if(!ys||!vi||!No.data)return null;const X=No.data.messages.flatMap(xe=>{const Re=cb(xe.parts,vi);return Re?[Re]:[]})[0];return{key:`${ys}:${vi}`,text:((ae=X==null?void 0:X.prompt)==null?void 0:ae.plan)??null}},[ys,vi,No.data]),es=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,bc=typeof b=="object"&&"code"in b?b:null,ts=bc?xn.find(X=>fd(X,bc))??null:null,Gu=new Map;for(const X of[...yt,...zn,...Ve,...sr,...xn])Gu.set(Mt(X),X);const Vu=Cl?Mt(Cl):null,Ku=Hn.filter(X=>X!==Vu).map(X=>Gu.get(X)).filter(_5n),zo=X=>Ds!==null&&Mt(Ds)===Mt(X),Wu=X=>f.jsx(Fc,{active:fn!==null&&__(fn,X),label:X.path.split("/").pop()||X.path,icon:f.jsx($I,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>mr(X),onPromote:()=>$t(X),onClose:()=>Wh(X)},`file:${SS(X)}`),ga=js?pe.find(X=>X.id===js.id)??null:null,yc=ts?pe.find(X=>X.id===ts.experimentId&&X.branchName===ts.branch)??null:null,$f=X=>{var xe,Re;if("path"in X)return Wu(X);if("id"in X){const Se=pe.find(Fe=>Fe.id===X.id);return f.jsx(Fc,{active:js!==null&&cw(js,X),label:Se?Se.title||Se.slug:"…",icon:X.view==="overview"?f.jsx(Jwn,{size:12,className:"shrink-0"}):f.jsx(lo,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>mr(X),onPromote:()=>$t(X),onClose:()=>xl(X)},Mt(X))}if("kind"in X&&X.kind==="plan")return f.jsx(Fc,{active:fs!==null&&fs.promptId===X.promptId,label:zD(),icon:f.jsx(gS,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>mr(X),onPromote:()=>$t(X),onClose:()=>Mf(X)},Mt(X));if("kind"in X)return f.jsx(Fc,{active:es!==null&&es.spawnPartId===X.spawnPartId,label:((xe=pa[X.spawnPartId])==null?void 0:xe.label)??X.label??x_e(),shimmer:((Re=pa[X.spawnPartId])==null?void 0:Re.running)??!1,icon:f.jsx(yS,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>mr(X),onPromote:()=>$t(X),onClose:()=>Xh(X)},Mt(X));const ae=pe.find(Se=>Se.id===X.experimentId);return f.jsx(Fc,{active:ts!==null&&fd(ts,X),label:(ae==null?void 0:ae.slug)??X.branch,icon:f.jsx(Su,{size:12,className:"shrink-0"}),preview:zo(X),onSelect:()=>mr(X),onPromote:()=>$t(X),onClose:()=>Yh(X)},Mt(X))};if(!a||a.kind==="resume")return null;if(G)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:Jp,children:[f.jsx("p",{children:G}),f.jsx(De,{variant:"primary",onClick:Nf,children:Ws()})]}),e.kind==="ssh"&&f.jsx(P3,{runtime:e,corner:!0})]});if(L&&!Pt)return f.jsxs("div",{className:Jp,children:[ro(),f.jsx(De,{onClick:()=>H(null),children:u0()})]});if(yo&&!Ir)return f.jsxs("div",{className:Jp,children:[f.jsx("p",{role:"alert",children:yo}),f.jsx(De,{onClick:fa,children:Ws()})]});if(L===null||ne===null||!Pu||y===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:Jp,children:f.jsx(zt,{})}),e.kind==="ssh"&&f.jsx(P3,{runtime:e,corner:!0})]});if(!Pt||(a==null?void 0:a.kind)==="task"&&u&&!(y!=null&&y.includes(u)))return f.jsxs("div",{className:Jp,children:[ro(),f.jsx(De,{onClick:()=>H(null),children:u0()})]});const xs=f.jsx(i$n,{projectName:((te=L.find(X=>X.id===n))==null?void 0:te.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>Ss(!0),onRepository:()=>Ha("git"),onCollapse:()=>st(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(f$,{}),e.kind==="local"&&f.jsx(H$,{status:J}),yo&&f.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[f.jsx("span",{children:yo}),f.jsx(De,{onClick:fa,children:Ws()})]}),f.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${Un?"workspace-card-visible":""}`,children:[n&&f.jsx(qLn,{projectId:n,projectName:(Pt==null?void 0:Pt.name)??"",railHeader:xs,railOpen:Wr,onShowRail:()=>st(!0),mainView:o,onSelectMainView:Ha,onOpenFile:gc,onOpenRun:Li,runExperimentName:mc,onOpenExperiment:Tf,experimentName:jf,onOpenPlan:Qh,onOpenSubagent:kl,composerFocusNonce:ar,demoRunningRunId:hr,runtime:e,onOpenDemoWelcome:Pt&&Uc(Pt.id)?xo:void 0,activeSessionId:u,onActiveSessionChange:Fu,preferredAgent:ne.preferredAgent,onPreferredAgentChange:or,children:o==="skills"?f.jsx(zIn,{}):o!=="chat"?f.jsx(iDn,{remote:e.kind==="ssh",tab:o,project:Pt,onProjectUpdate:X=>{F(ae=>ae?YM(ae,X):[X])},onSelectTab:Ha}):null}),o==="chat"&&f.jsx(R7n,{expanded:Un,experiments:pe,runs:He,onOpenExperiment:(X,ae)=>Di(X,"overview","preview",ae),rightOffset:h?Ys+28:void 0,activeView:h&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:Pt.id,onCompute:()=>Ha("compute"),sessionId:u,busy:((ve=w.data)==null?void 0:ve.some(X=>X.id===u&&X.busy))??!1,onChanges:()=>{ir("changes"),Sl()},onFiles:()=>{ir("files"),Sl()},onTerminal:gi,onArtifacts:zs,onExperiments:()=>ha()}),o==="chat"&&h&&f.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 ${qn?"max":""}`,style:qn?void 0:{width:Ys},"data-onboarding":"experiments",children:[f.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 ${qn?"cursor-e-resize":"cursor-col-resize"}`,title:qn?gle():ule(),onPointerDown:Df}),f.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:[f.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:[If.map(Wu),bt&&f.jsx(Fc,{active:b==="files",label:s3(),icon:f.jsx(Su,{size:12,className:"shrink-0"}),onSelect:()=>mr("files"),onClose:()=>Eo("files")}),dr&&f.jsx(Fc,{active:b==="terminal",label:Tv(),icon:f.jsx(lo,{size:12,className:"shrink-0"}),onSelect:()=>mr("terminal"),onClose:()=>Eo("terminal")}),En&&f.jsx(Fc,{active:b==="artifacts",label:bD(),icon:f.jsx(pS,{size:12,className:"shrink-0"}),onSelect:()=>mr("artifacts"),onClose:()=>Eo("artifacts")}),Yn&&f.jsx(Fc,{active:b==="experiments",label:yD(),icon:f.jsx(mh,{size:12,className:"shrink-0"}),onSelect:()=>mr("experiments"),onClose:()=>Eo("experiments")}),Ku.map($f)]}),f.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[f.jsx(It,{title:qn?WE():KE(),"aria-label":qn?WE():KE(),onClick:()=>Kr(X=>!X),children:qn?f.jsx(s3n,{size:14}):f.jsx(t3n,{size:14})}),f.jsx(It,{title:j0(),"aria-label":j0(),onClick:()=>{$(),Kr(!1)},children:f.jsx(ur,{size:14})})]})]}),b==="terminal"&&dr?null:!Ir||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!be||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Me?f.jsx(Aa,{children:f.jsx(zt,{})}):js&&(!ga||_&&!He.some(X=>X.id===_&&X.experimentId===js.id))||bc&&!yc||t&&"sessionId"in t&&t.sessionId&&!(y!=null&&y.includes(t.sessionId))?f.jsx(Aa,{children:f.jsx("div",{className:"p-6 text-subtext",children:ro()})}):b==="artifacts"?f.jsx(Aa,{children:Pt&&f.jsx(bIn,{project:Pt,artifacts:Ae,onOpenFile:Af,canRenameFile:X=>{var ae;return!((ae=_n.current.get(Os(Pt.id,u,{path:X,source:"artifacts"})))!=null&&ae.needsProtection)}},Pt.id)}):b==="experiments"?f.jsxs(Aa,{children:[f.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[f.jsx("span",{className:"flex-1"}),f.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[f.jsxs("div",{className:"option-picker relative inline-flex",ref:Ke,children:[f.jsx(It,{size:"small",ref:gt,className:"experiment-scope-trigger",active:yn==="agent",title:Lle({scope:yn==="agent"?GE():VE()}),"aria-label":cue(),"aria-expanded":Kt,onClick:()=>en(X=>!X),children:f.jsx(D4n,{size:16,strokeWidth:2.5})}),Kt&&f.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:[f.jsxs(Xn,{"aria-pressed":yn==="agent",disabled:!u||!tn,title:u?tn?void 0:pue():jue(),onClick:()=>{St("agent"),en(!1)},children:[f.jsx("span",{children:GE()}),yn==="agent"&&f.jsx(Ai,{size:13})]}),f.jsxs(Xn,{"aria-pressed":yn==="project",onClick:()=>{St("project"),en(!1)},children:[f.jsx("span",{children:VE()}),yn==="project"&&f.jsx(Ai,{size:13})]})]})]}),f.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":qle(),children:[f.jsx("button",{className:Be==="table"?"active":"","aria-pressed":Be==="table",onClick:()=>rt("table"),children:z_e()}),f.jsx("button",{className:Be==="tree"?"active":"","aria-pressed":Be==="tree",onClick:()=>rt("tree"),children:D_e()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:Be==="tree"?Pt&&f.jsx(TGn,{experiments:pe,runs:Pn,project:Pt,onOpenView:Di,onOpenCode:Co,agentSessionId:yn==="agent"?u:null,onShowProjectScope:yl,viewport:mo,onViewportChange:go}):f.jsx(a$n,{runs:Pn,emptyHint:yn==="agent"&&pe.length>0?wue():void 0,experiments:yr,onOpen:(X,ae)=>{Di(X.id,"overview",ae)},onOpenLogs:(X,ae,xe)=>{Di(X,"terminal",xe,ae)},onOpenCode:(X,ae)=>{const xe=pe.find(Re=>Re.id===X);xe&&Co(xe.id,xe.branchName,"files",ae)},onCancel:PL})})]}):b==="files"?f.jsx(Aa,{children:Pt?f.jsx(oIn,{sessionId:u??void 0,project:Pt,view:Vr,toggled:ho,onViewChange:ir,onToggledChange:po,canRenameFile:X=>{var ae;return!((ae=_n.current.get(Os(Pt.id,u,{path:X,source:"repo",sessionId:u??void 0})))!=null&&ae.needsProtection)},onOpenFile:(X,ae,xe,Re)=>So(X,ae,xe,void 0,void 0,void 0,Re)},`files:${u??`project:${Pt.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(Hd,{children:f.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:[f.jsx(BI,{size:22}),f.jsx("p",{children:e_e()})]})})})}):fn?f.jsx(Aa,{children:n&&f.jsx(s$n,{remote:e.kind==="ssh",restored:C.current.has(Os(n,u,fn)),onRestoreActivated:()=>{const X=Os(n,u,fn);C.current.delete(X),N.current.add(X)},showSource:z.current[Os(n,u,fn)]??!1,onShowSourceChange:X=>{z.current[Os(n,u,fn)]=X,j(ae=>ae+1)},projectId:n,path:fn.path,source:fn.source,sessionId:fn.source==="artifacts"?u??void 0:fn.sessionId,gitRef:fn.ref,line:fn.line,branchLabel:MGn(fn,Pt==null?void 0:Pt.baselineBranch),artifactVersion:qu,artifactEntries:fn.source==="artifacts"?Ae==null?void 0:Ae.entries:void 0,bufferSession:wr(Os(n,u,fn)),onOpenFile:(X,ae,xe,Re)=>ti(fn,()=>So(X,ae,xe,void 0,void 0,void 0,Re)),scrollPosition:rr.current.get(Os(n,u,fn)),onScrollPositionChange:X=>{rr.current.set(Os(n,u,fn),X),Bu()},lineScrollRequest:fn.lineScrollRequest,onLineScrollRequestHandled:()=>Rf(fn),onEdit:()=>$t(fn)},Os(n,u,fn))}):fs?f.jsx(Aa,{children:f.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:f.jsx(Jo,{text:(vc==null?void 0:vc.key)===`${fs.sessionId}:${fs.promptId}`?vc.text??ro():((je=Ve.find(X=>X.promptId===fs.promptId))==null?void 0:je.plan)||xD(),onOpenFile:(X,ae,xe,Re,Se)=>ti(fs,()=>So(X,fs.sessionId,Re,ae,xe,void 0,Se))})})}):es?f.jsx(VLn,{projectId:n,sessionId:es.sessionId,spawnPartId:es.spawnPartId,onOpenFile:(X,ae,xe,Re,Se)=>ti(es,()=>gc(X,es.sessionId,ae,xe,Re,Se)),onOpenRun:(X,ae)=>ti(es,()=>Li(X,ae)),runExperimentName:mc,onOpenExperiment:(X,ae)=>ti(es,()=>Tf(X,ae)),experimentName:jf,onOpenSubagent:(X,ae,xe)=>ti(es,()=>kl(es.sessionId,X,ae,xe))},es.spawnPartId):ts?f.jsx(Aa,{children:n&&Pt&&ts&&yc&&f.jsx(aIn,{projectId:n,project:Pt,experiment:yc,view:ts.view,toggled:ts.toggled,onViewChange:X=>ma(ts,{view:X}),onToggledChange:X=>ma(ts,{toggled:X}),onOpenFile:(X,ae,xe,Re)=>ti(ts,()=>So(X,ae,xe,void 0,void 0,yc.branchName,Re))},`code:${ts.branch}`)}):f.jsx(Aa,{children:js&&ga&&Pt&&f.jsx(MIn,{experiment:ga,project:Pt,view:js.view,runs:He,selectedRunId:_,onSelectRun:q,parentExperiment:pe.find(X=>X.id===ga.parentExperimentId)??null,onOpenView:(X,ae,xe)=>{ti(js,()=>Di(ga.id,X,xe,ae))},onOpenCode:(X,ae)=>ti(js,()=>Co(ga.id,ga.branchName,X,ae))},`${js.id}:${js.view}`)}),dr&&gn!==null&&gn===Ps&&Pt&&f.jsx(Aa,{className:b==="terminal"?void 0:"hidden",children:f.jsx(O7n,{projectId:Pt.id,sessionId:u,active:b==="terminal"},Ps)})]})]}),Wt&&f.jsx(_$,{remote:e.kind==="ssh",onClose:()=>Ss(!1),onCreated:(X,ae)=>{Ss(!1),Lf(X,ae)}}),uc&&Pt&&Uc(Pt.id)&&f.jsx(o$n,{onClose:wo,onCreateProject:Mi})]})}const pk=tc()({validateSearch:e=>({pane:xS(e.pane)}),beforeLoad:({location:e})=>{if(!J_(e.pathname))throw AK()},component:$Gn});function $Gn(){const{projectId:e}=pk.useParams(),{pane:n}=pk.useSearch(),t=fi(),r=cD({select:s=>s.location});return A.useEffect(()=>{const s=BGn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),f.jsxs(f.Fragment,{children:[f.jsx(E0,{}),f.jsx(IGn,{projectId:e,pane:n,runtime:i$()},e)]})}function BGn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&xS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const ZU=tc()({component:PGn});function PGn(){const{projectId:e}=ZU.useParams();return f.jsx(nSn,{projectId:e})}const FGn=tc()({}),HGn=tc()({}),qGn=tc()({}),UGn=tc()({}),GGn=sSn.update({id:"/",path:"/",getParentRoute:()=>Pb}),OC=iSn.update({id:"/projects",path:"/projects",getParentRoute:()=>Pb}),VGn=aSn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>Pb}),KGn=oSn.update({id:"/",path:"/",getParentRoute:()=>OC}),Vh=pk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>OC}),WGn=ZU.update({id:"/",path:"/",getParentRoute:()=>Vh}),QGn=FGn.update({id:"/skills",path:"/skills",getParentRoute:()=>Vh}),XGn=HGn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>Vh}),YGn=qGn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>Vh}),ZGn=UGn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>Vh}),JGn={ProjectsProjectIdSkillsRoute:QGn,ProjectsProjectIdIndexRoute:WGn,ProjectsProjectIdSettingsTabRoute:XGn,ProjectsProjectIdTasksSessionIdRoute:YGn,ProjectsProjectIdTasksNewRoute:ZGn},eVn=Vh._addFileChildren(JGn),tVn={ProjectsProjectIdRoute:eVn,ProjectsIndexRoute:KGn},nVn=OC._addFileChildren(tVn),rVn={IndexRoute:GGn,ProjectsRoute:nVn,RemoteLaunchRoute:VGn},sVn=Pb._addFileChildren(rVn)._addFileTypes(),iVn=JW({routeTree:sVn,context:{queryClient:tt},trailingSlash:"never",defaultPendingComponent:c6,defaultErrorComponent:l6,defaultNotFoundComponent:eSn}),aVn=E();document.documentElement.lang=aVn;document.documentElement.dir="ltr";oK.createRoot(document.getElementById("root")).render(f.jsxs(A.StrictMode,{children:[f.jsx(xV,{client:tt,children:f.jsx(nQ,{router:iVn})}),f.jsx(Own,{})]})); diff --git a/ui/dist/index.html b/ui/dist/index.html index e489612d..430567d9 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,7 +49,7 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - + diff --git a/ui/messages/ar.json b/ui/messages/ar.json index cb42f594..9d414807 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -176,6 +176,8 @@ "experiments_table_stop_failed": "فشل الإيقاف:", "file_viewer_binary_file_no_inline_preview": "ملف ثنائي — لا توجد معاينة مضمّنة.", "file_viewer_copy_install_command": "نسخ أمر التثبيت", + "file_viewer_copy_contents": "نسخ محتوى الملف", + "file_viewer_copy_failed": "تعذّر نسخ محتوى الملف", "file_viewer_discard_my_edits_and_reload": "تجاهل تعديلاتي وإعادة التحميل", "file_viewer_dismiss": "تجاهل", "file_viewer_dismiss_compile_message": "تجاهل رسالة التجميع", diff --git a/ui/messages/en.json b/ui/messages/en.json index ca8d163b..ae8380d1 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -176,6 +176,8 @@ "experiments_table_stop_failed": "Stop failed:", "file_viewer_binary_file_no_inline_preview": "Binary file — no inline preview.", "file_viewer_copy_install_command": "Copy install command", + "file_viewer_copy_contents": "Copy file contents", + "file_viewer_copy_failed": "Could not copy file contents", "file_viewer_discard_my_edits_and_reload": "Discard my edits and reload", "file_viewer_dismiss": "Dismiss", "file_viewer_dismiss_compile_message": "Dismiss compile message", diff --git a/ui/messages/es.json b/ui/messages/es.json index 5463fd6a..dab99b46 100644 --- a/ui/messages/es.json +++ b/ui/messages/es.json @@ -176,6 +176,8 @@ "experiments_table_stop_failed": "Error al detener:", "file_viewer_binary_file_no_inline_preview": "Archivo binario — sin vista previa.", "file_viewer_copy_install_command": "Copiar comando de instalación", + "file_viewer_copy_contents": "Copiar contenido del archivo", + "file_viewer_copy_failed": "No se pudo copiar el contenido del archivo", "file_viewer_discard_my_edits_and_reload": "Descartar mis cambios y recargar", "file_viewer_dismiss": "Cerrar", "file_viewer_dismiss_compile_message": "Cerrar mensaje de compilación", diff --git a/ui/messages/fa.json b/ui/messages/fa.json index f5da3d53..63fa0fee 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -176,6 +176,8 @@ "experiments_table_stop_failed": "توقف ناموفق بود:", "file_viewer_binary_file_no_inline_preview": "فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.", "file_viewer_copy_install_command": "کپی فرمان نصب", + "file_viewer_copy_contents": "کپی محتوای فایل", + "file_viewer_copy_failed": "کپی محتوای فایل ممکن نشد", "file_viewer_discard_my_edits_and_reload": "نادیده گرفتن ویرایش‌های من و بارگیری دوباره", "file_viewer_dismiss": "بستن", "file_viewer_dismiss_compile_message": "بستن پیام کامپایل", diff --git a/ui/messages/hi.json b/ui/messages/hi.json index a1142ad4..49d7864e 100644 --- a/ui/messages/hi.json +++ b/ui/messages/hi.json @@ -176,6 +176,8 @@ "experiments_table_stop_failed": "रोकना विफल:", "file_viewer_binary_file_no_inline_preview": "बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।", "file_viewer_copy_install_command": "इंस्टॉल कमांड कॉपी करें", + "file_viewer_copy_contents": "फ़ाइल की सामग्री कॉपी करें", + "file_viewer_copy_failed": "फ़ाइल की सामग्री कॉपी नहीं हो सकी", "file_viewer_discard_my_edits_and_reload": "मेरे बदलाव छोड़ें और फिर से लोड करें", "file_viewer_dismiss": "खारिज करें", "file_viewer_dismiss_compile_message": "कंपाइल संदेश खारिज करें", diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index 4eb6e03f..fa0a1bc3 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -176,6 +176,8 @@ "experiments_table_stop_failed": "停止失败:", "file_viewer_binary_file_no_inline_preview": "二进制文件——无法内嵌预览。", "file_viewer_copy_install_command": "复制安装命令", + "file_viewer_copy_contents": "复制文件内容", + "file_viewer_copy_failed": "无法复制文件内容", "file_viewer_discard_my_edits_and_reload": "放弃我的编辑并重新加载", "file_viewer_dismiss": "关闭", "file_viewer_dismiss_compile_message": "关闭编译消息", diff --git a/ui/src/components/FileViewer.tsx b/ui/src/components/FileViewer.tsx index d5561974..8754a67c 100644 --- a/ui/src/components/FileViewer.tsx +++ b/ui/src/components/FileViewer.tsx @@ -64,7 +64,7 @@ import { HtmlPreview } from "./HtmlPreview"; import { OverleafButton } from "./OverleafPanel"; import { MediaPreview, mediaPreviewKind } from "./MediaPreview"; import { Md } from "./Md"; -import { Button, IconButton, IconButtonLink, Spinner } from "./ui"; +import { Button, IconButton, IconButtonLink, Spinner, showAlert } from "./ui"; export interface FileScrollPosition { top: number; @@ -241,6 +241,8 @@ export function FileViewer({ const saveError = bufferSession.saveError; const setSaveError = bufferSession.setSaveError; const bodyRef = useRef(null); + const selectableContentRef = useRef(null); + const [copiedContents, setCopiedContents] = useState(false); const scrollPositionRef = useRef(scrollPosition); const data = loaded?.file ?? null; // A cited `artifacts/…` file can answer from either name in the checkout, so @@ -395,6 +397,41 @@ export function FileViewer({ const showingEditor = (editable || showingUnsafeDraft) && !(rendersByDefault && !showSource) && !showingPdf; + const canCopyContents = data !== null && !data.notFound && !data.binary && !mediaKind && !showingPdf; + const canSelectContents = canCopyContents && !showingEditor && (!isHtml || showSource); + + const copyContents = async () => { + if (!data) return; + try { + if (data.truncated && !showingEditor) { + // WebKit requires the clipboard write to start during the click. + const content = fetch(rawFileUrl(filePath)).then(async (response) => { + if (!response.ok) throw new Error(); + return new Blob([await response.text()], { type: "text/plain" }); + }); + await navigator.clipboard.write([new ClipboardItem({ "text/plain": content })]); + } else { + await navigator.clipboard.writeText(showingEditor ? draft : data.content); + } + setCopiedContents(true); + window.setTimeout(() => setCopiedContents(false), 1500); + } catch { + showAlert(m.file_viewer_copy_failed(), "error"); + } + }; + + const selectViewerContents = (event: React.KeyboardEvent) => { + if ((!event.metaKey && !event.ctrlKey) || event.altKey || event.shiftKey || event.key.toLowerCase() !== "a") return; + if (!(event.target instanceof Node) || !event.currentTarget.contains(event.target)) return; + const content = selectableContentRef.current; + if (!content) return; + event.preventDefault(); + const range = document.createRange(); + range.selectNodeContents(content); + const selection = window.getSelection(); + selection?.removeAllRanges(); + selection?.addRange(range); + }; // `#toolbar=0` asks the browser's PDF viewer to drop its own chrome, so the // pane shows the document and this view's header owns the controls. @@ -526,7 +563,7 @@ export function FileViewer({ }; return ( -
+
@@ -617,6 +654,17 @@ export function FileViewer({ )} + {canCopyContents && ( + void copyContents()} + > + {copiedContents ? : } + + )} {data != null && ( <> { const position = { top: Math.max(0, event.currentTarget.scrollTop), @@ -820,7 +869,7 @@ export function FileViewer({ downloadBar={false} /> ) : isMarkdown && !showSource ? ( -
+
{artifactsMode ? ( ) : ( <> - +
+ +
{data.truncated && (
{m.file_viewer_file_truncated_showing_the_first_512_kb()}
)}